From a801bf8bc38fad85ea7f42a831018e29531396fb Mon Sep 17 00:00:00 2001 From: Tom Herbert Date: Mon, 5 Mar 2012 19:53:50 +0000 Subject: [PATCH] --- yaml --- r: 288293 b: refs/heads/master c: 5cb917bc4f3882ecee87064483111023086757d3 h: refs/heads/master i: 288291: 6eaf41d46f739f1f75fa458f5e2287f5c7c1daac v: v3 --- [refs] | 2 +- .../arch/arm/mach-at91/at91sam9g45_devices.c | 19 ++++---- trunk/arch/arm/mach-at91/at91sam9rl_devices.c | 8 +++- trunk/arch/arm/mach-ep93xx/vision_ep9307.c | 2 - .../arm/mach-exynos/mach-universal_c210.c | 2 - trunk/arch/arm/mach-pxa/generic.h | 1 + trunk/arch/arm/mach-pxa/mfp-pxa2xx.c | 7 --- trunk/arch/arm/mach-pxa/pxa25x.c | 2 +- trunk/arch/arm/mach-pxa/pxa27x.c | 2 +- trunk/arch/arm/mach-pxa/pxa3xx.c | 1 + trunk/arch/arm/mach-pxa/pxa95x.c | 1 + trunk/arch/arm/mach-s3c2440/common.h | 2 +- trunk/arch/arm/mach-s3c2440/mach-anubis.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-at2440evb.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-gta02.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-mini2440.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-nexcoder.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-osiris.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-rx1950.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-rx3715.c | 2 +- trunk/arch/arm/mach-s3c2440/mach-smdk2440.c | 2 +- trunk/arch/arm/mach-s3c2440/s3c2440.c | 13 ++++++ trunk/arch/arm/mach-s3c2440/s3c244x.c | 11 ----- trunk/arch/arm/plat-s3c24xx/dma.c | 2 +- trunk/arch/arm/plat-samsung/devs.c | 2 +- trunk/arch/x86/mm/hugetlbpage.c | 4 +- trunk/drivers/net/ethernet/broadcom/tg3.c | 6 +-- trunk/drivers/regulator/da9052-regulator.c | 8 ++-- trunk/drivers/s390/cio/qdio_main.c | 4 +- trunk/fs/cifs/dir.c | 20 +-------- trunk/fs/cifs/inode.c | 28 ++++-------- trunk/kernel/irq/manage.c | 44 +++---------------- trunk/lib/vsprintf.c | 12 ++--- trunk/mm/mempolicy.c | 3 +- trunk/mm/mlock.c | 3 +- trunk/mm/mmap.c | 15 ++----- trunk/mm/mprotect.c | 3 +- trunk/mm/page_cgroup.c | 4 +- 38 files changed, 84 insertions(+), 165 deletions(-) diff --git a/[refs] b/[refs] index fa6a57a5a433..4c990e7f5000 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 55062d061790b43aee01ab3f9ac57b8596254f19 +refs/heads/master: 5cb917bc4f3882ecee87064483111023086757d3 diff --git a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c index 96e2adcd5a84..b7582dd10dc3 100644 --- a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c @@ -38,6 +38,10 @@ #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) static u64 hdmac_dmamask = DMA_BIT_MASK(32); +static struct at_dma_platform_data atdma_pdata = { + .nr_channels = 8, +}; + static struct resource hdmac_resources[] = { [0] = { .start = AT91SAM9G45_BASE_DMA, @@ -52,11 +56,12 @@ static struct resource hdmac_resources[] = { }; static struct platform_device at_hdmac_device = { - .name = "at91sam9g45_dma", + .name = "at_hdmac", .id = -1, .dev = { .dma_mask = &hdmac_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = &atdma_pdata, }, .resource = hdmac_resources, .num_resources = ARRAY_SIZE(hdmac_resources), @@ -64,15 +69,9 @@ static struct platform_device at_hdmac_device = { void __init at91_add_device_hdmac(void) { -#if defined(CONFIG_OF) - struct device_node *of_node = - of_find_node_by_name(NULL, "dma-controller"); - - if (of_node) - of_node_put(of_node); - else -#endif - platform_device_register(&at_hdmac_device); + dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); + dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask); + platform_device_register(&at_hdmac_device); } #else void __init at91_add_device_hdmac(void) {} diff --git a/trunk/arch/arm/mach-at91/at91sam9rl_devices.c b/trunk/arch/arm/mach-at91/at91sam9rl_devices.c index 9be71c11d0f0..61908dce9784 100644 --- a/trunk/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/trunk/arch/arm/mach-at91/at91sam9rl_devices.c @@ -33,6 +33,10 @@ #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) static u64 hdmac_dmamask = DMA_BIT_MASK(32); +static struct at_dma_platform_data atdma_pdata = { + .nr_channels = 2, +}; + static struct resource hdmac_resources[] = { [0] = { .start = AT91SAM9RL_BASE_DMA, @@ -47,11 +51,12 @@ static struct resource hdmac_resources[] = { }; static struct platform_device at_hdmac_device = { - .name = "at91sam9rl_dma", + .name = "at_hdmac", .id = -1, .dev = { .dma_mask = &hdmac_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = &atdma_pdata, }, .resource = hdmac_resources, .num_resources = ARRAY_SIZE(hdmac_resources), @@ -59,6 +64,7 @@ static struct platform_device at_hdmac_device = { void __init at91_add_device_hdmac(void) { + dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); platform_device_register(&at_hdmac_device); } #else diff --git a/trunk/arch/arm/mach-ep93xx/vision_ep9307.c b/trunk/arch/arm/mach-ep93xx/vision_ep9307.c index d67d0b4feb6f..d5fb44f16d31 100644 --- a/trunk/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/trunk/arch/arm/mach-ep93xx/vision_ep9307.c @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -362,7 +361,6 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307") .atag_offset = 0x100, .map_io = vision_map_io, .init_irq = ep93xx_init_irq, - .handle_irq = vic_handle_irq, .timer = &ep93xx_timer, .init_machine = vision_init_machine, .restart = ep93xx_restart, diff --git a/trunk/arch/arm/mach-exynos/mach-universal_c210.c b/trunk/arch/arm/mach-exynos/mach-universal_c210.c index 38939956c34f..0fc65ffde8ff 100644 --- a/trunk/arch/arm/mach-exynos/mach-universal_c210.c +++ b/trunk/arch/arm/mach-exynos/mach-universal_c210.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -596,7 +595,6 @@ static struct mxt_platform_data qt602240_platform_data = { .threshold = 0x28, .voltage = 2800000, /* 2.8V */ .orient = MXT_DIAGONAL, - .irqflags = IRQF_TRIGGER_FALLING, }; static struct i2c_board_info i2c3_devs[] __initdata = { diff --git a/trunk/arch/arm/mach-pxa/generic.h b/trunk/arch/arm/mach-pxa/generic.h index 42d5cca66257..0d729e6619df 100644 --- a/trunk/arch/arm/mach-pxa/generic.h +++ b/trunk/arch/arm/mach-pxa/generic.h @@ -49,6 +49,7 @@ extern unsigned pxa3xx_get_clk_frequency_khz(int); #endif extern struct syscore_ops pxa_irq_syscore_ops; +extern struct syscore_ops pxa_gpio_syscore_ops; extern struct syscore_ops pxa2xx_mfp_syscore_ops; extern struct syscore_ops pxa3xx_mfp_syscore_ops; diff --git a/trunk/arch/arm/mach-pxa/mfp-pxa2xx.c b/trunk/arch/arm/mach-pxa/mfp-pxa2xx.c index 29b62afc6f7c..f14775536b83 100644 --- a/trunk/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/trunk/arch/arm/mach-pxa/mfp-pxa2xx.c @@ -226,12 +226,6 @@ static void __init pxa25x_mfp_init(void) { int i; - /* running before pxa_gpio_probe() */ -#ifdef CONFIG_CPU_PXA26x - pxa_last_gpio = 89; -#else - pxa_last_gpio = 84; -#endif for (i = 0; i <= pxa_last_gpio; i++) gpio_desc[i].valid = 1; @@ -301,7 +295,6 @@ static void __init pxa27x_mfp_init(void) { int i, gpio; - pxa_last_gpio = 120; /* running before pxa_gpio_probe() */ for (i = 0; i <= pxa_last_gpio; i++) { /* skip GPIO2, 5, 6, 7, 8, they are not * valid pins allow configuration diff --git a/trunk/arch/arm/mach-pxa/pxa25x.c b/trunk/arch/arm/mach-pxa/pxa25x.c index 3352b37b60cf..00d6eacab8e4 100644 --- a/trunk/arch/arm/mach-pxa/pxa25x.c +++ b/trunk/arch/arm/mach-pxa/pxa25x.c @@ -208,7 +208,6 @@ static struct clk_lookup pxa25x_clkregs[] = { INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), - INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), }; static struct clk_lookup pxa25x_hwuart_clkreg = @@ -368,6 +367,7 @@ static int __init pxa25x_init(void) register_syscore_ops(&pxa_irq_syscore_ops); register_syscore_ops(&pxa2xx_mfp_syscore_ops); + register_syscore_ops(&pxa_gpio_syscore_ops); register_syscore_ops(&pxa2xx_clock_syscore_ops); ret = platform_add_devices(pxa25x_devices, diff --git a/trunk/arch/arm/mach-pxa/pxa27x.c b/trunk/arch/arm/mach-pxa/pxa27x.c index 6bce78edce7a..c1673b3441d4 100644 --- a/trunk/arch/arm/mach-pxa/pxa27x.c +++ b/trunk/arch/arm/mach-pxa/pxa27x.c @@ -229,7 +229,6 @@ static struct clk_lookup pxa27x_clkregs[] = { INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), - INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), }; #ifdef CONFIG_PM @@ -456,6 +455,7 @@ static int __init pxa27x_init(void) register_syscore_ops(&pxa_irq_syscore_ops); register_syscore_ops(&pxa2xx_mfp_syscore_ops); + register_syscore_ops(&pxa_gpio_syscore_ops); register_syscore_ops(&pxa2xx_clock_syscore_ops); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); diff --git a/trunk/arch/arm/mach-pxa/pxa3xx.c b/trunk/arch/arm/mach-pxa/pxa3xx.c index 3918a672238e..4f402afa6609 100644 --- a/trunk/arch/arm/mach-pxa/pxa3xx.c +++ b/trunk/arch/arm/mach-pxa/pxa3xx.c @@ -462,6 +462,7 @@ static int __init pxa3xx_init(void) register_syscore_ops(&pxa_irq_syscore_ops); register_syscore_ops(&pxa3xx_mfp_syscore_ops); + register_syscore_ops(&pxa_gpio_syscore_ops); register_syscore_ops(&pxa3xx_clock_syscore_ops); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); diff --git a/trunk/arch/arm/mach-pxa/pxa95x.c b/trunk/arch/arm/mach-pxa/pxa95x.c index 5ce434b95e87..d082a583df78 100644 --- a/trunk/arch/arm/mach-pxa/pxa95x.c +++ b/trunk/arch/arm/mach-pxa/pxa95x.c @@ -283,6 +283,7 @@ static int __init pxa95x_init(void) return ret; register_syscore_ops(&pxa_irq_syscore_ops); + register_syscore_ops(&pxa_gpio_syscore_ops); register_syscore_ops(&pxa3xx_clock_syscore_ops); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); diff --git a/trunk/arch/arm/mach-s3c2440/common.h b/trunk/arch/arm/mach-s3c2440/common.h index 0c1eb1dfc534..db8a98ac68c5 100644 --- a/trunk/arch/arm/mach-s3c2440/common.h +++ b/trunk/arch/arm/mach-s3c2440/common.h @@ -12,6 +12,6 @@ #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H #define __ARCH_ARM_MACH_S3C2440_COMMON_H -void s3c244x_restart(char mode, const char *cmd); +void s3c2440_restart(char mode, const char *cmd); #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ diff --git a/trunk/arch/arm/mach-s3c2440/mach-anubis.c b/trunk/arch/arm/mach-s3c2440/mach-anubis.c index 19b577bc09b8..24569550de1a 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-anubis.c +++ b/trunk/arch/arm/mach-s3c2440/mach-anubis.c @@ -487,5 +487,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") .init_machine = anubis_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-at2440evb.c b/trunk/arch/arm/mach-s3c2440/mach-at2440evb.c index d7ae49c90118..d6a9763110cd 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/trunk/arch/arm/mach-s3c2440/mach-at2440evb.c @@ -222,5 +222,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") .init_machine = at2440evb_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-gta02.c b/trunk/arch/arm/mach-s3c2440/mach-gta02.c index 9a4a5bc008e6..5859e609d28c 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-gta02.c +++ b/trunk/arch/arm/mach-s3c2440/mach-gta02.c @@ -601,5 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") .init_irq = s3c24xx_init_irq, .init_machine = gta02_machine_init, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-mini2440.c b/trunk/arch/arm/mach-s3c2440/mach-mini2440.c index 5d66fb218a41..adbbb85bc4cd 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/trunk/arch/arm/mach-s3c2440/mach-mini2440.c @@ -701,5 +701,5 @@ MACHINE_START(MINI2440, "MINI2440") .init_machine = mini2440_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-nexcoder.c b/trunk/arch/arm/mach-s3c2440/mach-nexcoder.c index 5198e3e1c5be..40eaf844bc1f 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/trunk/arch/arm/mach-s3c2440/mach-nexcoder.c @@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") .init_machine = nexcoder_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-osiris.c b/trunk/arch/arm/mach-s3c2440/mach-osiris.c index c5daeb612a88..4c480ef734f6 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-osiris.c +++ b/trunk/arch/arm/mach-s3c2440/mach-osiris.c @@ -436,5 +436,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-rx1950.c b/trunk/arch/arm/mach-s3c2440/mach-rx1950.c index 6f68abf44fab..80077f6472ee 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/trunk/arch/arm/mach-s3c2440/mach-rx1950.c @@ -822,5 +822,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") .init_irq = s3c24xx_init_irq, .init_machine = rx1950_init_machine, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-rx3715.c b/trunk/arch/arm/mach-s3c2440/mach-rx3715.c index 56af35447598..20103bafbd4b 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/trunk/arch/arm/mach-s3c2440/mach-rx3715.c @@ -213,5 +213,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") .init_irq = rx3715_init_irq, .init_machine = rx3715_init_machine, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/mach-smdk2440.c b/trunk/arch/arm/mach-s3c2440/mach-smdk2440.c index 83a1036d7dcb..1deb60d12a60 100644 --- a/trunk/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/trunk/arch/arm/mach-s3c2440/mach-smdk2440.c @@ -183,5 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") .map_io = smdk2440_map_io, .init_machine = smdk2440_machine_init, .timer = &s3c24xx_timer, - .restart = s3c244x_restart, + .restart = s3c2440_restart, MACHINE_END diff --git a/trunk/arch/arm/mach-s3c2440/s3c2440.c b/trunk/arch/arm/mach-s3c2440/s3c2440.c index 2b3dddb49af7..517623a09fc5 100644 --- a/trunk/arch/arm/mach-s3c2440/s3c2440.c +++ b/trunk/arch/arm/mach-s3c2440/s3c2440.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -73,3 +74,15 @@ void __init s3c2440_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; } + +void s3c2440_restart(char mode, const char *cmd) +{ + if (mode == 's') { + soft_restart(0); + } + + arch_wdt_reset(); + + /* we'll take a jump through zero as a poor second */ + soft_restart(0); +} diff --git a/trunk/arch/arm/mach-s3c2440/s3c244x.c b/trunk/arch/arm/mach-s3c2440/s3c244x.c index 744930a870eb..36bc60f61d0a 100644 --- a/trunk/arch/arm/mach-s3c2440/s3c244x.c +++ b/trunk/arch/arm/mach-s3c2440/s3c244x.c @@ -46,7 +46,6 @@ #include #include #include -#include static struct map_desc s3c244x_iodesc[] __initdata = { IODESC_ENT(CLKPWR), @@ -197,13 +196,3 @@ struct syscore_ops s3c244x_pm_syscore_ops = { .suspend = s3c244x_suspend, .resume = s3c244x_resume, }; - -void s3c244x_restart(char mode, const char *cmd) -{ - if (mode == 's') - soft_restart(0); - - arch_wdt_reset(); - - /* we'll take a jump through zero as a poor second */ - soft_restart(0); diff --git a/trunk/arch/arm/plat-s3c24xx/dma.c b/trunk/arch/arm/plat-s3c24xx/dma.c index 2bab4c99a234..9fe35348e03b 100644 --- a/trunk/arch/arm/plat-s3c24xx/dma.c +++ b/trunk/arch/arm/plat-s3c24xx/dma.c @@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void) struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1; int channel; - for (channel = dma_channels - 1; channel >= 0; cp--, channel--) + for (channel = dma_channels - 1; channel >= 0; cp++, channel--) s3c2410_dma_resume_chan(cp); } diff --git a/trunk/arch/arm/plat-samsung/devs.c b/trunk/arch/arm/plat-samsung/devs.c index d21d744e4d99..f10768e988d4 100644 --- a/trunk/arch/arm/plat-samsung/devs.c +++ b/trunk/arch/arm/plat-samsung/devs.c @@ -1409,7 +1409,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) #ifdef CONFIG_S3C_DEV_USB_HSOTG static struct resource s3c_usb_hsotg_resources[] = { - [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K), + [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K), [1] = DEFINE_RES_IRQ(IRQ_OTG), }; diff --git a/trunk/arch/x86/mm/hugetlbpage.c b/trunk/arch/x86/mm/hugetlbpage.c index 8ecbb4bba4b3..f581a18c0d4d 100644 --- a/trunk/arch/x86/mm/hugetlbpage.c +++ b/trunk/arch/x86/mm/hugetlbpage.c @@ -333,15 +333,13 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, * Lookup failure means no vma is above this address, * i.e. return with success: */ - vma = find_vma(mm, addr); - if (!vma) + if (!(vma = find_vma_prev(mm, addr, &prev_vma))) return addr; /* * new region fits between prev_vma->vm_end and * vma->vm_start, use it: */ - prev_vma = vma->vm_prev; if (addr + len <= vma->vm_start && (!prev_vma || (addr >= prev_vma->vm_end))) { /* remember the address as a hint for next time */ diff --git a/trunk/drivers/net/ethernet/broadcom/tg3.c b/trunk/drivers/net/ethernet/broadcom/tg3.c index 423d0235a878..35c2a202d67a 100644 --- a/trunk/drivers/net/ethernet/broadcom/tg3.c +++ b/trunk/drivers/net/ethernet/broadcom/tg3.c @@ -5352,7 +5352,7 @@ static void tg3_tx(struct tg3_napi *tnapi) } } - netdev_completed_queue(tp->dev, pkts_compl, bytes_compl); + netdev_tx_completed_queue(txq, pkts_compl, bytes_compl); tnapi->tx_cons = sw_idx; @@ -6793,7 +6793,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) } skb_tx_timestamp(skb); - netdev_sent_queue(tp->dev, skb->len); + netdev_tx_sent_queue(txq, skb->len); /* Packets are ready, update Tx producer idx local and on card. */ tw32_tx_mbox(tnapi->prodmbox, entry); @@ -7275,8 +7275,8 @@ static void tg3_free_rings(struct tg3 *tp) dev_kfree_skb_any(skb); } + netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j)); } - netdev_reset_queue(tp->dev); } /* Initialize tx/rx rings for packet processing. diff --git a/trunk/drivers/regulator/da9052-regulator.c b/trunk/drivers/regulator/da9052-regulator.c index ea4d8f575ac6..3767364452fd 100644 --- a/trunk/drivers/regulator/da9052-regulator.c +++ b/trunk/drivers/regulator/da9052-regulator.c @@ -260,8 +260,8 @@ static int da9052_set_ldo5_6_voltage(struct regulator_dev *rdev, * the LDO activate bit to implment the changes on the * LDO output. */ - return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, - info->activate_bit, info->activate_bit); + return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0, + info->activate_bit); } static int da9052_set_dcdc_voltage(struct regulator_dev *rdev, @@ -280,8 +280,8 @@ static int da9052_set_dcdc_voltage(struct regulator_dev *rdev, * the DCDC activate bit to implment the changes on the * DCDC output. */ - return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, - info->activate_bit, info->activate_bit); + return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0, + info->activate_bit); } static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev) diff --git a/trunk/drivers/s390/cio/qdio_main.c b/trunk/drivers/s390/cio/qdio_main.c index 770a740a393c..3ef8d071c64a 100644 --- a/trunk/drivers/s390/cio/qdio_main.c +++ b/trunk/drivers/s390/cio/qdio_main.c @@ -167,7 +167,7 @@ static int qdio_do_eqbs(struct qdio_q *q, unsigned char *state, DBF_ERROR("%4x EQBS ERROR", SCH_NO(q)); DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION, - q->nr, q->first_to_kick, count, q->irq_ptr->int_parm); + 0, -1, -1, q->irq_ptr->int_parm); return 0; } @@ -215,7 +215,7 @@ static int qdio_do_sqbs(struct qdio_q *q, unsigned char state, int start, DBF_ERROR("%4x SQBS ERROR", SCH_NO(q)); DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION, - q->nr, q->first_to_kick, count, q->irq_ptr->int_parm); + 0, -1, -1, q->irq_ptr->int_parm); return 0; } diff --git a/trunk/fs/cifs/dir.c b/trunk/fs/cifs/dir.c index bc7e24420ac0..63a196b97d50 100644 --- a/trunk/fs/cifs/dir.c +++ b/trunk/fs/cifs/dir.c @@ -584,26 +584,10 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, * If either that or op not supported returned, follow * the normal lookup. */ - switch (rc) { - case 0: - /* - * The server may allow us to open things like - * FIFOs, but the client isn't set up to deal - * with that. If it's not a regular file, just - * close it and proceed as if it were a normal - * lookup. - */ - if (newInode && !S_ISREG(newInode->i_mode)) { - CIFSSMBClose(xid, pTcon, fileHandle); - break; - } - case -ENOENT: + if ((rc == 0) || (rc == -ENOENT)) posix_open = true; - case -EOPNOTSUPP: - break; - default: + else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP)) pTcon->broken_posix_open = true; - } } if (!posix_open) rc = cifs_get_inode_info_unix(&newInode, full_path, diff --git a/trunk/fs/cifs/inode.c b/trunk/fs/cifs/inode.c index 745da3d0653e..a5f54b7d9822 100644 --- a/trunk/fs/cifs/inode.c +++ b/trunk/fs/cifs/inode.c @@ -534,11 +534,6 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info, if (fattr->cf_cifsattrs & ATTR_DIRECTORY) { fattr->cf_mode = S_IFDIR | cifs_sb->mnt_dir_mode; fattr->cf_dtype = DT_DIR; - /* - * Server can return wrong NumberOfLinks value for directories - * when Unix extensions are disabled - fake it. - */ - fattr->cf_nlink = 2; } else { fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode; fattr->cf_dtype = DT_REG; @@ -546,10 +541,10 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info, /* clear write bits if ATTR_READONLY is set */ if (fattr->cf_cifsattrs & ATTR_READONLY) fattr->cf_mode &= ~(S_IWUGO); - - fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks); } + fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks); + fattr->cf_uid = cifs_sb->mnt_uid; fattr->cf_gid = cifs_sb->mnt_gid; } @@ -1327,6 +1322,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode) } /*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need to set uid/gid */ + inc_nlink(inode); cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb); cifs_fill_uniqueid(inode->i_sb, &fattr); @@ -1359,6 +1355,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode) d_drop(direntry); } else { mkdir_get_info: + inc_nlink(inode); if (pTcon->unix_ext) rc = cifs_get_inode_info_unix(&newinode, full_path, inode->i_sb, xid); @@ -1439,11 +1436,6 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode) } } mkdir_out: - /* - * Force revalidate to get parent dir info when needed since cached - * attributes are invalid now. - */ - CIFS_I(inode)->time = 0; kfree(full_path); FreeXid(xid); cifs_put_tlink(tlink); @@ -1483,6 +1475,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) cifs_put_tlink(tlink); if (!rc) { + drop_nlink(inode); spin_lock(&direntry->d_inode->i_lock); i_size_write(direntry->d_inode, 0); clear_nlink(direntry->d_inode); @@ -1490,15 +1483,12 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) } cifsInode = CIFS_I(direntry->d_inode); - /* force revalidate to go get info when needed */ - cifsInode->time = 0; + cifsInode->time = 0; /* force revalidate to go get info when + needed */ cifsInode = CIFS_I(inode); - /* - * Force revalidate to get parent dir info when needed since cached - * attributes are invalid now. - */ - cifsInode->time = 0; + cifsInode->time = 0; /* force revalidate to get parent dir info + since cached search results now invalid */ direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); diff --git a/trunk/kernel/irq/manage.c b/trunk/kernel/irq/manage.c index 0f0d4704ddd8..32313c084442 100644 --- a/trunk/kernel/irq/manage.c +++ b/trunk/kernel/irq/manage.c @@ -985,11 +985,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) /* add new interrupt at end of irq queue */ do { - /* - * Or all existing action->thread_mask bits, - * so we can find the next zero bit for this - * new action. - */ thread_mask |= old->thread_mask; old_ptr = &old->next; old = *old_ptr; @@ -998,41 +993,14 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) } /* - * Setup the thread mask for this irqaction for ONESHOT. For - * !ONESHOT irqs the thread mask is 0 so we can avoid a - * conditional in irq_wake_thread(). + * Setup the thread mask for this irqaction. Unlikely to have + * 32 resp 64 irqs sharing one line, but who knows. */ - if (new->flags & IRQF_ONESHOT) { - /* - * Unlikely to have 32 resp 64 irqs sharing one line, - * but who knows. - */ - if (thread_mask == ~0UL) { - ret = -EBUSY; - goto out_mask; - } - /* - * The thread_mask for the action is or'ed to - * desc->thread_active to indicate that the - * IRQF_ONESHOT thread handler has been woken, but not - * yet finished. The bit is cleared when a thread - * completes. When all threads of a shared interrupt - * line have completed desc->threads_active becomes - * zero and the interrupt line is unmasked. See - * handle.c:irq_wake_thread() for further information. - * - * If no thread is woken by primary (hard irq context) - * interrupt handlers, then desc->threads_active is - * also checked for zero to unmask the irq line in the - * affected hard irq flow handlers - * (handle_[fasteoi|level]_irq). - * - * The new action gets the first zero bit of - * thread_mask assigned. See the loop above which or's - * all existing action->thread_mask bits. - */ - new->thread_mask = 1 << ffz(thread_mask); + if (new->flags & IRQF_ONESHOT && thread_mask == ~0UL) { + ret = -EBUSY; + goto out_mask; } + new->thread_mask = 1 << ffz(thread_mask); if (!shared) { init_waitqueue_head(&desc->wait_for_threads); diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index 38e612e66da5..8e75003d62f6 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -891,15 +891,9 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, case 'U': return uuid_string(buf, end, ptr, spec, fmt); case 'V': - { - va_list va; - - va_copy(va, *((struct va_format *)ptr)->va); - buf += vsnprintf(buf, end > buf ? end - buf : 0, - ((struct va_format *)ptr)->fmt, va); - va_end(va); - return buf; - } + return buf + vsnprintf(buf, end > buf ? end - buf : 0, + ((struct va_format *)ptr)->fmt, + *(((struct va_format *)ptr)->va)); case 'K': /* * %pK cannot be used in IRQ context because its test diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index 47296fee23db..06b145fb64ab 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -640,11 +640,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start, unsigned long vmstart; unsigned long vmend; - vma = find_vma(mm, start); + vma = find_vma_prev(mm, start, &prev); if (!vma || vma->vm_start > start) return -EFAULT; - prev = vma->vm_prev; if (start > vma->vm_start) prev = vma; diff --git a/trunk/mm/mlock.c b/trunk/mm/mlock.c index ef726e8aa8e9..4f4f53bdc65d 100644 --- a/trunk/mm/mlock.c +++ b/trunk/mm/mlock.c @@ -385,11 +385,10 @@ static int do_mlock(unsigned long start, size_t len, int on) return -EINVAL; if (end == start) return 0; - vma = find_vma(current->mm, start); + vma = find_vma_prev(current->mm, start, &prev); if (!vma || vma->vm_start > start) return -ENOMEM; - prev = vma->vm_prev; if (start > vma->vm_start) prev = vma; diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index da15a79b1441..22e1a0b2f70c 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -1266,9 +1266,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, vma->vm_pgoff = pgoff; INIT_LIST_HEAD(&vma->anon_vma_chain); - error = -EINVAL; /* when rejecting VM_GROWSDOWN|VM_GROWSUP */ - if (file) { + error = -EINVAL; if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP)) goto free_vma; if (vm_flags & VM_DENYWRITE) { @@ -1608,6 +1607,7 @@ EXPORT_SYMBOL(find_vma); /* * Same as find_vma, but also return a pointer to the previous VMA in *pprev. + * Note: pprev is set to NULL when return value is NULL. */ struct vm_area_struct * find_vma_prev(struct mm_struct *mm, unsigned long addr, @@ -1616,16 +1616,7 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, struct vm_area_struct *vma; vma = find_vma(mm, addr); - if (vma) { - *pprev = vma->vm_prev; - } else { - struct rb_node *rb_node = mm->mm_rb.rb_node; - *pprev = NULL; - while (rb_node) { - *pprev = rb_entry(rb_node, struct vm_area_struct, vm_rb); - rb_node = rb_node->rb_right; - } - } + *pprev = vma ? vma->vm_prev : NULL; return vma; } diff --git a/trunk/mm/mprotect.c b/trunk/mm/mprotect.c index f437d054c3bf..5a688a2756be 100644 --- a/trunk/mm/mprotect.c +++ b/trunk/mm/mprotect.c @@ -262,11 +262,10 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, down_write(¤t->mm->mmap_sem); - vma = find_vma(current->mm, start); + vma = find_vma_prev(current->mm, start, &prev); error = -ENOMEM; if (!vma) goto out; - prev = vma->vm_prev; if (unlikely(grows & PROT_GROWSDOWN)) { if (vma->vm_start >= end) goto out; diff --git a/trunk/mm/page_cgroup.c b/trunk/mm/page_cgroup.c index 1ccbd714059c..de1616aa9b1e 100644 --- a/trunk/mm/page_cgroup.c +++ b/trunk/mm/page_cgroup.c @@ -379,15 +379,13 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent, pgoff_t offset = swp_offset(ent); struct swap_cgroup_ctrl *ctrl; struct page *mappage; - struct swap_cgroup *sc; ctrl = &swap_cgroup_ctrl[swp_type(ent)]; if (ctrlp) *ctrlp = ctrl; mappage = ctrl->map[offset / SC_PER_PAGE]; - sc = page_address(mappage); - return sc + offset % SC_PER_PAGE; + return page_address(mappage) + offset % SC_PER_PAGE; } /**