From 00e9c4e78ce91ab6e12e0c9dcd0b856a16b15312 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Tue, 15 Apr 2008 21:13:33 +0100 Subject: [PATCH] --- yaml --- r: 91158 b: refs/heads/master c: fdb72fd84c26438a7dd754a1cc74890aca7f1b77 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-iop32x/Kconfig | 8 ++ trunk/arch/arm/mach-iop32x/iq31244.c | 11 ++- trunk/arch/arm/mach-iop32x/iq80321.c | 2 +- trunk/arch/arm/mach-iop33x/Kconfig | 8 ++ trunk/arch/arm/mach-iop33x/iq80331.c | 2 +- trunk/arch/arm/mach-iop33x/iq80332.c | 2 +- trunk/arch/arm/mach-ks8695/Makefile | 3 + trunk/arch/arm/mach-ks8695/devices.c | 21 +++++ trunk/arch/arm/mach-ks8695/leds.c | 94 +++++++++++++++++++ trunk/arch/arm/plat-iop/pci.c | 79 +++++----------- trunk/drivers/pci/setup-bus.c | 5 + trunk/include/asm-arm/arch-ks8695/devices.h | 5 + trunk/include/asm-arm/hardware/iop3xx.h | 9 +- trunk/include/asm-arm/mach/pci.h | 1 - trunk/include/linux/sched.h | 6 -- trunk/kernel/relay.c | 7 +- trunk/kernel/sched.c | 43 --------- trunk/kernel/time/clocksource.c | 2 +- trunk/kernel/timer.c | 10 +- trunk/mm/slab.c | 4 +- trunk/mm/slub.c | 2 - trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 21 ++--- 23 files changed, 203 insertions(+), 144 deletions(-) create mode 100644 trunk/arch/arm/mach-ks8695/leds.c diff --git a/[refs] b/[refs] index a0e67d3cc0e6..3871cc991c4f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c34002c102880bfac5b449b41e5313dcda186db8 +refs/heads/master: fdb72fd84c26438a7dd754a1cc74890aca7f1b77 diff --git a/trunk/arch/arm/mach-iop32x/Kconfig b/trunk/arch/arm/mach-iop32x/Kconfig index 5e8c6f7dfabb..dbe07c9472ed 100644 --- a/trunk/arch/arm/mach-iop32x/Kconfig +++ b/trunk/arch/arm/mach-iop32x/Kconfig @@ -34,6 +34,14 @@ config MACH_N2100 Say Y here if you want to run your kernel on the Thecus n2100 NAS appliance. +config IOP3XX_ATU + bool "Enable the PCI Controller" + default y + help + Say Y here if you want the IOP to initialize its PCI Controller. + Say N if the IOP is an add in card, the host system owns the PCI + bus in this case. + config MACH_EM7210 bool "Enable support for the Lanner EM7210" help diff --git a/trunk/arch/arm/mach-iop32x/iq31244.c b/trunk/arch/arm/mach-iop32x/iq31244.c index 4a89823bcebb..98cfa1cd6bdb 100644 --- a/trunk/arch/arm/mach-iop32x/iq31244.c +++ b/trunk/arch/arm/mach-iop32x/iq31244.c @@ -178,9 +178,10 @@ static struct hw_pci iq31244_pci __initdata = { static int __init iq31244_pci_init(void) { - if (is_ep80219()) - pci_common_init(&ep80219_pci); - else if (machine_is_iq31244()) { + if (is_ep80219()) { + if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) + pci_common_init(&ep80219_pci); + } else if (machine_is_iq31244()) { if (is_80219()) { printk("note: iq31244 board type has been selected\n"); printk("note: to select ep80219 operation:\n"); @@ -189,7 +190,9 @@ static int __init iq31244_pci_init(void) printk("\t2/ update boot loader to pass" " the ep80219 id: %d\n", MACH_TYPE_EP80219); } - pci_common_init(&iq31244_pci); + + if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) + pci_common_init(&iq31244_pci); } return 0; diff --git a/trunk/arch/arm/mach-iop32x/iq80321.c b/trunk/arch/arm/mach-iop32x/iq80321.c index 1da3c911edd3..18ad29f213b2 100644 --- a/trunk/arch/arm/mach-iop32x/iq80321.c +++ b/trunk/arch/arm/mach-iop32x/iq80321.c @@ -106,7 +106,7 @@ static struct hw_pci iq80321_pci __initdata = { .swizzle = pci_std_swizzle, .nr_controllers = 1, .setup = iop3xx_pci_setup, - .preinit = iop3xx_pci_preinit_cond, + .preinit = iop3xx_pci_preinit, .scan = iop3xx_pci_scan_bus, .map_irq = iq80321_pci_map_irq, }; diff --git a/trunk/arch/arm/mach-iop33x/Kconfig b/trunk/arch/arm/mach-iop33x/Kconfig index 9aa016bb18f9..45598e096898 100644 --- a/trunk/arch/arm/mach-iop33x/Kconfig +++ b/trunk/arch/arm/mach-iop33x/Kconfig @@ -16,6 +16,14 @@ config MACH_IQ80332 Say Y here if you want to run your kernel on the Intel IQ80332 evaluation kit for the IOP332 chipset. +config IOP3XX_ATU + bool "Enable the PCI Controller" + default y + help + Say Y here if you want the IOP to initialize its PCI Controller. + Say N if the IOP is an add in card, the host system owns the PCI + bus in this case. + endmenu endif diff --git a/trunk/arch/arm/mach-iop33x/iq80331.c b/trunk/arch/arm/mach-iop33x/iq80331.c index de39fd778579..433188ebff2a 100644 --- a/trunk/arch/arm/mach-iop33x/iq80331.c +++ b/trunk/arch/arm/mach-iop33x/iq80331.c @@ -89,7 +89,7 @@ static struct hw_pci iq80331_pci __initdata = { .swizzle = pci_std_swizzle, .nr_controllers = 1, .setup = iop3xx_pci_setup, - .preinit = iop3xx_pci_preinit_cond, + .preinit = iop3xx_pci_preinit, .scan = iop3xx_pci_scan_bus, .map_irq = iq80331_pci_map_irq, }; diff --git a/trunk/arch/arm/mach-iop33x/iq80332.c b/trunk/arch/arm/mach-iop33x/iq80332.c index 4904fd78445f..416c09564cc6 100644 --- a/trunk/arch/arm/mach-iop33x/iq80332.c +++ b/trunk/arch/arm/mach-iop33x/iq80332.c @@ -89,7 +89,7 @@ static struct hw_pci iq80332_pci __initdata = { .swizzle = pci_std_swizzle, .nr_controllers = 1, .setup = iop3xx_pci_setup, - .preinit = iop3xx_pci_preinit_cond, + .preinit = iop3xx_pci_preinit, .scan = iop3xx_pci_scan_bus, .map_irq = iq80332_pci_map_irq, }; diff --git a/trunk/arch/arm/mach-ks8695/Makefile b/trunk/arch/arm/mach-ks8695/Makefile index 730a3af12c98..ade42b73afbb 100644 --- a/trunk/arch/arm/mach-ks8695/Makefile +++ b/trunk/arch/arm/mach-ks8695/Makefile @@ -11,5 +11,8 @@ obj- := # PCI support is optional obj-$(CONFIG_PCI) += pci.o +# LEDs +obj-$(CONFIG_LEDS) += leds.o + # Board-specific support obj-$(CONFIG_MACH_KS8695) += board-micrel.o diff --git a/trunk/arch/arm/mach-ks8695/devices.c b/trunk/arch/arm/mach-ks8695/devices.c index 386593f8ac65..3db2ec61d06f 100644 --- a/trunk/arch/arm/mach-ks8695/devices.c +++ b/trunk/arch/arm/mach-ks8695/devices.c @@ -176,6 +176,27 @@ static void __init ks8695_add_device_watchdog(void) {} #endif +/* -------------------------------------------------------------------- + * LEDs + * -------------------------------------------------------------------- */ + +#if defined(CONFIG_LEDS) +short ks8695_leds_cpu = -1; +short ks8695_leds_timer = -1; + +void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) +{ + /* Enable GPIO to access the LEDs */ + gpio_direction_output(cpu_led, 1); + gpio_direction_output(timer_led, 1); + + ks8695_leds_cpu = cpu_led; + ks8695_leds_timer = timer_led; +} +#else +void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) {} +#endif + /* -------------------------------------------------------------------- */ /* diff --git a/trunk/arch/arm/mach-ks8695/leds.c b/trunk/arch/arm/mach-ks8695/leds.c new file mode 100644 index 000000000000..d61762ae50d8 --- /dev/null +++ b/trunk/arch/arm/mach-ks8695/leds.c @@ -0,0 +1,94 @@ +/* + * LED driver for KS8695-based boards. + * + * Copyright (C) Andrew Victor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include +#include +#include + + +static inline void ks8695_led_on(unsigned int led) +{ + gpio_set_value(led, 0); +} + +static inline void ks8695_led_off(unsigned int led) +{ + gpio_set_value(led, 1); +} + +static inline void ks8695_led_toggle(unsigned int led) +{ + unsigned long is_off = gpio_get_value(led); + if (is_off) + ks8695_led_on(led); + else + ks8695_led_off(led); +} + + +/* + * Handle LED events. + */ +static void ks8695_leds_event(led_event_t evt) +{ + unsigned long flags; + + local_irq_save(flags); + + switch(evt) { + case led_start: /* System startup */ + ks8695_led_on(ks8695_leds_cpu); + break; + + case led_stop: /* System stop / suspend */ + ks8695_led_off(ks8695_leds_cpu); + break; + +#ifdef CONFIG_LEDS_TIMER + case led_timer: /* Every 50 timer ticks */ + ks8695_led_toggle(ks8695_leds_timer); + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: /* Entering idle state */ + ks8695_led_off(ks8695_leds_cpu); + break; + + case led_idle_end: /* Exit idle state */ + ks8695_led_on(ks8695_leds_cpu); + break; +#endif + + default: + break; + } + + local_irq_restore(flags); +} + + +static int __init leds_init(void) +{ + if ((ks8695_leds_timer == -1) || (ks8695_leds_cpu == -1)) + return -ENODEV; + + leds_event = ks8695_leds_event; + + leds_event(led_start); + return 0; +} + +__initcall(leds_init); diff --git a/trunk/arch/arm/plat-iop/pci.c b/trunk/arch/arm/plat-iop/pci.c index d9bc15a69e5d..98d01517b563 100644 --- a/trunk/arch/arm/plat-iop/pci.c +++ b/trunk/arch/arm/plat-iop/pci.c @@ -24,7 +24,6 @@ #include #include #include -#include // #define DEBUG @@ -210,11 +209,8 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) res[1].flags = IORESOURCE_MEM; request_resource(&iomem_resource, &res[1]); - /* - * Use whatever translation is already setup. - */ - sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - *IOP3XX_OMWTVR0; - sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - *IOP3XX_OIOWTVR; + sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA; + sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - IOP3XX_PCI_LOWER_IO_BA; sys->resource[0] = &res[0]; sys->resource[1] = &res[1]; @@ -254,11 +250,11 @@ void __init iop3xx_atu_setup(void) *IOP3XX_IATVR2 = PHYS_OFFSET; /* Outbound window 0 */ - *IOP3XX_OMWTVR0 = IOP3XX_PCI_LOWER_MEM_BA; + *IOP3XX_OMWTVR0 = IOP3XX_PCI_LOWER_MEM_PA; *IOP3XX_OUMWTVR0 = 0; /* Outbound window 1 */ - *IOP3XX_OMWTVR1 = IOP3XX_PCI_LOWER_MEM_BA + IOP3XX_PCI_MEM_WINDOW_SIZE; + *IOP3XX_OMWTVR1 = IOP3XX_PCI_LOWER_MEM_PA + IOP3XX_PCI_MEM_WINDOW_SIZE; *IOP3XX_OUMWTVR1 = 0; /* BAR 3 ( Disabled ) */ @@ -269,7 +265,7 @@ void __init iop3xx_atu_setup(void) /* Setup the I/O Bar */ - *IOP3XX_OIOWTVR = IOP3XX_PCI_LOWER_IO_BA; + *IOP3XX_OIOWTVR = IOP3XX_PCI_LOWER_IO_PA;; /* Enable inbound and outbound cycles */ @@ -326,57 +322,32 @@ void __init iop3xx_atu_disable(void) /* Flag to determine whether the ATU is initialized and the PCI bus scanned */ int init_atu; -int iop3xx_get_init_atu(void) { - /* check if default has been overridden */ - if (init_atu != IOP3XX_INIT_ATU_DEFAULT) - return init_atu; - else - return IOP3XX_INIT_ATU_DISABLE; -} - -static void __init iop3xx_atu_debug(void) -{ - DBG("PCI: Intel IOP3xx PCI init.\n"); - DBG("PCI: Outbound memory window 0: PCI 0x%08x%08x\n", - *IOP3XX_OUMWTVR0, *IOP3XX_OMWTVR0); - DBG("PCI: Outbound memory window 1: PCI 0x%08x%08x\n", - *IOP3XX_OUMWTVR1, *IOP3XX_OMWTVR1); - DBG("PCI: Outbound IO window: PCI 0x%08x\n", - *IOP3XX_OIOWTVR); - - DBG("PCI: Inbound memory window 0: PCI 0x%08x%08x 0x%08x -> 0x%08x\n", - *IOP3XX_IAUBAR0, *IOP3XX_IABAR0, *IOP3XX_IALR0, *IOP3XX_IATVR0); - DBG("PCI: Inbound memory window 1: PCI 0x%08x%08x 0x%08x\n", - *IOP3XX_IAUBAR1, *IOP3XX_IABAR1, *IOP3XX_IALR1); - DBG("PCI: Inbound memory window 2: PCI 0x%08x%08x 0x%08x -> 0x%08x\n", - *IOP3XX_IAUBAR2, *IOP3XX_IABAR2, *IOP3XX_IALR2, *IOP3XX_IATVR2); - DBG("PCI: Inbound memory window 3: PCI 0x%08x%08x 0x%08x -> 0x%08x\n", - *IOP3XX_IAUBAR3, *IOP3XX_IABAR3, *IOP3XX_IALR3, *IOP3XX_IATVR3); - - DBG("PCI: Expansion ROM window: PCI 0x%08x%08x 0x%08x -> 0x%08x\n", - 0, *IOP3XX_ERBAR, *IOP3XX_ERLR, *IOP3XX_ERTVR); - - DBG("ATU: IOP3XX_ATUCMD=0x%04x\n", *IOP3XX_ATUCMD); - DBG("ATU: IOP3XX_ATUCR=0x%08x\n", *IOP3XX_ATUCR); - - hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); -} - -/* for platforms that might be host-bus-adapters */ -void __init iop3xx_pci_preinit_cond(void) +void __init iop3xx_pci_preinit(void) { if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) { iop3xx_atu_disable(); iop3xx_atu_setup(); - iop3xx_atu_debug(); } -} -void __init iop3xx_pci_preinit(void) -{ - iop3xx_atu_disable(); - iop3xx_atu_setup(); - iop3xx_atu_debug(); + DBG("PCI: Intel 803xx PCI init code.\n"); + DBG("ATU: IOP3XX_ATUCMD=0x%04x\n", *IOP3XX_ATUCMD); + DBG("ATU: IOP3XX_OMWTVR0=0x%04x, IOP3XX_OIOWTVR=0x%04x\n", + *IOP3XX_OMWTVR0, + *IOP3XX_OIOWTVR); + DBG("ATU: IOP3XX_ATUCR=0x%08x\n", *IOP3XX_ATUCR); + DBG("ATU: IOP3XX_IABAR0=0x%08x IOP3XX_IALR0=0x%08x IOP3XX_IATVR0=%08x\n", + *IOP3XX_IABAR0, *IOP3XX_IALR0, *IOP3XX_IATVR0); + DBG("ATU: IOP3XX_OMWTVR0=0x%08x\n", *IOP3XX_OMWTVR0); + DBG("ATU: IOP3XX_IABAR1=0x%08x IOP3XX_IALR1=0x%08x\n", + *IOP3XX_IABAR1, *IOP3XX_IALR1); + DBG("ATU: IOP3XX_ERBAR=0x%08x IOP3XX_ERLR=0x%08x IOP3XX_ERTVR=%08x\n", + *IOP3XX_ERBAR, *IOP3XX_ERLR, *IOP3XX_ERTVR); + DBG("ATU: IOP3XX_IABAR2=0x%08x IOP3XX_IALR2=0x%08x IOP3XX_IATVR2=%08x\n", + *IOP3XX_IABAR2, *IOP3XX_IALR2, *IOP3XX_IATVR2); + DBG("ATU: IOP3XX_IABAR3=0x%08x IOP3XX_IALR3=0x%08x IOP3XX_IATVR3=%08x\n", + *IOP3XX_IABAR3, *IOP3XX_IALR3, *IOP3XX_IATVR3); + + hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); } /* allow init_atu to be user overridden */ diff --git a/trunk/drivers/pci/setup-bus.c b/trunk/drivers/pci/setup-bus.c index f7cb8e0758b4..125e7b7f34ff 100644 --- a/trunk/drivers/pci/setup-bus.c +++ b/trunk/drivers/pci/setup-bus.c @@ -486,7 +486,12 @@ void __ref pci_bus_size_bridges(struct pci_bus *bus) break; case PCI_CLASS_BRIDGE_PCI: + /* don't size subtractive decoding (transparent) + * PCI-to-PCI bridges */ + if (bus->self->transparent) + break; pci_bridge_check_ranges(bus); + /* fall through */ default: pbus_size_io(bus); /* If the bridge supports prefetchable range, size it diff --git a/trunk/include/asm-arm/arch-ks8695/devices.h b/trunk/include/asm-arm/arch-ks8695/devices.h index b0364dce463f..7ad2c656e162 100644 --- a/trunk/include/asm-arm/arch-ks8695/devices.h +++ b/trunk/include/asm-arm/arch-ks8695/devices.h @@ -18,6 +18,11 @@ extern void __init ks8695_add_device_wan(void); extern void __init ks8695_add_device_lan(void); extern void __init ks8695_add_device_hpna(void); + /* LEDs */ +extern short ks8695_leds_cpu; +extern short ks8695_leds_timer; +extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led); + /* PCI */ #define KS8695_MODE_PCI 0 #define KS8695_MODE_MINIPCI 1 diff --git a/trunk/include/asm-arm/hardware/iop3xx.h b/trunk/include/asm-arm/hardware/iop3xx.h index 18f6937f5010..ede377ec9147 100644 --- a/trunk/include/asm-arm/hardware/iop3xx.h +++ b/trunk/include/asm-arm/hardware/iop3xx.h @@ -29,7 +29,6 @@ extern void gpio_line_config(int line, int direction); extern int gpio_line_get(int line); extern void gpio_line_set(int line, int value); extern int init_atu; -extern int iop3xx_get_init_atu(void); #endif @@ -113,6 +112,14 @@ extern int iop3xx_get_init_atu(void); #define IOP3XX_INIT_ATU_DISABLE -1 #define IOP3XX_INIT_ATU_ENABLE 1 +#ifdef CONFIG_IOP3XX_ATU +#define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ + IOP3XX_INIT_ATU_ENABLE : init_atu) +#else +#define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ + IOP3XX_INIT_ATU_DISABLE : init_atu) +#endif + /* Messaging Unit */ #define IOP3XX_IMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0310) #define IOP3XX_IMR1 (volatile u32 *)IOP3XX_REG_ADDR(0x0314) diff --git a/trunk/include/asm-arm/mach/pci.h b/trunk/include/asm-arm/mach/pci.h index 9d4f6b5ea419..24621c49a0c7 100644 --- a/trunk/include/asm-arm/mach/pci.h +++ b/trunk/include/asm-arm/mach/pci.h @@ -55,7 +55,6 @@ void pci_common_init(struct hw_pci *); extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); extern void iop3xx_pci_preinit(void); -extern void iop3xx_pci_preinit_cond(void); extern int dc21285_setup(int nr, struct pci_sys_data *); extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index 6a1e7afb099b..fed07d03364e 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -1541,12 +1541,6 @@ static inline void idle_task_exit(void) {} extern void sched_idle_next(void); -#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) -extern void wake_up_idle_cpu(int cpu); -#else -static inline void wake_up_idle_cpu(int cpu) { } -#endif - #ifdef CONFIG_SCHED_DEBUG extern unsigned int sysctl_sched_latency; extern unsigned int sysctl_sched_min_granularity; diff --git a/trunk/kernel/relay.c b/trunk/kernel/relay.c index d6204a485818..4c035a8a248c 100644 --- a/trunk/kernel/relay.c +++ b/trunk/kernel/relay.c @@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp) kref_get(&buf->kref); filp->private_data = buf; - return nonseekable_open(inode, filp); + return 0; } /** @@ -1056,10 +1056,6 @@ static struct pipe_buf_operations relay_pipe_buf_ops = { .get = generic_pipe_buf_get, }; -static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i) -{ -} - /* * subbuf_splice_actor - splice up to one subbuf's worth of data */ @@ -1087,7 +1083,6 @@ static int subbuf_splice_actor(struct file *in, .partial = partial, .flags = flags, .ops = &relay_pipe_buf_ops, - .spd_release = relay_page_release, }; if (rbuf->subbufs_produced == rbuf->subbufs_consumed) diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 8dcdec6fe0fe..28c73f07efb2 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -1052,49 +1052,6 @@ static void resched_cpu(int cpu) resched_task(cpu_curr(cpu)); spin_unlock_irqrestore(&rq->lock, flags); } - -#ifdef CONFIG_NO_HZ -/* - * When add_timer_on() enqueues a timer into the timer wheel of an - * idle CPU then this timer might expire before the next timer event - * which is scheduled to wake up that CPU. In case of a completely - * idle system the next event might even be infinite time into the - * future. wake_up_idle_cpu() ensures that the CPU is woken up and - * leaves the inner idle loop so the newly added timer is taken into - * account when the CPU goes back to idle and evaluates the timer - * wheel for the next timer event. - */ -void wake_up_idle_cpu(int cpu) -{ - struct rq *rq = cpu_rq(cpu); - - if (cpu == smp_processor_id()) - return; - - /* - * This is safe, as this function is called with the timer - * wheel base lock of (cpu) held. When the CPU is on the way - * to idle and has not yet set rq->curr to idle then it will - * be serialized on the timer wheel base lock and take the new - * timer into account automatically. - */ - if (rq->curr != rq->idle) - return; - - /* - * We can set TIF_RESCHED on the idle task of the other CPU - * lockless. The worst case is that the other CPU runs the - * idle task through an additional NOOP schedule() - */ - set_tsk_thread_flag(rq->idle, TIF_NEED_RESCHED); - - /* NEED_RESCHED must be visible before we test polling */ - smp_mb(); - if (!tsk_is_polling(rq->idle)) - smp_send_reschedule(cpu); -} -#endif - #else static void __resched_task(struct task_struct *p, int tif_bit) { diff --git a/trunk/kernel/time/clocksource.c b/trunk/kernel/time/clocksource.c index 7f60097d443a..278534bbca95 100644 --- a/trunk/kernel/time/clocksource.c +++ b/trunk/kernel/time/clocksource.c @@ -174,7 +174,7 @@ static void clocksource_check_watchdog(struct clocksource *cs) if (watchdog) del_timer(&watchdog_timer); watchdog = cs; - init_timer(&watchdog_timer); + init_timer_deferrable(&watchdog_timer); watchdog_timer.function = clocksource_watchdog; /* Reset watchdog cycles */ diff --git a/trunk/kernel/timer.c b/trunk/kernel/timer.c index b024106daa70..99b00a25f88b 100644 --- a/trunk/kernel/timer.c +++ b/trunk/kernel/timer.c @@ -451,18 +451,10 @@ void add_timer_on(struct timer_list *timer, int cpu) spin_lock_irqsave(&base->lock, flags); timer_set_base(timer, base); internal_add_timer(base, timer); - /* - * Check whether the other CPU is idle and needs to be - * triggered to reevaluate the timer wheel when nohz is - * active. We are protected against the other CPU fiddling - * with the timer by holding the timer base lock. This also - * makes sure that a CPU on the way to idle can not evaluate - * the timer wheel. - */ - wake_up_idle_cpu(cpu); spin_unlock_irqrestore(&base->lock, flags); } + /** * mod_timer - modify a timer's timeout * @timer: the timer to be modified diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index 04b308c3bc54..bb4070e1079f 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -1481,7 +1481,7 @@ void __init kmem_cache_init(void) list_add(&cache_cache.next, &cache_chain); cache_cache.colour_off = cache_line_size(); cache_cache.array[smp_processor_id()] = &initarray_cache.cache; - cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE + node]; + cache_cache.nodelists[node] = &initkmem_list3[CACHE_CACHE]; /* * struct kmem_cache size depends on nr_node_ids, which @@ -1602,7 +1602,7 @@ void __init kmem_cache_init(void) int nid; for_each_online_node(nid) { - init_list(&cache_cache, &initkmem_list3[CACHE_CACHE + nid], nid); + init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], nid); init_list(malloc_sizes[INDEX_AC].cs_cachep, &initkmem_list3[SIZE_AC + nid], nid); diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index b72bc98e2dc1..ca71d5b81e4a 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -2685,7 +2685,6 @@ void kfree(const void *x) } EXPORT_SYMBOL(kfree); -#if defined(SLUB_DEBUG) || defined(CONFIG_SLABINFO) static unsigned long count_partial(struct kmem_cache_node *n) { unsigned long flags; @@ -2698,7 +2697,6 @@ static unsigned long count_partial(struct kmem_cache_node *n) spin_unlock_irqrestore(&n->list_lock, flags); return x; } -#endif /* * kmem_cache_shrink removes empty slabs from the partial lists and sorts diff --git a/trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index c22d6b6f2db4..971271602dd0 100644 --- a/trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -322,6 +322,15 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt, ctxt->direction = DMA_FROM_DEVICE; clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); + if ((ch+1)->rc_discrim == 0) { + /* + * Checked in sq_cq_reap to see if we need to + * be enqueued + */ + set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); + ctxt->next = hdr_ctxt; + hdr_ctxt->next = head; + } /* Prepare READ WR */ memset(&read_wr, 0, sizeof read_wr); @@ -339,17 +348,7 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt, rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start], &sgl_offset, read_wr.num_sge); - if (((ch+1)->rc_discrim == 0) && - (read_wr.num_sge == ch_sge_ary[ch_no].count)) { - /* - * Mark the last RDMA_READ with a bit to - * indicate all RPC data has been fetched from - * the client and the RPC needs to be enqueued. - */ - set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); - ctxt->next = hdr_ctxt; - hdr_ctxt->next = head; - } + /* Post the read */ err = svc_rdma_send(xprt, &read_wr); if (err) {