diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 | ||||
-rw-r--r-- | drivers/ide/falconide.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 3 | ||||
-rw-r--r-- | drivers/ide/palm_bk3710.c | 11 | ||||
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 5 | ||||
-rw-r--r-- | drivers/oprofile/cpu_buffer.h | 7 | ||||
-rw-r--r-- | drivers/xen/balloon.c | 8 | ||||
-rw-r--r-- | drivers/xen/xenfs/xenbus.c | 11 |
8 files changed, 36 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 96316fd47233..33fbeb664f08 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3427,7 +3427,7 @@ i915_gem_attach_phys_object(struct drm_device *dev, | |||
3427 | ret = i915_gem_init_phys_object(dev, id, | 3427 | ret = i915_gem_init_phys_object(dev, id, |
3428 | obj->size); | 3428 | obj->size); |
3429 | if (ret) { | 3429 | if (ret) { |
3430 | DRM_ERROR("failed to init phys object %d size: %d\n", id, obj->size); | 3430 | DRM_ERROR("failed to init phys object %d size: %zu\n", id, obj->size); |
3431 | goto out; | 3431 | goto out; |
3432 | } | 3432 | } |
3433 | } | 3433 | } |
diff --git a/drivers/ide/falconide.c b/drivers/ide/falconide.c index a5ba820d69bb..a638e952d67a 100644 --- a/drivers/ide/falconide.c +++ b/drivers/ide/falconide.c | |||
@@ -82,7 +82,7 @@ static const struct ide_tp_ops falconide_tp_ops = { | |||
82 | 82 | ||
83 | static const struct ide_port_info falconide_port_info = { | 83 | static const struct ide_port_info falconide_port_info = { |
84 | .tp_ops = &falconide_tp_ops, | 84 | .tp_ops = &falconide_tp_ops, |
85 | .host_flags = IDE_HFLAG_NO_DMA, | 85 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_SERIALIZE, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static void __init falconide_setup_ports(hw_regs_t *hw) | 88 | static void __init falconide_setup_ports(hw_regs_t *hw) |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 312127ea443a..0db1ed9f5fc2 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -649,7 +649,8 @@ static int ide_register_port(ide_hwif_t *hwif) | |||
649 | /* register with global device tree */ | 649 | /* register with global device tree */ |
650 | dev_set_name(&hwif->gendev, hwif->name); | 650 | dev_set_name(&hwif->gendev, hwif->name); |
651 | hwif->gendev.driver_data = hwif; | 651 | hwif->gendev.driver_data = hwif; |
652 | hwif->gendev.parent = hwif->dev; | 652 | if (hwif->gendev.parent == NULL) |
653 | hwif->gendev.parent = hwif->dev; | ||
653 | hwif->gendev.release = hwif_release_dev; | 654 | hwif->gendev.release = hwif_release_dev; |
654 | 655 | ||
655 | ret = device_register(&hwif->gendev); | 656 | ret = device_register(&hwif->gendev); |
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c index a7ac490c9ae3..f38aac78044c 100644 --- a/drivers/ide/palm_bk3710.c +++ b/drivers/ide/palm_bk3710.c | |||
@@ -346,7 +346,8 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) | |||
346 | { | 346 | { |
347 | struct clk *clk; | 347 | struct clk *clk; |
348 | struct resource *mem, *irq; | 348 | struct resource *mem, *irq; |
349 | unsigned long base, rate; | 349 | void __iomem *base; |
350 | unsigned long rate; | ||
350 | int i, rc; | 351 | int i, rc; |
351 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; | 352 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; |
352 | 353 | ||
@@ -382,11 +383,13 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) | |||
382 | base = IO_ADDRESS(mem->start); | 383 | base = IO_ADDRESS(mem->start); |
383 | 384 | ||
384 | /* Configure the Palm Chip controller */ | 385 | /* Configure the Palm Chip controller */ |
385 | palm_bk3710_chipinit((void __iomem *)base); | 386 | palm_bk3710_chipinit(base); |
386 | 387 | ||
387 | for (i = 0; i < IDE_NR_PORTS - 2; i++) | 388 | for (i = 0; i < IDE_NR_PORTS - 2; i++) |
388 | hw.io_ports_array[i] = base + IDE_PALM_ATA_PRI_REG_OFFSET + i; | 389 | hw.io_ports_array[i] = (unsigned long) |
389 | hw.io_ports.ctl_addr = base + IDE_PALM_ATA_PRI_CTL_OFFSET; | 390 | (base + IDE_PALM_ATA_PRI_REG_OFFSET + i); |
391 | hw.io_ports.ctl_addr = (unsigned long) | ||
392 | (base + IDE_PALM_ATA_PRI_CTL_OFFSET); | ||
390 | hw.irq = irq->start; | 393 | hw.irq = irq->start; |
391 | hw.dev = &pdev->dev; | 394 | hw.dev = &pdev->dev; |
392 | hw.chipset = ide_palm3710; | 395 | hw.chipset = ide_palm3710; |
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 2e03b6d796d3..e76d715e4342 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -393,16 +393,21 @@ oprofile_write_reserve(struct op_entry *entry, struct pt_regs * const regs, | |||
393 | return; | 393 | return; |
394 | 394 | ||
395 | fail: | 395 | fail: |
396 | entry->event = NULL; | ||
396 | cpu_buf->sample_lost_overflow++; | 397 | cpu_buf->sample_lost_overflow++; |
397 | } | 398 | } |
398 | 399 | ||
399 | int oprofile_add_data(struct op_entry *entry, unsigned long val) | 400 | int oprofile_add_data(struct op_entry *entry, unsigned long val) |
400 | { | 401 | { |
402 | if (!entry->event) | ||
403 | return 0; | ||
401 | return op_cpu_buffer_add_data(entry, val); | 404 | return op_cpu_buffer_add_data(entry, val); |
402 | } | 405 | } |
403 | 406 | ||
404 | int oprofile_write_commit(struct op_entry *entry) | 407 | int oprofile_write_commit(struct op_entry *entry) |
405 | { | 408 | { |
409 | if (!entry->event) | ||
410 | return -EINVAL; | ||
406 | return op_cpu_buffer_write_commit(entry); | 411 | return op_cpu_buffer_write_commit(entry); |
407 | } | 412 | } |
408 | 413 | ||
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h index 63f81c44846a..272995d20293 100644 --- a/drivers/oprofile/cpu_buffer.h +++ b/drivers/oprofile/cpu_buffer.h | |||
@@ -66,6 +66,13 @@ static inline void op_cpu_buffer_reset(int cpu) | |||
66 | cpu_buf->last_task = NULL; | 66 | cpu_buf->last_task = NULL; |
67 | } | 67 | } |
68 | 68 | ||
69 | /* | ||
70 | * op_cpu_buffer_add_data() and op_cpu_buffer_write_commit() may be | ||
71 | * called only if op_cpu_buffer_write_reserve() did not return NULL or | ||
72 | * entry->event != NULL, otherwise entry->size or entry->event will be | ||
73 | * used uninitialized. | ||
74 | */ | ||
75 | |||
69 | struct op_sample | 76 | struct op_sample |
70 | *op_cpu_buffer_write_reserve(struct op_entry *entry, unsigned long size); | 77 | *op_cpu_buffer_write_reserve(struct op_entry *entry, unsigned long size); |
71 | int op_cpu_buffer_write_commit(struct op_entry *entry); | 78 | int op_cpu_buffer_write_commit(struct op_entry *entry); |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 8dc7109d61b7..2ba8f95516a0 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -298,6 +298,14 @@ static int decrease_reservation(unsigned long nr_pages) | |||
298 | frame_list[i] = pfn_to_mfn(pfn); | 298 | frame_list[i] = pfn_to_mfn(pfn); |
299 | 299 | ||
300 | scrub_page(page); | 300 | scrub_page(page); |
301 | |||
302 | if (!PageHighMem(page)) { | ||
303 | ret = HYPERVISOR_update_va_mapping( | ||
304 | (unsigned long)__va(pfn << PAGE_SHIFT), | ||
305 | __pte_ma(0), 0); | ||
306 | BUG_ON(ret); | ||
307 | } | ||
308 | |||
301 | } | 309 | } |
302 | 310 | ||
303 | /* Ensure that ballooned highmem pages don't have kmaps. */ | 311 | /* Ensure that ballooned highmem pages don't have kmaps. */ |
diff --git a/drivers/xen/xenfs/xenbus.c b/drivers/xen/xenfs/xenbus.c index 875a4c59c594..a9592d981b10 100644 --- a/drivers/xen/xenfs/xenbus.c +++ b/drivers/xen/xenfs/xenbus.c | |||
@@ -291,7 +291,7 @@ static void watch_fired(struct xenbus_watch *watch, | |||
291 | static int xenbus_write_transaction(unsigned msg_type, | 291 | static int xenbus_write_transaction(unsigned msg_type, |
292 | struct xenbus_file_priv *u) | 292 | struct xenbus_file_priv *u) |
293 | { | 293 | { |
294 | int rc, ret; | 294 | int rc; |
295 | void *reply; | 295 | void *reply; |
296 | struct xenbus_transaction_holder *trans = NULL; | 296 | struct xenbus_transaction_holder *trans = NULL; |
297 | LIST_HEAD(staging_q); | 297 | LIST_HEAD(staging_q); |
@@ -326,15 +326,14 @@ static int xenbus_write_transaction(unsigned msg_type, | |||
326 | } | 326 | } |
327 | 327 | ||
328 | mutex_lock(&u->reply_mutex); | 328 | mutex_lock(&u->reply_mutex); |
329 | ret = queue_reply(&staging_q, &u->u.msg, sizeof(u->u.msg)); | 329 | rc = queue_reply(&staging_q, &u->u.msg, sizeof(u->u.msg)); |
330 | if (!ret) | 330 | if (!rc) |
331 | ret = queue_reply(&staging_q, reply, u->u.msg.len); | 331 | rc = queue_reply(&staging_q, reply, u->u.msg.len); |
332 | if (!ret) { | 332 | if (!rc) { |
333 | list_splice_tail(&staging_q, &u->read_buffers); | 333 | list_splice_tail(&staging_q, &u->read_buffers); |
334 | wake_up(&u->read_waitq); | 334 | wake_up(&u->read_waitq); |
335 | } else { | 335 | } else { |
336 | queue_cleanup(&staging_q); | 336 | queue_cleanup(&staging_q); |
337 | rc = ret; | ||
338 | } | 337 | } |
339 | mutex_unlock(&u->reply_mutex); | 338 | mutex_unlock(&u->reply_mutex); |
340 | 339 | ||