Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119975
b: refs/heads/master
c: d8a0be6
h: refs/heads/master
i:
  119973: a947a67
  119971: ce6ed3b
  119967: d297662
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Dec 19, 2008
1 parent bea3237 commit 0408180
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3485c82f75eeb951162dda663f45714627a85f5
refs/heads/master: d8a0be6ab7ba1ffa43e7ea0dcdde3e8b68d4f762
5 changes: 5 additions & 0 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,11 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
for (i = 0; i <= h->highest_lun; i++) {
int j;
drv_found = 0;

/* skip holes in the array from already deleted drives */
if (h->drv[i].raid_level == -1)
continue;

for (j = 0; j < num_luns; j++) {
memcpy(&lunid, &ld_buff->LUN[j][0], 4);
lunid = le32_to_cpu(lunid);
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
value = dev->pci_device;
break;
case I915_PARAM_HAS_GEM:
value = dev_priv->has_gem;
value = 1;
break;
default:
DRM_ERROR("Unknown parameter %d\n", param->param);
Expand Down Expand Up @@ -830,14 +830,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)

dev_priv->regs = ioremap(base, size);

#ifdef CONFIG_HIGHMEM64G
/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
dev_priv->has_gem = 0;
#else
/* enable GEM by default */
dev_priv->has_gem = 1;
#endif

i915_gem_load(dev);

/* Init HWS */
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ struct intel_opregion {
typedef struct drm_i915_private {
struct drm_device *dev;

int has_gem;

void __iomem *regs;
drm_local_map_t *sarea;

Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2309,14 +2309,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
}

obj_priv = obj->driver_private;
/* Don't count being on the flushing list against the object being
* done. Otherwise, a buffer left on the flushing list but not getting
* flushed (because nobody's flushing that domain) won't ever return
* unbusy and get reused by libdrm's bo cache. The other expected
* consumer of this interface, OpenGL's occlusion queries, also specs
* that the objects get unbusy "eventually" without any interference.
*/
args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;
args->busy = obj_priv->active;

drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
Expand Down
22 changes: 5 additions & 17 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,15 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
*/

/* IO operations when bitmap is stored near all superblocks */
static struct page *read_sb_page(mddev_t *mddev, long offset,
struct page *page,
unsigned long index, int size)
static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long index)
{
/* choose a good rdev and read the page from there */

mdk_rdev_t *rdev;
struct list_head *tmp;
struct page *page = alloc_page(GFP_KERNEL);
sector_t target;

if (!page)
page = alloc_page(GFP_KERNEL);
if (!page)
return ERR_PTR(-ENOMEM);

Expand All @@ -230,9 +227,7 @@ static struct page *read_sb_page(mddev_t *mddev, long offset,

target = rdev->sb_start + offset + index * (PAGE_SIZE/512);

if (sync_page_io(rdev->bdev, target,
roundup(size, bdev_hardsect_size(rdev->bdev)),
page, READ)) {
if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) {
page->index = index;
attach_page_buffers(page, NULL); /* so that free_buffer will
* quietly no-op */
Expand Down Expand Up @@ -549,9 +544,7 @@ static int bitmap_read_sb(struct bitmap *bitmap)

bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
} else {
bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset,
NULL,
0, sizeof(bitmap_super_t));
bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0);
}
if (IS_ERR(bitmap->sb_page)) {
err = PTR_ERR(bitmap->sb_page);
Expand Down Expand Up @@ -964,16 +957,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
*/
page = bitmap->sb_page;
offset = sizeof(bitmap_super_t);
read_sb_page(bitmap->mddev, bitmap->offset,
page,
index, count);
} else if (file) {
page = read_page(file, index, bitmap, count);
offset = 0;
} else {
page = read_sb_page(bitmap->mddev, bitmap->offset,
NULL,
index, count);
page = read_sb_page(bitmap->mddev, bitmap->offset, index);
offset = 0;
}
if (IS_ERR(page)) { /* read error */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/acpiphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct acpiphp_slot {

u8 device; /* pci device# */

unsigned long long sun; /* ACPI _SUN (slot unique number) */
u32 sun; /* ACPI _SUN (slot unique number) */
u32 flags; /* see below */
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/acpiphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;

acpiphp_slot->slot = slot;
snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);

retval = pci_hp_register(slot->hotplug_slot,
acpiphp_slot->bridge->pci_bus,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)

bridge->nr_slots++;

dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n",
slot->sun, pci_domain_nr(bridge->pci_bus),
bridge->pci_bus->number, slot->device);
retval = acpiphp_register_hotplug_slot(slot);
if (retval) {
if (retval == -EBUSY)
warn("Slot %llu already registered by another "
warn("Slot %d already registered by another "
"hotplug driver\n", slot->sun);
else
warn("acpiphp_register_hotplug_slot failed "
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/pci/hotplug/ibmphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,10 @@ static int __init ibmphp_init(void)
goto error;
}

/* lock ourselves into memory with a module
* count of -1 so that no one can unload us. */
module_put(THIS_MODULE);

exit:
return rc;

Expand All @@ -1419,3 +1423,4 @@ static void __exit ibmphp_exit(void)
}

module_init(ibmphp_init);
module_exit(ibmphp_exit);
23 changes: 11 additions & 12 deletions trunk/drivers/pci/hotplug/pciehp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,19 +432,18 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
goto err_out_release_ctlr;
}

/* Check if slot is occupied */
t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
t_slot->hpc_ops->get_adapter_status(t_slot, &value);
if (value) {
if (pciehp_force)
pciehp_enable_slot(t_slot);
} else {
/* Power off slot if not occupied */
if (POWER_CTRL(ctrl)) {
rc = t_slot->hpc_ops->power_off_slot(t_slot);
if (rc)
goto err_out_free_ctrl_slot;
}

t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
if (value && pciehp_force) {
rc = pciehp_enable_slot(t_slot);
if (rc) /* -ENODEV: shouldn't happen, but deal with it */
value = 0;
}
if ((POWER_CTRL(ctrl)) && !value) {
rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
if (rc)
goto err_out_free_ctrl_slot;
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/pcie/aer/aerdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static void report_resume(struct pci_dev *dev, void *data)

if (!dev->driver ||
!dev->driver->err_handler ||
!dev->driver->err_handler->resume)
!dev->driver->err_handler->slot_reset)
return;

err_handler = dev->driver->err_handler;
Expand Down

0 comments on commit 0408180

Please sign in to comment.