diff options
| -rw-r--r-- | arch/arm/mach-ep93xx/ts72xx.c | 8 | ||||
| -rw-r--r-- | arch/i386/kernel/acpi/earlyquirk.c | 23 | ||||
| -rw-r--r-- | arch/i386/kernel/setup.c | 11 | ||||
| -rw-r--r-- | arch/x86_64/kernel/io_apic.c | 30 | ||||
| -rw-r--r-- | block/as-iosched.c | 13 | ||||
| -rw-r--r-- | block/cfq-iosched.c | 10 | ||||
| -rw-r--r-- | block/deadline-iosched.c | 13 | ||||
| -rw-r--r-- | block/elevator.c | 55 | ||||
| -rw-r--r-- | block/noop-iosched.c | 7 | ||||
| -rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 5 | ||||
| -rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_dma.c | 31 | ||||
| -rw-r--r-- | drivers/video/console/fbcon.c | 2 | ||||
| -rw-r--r-- | fs/debugfs/inode.c | 3 | ||||
| -rw-r--r-- | include/asm-s390/futex.h | 15 | ||||
| -rw-r--r-- | include/linux/elevator.h | 2 | ||||
| -rw-r--r-- | include/linux/mempolicy.h | 1 |
17 files changed, 150 insertions, 87 deletions
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 9be01b0c3f48..e24566b88a78 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
| @@ -111,21 +111,21 @@ static void __init ts72xx_map_io(void) | |||
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static unsigned char ts72xx_rtc_readb(unsigned long addr) | 114 | static unsigned char ts72xx_rtc_readbyte(unsigned long addr) |
| 115 | { | 115 | { |
| 116 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); | 116 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); |
| 117 | return __raw_readb(TS72XX_RTC_DATA_VIRT_BASE); | 117 | return __raw_readb(TS72XX_RTC_DATA_VIRT_BASE); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | static void ts72xx_rtc_writeb(unsigned char value, unsigned long addr) | 120 | static void ts72xx_rtc_writebyte(unsigned char value, unsigned long addr) |
| 121 | { | 121 | { |
| 122 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); | 122 | __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); |
| 123 | __raw_writeb(value, TS72XX_RTC_DATA_VIRT_BASE); | 123 | __raw_writeb(value, TS72XX_RTC_DATA_VIRT_BASE); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | static struct m48t86_ops ts72xx_rtc_ops = { | 126 | static struct m48t86_ops ts72xx_rtc_ops = { |
| 127 | .readb = ts72xx_rtc_readb, | 127 | .readbyte = ts72xx_rtc_readbyte, |
| 128 | .writeb = ts72xx_rtc_writeb, | 128 | .writebyte = ts72xx_rtc_writebyte, |
| 129 | }; | 129 | }; |
| 130 | 130 | ||
| 131 | static struct platform_device ts72xx_rtc_device = { | 131 | static struct platform_device ts72xx_rtc_device = { |
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index 2e3b643a4dc4..1649a175a206 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c | |||
| @@ -5,17 +5,34 @@ | |||
| 5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
| 6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
| 7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
| 8 | #include <linux/acpi.h> | ||
| 9 | |||
| 8 | #include <asm/pci-direct.h> | 10 | #include <asm/pci-direct.h> |
| 9 | #include <asm/acpi.h> | 11 | #include <asm/acpi.h> |
| 10 | #include <asm/apic.h> | 12 | #include <asm/apic.h> |
| 11 | 13 | ||
| 14 | #ifdef CONFIG_ACPI | ||
| 15 | |||
| 16 | static int nvidia_hpet_detected __initdata; | ||
| 17 | |||
| 18 | static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) | ||
| 19 | { | ||
| 20 | nvidia_hpet_detected = 1; | ||
| 21 | return 0; | ||
| 22 | } | ||
| 23 | #endif | ||
| 24 | |||
| 12 | static int __init check_bridge(int vendor, int device) | 25 | static int __init check_bridge(int vendor, int device) |
| 13 | { | 26 | { |
| 14 | #ifdef CONFIG_ACPI | 27 | #ifdef CONFIG_ACPI |
| 15 | /* According to Nvidia all timer overrides are bogus. Just ignore | 28 | /* According to Nvidia all timer overrides are bogus unless HPET |
| 16 | them all. */ | 29 | is enabled. */ |
| 17 | if (vendor == PCI_VENDOR_ID_NVIDIA) { | 30 | if (vendor == PCI_VENDOR_ID_NVIDIA) { |
| 18 | acpi_skip_timer_override = 1; | 31 | nvidia_hpet_detected = 0; |
| 32 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); | ||
| 33 | if (nvidia_hpet_detected == 0) { | ||
| 34 | acpi_skip_timer_override = 1; | ||
| 35 | } | ||
| 19 | } | 36 | } |
| 20 | #endif | 37 | #endif |
| 21 | if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) { | 38 | if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) { |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 846e1639ef7c..dd6b0e3386ce 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
| @@ -1547,15 +1547,18 @@ void __init setup_arch(char **cmdline_p) | |||
| 1547 | if (efi_enabled) | 1547 | if (efi_enabled) |
| 1548 | efi_map_memmap(); | 1548 | efi_map_memmap(); |
| 1549 | 1549 | ||
| 1550 | #ifdef CONFIG_X86_IO_APIC | ||
| 1551 | check_acpi_pci(); /* Checks more than just ACPI actually */ | ||
| 1552 | #endif | ||
| 1553 | |||
| 1554 | #ifdef CONFIG_ACPI | 1550 | #ifdef CONFIG_ACPI |
| 1555 | /* | 1551 | /* |
| 1556 | * Parse the ACPI tables for possible boot-time SMP configuration. | 1552 | * Parse the ACPI tables for possible boot-time SMP configuration. |
| 1557 | */ | 1553 | */ |
| 1558 | acpi_boot_table_init(); | 1554 | acpi_boot_table_init(); |
| 1555 | #endif | ||
| 1556 | |||
| 1557 | #ifdef CONFIG_X86_IO_APIC | ||
| 1558 | check_acpi_pci(); /* Checks more than just ACPI actually */ | ||
| 1559 | #endif | ||
| 1560 | |||
| 1561 | #ifdef CONFIG_ACPI | ||
| 1559 | acpi_boot_init(); | 1562 | acpi_boot_init(); |
| 1560 | 1563 | ||
| 1561 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) | 1564 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 0de3ea938830..9cc7031b7151 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
| @@ -271,6 +271,18 @@ __setup("enable_8254_timer", setup_enable_8254_timer); | |||
| 271 | #include <linux/pci_ids.h> | 271 | #include <linux/pci_ids.h> |
| 272 | #include <linux/pci.h> | 272 | #include <linux/pci.h> |
| 273 | 273 | ||
| 274 | |||
| 275 | #ifdef CONFIG_ACPI | ||
| 276 | |||
| 277 | static int nvidia_hpet_detected __initdata; | ||
| 278 | |||
| 279 | static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) | ||
| 280 | { | ||
| 281 | nvidia_hpet_detected = 1; | ||
| 282 | return 0; | ||
| 283 | } | ||
| 284 | #endif | ||
| 285 | |||
| 274 | /* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC | 286 | /* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC |
| 275 | off. Check for an Nvidia or VIA PCI bridge and turn it off. | 287 | off. Check for an Nvidia or VIA PCI bridge and turn it off. |
| 276 | Use pci direct infrastructure because this runs before the PCI subsystem. | 288 | Use pci direct infrastructure because this runs before the PCI subsystem. |
| @@ -317,11 +329,19 @@ void __init check_ioapic(void) | |||
| 317 | return; | 329 | return; |
| 318 | case PCI_VENDOR_ID_NVIDIA: | 330 | case PCI_VENDOR_ID_NVIDIA: |
| 319 | #ifdef CONFIG_ACPI | 331 | #ifdef CONFIG_ACPI |
| 320 | /* All timer overrides on Nvidia | 332 | /* |
| 321 | seem to be wrong. Skip them. */ | 333 | * All timer overrides on Nvidia are |
| 322 | acpi_skip_timer_override = 1; | 334 | * wrong unless HPET is enabled. |
| 323 | printk(KERN_INFO | 335 | */ |
| 324 | "Nvidia board detected. Ignoring ACPI timer override.\n"); | 336 | nvidia_hpet_detected = 0; |
| 337 | acpi_table_parse(ACPI_HPET, | ||
| 338 | nvidia_hpet_check); | ||
| 339 | if (nvidia_hpet_detected == 0) { | ||
| 340 | acpi_skip_timer_override = 1; | ||
| 341 | printk(KERN_INFO "Nvidia board " | ||
| 342 | "detected. Ignoring ACPI " | ||
| 343 | "timer override.\n"); | ||
| 344 | } | ||
| 325 | #endif | 345 | #endif |
| 326 | /* RED-PEN skip them on mptables too? */ | 346 | /* RED-PEN skip them on mptables too? */ |
| 327 | return; | 347 | return; |
diff --git a/block/as-iosched.c b/block/as-iosched.c index e25a5d79ab27..a7caf35ca0c2 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c | |||
| @@ -1648,17 +1648,17 @@ static void as_exit_queue(elevator_t *e) | |||
| 1648 | * initialize elevator private data (as_data), and alloc a arq for | 1648 | * initialize elevator private data (as_data), and alloc a arq for |
| 1649 | * each request on the free lists | 1649 | * each request on the free lists |
| 1650 | */ | 1650 | */ |
| 1651 | static int as_init_queue(request_queue_t *q, elevator_t *e) | 1651 | static void *as_init_queue(request_queue_t *q, elevator_t *e) |
| 1652 | { | 1652 | { |
| 1653 | struct as_data *ad; | 1653 | struct as_data *ad; |
| 1654 | int i; | 1654 | int i; |
| 1655 | 1655 | ||
| 1656 | if (!arq_pool) | 1656 | if (!arq_pool) |
| 1657 | return -ENOMEM; | 1657 | return NULL; |
| 1658 | 1658 | ||
| 1659 | ad = kmalloc_node(sizeof(*ad), GFP_KERNEL, q->node); | 1659 | ad = kmalloc_node(sizeof(*ad), GFP_KERNEL, q->node); |
| 1660 | if (!ad) | 1660 | if (!ad) |
| 1661 | return -ENOMEM; | 1661 | return NULL; |
| 1662 | memset(ad, 0, sizeof(*ad)); | 1662 | memset(ad, 0, sizeof(*ad)); |
| 1663 | 1663 | ||
| 1664 | ad->q = q; /* Identify what queue the data belongs to */ | 1664 | ad->q = q; /* Identify what queue the data belongs to */ |
| @@ -1667,7 +1667,7 @@ static int as_init_queue(request_queue_t *q, elevator_t *e) | |||
| 1667 | GFP_KERNEL, q->node); | 1667 | GFP_KERNEL, q->node); |
| 1668 | if (!ad->hash) { | 1668 | if (!ad->hash) { |
| 1669 | kfree(ad); | 1669 | kfree(ad); |
| 1670 | return -ENOMEM; | 1670 | return NULL; |
| 1671 | } | 1671 | } |
| 1672 | 1672 | ||
| 1673 | ad->arq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab, | 1673 | ad->arq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab, |
| @@ -1675,7 +1675,7 @@ static int as_init_queue(request_queue_t *q, elevator_t *e) | |||
| 1675 | if (!ad->arq_pool) { | 1675 | if (!ad->arq_pool) { |
| 1676 | kfree(ad->hash); | 1676 | kfree(ad->hash); |
| 1677 | kfree(ad); | 1677 | kfree(ad); |
| 1678 | return -ENOMEM; | 1678 | return NULL; |
| 1679 | } | 1679 | } |
| 1680 | 1680 | ||
| 1681 | /* anticipatory scheduling helpers */ | 1681 | /* anticipatory scheduling helpers */ |
| @@ -1696,14 +1696,13 @@ static int as_init_queue(request_queue_t *q, elevator_t *e) | |||
| 1696 | ad->antic_expire = default_antic_expire; | 1696 | ad->antic_expire = default_antic_expire; |
| 1697 | ad->batch_expire[REQ_SYNC] = default_read_batch_expire; | 1697 | ad->batch_expire[REQ_SYNC] = default_read_batch_expire; |
| 1698 | ad->batch_expire[REQ_ASYNC] = default_write_batch_expire; | 1698 | ad->batch_expire[REQ_ASYNC] = default_write_batch_expire; |
| 1699 | e->elevator_data = ad; | ||
| 1700 | 1699 | ||
| 1701 | ad->current_batch_expires = jiffies + ad->batch_expire[REQ_SYNC]; | 1700 | ad->current_batch_expires = jiffies + ad->batch_expire[REQ_SYNC]; |
| 1702 | ad->write_batch_count = ad->batch_expire[REQ_ASYNC] / 10; | 1701 | ad->write_batch_count = ad->batch_expire[REQ_ASYNC] / 10; |
| 1703 | if (ad->write_batch_count < 2) | 1702 | if (ad->write_batch_count < 2) |
| 1704 | ad->write_batch_count = 2; | 1703 | ad->write_batch_count = 2; |
| 1705 | 1704 | ||
| 1706 | return 0; | 1705 | return ad; |
| 1707 | } | 1706 | } |
| 1708 | 1707 | ||
| 1709 | /* | 1708 | /* |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 8e9d84825e1c..a46d030e092a 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
| @@ -2251,14 +2251,14 @@ static void cfq_exit_queue(elevator_t *e) | |||
| 2251 | kfree(cfqd); | 2251 | kfree(cfqd); |
| 2252 | } | 2252 | } |
| 2253 | 2253 | ||
| 2254 | static int cfq_init_queue(request_queue_t *q, elevator_t *e) | 2254 | static void *cfq_init_queue(request_queue_t *q, elevator_t *e) |
| 2255 | { | 2255 | { |
| 2256 | struct cfq_data *cfqd; | 2256 | struct cfq_data *cfqd; |
| 2257 | int i; | 2257 | int i; |
| 2258 | 2258 | ||
| 2259 | cfqd = kmalloc(sizeof(*cfqd), GFP_KERNEL); | 2259 | cfqd = kmalloc(sizeof(*cfqd), GFP_KERNEL); |
| 2260 | if (!cfqd) | 2260 | if (!cfqd) |
| 2261 | return -ENOMEM; | 2261 | return NULL; |
| 2262 | 2262 | ||
| 2263 | memset(cfqd, 0, sizeof(*cfqd)); | 2263 | memset(cfqd, 0, sizeof(*cfqd)); |
| 2264 | 2264 | ||
| @@ -2288,8 +2288,6 @@ static int cfq_init_queue(request_queue_t *q, elevator_t *e) | |||
| 2288 | for (i = 0; i < CFQ_QHASH_ENTRIES; i++) | 2288 | for (i = 0; i < CFQ_QHASH_ENTRIES; i++) |
| 2289 | INIT_HLIST_HEAD(&cfqd->cfq_hash[i]); | 2289 | INIT_HLIST_HEAD(&cfqd->cfq_hash[i]); |
| 2290 | 2290 | ||
| 2291 | e->elevator_data = cfqd; | ||
| 2292 | |||
| 2293 | cfqd->queue = q; | 2291 | cfqd->queue = q; |
| 2294 | 2292 | ||
| 2295 | cfqd->max_queued = q->nr_requests / 4; | 2293 | cfqd->max_queued = q->nr_requests / 4; |
| @@ -2316,14 +2314,14 @@ static int cfq_init_queue(request_queue_t *q, elevator_t *e) | |||
| 2316 | cfqd->cfq_slice_async_rq = cfq_slice_async_rq; | 2314 | cfqd->cfq_slice_async_rq = cfq_slice_async_rq; |
| 2317 | cfqd->cfq_slice_idle = cfq_slice_idle; | 2315 | cfqd->cfq_slice_idle = cfq_slice_idle; |
| 2318 | 2316 | ||
| 2319 | return 0; | 2317 | return cfqd; |
| 2320 | out_crqpool: | 2318 | out_crqpool: |
| 2321 | kfree(cfqd->cfq_hash); | 2319 | kfree(cfqd->cfq_hash); |
| 2322 | out_cfqhash: | 2320 | out_cfqhash: |
| 2323 | kfree(cfqd->crq_hash); | 2321 | kfree(cfqd->crq_hash); |
| 2324 | out_crqhash: | 2322 | out_crqhash: |
| 2325 | kfree(cfqd); | 2323 | kfree(cfqd); |
| 2326 | return -ENOMEM; | 2324 | return NULL; |
| 2327 | } | 2325 | } |
| 2328 | 2326 | ||
| 2329 | static void cfq_slab_kill(void) | 2327 | static void cfq_slab_kill(void) |
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index 399fa1e60e1f..3bd0415a9828 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c | |||
| @@ -613,24 +613,24 @@ static void deadline_exit_queue(elevator_t *e) | |||
| 613 | * initialize elevator private data (deadline_data), and alloc a drq for | 613 | * initialize elevator private data (deadline_data), and alloc a drq for |
| 614 | * each request on the free lists | 614 | * each request on the free lists |
| 615 | */ | 615 | */ |
| 616 | static int deadline_init_queue(request_queue_t *q, elevator_t *e) | 616 | static void *deadline_init_queue(request_queue_t *q, elevator_t *e) |
| 617 | { | 617 | { |
| 618 | struct deadline_data *dd; | 618 | struct deadline_data *dd; |
| 619 | int i; | 619 | int i; |
| 620 | 620 | ||
| 621 | if (!drq_pool) | 621 | if (!drq_pool) |
| 622 | return -ENOMEM; | 622 | return NULL; |
| 623 | 623 | ||
| 624 | dd = kmalloc_node(sizeof(*dd), GFP_KERNEL, q->node); | 624 | dd = kmalloc_node(sizeof(*dd), GFP_KERNEL, q->node); |
| 625 | if (!dd) | 625 | if (!dd) |
| 626 | return -ENOMEM; | 626 | return NULL; |
| 627 | memset(dd, 0, sizeof(*dd)); | 627 | memset(dd, 0, sizeof(*dd)); |
| 628 | 628 | ||
| 629 | dd->hash = kmalloc_node(sizeof(struct list_head)*DL_HASH_ENTRIES, | 629 | dd->hash = kmalloc_node(sizeof(struct list_head)*DL_HASH_ENTRIES, |
| 630 | GFP_KERNEL, q->node); | 630 | GFP_KERNEL, q->node); |
| 631 | if (!dd->hash) { | 631 | if (!dd->hash) { |
| 632 | kfree(dd); | 632 | kfree(dd); |
| 633 | return -ENOMEM; | 633 | return NULL; |
| 634 | } | 634 | } |
| 635 | 635 | ||
| 636 | dd->drq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab, | 636 | dd->drq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab, |
| @@ -638,7 +638,7 @@ static int deadline_init_queue(request_queue_t *q, elevator_t *e) | |||
| 638 | if (!dd->drq_pool) { | 638 | if (!dd->drq_pool) { |
| 639 | kfree(dd->hash); | 639 | kfree(dd->hash); |
| 640 | kfree(dd); | 640 | kfree(dd); |
| 641 | return -ENOMEM; | 641 | return NULL; |
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | for (i = 0; i < DL_HASH_ENTRIES; i++) | 644 | for (i = 0; i < DL_HASH_ENTRIES; i++) |
| @@ -653,8 +653,7 @@ static int deadline_init_queue(request_queue_t *q, elevator_t *e) | |||
| 653 | dd->writes_starved = writes_starved; | 653 | dd->writes_starved = writes_starved; |
| 654 | dd->front_merges = 1; | 654 | dd->front_merges = 1; |
| 655 | dd->fifo_batch = fifo_batch; | 655 | dd->fifo_batch = fifo_batch; |
| 656 | e->elevator_data = dd; | 656 | return dd; |
| 657 | return 0; | ||
| 658 | } | 657 | } |
| 659 | 658 | ||
| 660 | static void deadline_put_request(request_queue_t *q, struct request *rq) | 659 | static void deadline_put_request(request_queue_t *q, struct request *rq) |
diff --git a/block/elevator.c b/block/elevator.c index 8768a367fdde..a0afdd317cef 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
| @@ -121,16 +121,16 @@ static struct elevator_type *elevator_get(const char *name) | |||
| 121 | return e; | 121 | return e; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static int elevator_attach(request_queue_t *q, struct elevator_queue *eq) | 124 | static void *elevator_init_queue(request_queue_t *q, struct elevator_queue *eq) |
| 125 | { | 125 | { |
| 126 | int ret = 0; | 126 | return eq->ops->elevator_init_fn(q, eq); |
| 127 | } | ||
| 127 | 128 | ||
| 129 | static void elevator_attach(request_queue_t *q, struct elevator_queue *eq, | ||
| 130 | void *data) | ||
| 131 | { | ||
| 128 | q->elevator = eq; | 132 | q->elevator = eq; |
| 129 | 133 | eq->elevator_data = data; | |
| 130 | if (eq->ops->elevator_init_fn) | ||
| 131 | ret = eq->ops->elevator_init_fn(q, eq); | ||
| 132 | |||
| 133 | return ret; | ||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static char chosen_elevator[16]; | 136 | static char chosen_elevator[16]; |
| @@ -181,6 +181,7 @@ int elevator_init(request_queue_t *q, char *name) | |||
| 181 | struct elevator_type *e = NULL; | 181 | struct elevator_type *e = NULL; |
| 182 | struct elevator_queue *eq; | 182 | struct elevator_queue *eq; |
| 183 | int ret = 0; | 183 | int ret = 0; |
| 184 | void *data; | ||
| 184 | 185 | ||
| 185 | INIT_LIST_HEAD(&q->queue_head); | 186 | INIT_LIST_HEAD(&q->queue_head); |
| 186 | q->last_merge = NULL; | 187 | q->last_merge = NULL; |
| @@ -202,10 +203,13 @@ int elevator_init(request_queue_t *q, char *name) | |||
| 202 | if (!eq) | 203 | if (!eq) |
| 203 | return -ENOMEM; | 204 | return -ENOMEM; |
| 204 | 205 | ||
| 205 | ret = elevator_attach(q, eq); | 206 | data = elevator_init_queue(q, eq); |
| 206 | if (ret) | 207 | if (!data) { |
| 207 | kobject_put(&eq->kobj); | 208 | kobject_put(&eq->kobj); |
| 209 | return -ENOMEM; | ||
| 210 | } | ||
| 208 | 211 | ||
| 212 | elevator_attach(q, eq, data); | ||
| 209 | return ret; | 213 | return ret; |
| 210 | } | 214 | } |
| 211 | 215 | ||
| @@ -722,13 +726,16 @@ int elv_register_queue(struct request_queue *q) | |||
| 722 | return error; | 726 | return error; |
| 723 | } | 727 | } |
| 724 | 728 | ||
| 729 | static void __elv_unregister_queue(elevator_t *e) | ||
| 730 | { | ||
| 731 | kobject_uevent(&e->kobj, KOBJ_REMOVE); | ||
| 732 | kobject_del(&e->kobj); | ||
| 733 | } | ||
| 734 | |||
| 725 | void elv_unregister_queue(struct request_queue *q) | 735 | void elv_unregister_queue(struct request_queue *q) |
| 726 | { | 736 | { |
| 727 | if (q) { | 737 | if (q) |
| 728 | elevator_t *e = q->elevator; | 738 | __elv_unregister_queue(q->elevator); |
| 729 | kobject_uevent(&e->kobj, KOBJ_REMOVE); | ||
| 730 | kobject_del(&e->kobj); | ||
| 731 | } | ||
| 732 | } | 739 | } |
| 733 | 740 | ||
| 734 | int elv_register(struct elevator_type *e) | 741 | int elv_register(struct elevator_type *e) |
| @@ -780,6 +787,7 @@ EXPORT_SYMBOL_GPL(elv_unregister); | |||
| 780 | static int elevator_switch(request_queue_t *q, struct elevator_type *new_e) | 787 | static int elevator_switch(request_queue_t *q, struct elevator_type *new_e) |
| 781 | { | 788 | { |
| 782 | elevator_t *old_elevator, *e; | 789 | elevator_t *old_elevator, *e; |
| 790 | void *data; | ||
| 783 | 791 | ||
| 784 | /* | 792 | /* |
| 785 | * Allocate new elevator | 793 | * Allocate new elevator |
| @@ -788,6 +796,12 @@ static int elevator_switch(request_queue_t *q, struct elevator_type *new_e) | |||
| 788 | if (!e) | 796 | if (!e) |
| 789 | return 0; | 797 | return 0; |
| 790 | 798 | ||
| 799 | data = elevator_init_queue(q, e); | ||
| 800 | if (!data) { | ||
| 801 | kobject_put(&e->kobj); | ||
| 802 | return 0; | ||
| 803 | } | ||
| 804 | |||
| 791 | /* | 805 | /* |
| 792 | * Turn on BYPASS and drain all requests w/ elevator private data | 806 | * Turn on BYPASS and drain all requests w/ elevator private data |
| 793 | */ | 807 | */ |
| @@ -806,19 +820,19 @@ static int elevator_switch(request_queue_t *q, struct elevator_type *new_e) | |||
| 806 | elv_drain_elevator(q); | 820 | elv_drain_elevator(q); |
| 807 | } | 821 | } |
| 808 | 822 | ||
| 809 | spin_unlock_irq(q->queue_lock); | ||
| 810 | |||
| 811 | /* | 823 | /* |
| 812 | * unregister old elevator data | 824 | * Remember old elevator. |
| 813 | */ | 825 | */ |
| 814 | elv_unregister_queue(q); | ||
| 815 | old_elevator = q->elevator; | 826 | old_elevator = q->elevator; |
| 816 | 827 | ||
| 817 | /* | 828 | /* |
| 818 | * attach and start new elevator | 829 | * attach and start new elevator |
| 819 | */ | 830 | */ |
| 820 | if (elevator_attach(q, e)) | 831 | elevator_attach(q, e, data); |
| 821 | goto fail; | 832 | |
| 833 | spin_unlock_irq(q->queue_lock); | ||
| 834 | |||
| 835 | __elv_unregister_queue(old_elevator); | ||
| 822 | 836 | ||
| 823 | if (elv_register_queue(q)) | 837 | if (elv_register_queue(q)) |
| 824 | goto fail_register; | 838 | goto fail_register; |
| @@ -837,7 +851,6 @@ fail_register: | |||
| 837 | */ | 851 | */ |
| 838 | elevator_exit(e); | 852 | elevator_exit(e); |
| 839 | e = NULL; | 853 | e = NULL; |
| 840 | fail: | ||
| 841 | q->elevator = old_elevator; | 854 | q->elevator = old_elevator; |
| 842 | elv_register_queue(q); | 855 | elv_register_queue(q); |
| 843 | clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags); | 856 | clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags); |
diff --git a/block/noop-iosched.c b/block/noop-iosched.c index f370e4a7fe6d..56a7c620574f 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c | |||
| @@ -65,16 +65,15 @@ noop_latter_request(request_queue_t *q, struct request *rq) | |||
| 65 | return list_entry(rq->queuelist.next, struct request, queuelist); | 65 | return list_entry(rq->queuelist.next, struct request, queuelist); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | static int noop_init_queue(request_queue_t *q, elevator_t *e) | 68 | static void *noop_init_queue(request_queue_t *q, elevator_t *e) |
| 69 | { | 69 | { |
| 70 | struct noop_data *nd; | 70 | struct noop_data *nd; |
| 71 | 71 | ||
| 72 | nd = kmalloc(sizeof(*nd), GFP_KERNEL); | 72 | nd = kmalloc(sizeof(*nd), GFP_KERNEL); |
| 73 | if (!nd) | 73 | if (!nd) |
| 74 | return -ENOMEM; | 74 | return NULL; |
| 75 | INIT_LIST_HEAD(&nd->queue); | 75 | INIT_LIST_HEAD(&nd->queue); |
| 76 | e->elevator_data = nd; | 76 | return nd; |
| 77 | return 0; | ||
| 78 | } | 77 | } |
| 79 | 78 | ||
| 80 | static void noop_exit_queue(elevator_t *e) | 79 | static void noop_exit_queue(elevator_t *e) |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index ecccca35c6f4..d1c705b412c2 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
| @@ -870,13 +870,16 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
| 870 | *data = 0; | 870 | *data = 0; |
| 871 | 871 | ||
| 872 | /* Hook up test interrupt handler just for this test */ | 872 | /* Hook up test interrupt handler just for this test */ |
| 873 | if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) { | 873 | if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name, |
| 874 | netdev)) { | ||
| 874 | shared_int = FALSE; | 875 | shared_int = FALSE; |
| 875 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, | 876 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, |
| 876 | netdev->name, netdev)){ | 877 | netdev->name, netdev)){ |
| 877 | *data = 1; | 878 | *data = 1; |
| 878 | return -1; | 879 | return -1; |
| 879 | } | 880 | } |
| 881 | DPRINTK(PROBE,INFO, "testing %s interrupt\n", | ||
| 882 | (shared_int ? "shared" : "unshared")); | ||
| 880 | 883 | ||
| 881 | /* Disable all the interrupts */ | 884 | /* Disable all the interrupts */ |
| 882 | E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF); | 885 | E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF); |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index ed15fcaedaf9..97e71a4fe8eb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
| @@ -3519,7 +3519,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
| 3519 | buffer_info = &rx_ring->buffer_info[i]; | 3519 | buffer_info = &rx_ring->buffer_info[i]; |
| 3520 | 3520 | ||
| 3521 | while (rx_desc->status & E1000_RXD_STAT_DD) { | 3521 | while (rx_desc->status & E1000_RXD_STAT_DD) { |
| 3522 | struct sk_buff *skb, *next_skb; | 3522 | struct sk_buff *skb; |
| 3523 | u8 status; | 3523 | u8 status; |
| 3524 | #ifdef CONFIG_E1000_NAPI | 3524 | #ifdef CONFIG_E1000_NAPI |
| 3525 | if (*work_done >= work_to_do) | 3525 | if (*work_done >= work_to_do) |
| @@ -3537,8 +3537,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
| 3537 | prefetch(next_rxd); | 3537 | prefetch(next_rxd); |
| 3538 | 3538 | ||
| 3539 | next_buffer = &rx_ring->buffer_info[i]; | 3539 | next_buffer = &rx_ring->buffer_info[i]; |
| 3540 | next_skb = next_buffer->skb; | ||
| 3541 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
| 3542 | 3540 | ||
| 3543 | cleaned = TRUE; | 3541 | cleaned = TRUE; |
| 3544 | cleaned_count++; | 3542 | cleaned_count++; |
| @@ -3668,7 +3666,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
| 3668 | struct e1000_buffer *buffer_info, *next_buffer; | 3666 | struct e1000_buffer *buffer_info, *next_buffer; |
| 3669 | struct e1000_ps_page *ps_page; | 3667 | struct e1000_ps_page *ps_page; |
| 3670 | struct e1000_ps_page_dma *ps_page_dma; | 3668 | struct e1000_ps_page_dma *ps_page_dma; |
| 3671 | struct sk_buff *skb, *next_skb; | 3669 | struct sk_buff *skb; |
| 3672 | unsigned int i, j; | 3670 | unsigned int i, j; |
| 3673 | uint32_t length, staterr; | 3671 | uint32_t length, staterr; |
| 3674 | int cleaned_count = 0; | 3672 | int cleaned_count = 0; |
| @@ -3697,8 +3695,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
| 3697 | prefetch(next_rxd); | 3695 | prefetch(next_rxd); |
| 3698 | 3696 | ||
| 3699 | next_buffer = &rx_ring->buffer_info[i]; | 3697 | next_buffer = &rx_ring->buffer_info[i]; |
| 3700 | next_skb = next_buffer->skb; | ||
| 3701 | prefetch(next_skb->data - NET_IP_ALIGN); | ||
| 3702 | 3698 | ||
| 3703 | cleaned = TRUE; | 3699 | cleaned = TRUE; |
| 3704 | cleaned_count++; | 3700 | cleaned_count++; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index bbecba02e697..d0318e525ba7 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c | |||
| @@ -624,25 +624,28 @@ err_destroy_tx0: | |||
| 624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, | 624 | static u16 generate_cookie(struct bcm43xx_dmaring *ring, |
| 625 | int slot) | 625 | int slot) |
| 626 | { | 626 | { |
| 627 | u16 cookie = 0x0000; | 627 | u16 cookie = 0xF000; |
| 628 | 628 | ||
| 629 | /* Use the upper 4 bits of the cookie as | 629 | /* Use the upper 4 bits of the cookie as |
| 630 | * DMA controller ID and store the slot number | 630 | * DMA controller ID and store the slot number |
| 631 | * in the lower 12 bits | 631 | * in the lower 12 bits. |
| 632 | * Note that the cookie must never be 0, as this | ||
| 633 | * is a special value used in RX path. | ||
| 632 | */ | 634 | */ |
| 633 | switch (ring->mmio_base) { | 635 | switch (ring->mmio_base) { |
| 634 | default: | 636 | default: |
| 635 | assert(0); | 637 | assert(0); |
| 636 | case BCM43xx_MMIO_DMA1_BASE: | 638 | case BCM43xx_MMIO_DMA1_BASE: |
| 639 | cookie = 0xA000; | ||
| 637 | break; | 640 | break; |
| 638 | case BCM43xx_MMIO_DMA2_BASE: | 641 | case BCM43xx_MMIO_DMA2_BASE: |
| 639 | cookie = 0x1000; | 642 | cookie = 0xB000; |
| 640 | break; | 643 | break; |
| 641 | case BCM43xx_MMIO_DMA3_BASE: | 644 | case BCM43xx_MMIO_DMA3_BASE: |
| 642 | cookie = 0x2000; | 645 | cookie = 0xC000; |
| 643 | break; | 646 | break; |
| 644 | case BCM43xx_MMIO_DMA4_BASE: | 647 | case BCM43xx_MMIO_DMA4_BASE: |
| 645 | cookie = 0x3000; | 648 | cookie = 0xD000; |
| 646 | break; | 649 | break; |
| 647 | } | 650 | } |
| 648 | assert(((u16)slot & 0xF000) == 0x0000); | 651 | assert(((u16)slot & 0xF000) == 0x0000); |
| @@ -660,16 +663,16 @@ struct bcm43xx_dmaring * parse_cookie(struct bcm43xx_private *bcm, | |||
| 660 | struct bcm43xx_dmaring *ring = NULL; | 663 | struct bcm43xx_dmaring *ring = NULL; |
| 661 | 664 | ||
| 662 | switch (cookie & 0xF000) { | 665 | switch (cookie & 0xF000) { |
| 663 | case 0x0000: | 666 | case 0xA000: |
| 664 | ring = dma->tx_ring0; | 667 | ring = dma->tx_ring0; |
| 665 | break; | 668 | break; |
| 666 | case 0x1000: | 669 | case 0xB000: |
| 667 | ring = dma->tx_ring1; | 670 | ring = dma->tx_ring1; |
| 668 | break; | 671 | break; |
| 669 | case 0x2000: | 672 | case 0xC000: |
| 670 | ring = dma->tx_ring2; | 673 | ring = dma->tx_ring2; |
| 671 | break; | 674 | break; |
| 672 | case 0x3000: | 675 | case 0xD000: |
| 673 | ring = dma->tx_ring3; | 676 | ring = dma->tx_ring3; |
| 674 | break; | 677 | break; |
| 675 | default: | 678 | default: |
| @@ -839,8 +842,18 @@ static void dma_rx(struct bcm43xx_dmaring *ring, | |||
| 839 | /* We received an xmit status. */ | 842 | /* We received an xmit status. */ |
| 840 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; | 843 | struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; |
| 841 | struct bcm43xx_xmitstatus stat; | 844 | struct bcm43xx_xmitstatus stat; |
| 845 | int i = 0; | ||
| 842 | 846 | ||
| 843 | stat.cookie = le16_to_cpu(hw->cookie); | 847 | stat.cookie = le16_to_cpu(hw->cookie); |
| 848 | while (stat.cookie == 0) { | ||
| 849 | if (unlikely(++i >= 10000)) { | ||
| 850 | assert(0); | ||
| 851 | break; | ||
| 852 | } | ||
| 853 | udelay(2); | ||
| 854 | barrier(); | ||
| 855 | stat.cookie = le16_to_cpu(hw->cookie); | ||
| 856 | } | ||
| 844 | stat.flags = hw->flags; | 857 | stat.flags = hw->flags; |
| 845 | stat.cnt1 = hw->cnt1; | 858 | stat.cnt1 = hw->cnt1; |
| 846 | stat.cnt2 = hw->cnt2; | 859 | stat.cnt2 = hw->cnt2; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 953eb8c171d6..47ba1a79adcd 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
| @@ -1745,7 +1745,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, | |||
| 1745 | fbcon_redraw_move(vc, p, 0, t, count); | 1745 | fbcon_redraw_move(vc, p, 0, t, count); |
| 1746 | ypan_up_redraw(vc, t, count); | 1746 | ypan_up_redraw(vc, t, count); |
| 1747 | if (vc->vc_rows - b > 0) | 1747 | if (vc->vc_rows - b > 0) |
| 1748 | fbcon_redraw_move(vc, p, b - count, | 1748 | fbcon_redraw_move(vc, p, b, |
| 1749 | vc->vc_rows - b, b); | 1749 | vc->vc_rows - b, b); |
| 1750 | } else | 1750 | } else |
| 1751 | fbcon_redraw_move(vc, p, t + count, b - t - count, t); | 1751 | fbcon_redraw_move(vc, p, t + count, b - t - count, t); |
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 85d166cdcae4..b55b4ea9a676 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -67,12 +67,13 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d | |||
| 67 | static int debugfs_mknod(struct inode *dir, struct dentry *dentry, | 67 | static int debugfs_mknod(struct inode *dir, struct dentry *dentry, |
| 68 | int mode, dev_t dev) | 68 | int mode, dev_t dev) |
| 69 | { | 69 | { |
| 70 | struct inode *inode = debugfs_get_inode(dir->i_sb, mode, dev); | 70 | struct inode *inode; |
| 71 | int error = -EPERM; | 71 | int error = -EPERM; |
| 72 | 72 | ||
| 73 | if (dentry->d_inode) | 73 | if (dentry->d_inode) |
| 74 | return -EEXIST; | 74 | return -EEXIST; |
| 75 | 75 | ||
| 76 | inode = debugfs_get_inode(dir->i_sb, mode, dev); | ||
| 76 | if (inode) { | 77 | if (inode) { |
| 77 | d_instantiate(dentry, inode); | 78 | d_instantiate(dentry, inode); |
| 78 | dget(dentry); | 79 | dget(dentry); |
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h index 40c25e166a9b..1802775568b9 100644 --- a/include/asm-s390/futex.h +++ b/include/asm-s390/futex.h | |||
| @@ -11,23 +11,24 @@ | |||
| 11 | #define __futex_atomic_fixup \ | 11 | #define __futex_atomic_fixup \ |
| 12 | ".section __ex_table,\"a\"\n" \ | 12 | ".section __ex_table,\"a\"\n" \ |
| 13 | " .align 4\n" \ | 13 | " .align 4\n" \ |
| 14 | " .long 0b,2b,1b,2b\n" \ | 14 | " .long 0b,4b,2b,4b,3b,4b\n" \ |
| 15 | ".previous" | 15 | ".previous" |
| 16 | #else /* __s390x__ */ | 16 | #else /* __s390x__ */ |
| 17 | #define __futex_atomic_fixup \ | 17 | #define __futex_atomic_fixup \ |
| 18 | ".section __ex_table,\"a\"\n" \ | 18 | ".section __ex_table,\"a\"\n" \ |
| 19 | " .align 8\n" \ | 19 | " .align 8\n" \ |
| 20 | " .quad 0b,2b,1b,2b\n" \ | 20 | " .quad 0b,4b,2b,4b,3b,4b\n" \ |
| 21 | ".previous" | 21 | ".previous" |
| 22 | #endif /* __s390x__ */ | 22 | #endif /* __s390x__ */ |
| 23 | 23 | ||
| 24 | #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ | 24 | #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ |
| 25 | asm volatile(" l %1,0(%6)\n" \ | 25 | asm volatile(" sacf 256\n" \ |
| 26 | "0: " insn \ | 26 | "0: l %1,0(%6)\n" \ |
| 27 | " cs %1,%2,0(%6)\n" \ | 27 | "1: " insn \ |
| 28 | "1: jl 0b\n" \ | 28 | "2: cs %1,%2,0(%6)\n" \ |
| 29 | "3: jl 1b\n" \ | ||
| 29 | " lhi %0,0\n" \ | 30 | " lhi %0,0\n" \ |
| 30 | "2:\n" \ | 31 | "4: sacf 0\n" \ |
| 31 | __futex_atomic_fixup \ | 32 | __futex_atomic_fixup \ |
| 32 | : "=d" (ret), "=&d" (oldval), "=&d" (newval), \ | 33 | : "=d" (ret), "=&d" (oldval), "=&d" (newval), \ |
| 33 | "=m" (*uaddr) \ | 34 | "=m" (*uaddr) \ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index ad133fcfb239..1713ace808bf 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -21,7 +21,7 @@ typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | |||
| 21 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | 21 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); |
| 22 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 22 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
| 23 | 23 | ||
| 24 | typedef int (elevator_init_fn) (request_queue_t *, elevator_t *); | 24 | typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *); |
| 25 | typedef void (elevator_exit_fn) (elevator_t *); | 25 | typedef void (elevator_exit_fn) (elevator_t *); |
| 26 | 26 | ||
| 27 | struct elevator_ops | 27 | struct elevator_ops |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 6a7621b2b12b..f5fdca1d67e6 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/nodemask.h> | 36 | #include <linux/nodemask.h> |
| 37 | 37 | ||
| 38 | struct vm_area_struct; | 38 | struct vm_area_struct; |
| 39 | struct mm_struct; | ||
| 39 | 40 | ||
| 40 | #ifdef CONFIG_NUMA | 41 | #ifdef CONFIG_NUMA |
| 41 | 42 | ||
