diff options
188 files changed, 1215 insertions, 714 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 033d4e69b43b..d99fd9c0ec0e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -2211,6 +2211,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2211 | 2211 | ||
| 2212 | default: off. | 2212 | default: off. |
| 2213 | 2213 | ||
| 2214 | printk.always_kmsg_dump= | ||
| 2215 | Trigger kmsg_dump for cases other than kernel oops or | ||
| 2216 | panics | ||
| 2217 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) | ||
| 2218 | default: disabled | ||
| 2219 | |||
| 2214 | printk.time= Show timing data prefixed to each printk message line | 2220 | printk.time= Show timing data prefixed to each printk message line |
| 2215 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) | 2221 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) |
| 2216 | 2222 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 0a96e80d4515..b087b3bca290 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1310,7 +1310,7 @@ F: drivers/atm/ | |||
| 1310 | F: include/linux/atm* | 1310 | F: include/linux/atm* |
| 1311 | 1311 | ||
| 1312 | ATMEL AT91 MCI DRIVER | 1312 | ATMEL AT91 MCI DRIVER |
| 1313 | M: Nicolas Ferre <nicolas.ferre@atmel.com> | 1313 | M: Ludovic Desroches <ludovic.desroches@atmel.com> |
| 1314 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1314 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1315 | W: http://www.atmel.com/products/AT91/ | 1315 | W: http://www.atmel.com/products/AT91/ |
| 1316 | W: http://www.at91.com/ | 1316 | W: http://www.at91.com/ |
| @@ -1318,7 +1318,7 @@ S: Maintained | |||
| 1318 | F: drivers/mmc/host/at91_mci.c | 1318 | F: drivers/mmc/host/at91_mci.c |
| 1319 | 1319 | ||
| 1320 | ATMEL AT91 / AT32 MCI DRIVER | 1320 | ATMEL AT91 / AT32 MCI DRIVER |
| 1321 | M: Nicolas Ferre <nicolas.ferre@atmel.com> | 1321 | M: Ludovic Desroches <ludovic.desroches@atmel.com> |
| 1322 | S: Maintained | 1322 | S: Maintained |
| 1323 | F: drivers/mmc/host/atmel-mci.c | 1323 | F: drivers/mmc/host/atmel-mci.c |
| 1324 | F: drivers/mmc/host/atmel-mci-regs.h | 1324 | F: drivers/mmc/host/atmel-mci-regs.h |
| @@ -7271,7 +7271,7 @@ WATCHDOG DEVICE DRIVERS | |||
| 7271 | M: Wim Van Sebroeck <wim@iguana.be> | 7271 | M: Wim Van Sebroeck <wim@iguana.be> |
| 7272 | L: linux-watchdog@vger.kernel.org | 7272 | L: linux-watchdog@vger.kernel.org |
| 7273 | W: http://www.linux-watchdog.org/ | 7273 | W: http://www.linux-watchdog.org/ |
| 7274 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git | 7274 | T: git git://www.linux-watchdog.org/linux-watchdog.git |
| 7275 | S: Maintained | 7275 | S: Maintained |
| 7276 | F: Documentation/watchdog/ | 7276 | F: Documentation/watchdog/ |
| 7277 | F: drivers/watchdog/ | 7277 | F: drivers/watchdog/ |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 3 | 1 | VERSION = 3 |
| 2 | PATCHLEVEL = 3 | 2 | PATCHLEVEL = 3 |
| 3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
| 4 | EXTRAVERSION = -rc5 | 4 | EXTRAVERSION = -rc6 |
| 5 | NAME = Saber-toothed Squirrel | 5 | NAME = Saber-toothed Squirrel |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/include/asm/futex.h b/arch/alpha/include/asm/futex.h index e8a761aee088..f939794363ac 100644 --- a/arch/alpha/include/asm/futex.h +++ b/arch/alpha/include/asm/futex.h | |||
| @@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
| 108 | " lda $31,3b-2b(%0)\n" | 108 | " lda $31,3b-2b(%0)\n" |
| 109 | " .previous\n" | 109 | " .previous\n" |
| 110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) | 110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) |
| 111 | : "r"(uaddr), "r"((long)oldval), "r"(newval) | 111 | : "r"(uaddr), "r"((long)(int)oldval), "r"(newval) |
| 112 | : "memory"); | 112 | : "memory"); |
| 113 | 113 | ||
| 114 | *uval = prev; | 114 | *uval = prev; |
diff --git a/arch/arm/mach-lpc32xx/include/mach/irqs.h b/arch/arm/mach-lpc32xx/include/mach/irqs.h index 2667f52e3b04..9e3b90df32e1 100644 --- a/arch/arm/mach-lpc32xx/include/mach/irqs.h +++ b/arch/arm/mach-lpc32xx/include/mach/irqs.h | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | */ | 61 | */ |
| 62 | #define IRQ_LPC32XX_JTAG_COMM_TX LPC32XX_SIC1_IRQ(1) | 62 | #define IRQ_LPC32XX_JTAG_COMM_TX LPC32XX_SIC1_IRQ(1) |
| 63 | #define IRQ_LPC32XX_JTAG_COMM_RX LPC32XX_SIC1_IRQ(2) | 63 | #define IRQ_LPC32XX_JTAG_COMM_RX LPC32XX_SIC1_IRQ(2) |
| 64 | #define IRQ_LPC32XX_GPI_11 LPC32XX_SIC1_IRQ(4) | 64 | #define IRQ_LPC32XX_GPI_28 LPC32XX_SIC1_IRQ(4) |
| 65 | #define IRQ_LPC32XX_TS_P LPC32XX_SIC1_IRQ(6) | 65 | #define IRQ_LPC32XX_TS_P LPC32XX_SIC1_IRQ(6) |
| 66 | #define IRQ_LPC32XX_TS_IRQ LPC32XX_SIC1_IRQ(7) | 66 | #define IRQ_LPC32XX_TS_IRQ LPC32XX_SIC1_IRQ(7) |
| 67 | #define IRQ_LPC32XX_TS_AUX LPC32XX_SIC1_IRQ(8) | 67 | #define IRQ_LPC32XX_TS_AUX LPC32XX_SIC1_IRQ(8) |
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index 4eae566dfdc7..c74de01ab5b6 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
| @@ -118,6 +118,10 @@ static const struct lpc32xx_event_info lpc32xx_events[NR_IRQS] = { | |||
| 118 | .event_group = &lpc32xx_event_pin_regs, | 118 | .event_group = &lpc32xx_event_pin_regs, |
| 119 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_06_BIT, | 119 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_06_BIT, |
| 120 | }, | 120 | }, |
| 121 | [IRQ_LPC32XX_GPI_28] = { | ||
| 122 | .event_group = &lpc32xx_event_pin_regs, | ||
| 123 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_28_BIT, | ||
| 124 | }, | ||
| 121 | [IRQ_LPC32XX_GPIO_00] = { | 125 | [IRQ_LPC32XX_GPIO_00] = { |
| 122 | .event_group = &lpc32xx_event_int_regs, | 126 | .event_group = &lpc32xx_event_int_regs, |
| 123 | .mask = LPC32XX_CLKPWR_INTSRC_GPIO_00_BIT, | 127 | .mask = LPC32XX_CLKPWR_INTSRC_GPIO_00_BIT, |
| @@ -305,9 +309,18 @@ static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state) | |||
| 305 | 309 | ||
| 306 | if (state) | 310 | if (state) |
| 307 | eventreg |= lpc32xx_events[d->irq].mask; | 311 | eventreg |= lpc32xx_events[d->irq].mask; |
| 308 | else | 312 | else { |
| 309 | eventreg &= ~lpc32xx_events[d->irq].mask; | 313 | eventreg &= ~lpc32xx_events[d->irq].mask; |
| 310 | 314 | ||
| 315 | /* | ||
| 316 | * When disabling the wakeup, clear the latched | ||
| 317 | * event | ||
| 318 | */ | ||
| 319 | __raw_writel(lpc32xx_events[d->irq].mask, | ||
| 320 | lpc32xx_events[d->irq]. | ||
| 321 | event_group->rawstat_reg); | ||
| 322 | } | ||
| 323 | |||
| 311 | __raw_writel(eventreg, | 324 | __raw_writel(eventreg, |
| 312 | lpc32xx_events[d->irq].event_group->enab_reg); | 325 | lpc32xx_events[d->irq].event_group->enab_reg); |
| 313 | 326 | ||
| @@ -380,13 +393,15 @@ void __init lpc32xx_init_irq(void) | |||
| 380 | 393 | ||
| 381 | /* Setup SIC1 */ | 394 | /* Setup SIC1 */ |
| 382 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); | 395 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); |
| 383 | __raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE)); | 396 | __raw_writel(SIC1_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE)); |
| 384 | __raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE)); | 397 | __raw_writel(SIC1_ATR_DEFAULT, |
| 398 | LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE)); | ||
| 385 | 399 | ||
| 386 | /* Setup SIC2 */ | 400 | /* Setup SIC2 */ |
| 387 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); | 401 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); |
| 388 | __raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE)); | 402 | __raw_writel(SIC2_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE)); |
| 389 | __raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE)); | 403 | __raw_writel(SIC2_ATR_DEFAULT, |
| 404 | LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE)); | ||
| 390 | 405 | ||
| 391 | /* Configure supported IRQ's */ | 406 | /* Configure supported IRQ's */ |
| 392 | for (i = 0; i < NR_IRQS; i++) { | 407 | for (i = 0; i < NR_IRQS; i++) { |
diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c index 429cfdbb2b3d..f2735281616a 100644 --- a/arch/arm/mach-lpc32xx/serial.c +++ b/arch/arm/mach-lpc32xx/serial.c | |||
| @@ -88,6 +88,7 @@ struct uartinit { | |||
| 88 | char *uart_ck_name; | 88 | char *uart_ck_name; |
| 89 | u32 ck_mode_mask; | 89 | u32 ck_mode_mask; |
| 90 | void __iomem *pdiv_clk_reg; | 90 | void __iomem *pdiv_clk_reg; |
| 91 | resource_size_t mapbase; | ||
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| 93 | static struct uartinit uartinit_data[] __initdata = { | 94 | static struct uartinit uartinit_data[] __initdata = { |
| @@ -97,6 +98,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
| 97 | .ck_mode_mask = | 98 | .ck_mode_mask = |
| 98 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 5), | 99 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 5), |
| 99 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART5_CLK_CTRL, | 100 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART5_CLK_CTRL, |
| 101 | .mapbase = LPC32XX_UART5_BASE, | ||
| 100 | }, | 102 | }, |
| 101 | #endif | 103 | #endif |
| 102 | #ifdef CONFIG_ARCH_LPC32XX_UART3_SELECT | 104 | #ifdef CONFIG_ARCH_LPC32XX_UART3_SELECT |
| @@ -105,6 +107,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
| 105 | .ck_mode_mask = | 107 | .ck_mode_mask = |
| 106 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 3), | 108 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 3), |
| 107 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART3_CLK_CTRL, | 109 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART3_CLK_CTRL, |
| 110 | .mapbase = LPC32XX_UART3_BASE, | ||
| 108 | }, | 111 | }, |
| 109 | #endif | 112 | #endif |
| 110 | #ifdef CONFIG_ARCH_LPC32XX_UART4_SELECT | 113 | #ifdef CONFIG_ARCH_LPC32XX_UART4_SELECT |
| @@ -113,6 +116,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
| 113 | .ck_mode_mask = | 116 | .ck_mode_mask = |
| 114 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 4), | 117 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 4), |
| 115 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART4_CLK_CTRL, | 118 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART4_CLK_CTRL, |
| 119 | .mapbase = LPC32XX_UART4_BASE, | ||
| 116 | }, | 120 | }, |
| 117 | #endif | 121 | #endif |
| 118 | #ifdef CONFIG_ARCH_LPC32XX_UART6_SELECT | 122 | #ifdef CONFIG_ARCH_LPC32XX_UART6_SELECT |
| @@ -121,6 +125,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
| 121 | .ck_mode_mask = | 125 | .ck_mode_mask = |
| 122 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 6), | 126 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 6), |
| 123 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART6_CLK_CTRL, | 127 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART6_CLK_CTRL, |
| 128 | .mapbase = LPC32XX_UART6_BASE, | ||
| 124 | }, | 129 | }, |
| 125 | #endif | 130 | #endif |
| 126 | }; | 131 | }; |
| @@ -165,11 +170,24 @@ void __init lpc32xx_serial_init(void) | |||
| 165 | 170 | ||
| 166 | /* pre-UART clock divider set to 1 */ | 171 | /* pre-UART clock divider set to 1 */ |
| 167 | __raw_writel(0x0101, uartinit_data[i].pdiv_clk_reg); | 172 | __raw_writel(0x0101, uartinit_data[i].pdiv_clk_reg); |
| 173 | |||
| 174 | /* | ||
| 175 | * Force a flush of the RX FIFOs to work around a | ||
| 176 | * HW bug | ||
| 177 | */ | ||
| 178 | puart = uartinit_data[i].mapbase; | ||
| 179 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); | ||
| 180 | __raw_writel(0x00, LPC32XX_UART_DLL_FIFO(puart)); | ||
| 181 | j = LPC32XX_SUART_FIFO_SIZE; | ||
| 182 | while (j--) | ||
| 183 | tmp = __raw_readl( | ||
| 184 | LPC32XX_UART_DLL_FIFO(puart)); | ||
| 185 | __raw_writel(0, LPC32XX_UART_IIR_FCR(puart)); | ||
| 168 | } | 186 | } |
| 169 | 187 | ||
| 170 | /* This needs to be done after all UART clocks are setup */ | 188 | /* This needs to be done after all UART clocks are setup */ |
| 171 | __raw_writel(clkmodes, LPC32XX_UARTCTL_CLKMODE); | 189 | __raw_writel(clkmodes, LPC32XX_UARTCTL_CLKMODE); |
| 172 | for (i = 0; i < ARRAY_SIZE(uartinit_data) - 1; i++) { | 190 | for (i = 0; i < ARRAY_SIZE(uartinit_data); i++) { |
| 173 | /* Force a flush of the RX FIFOs to work around a HW bug */ | 191 | /* Force a flush of the RX FIFOs to work around a HW bug */ |
| 174 | puart = serial_std_platform_data[i].mapbase; | 192 | puart = serial_std_platform_data[i].mapbase; |
| 175 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); | 193 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); |
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 17cb76060125..3588a5584153 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
| 18 | #include <linux/mtd/nand.h> | 18 | #include <linux/mtd/nand.h> |
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/gpio.h> | ||
| 21 | 20 | ||
| 22 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
| 23 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 7bc17eaa12eb..ada1213982b4 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
| 25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
| 26 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
| 27 | #include <linux/platform_device.h> | ||
| 28 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
| 29 | #include <mach/pxa168.h> | 28 | #include <mach/pxa168.h> |
| 30 | 29 | ||
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index 8e3b5af04a57..bc97170125bf 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/smc91x.h> | 14 | #include <linux/smc91x.h> |
| 15 | #include <linux/gpio.h> | ||
| 16 | 15 | ||
| 17 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
| 18 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 309369ea6978..be2002f42dea 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
| @@ -416,13 +416,13 @@ static void __init innovator_init(void) | |||
| 416 | #ifdef CONFIG_ARCH_OMAP15XX | 416 | #ifdef CONFIG_ARCH_OMAP15XX |
| 417 | if (cpu_is_omap1510()) { | 417 | if (cpu_is_omap1510()) { |
| 418 | omap1_usb_init(&innovator1510_usb_config); | 418 | omap1_usb_init(&innovator1510_usb_config); |
| 419 | innovator_config[1].data = &innovator1510_lcd_config; | 419 | innovator_config[0].data = &innovator1510_lcd_config; |
| 420 | } | 420 | } |
| 421 | #endif | 421 | #endif |
| 422 | #ifdef CONFIG_ARCH_OMAP16XX | 422 | #ifdef CONFIG_ARCH_OMAP16XX |
| 423 | if (cpu_is_omap1610()) { | 423 | if (cpu_is_omap1610()) { |
| 424 | omap1_usb_init(&h2_usb_config); | 424 | omap1_usb_init(&h2_usb_config); |
| 425 | innovator_config[1].data = &innovator1610_lcd_config; | 425 | innovator_config[0].data = &innovator1610_lcd_config; |
| 426 | } | 426 | } |
| 427 | #endif | 427 | #endif |
| 428 | omap_board_config = innovator_config; | 428 | omap_board_config = innovator_config; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index d965da45160e..e20c8ab80b0e 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -364,8 +364,8 @@ config OMAP3_SDRC_AC_TIMING | |||
| 364 | going on could result in system crashes; | 364 | going on could result in system crashes; |
| 365 | 365 | ||
| 366 | config OMAP4_ERRATA_I688 | 366 | config OMAP4_ERRATA_I688 |
| 367 | bool "OMAP4 errata: Async Bridge Corruption (BROKEN)" | 367 | bool "OMAP4 errata: Async Bridge Corruption" |
| 368 | depends on ARCH_OMAP4 && BROKEN | 368 | depends on ARCH_OMAP4 |
| 369 | select ARCH_HAS_BARRIERS | 369 | select ARCH_HAS_BARRIERS |
| 370 | help | 370 | help |
| 371 | If a data is stalled inside asynchronous bridge because of back | 371 | If a data is stalled inside asynchronous bridge because of back |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 42a4d11fad23..672262717601 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
| @@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) | |||
| 371 | else | 371 | else |
| 372 | *openp = 0; | 372 | *openp = 0; |
| 373 | 373 | ||
| 374 | #ifdef CONFIG_MMC_OMAP | ||
| 374 | omap_mmc_notify_cover_event(mmc_device, index, *openp); | 375 | omap_mmc_notify_cover_event(mmc_device, index, *openp); |
| 376 | #else | ||
| 377 | pr_warn("MMC: notify cover event not available\n"); | ||
| 378 | #endif | ||
| 375 | } | 379 | } |
| 376 | 380 | ||
| 377 | static int n8x0_mmc_late_init(struct device *dev) | 381 | static int n8x0_mmc_late_init(struct device *dev) |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c775bead1497..c877236a8442 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
| @@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
| 381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); | 381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); |
| 382 | 382 | ||
| 383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
| 384 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 384 | gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1; |
| 385 | 385 | ||
| 386 | platform_device_register(&leds_gpio); | 386 | platform_device_register(&leds_gpio); |
| 387 | 387 | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index febffde2ff10..7e9338e8d684 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
| @@ -132,6 +132,7 @@ void omap3_map_io(void); | |||
| 132 | void am33xx_map_io(void); | 132 | void am33xx_map_io(void); |
| 133 | void omap4_map_io(void); | 133 | void omap4_map_io(void); |
| 134 | void ti81xx_map_io(void); | 134 | void ti81xx_map_io(void); |
| 135 | void omap_barriers_init(void); | ||
| 135 | 136 | ||
| 136 | /** | 137 | /** |
| 137 | * omap_test_timeout - busy-loop, testing a condition | 138 | * omap_test_timeout - busy-loop, testing a condition |
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index cfdbb86bc84e..72e018b9b260 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
| @@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
| 65 | struct timespec ts_preidle, ts_postidle, ts_idle; | 65 | struct timespec ts_preidle, ts_postidle, ts_idle; |
| 66 | u32 cpu1_state; | 66 | u32 cpu1_state; |
| 67 | int idle_time; | 67 | int idle_time; |
| 68 | int new_state_idx; | ||
| 69 | int cpu_id = smp_processor_id(); | 68 | int cpu_id = smp_processor_id(); |
| 70 | 69 | ||
| 71 | /* Used to keep track of the total time in idle */ | 70 | /* Used to keep track of the total time in idle */ |
| @@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
| 84 | */ | 83 | */ |
| 85 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); | 84 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); |
| 86 | if (cpu1_state != PWRDM_POWER_OFF) { | 85 | if (cpu1_state != PWRDM_POWER_OFF) { |
| 87 | new_state_idx = drv->safe_state_index; | 86 | index = drv->safe_state_index; |
| 88 | cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]); | 87 | cx = cpuidle_get_statedata(&dev->states_usage[index]); |
| 89 | } | 88 | } |
| 90 | 89 | ||
| 91 | if (index > 0) | 90 | if (index > 0) |
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 997033129d26..bbb870c04a5e 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
| @@ -19,6 +19,8 @@ | |||
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
| 22 | #include <linux/regulator/fixed.h> | ||
| 23 | #include <linux/regulator/machine.h> | ||
| 22 | 24 | ||
| 23 | #include <plat/board.h> | 25 | #include <plat/board.h> |
| 24 | #include <plat/gpmc.h> | 26 | #include <plat/gpmc.h> |
| @@ -42,6 +44,50 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = { | |||
| 42 | .flags = SMSC911X_USE_16BIT, | 44 | .flags = SMSC911X_USE_16BIT, |
| 43 | }; | 45 | }; |
| 44 | 46 | ||
| 47 | static struct regulator_consumer_supply gpmc_smsc911x_supply[] = { | ||
| 48 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
| 49 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
| 50 | }; | ||
| 51 | |||
| 52 | /* Generic regulator definition to satisfy smsc911x */ | ||
| 53 | static struct regulator_init_data gpmc_smsc911x_reg_init_data = { | ||
| 54 | .constraints = { | ||
| 55 | .min_uV = 3300000, | ||
| 56 | .max_uV = 3300000, | ||
| 57 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 58 | | REGULATOR_MODE_STANDBY, | ||
| 59 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 60 | | REGULATOR_CHANGE_STATUS, | ||
| 61 | }, | ||
| 62 | .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply), | ||
| 63 | .consumer_supplies = gpmc_smsc911x_supply, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = { | ||
| 67 | .supply_name = "gpmc_smsc911x", | ||
| 68 | .microvolts = 3300000, | ||
| 69 | .gpio = -EINVAL, | ||
| 70 | .startup_delay = 0, | ||
| 71 | .enable_high = 0, | ||
| 72 | .enabled_at_boot = 1, | ||
| 73 | .init_data = &gpmc_smsc911x_reg_init_data, | ||
| 74 | }; | ||
| 75 | |||
| 76 | /* | ||
| 77 | * Platform device id of 42 is a temporary fix to avoid conflicts | ||
| 78 | * with other reg-fixed-voltage devices. The real fix should | ||
| 79 | * involve the driver core providing a way of dynamically | ||
| 80 | * assigning a unique id on registration for platform devices | ||
| 81 | * in the same name space. | ||
| 82 | */ | ||
| 83 | static struct platform_device gpmc_smsc911x_regulator = { | ||
| 84 | .name = "reg-fixed-voltage", | ||
| 85 | .id = 42, | ||
| 86 | .dev = { | ||
| 87 | .platform_data = &gpmc_smsc911x_fixed_reg_data, | ||
| 88 | }, | ||
| 89 | }; | ||
| 90 | |||
| 45 | /* | 91 | /* |
| 46 | * Initialize smsc911x device connected to the GPMC. Note that we | 92 | * Initialize smsc911x device connected to the GPMC. Note that we |
| 47 | * assume that pin multiplexing is done in the board-*.c file, | 93 | * assume that pin multiplexing is done in the board-*.c file, |
| @@ -55,6 +101,12 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | |||
| 55 | 101 | ||
| 56 | gpmc_cfg = board_data; | 102 | gpmc_cfg = board_data; |
| 57 | 103 | ||
| 104 | ret = platform_device_register(&gpmc_smsc911x_regulator); | ||
| 105 | if (ret < 0) { | ||
| 106 | pr_err("Unable to register smsc911x regulators: %d\n", ret); | ||
| 107 | return; | ||
| 108 | } | ||
| 109 | |||
| 58 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | 110 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { |
| 59 | pr_err("Failed to request GPMC mem region\n"); | 111 | pr_err("Failed to request GPMC mem region\n"); |
| 60 | return; | 112 | return; |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index b40c28895298..19dd1657245c 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
| @@ -428,6 +428,7 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
| 428 | return 0; | 428 | return 0; |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | static int omap_hsmmc_done; | ||
| 431 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 | 432 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 |
| 432 | 433 | ||
| 433 | void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | 434 | void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) |
| @@ -491,6 +492,11 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
| 491 | { | 492 | { |
| 492 | u32 reg; | 493 | u32 reg; |
| 493 | 494 | ||
| 495 | if (omap_hsmmc_done) | ||
| 496 | return; | ||
| 497 | |||
| 498 | omap_hsmmc_done = 1; | ||
| 499 | |||
| 494 | if (!cpu_is_omap44xx()) { | 500 | if (!cpu_is_omap44xx()) { |
| 495 | if (cpu_is_omap2430()) { | 501 | if (cpu_is_omap2430()) { |
| 496 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | 502 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index eb50c29fb644..fb11b44fbdec 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
| @@ -307,6 +307,7 @@ void __init omapam33xx_map_common_io(void) | |||
| 307 | void __init omap44xx_map_common_io(void) | 307 | void __init omap44xx_map_common_io(void) |
| 308 | { | 308 | { |
| 309 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 309 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
| 310 | omap_barriers_init(); | ||
| 310 | } | 311 | } |
| 311 | #endif | 312 | #endif |
| 312 | 313 | ||
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 609ea2ded7e3..2cc1aa004b94 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
| @@ -281,8 +281,16 @@ static struct omap_mbox mbox_iva_info = { | |||
| 281 | .ops = &omap2_mbox_ops, | 281 | .ops = &omap2_mbox_ops, |
| 282 | .priv = &omap2_mbox_iva_priv, | 282 | .priv = &omap2_mbox_iva_priv, |
| 283 | }; | 283 | }; |
| 284 | #endif | ||
| 284 | 285 | ||
| 285 | struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL }; | 286 | #ifdef CONFIG_ARCH_OMAP2 |
| 287 | struct omap_mbox *omap2_mboxes[] = { | ||
| 288 | &mbox_dsp_info, | ||
| 289 | #ifdef CONFIG_SOC_OMAP2420 | ||
| 290 | &mbox_iva_info, | ||
| 291 | #endif | ||
| 292 | NULL | ||
| 293 | }; | ||
| 286 | #endif | 294 | #endif |
| 287 | 295 | ||
| 288 | #if defined(CONFIG_ARCH_OMAP4) | 296 | #if defined(CONFIG_ARCH_OMAP4) |
| @@ -412,7 +420,8 @@ static void __exit omap2_mbox_exit(void) | |||
| 412 | platform_driver_unregister(&omap2_mbox_driver); | 420 | platform_driver_unregister(&omap2_mbox_driver); |
| 413 | } | 421 | } |
| 414 | 422 | ||
| 415 | module_init(omap2_mbox_init); | 423 | /* must be ready before omap3isp is probed */ |
| 424 | subsys_initcall(omap2_mbox_init); | ||
| 416 | module_exit(omap2_mbox_exit); | 425 | module_exit(omap2_mbox_exit); |
| 417 | 426 | ||
| 418 | MODULE_LICENSE("GPL v2"); | 427 | MODULE_LICENSE("GPL v2"); |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index fb8bc9fa43b1..611a0e3d54ca 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
| @@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
| 218 | return -ENODEV; | 218 | return -ENODEV; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | static int __init | 221 | static int |
| 222 | omap_mux_get_by_name(const char *muxname, | 222 | omap_mux_get_by_name(const char *muxname, |
| 223 | struct omap_mux_partition **found_partition, | 223 | struct omap_mux_partition **found_partition, |
| 224 | struct omap_mux **found_mux) | 224 | struct omap_mux **found_mux) |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 40a8fbc07e4b..ebc595091312 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | #include <plat/irqs.h> | 25 | #include <plat/irqs.h> |
| 26 | #include <plat/sram.h> | 26 | #include <plat/sram.h> |
| 27 | #include <plat/omap-secure.h> | ||
| 27 | 28 | ||
| 28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
| 29 | #include <mach/omap-wakeupgen.h> | 30 | #include <mach/omap-wakeupgen.h> |
| @@ -43,6 +44,9 @@ static void __iomem *sar_ram_base; | |||
| 43 | 44 | ||
| 44 | void __iomem *dram_sync, *sram_sync; | 45 | void __iomem *dram_sync, *sram_sync; |
| 45 | 46 | ||
| 47 | static phys_addr_t paddr; | ||
| 48 | static u32 size; | ||
| 49 | |||
| 46 | void omap_bus_sync(void) | 50 | void omap_bus_sync(void) |
| 47 | { | 51 | { |
| 48 | if (dram_sync && sram_sync) { | 52 | if (dram_sync && sram_sync) { |
| @@ -52,18 +56,20 @@ void omap_bus_sync(void) | |||
| 52 | } | 56 | } |
| 53 | } | 57 | } |
| 54 | 58 | ||
| 55 | static int __init omap_barriers_init(void) | 59 | /* Steal one page physical memory for barrier implementation */ |
| 60 | int __init omap_barrier_reserve_memblock(void) | ||
| 56 | { | 61 | { |
| 57 | struct map_desc dram_io_desc[1]; | ||
| 58 | phys_addr_t paddr; | ||
| 59 | u32 size; | ||
| 60 | |||
| 61 | if (!cpu_is_omap44xx()) | ||
| 62 | return -ENODEV; | ||
| 63 | 62 | ||
| 64 | size = ALIGN(PAGE_SIZE, SZ_1M); | 63 | size = ALIGN(PAGE_SIZE, SZ_1M); |
| 65 | paddr = arm_memblock_steal(size, SZ_1M); | 64 | paddr = arm_memblock_steal(size, SZ_1M); |
| 66 | 65 | ||
| 66 | return 0; | ||
| 67 | } | ||
| 68 | |||
| 69 | void __init omap_barriers_init(void) | ||
| 70 | { | ||
| 71 | struct map_desc dram_io_desc[1]; | ||
| 72 | |||
| 67 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 73 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
| 68 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 74 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
| 69 | dram_io_desc[0].length = size; | 75 | dram_io_desc[0].length = size; |
| @@ -75,9 +81,10 @@ static int __init omap_barriers_init(void) | |||
| 75 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", | 81 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", |
| 76 | (long long) paddr, dram_io_desc[0].virtual); | 82 | (long long) paddr, dram_io_desc[0].virtual); |
| 77 | 83 | ||
| 78 | return 0; | ||
| 79 | } | 84 | } |
| 80 | core_initcall(omap_barriers_init); | 85 | #else |
| 86 | void __init omap_barriers_init(void) | ||
| 87 | {} | ||
| 81 | #endif | 88 | #endif |
| 82 | 89 | ||
| 83 | void __init gic_init_irq(void) | 90 | void __init gic_init_irq(void) |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 1881fe915149..5a65dd04aa38 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
| @@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
| 174 | freq = clk->rate; | 174 | freq = clk->rate; |
| 175 | clk_put(clk); | 175 | clk_put(clk); |
| 176 | 176 | ||
| 177 | rcu_read_lock(); | ||
| 177 | opp = opp_find_freq_ceil(dev, &freq); | 178 | opp = opp_find_freq_ceil(dev, &freq); |
| 178 | if (IS_ERR(opp)) { | 179 | if (IS_ERR(opp)) { |
| 180 | rcu_read_unlock(); | ||
| 179 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", | 181 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", |
| 180 | __func__, vdd_name); | 182 | __func__, vdd_name); |
| 181 | goto exit; | 183 | goto exit; |
| 182 | } | 184 | } |
| 183 | 185 | ||
| 184 | bootup_volt = opp_get_voltage(opp); | 186 | bootup_volt = opp_get_voltage(opp); |
| 187 | rcu_read_unlock(); | ||
| 185 | if (!bootup_volt) { | 188 | if (!bootup_volt) { |
| 186 | pr_err("%s: unable to find voltage corresponding " | 189 | pr_err("%s: unable to find voltage corresponding " |
| 187 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); | 190 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 771dc781b746..f51348dafafd 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
| @@ -486,7 +486,7 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
| 486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) |
| 487 | { | 487 | { |
| 488 | struct omap_hwmod *oh[2]; | 488 | struct omap_hwmod *oh[2]; |
| 489 | struct omap_device *od; | 489 | struct platform_device *pdev; |
| 490 | int bus_id = -1; | 490 | int bus_id = -1; |
| 491 | int i; | 491 | int i; |
| 492 | 492 | ||
| @@ -522,11 +522,11 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
| 522 | return; | 522 | return; |
| 523 | } | 523 | } |
| 524 | 524 | ||
| 525 | od = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, | 525 | pdev = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, |
| 526 | (void *)&usbhs_data, sizeof(usbhs_data), | 526 | (void *)&usbhs_data, sizeof(usbhs_data), |
| 527 | omap_uhhtll_latency, | 527 | omap_uhhtll_latency, |
| 528 | ARRAY_SIZE(omap_uhhtll_latency), false); | 528 | ARRAY_SIZE(omap_uhhtll_latency), false); |
| 529 | if (IS_ERR(od)) { | 529 | if (IS_ERR(pdev)) { |
| 530 | pr_err("Could not build hwmod devices %s,%s\n", | 530 | pr_err("Could not build hwmod devices %s,%s\n", |
| 531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); | 531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); |
| 532 | return; | 532 | return; |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index fb9b62dcf4ca..208eef1c0485 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <mach/hx4700.h> | 45 | #include <mach/hx4700.h> |
| 46 | #include <mach/irda.h> | 46 | #include <mach/irda.h> |
| 47 | 47 | ||
| 48 | #include <sound/ak4641.h> | ||
| 48 | #include <video/platform_lcd.h> | 49 | #include <video/platform_lcd.h> |
| 49 | #include <video/w100fb.h> | 50 | #include <video/w100fb.h> |
| 50 | 51 | ||
| @@ -765,6 +766,28 @@ static struct i2c_board_info __initdata pi2c_board_info[] = { | |||
| 765 | }; | 766 | }; |
| 766 | 767 | ||
| 767 | /* | 768 | /* |
| 769 | * Asahi Kasei AK4641 on I2C | ||
| 770 | */ | ||
| 771 | |||
| 772 | static struct ak4641_platform_data ak4641_info = { | ||
| 773 | .gpio_power = GPIO27_HX4700_CODEC_ON, | ||
| 774 | .gpio_npdn = GPIO109_HX4700_CODEC_nPDN, | ||
| 775 | }; | ||
| 776 | |||
| 777 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
| 778 | { | ||
| 779 | I2C_BOARD_INFO("ak4641", 0x12), | ||
| 780 | .platform_data = &ak4641_info, | ||
| 781 | }, | ||
| 782 | }; | ||
| 783 | |||
| 784 | static struct platform_device audio = { | ||
| 785 | .name = "hx4700-audio", | ||
| 786 | .id = -1, | ||
| 787 | }; | ||
| 788 | |||
| 789 | |||
| 790 | /* | ||
| 768 | * PCMCIA | 791 | * PCMCIA |
| 769 | */ | 792 | */ |
| 770 | 793 | ||
| @@ -790,6 +813,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 790 | &gpio_vbus, | 813 | &gpio_vbus, |
| 791 | &power_supply, | 814 | &power_supply, |
| 792 | &strataflash, | 815 | &strataflash, |
| 816 | &audio, | ||
| 793 | &pcmcia, | 817 | &pcmcia, |
| 794 | }; | 818 | }; |
| 795 | 819 | ||
| @@ -827,6 +851,7 @@ static void __init hx4700_init(void) | |||
| 827 | pxa_set_ficp_info(&ficp_info); | 851 | pxa_set_ficp_info(&ficp_info); |
| 828 | pxa27x_set_i2c_power_info(NULL); | 852 | pxa27x_set_i2c_power_info(NULL); |
| 829 | pxa_set_i2c_info(NULL); | 853 | pxa_set_i2c_info(NULL); |
| 854 | i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info)); | ||
| 830 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); | 855 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); |
| 831 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); | 856 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); |
| 832 | spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); | 857 | spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 91e4f6c03766..00d6eacab8e4 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/suspend.h> | 25 | #include <linux/suspend.h> |
| 26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
| 27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
| 28 | #include <linux/gpio.h> | ||
| 29 | 28 | ||
| 30 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
| 31 | #include <asm/suspend.h> | 30 | #include <asm/suspend.h> |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index aed6cbcf3866..c1673b3441d4 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
| 23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
| 24 | #include <linux/i2c/pxa-i2c.h> | 24 | #include <linux/i2c/pxa-i2c.h> |
| 25 | #include <linux/gpio.h> | ||
| 26 | 25 | ||
| 27 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
| 28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index febc809ed5a6..5aded5e6148f 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
| 16 | #include <linux/i2c/pxa-i2c.h> | 16 | #include <linux/i2c/pxa-i2c.h> |
| 17 | #include <linux/mfd/88pm860x.h> | 17 | #include <linux/mfd/88pm860x.h> |
| 18 | #include <linux/gpio.h> | ||
| 19 | 18 | ||
| 20 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
| 21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 8d5168d253a9..30989baf7f2a 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
| @@ -168,6 +168,7 @@ struct battery_thresh sharpsl_battery_levels_noac[] = { | |||
| 168 | #define MAXCTRL_SEL_SH 4 | 168 | #define MAXCTRL_SEL_SH 4 |
| 169 | #define MAXCTRL_STR (1u << 7) | 169 | #define MAXCTRL_STR (1u << 7) |
| 170 | 170 | ||
| 171 | extern int max1111_read_channel(int); | ||
| 171 | /* | 172 | /* |
| 172 | * Read MAX1111 ADC | 173 | * Read MAX1111 ADC |
| 173 | */ | 174 | */ |
| @@ -177,8 +178,6 @@ int sharpsl_pm_pxa_read_max1111(int channel) | |||
| 177 | if (machine_is_tosa()) | 178 | if (machine_is_tosa()) |
| 178 | return 0; | 179 | return 0; |
| 179 | 180 | ||
| 180 | extern int max1111_read_channel(int); | ||
| 181 | |||
| 182 | /* max1111 accepts channels from 0-3, however, | 181 | /* max1111 accepts channels from 0-3, however, |
| 183 | * it is encoded from 0-7 here in the code. | 182 | * it is encoded from 0-7 here in the code. |
| 184 | */ | 183 | */ |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 34cbdac51525..438f02fe122a 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
| @@ -172,10 +172,9 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) | |||
| 172 | static unsigned long spitz_charger_wakeup(void) | 172 | static unsigned long spitz_charger_wakeup(void) |
| 173 | { | 173 | { |
| 174 | unsigned long ret; | 174 | unsigned long ret; |
| 175 | ret = (!gpio_get_value(SPITZ_GPIO_KEY_INT) | 175 | ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT) |
| 176 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) | 176 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) |
| 177 | | (!gpio_get_value(SPITZ_GPIO_SYNC) | 177 | | gpio_get_value(SPITZ_GPIO_SYNC)); |
| 178 | << GPIO_bit(SPITZ_GPIO_SYNC)); | ||
| 179 | return ret; | 178 | return ret; |
| 180 | } | 179 | } |
| 181 | 180 | ||
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 06383b51e655..4de7d1e79e73 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
| @@ -69,6 +69,7 @@ void __init omap_reserve(void) | |||
| 69 | omap_vram_reserve_sdram_memblock(); | 69 | omap_vram_reserve_sdram_memblock(); |
| 70 | omap_dsp_reserve_sdram_memblock(); | 70 | omap_dsp_reserve_sdram_memblock(); |
| 71 | omap_secure_ram_reserve_memblock(); | 71 | omap_secure_ram_reserve_memblock(); |
| 72 | omap_barrier_reserve_memblock(); | ||
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | void __init omap_init_consistent_dma_size(void) | 75 | void __init omap_init_consistent_dma_size(void) |
diff --git a/arch/arm/plat-omap/include/plat/omap-secure.h b/arch/arm/plat-omap/include/plat/omap-secure.h index 3047ff923a63..8c7994ce9869 100644 --- a/arch/arm/plat-omap/include/plat/omap-secure.h +++ b/arch/arm/plat-omap/include/plat/omap-secure.h | |||
| @@ -10,4 +10,10 @@ static inline void omap_secure_ram_reserve_memblock(void) | |||
| 10 | { } | 10 | { } |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
| 14 | extern int omap_barrier_reserve_memblock(void); | ||
| 15 | #else | ||
| 16 | static inline void omap_barrier_reserve_memblock(void) | ||
| 17 | { } | ||
| 18 | #endif | ||
| 13 | #endif /* __OMAP_SECURE_H__ */ | 19 | #endif /* __OMAP_SECURE_H__ */ |
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 7da4d0081487..a7193ae13a5d 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
| @@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int) | |||
| 146 | cd->shift = 32; | 146 | cd->shift = 32; |
| 147 | cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); | 147 | cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); |
| 148 | cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); | 148 | cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); |
| 149 | cd->min_delta_ns = clockevent_delta2ns(8, cd); /* ~0.25ms */ | 149 | cd->min_delta_ns = clockevent_delta2ns(9, cd); /* ~0.28ms */ |
| 150 | clockevents_register_device(cd); | 150 | clockevents_register_device(cd); |
| 151 | setup_irq(m2int, &au1x_rtcmatch2_irqaction); | 151 | setup_irq(m2int, &au1x_rtcmatch2_irqaction); |
| 152 | 152 | ||
diff --git a/arch/mips/ath79/dev-wmac.c b/arch/mips/ath79/dev-wmac.c index 24f546985b69..e21507052066 100644 --- a/arch/mips/ath79/dev-wmac.c +++ b/arch/mips/ath79/dev-wmac.c | |||
| @@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data) | |||
| 96 | { | 96 | { |
| 97 | if (soc_is_ar913x()) | 97 | if (soc_is_ar913x()) |
| 98 | ar913x_wmac_setup(); | 98 | ar913x_wmac_setup(); |
| 99 | if (soc_is_ar933x()) | 99 | else if (soc_is_ar933x()) |
| 100 | ar933x_wmac_setup(); | 100 | ar933x_wmac_setup(); |
| 101 | else | 101 | else |
| 102 | BUG(); | 102 | BUG(); |
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig index 4479fd669ac1..28c6b276c216 100644 --- a/arch/mips/configs/nlm_xlp_defconfig +++ b/arch/mips/configs/nlm_xlp_defconfig | |||
| @@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y | |||
| 8 | # CONFIG_SECCOMP is not set | 8 | # CONFIG_SECCOMP is not set |
| 9 | CONFIG_USE_OF=y | 9 | CONFIG_USE_OF=y |
| 10 | CONFIG_EXPERIMENTAL=y | 10 | CONFIG_EXPERIMENTAL=y |
| 11 | CONFIG_CROSS_COMPILE="mips-linux-gnu-" | 11 | CONFIG_CROSS_COMPILE="" |
| 12 | # CONFIG_LOCALVERSION_AUTO is not set | 12 | # CONFIG_LOCALVERSION_AUTO is not set |
| 13 | CONFIG_SYSVIPC=y | 13 | CONFIG_SYSVIPC=y |
| 14 | CONFIG_POSIX_MQUEUE=y | 14 | CONFIG_POSIX_MQUEUE=y |
| @@ -22,7 +22,7 @@ CONFIG_AUDIT=y | |||
| 22 | CONFIG_CGROUPS=y | 22 | CONFIG_CGROUPS=y |
| 23 | CONFIG_NAMESPACES=y | 23 | CONFIG_NAMESPACES=y |
| 24 | CONFIG_BLK_DEV_INITRD=y | 24 | CONFIG_BLK_DEV_INITRD=y |
| 25 | CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp" | 25 | CONFIG_INITRAMFS_SOURCE="" |
| 26 | CONFIG_RD_BZIP2=y | 26 | CONFIG_RD_BZIP2=y |
| 27 | CONFIG_RD_LZMA=y | 27 | CONFIG_RD_LZMA=y |
| 28 | CONFIG_INITRAMFS_COMPRESSION_LZMA=y | 28 | CONFIG_INITRAMFS_COMPRESSION_LZMA=y |
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig index 7c68666fdd64..d0b857d98c91 100644 --- a/arch/mips/configs/nlm_xlr_defconfig +++ b/arch/mips/configs/nlm_xlr_defconfig | |||
| @@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y | |||
| 8 | CONFIG_PREEMPT_VOLUNTARY=y | 8 | CONFIG_PREEMPT_VOLUNTARY=y |
| 9 | CONFIG_KEXEC=y | 9 | CONFIG_KEXEC=y |
| 10 | CONFIG_EXPERIMENTAL=y | 10 | CONFIG_EXPERIMENTAL=y |
| 11 | CONFIG_CROSS_COMPILE="mips-linux-gnu-" | 11 | CONFIG_CROSS_COMPILE="" |
| 12 | # CONFIG_LOCALVERSION_AUTO is not set | 12 | # CONFIG_LOCALVERSION_AUTO is not set |
| 13 | CONFIG_SYSVIPC=y | 13 | CONFIG_SYSVIPC=y |
| 14 | CONFIG_POSIX_MQUEUE=y | 14 | CONFIG_POSIX_MQUEUE=y |
| @@ -22,7 +22,7 @@ CONFIG_AUDIT=y | |||
| 22 | CONFIG_NAMESPACES=y | 22 | CONFIG_NAMESPACES=y |
| 23 | CONFIG_SCHED_AUTOGROUP=y | 23 | CONFIG_SCHED_AUTOGROUP=y |
| 24 | CONFIG_BLK_DEV_INITRD=y | 24 | CONFIG_BLK_DEV_INITRD=y |
| 25 | CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr" | 25 | CONFIG_INITRAMFS_SOURCE="" |
| 26 | CONFIG_RD_BZIP2=y | 26 | CONFIG_RD_BZIP2=y |
| 27 | CONFIG_RD_LZMA=y | 27 | CONFIG_RD_LZMA=y |
| 28 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | 28 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y |
diff --git a/arch/mips/configs/powertv_defconfig b/arch/mips/configs/powertv_defconfig index 3b0b6e8c8533..7fda0ce5f692 100644 --- a/arch/mips/configs/powertv_defconfig +++ b/arch/mips/configs/powertv_defconfig | |||
| @@ -6,7 +6,7 @@ CONFIG_HZ_1000=y | |||
| 6 | CONFIG_PREEMPT=y | 6 | CONFIG_PREEMPT=y |
| 7 | # CONFIG_SECCOMP is not set | 7 | # CONFIG_SECCOMP is not set |
| 8 | CONFIG_EXPERIMENTAL=y | 8 | CONFIG_EXPERIMENTAL=y |
| 9 | CONFIG_CROSS_COMPILE="mips-linux-" | 9 | CONFIG_CROSS_COMPILE="" |
| 10 | # CONFIG_SWAP is not set | 10 | # CONFIG_SWAP is not set |
| 11 | CONFIG_SYSVIPC=y | 11 | CONFIG_SYSVIPC=y |
| 12 | CONFIG_LOG_BUF_SHIFT=16 | 12 | CONFIG_LOG_BUF_SHIFT=16 |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h index 556e1be20bf6..fb9975c74c57 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | #include <asm/io.h> | 11 | #include <asm/io.h> |
| 12 | #include <asm/mach-au1x00/au1000.h> | 12 | #include <asm/mach-au1x00/au1000.h> |
| 13 | 13 | ||
| 14 | struct gpio; | ||
| 15 | struct gpio_chip; | ||
| 16 | |||
| 14 | /* with the current GPIC design, up to 128 GPIOs are possible. | 17 | /* with the current GPIC design, up to 128 GPIOs are possible. |
| 15 | * The only implementation so far is in the Au1300, which has 75 externally | 18 | * The only implementation so far is in the Au1300, which has 75 externally |
| 16 | * available GPIOs. | 19 | * available GPIOs. |
| @@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label) | |||
| 203 | return 0; | 206 | return 0; |
| 204 | } | 207 | } |
| 205 | 208 | ||
| 206 | static inline void gpio_free(unsigned int gpio) | 209 | static inline int gpio_request_one(unsigned gpio, |
| 210 | unsigned long flags, const char *label) | ||
| 211 | { | ||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | static inline int gpio_request_array(struct gpio *array, size_t num) | ||
| 216 | { | ||
| 217 | return 0; | ||
| 218 | } | ||
| 219 | |||
| 220 | static inline void gpio_free(unsigned gpio) | ||
| 221 | { | ||
| 222 | } | ||
| 223 | |||
| 224 | static inline void gpio_free_array(struct gpio *array, size_t num) | ||
| 207 | { | 225 | { |
| 208 | } | 226 | } |
| 209 | 227 | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index d41790928c64..da9bd7d270d1 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -39,9 +39,6 @@ | |||
| 39 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 39 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
| 40 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 40 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
| 41 | #else /* !CONFIG_HUGETLB_PAGE */ | 41 | #else /* !CONFIG_HUGETLB_PAGE */ |
| 42 | # ifndef BUILD_BUG | ||
| 43 | # define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0) | ||
| 44 | # endif | ||
| 45 | #define HPAGE_SHIFT ({BUILD_BUG(); 0; }) | 42 | #define HPAGE_SHIFT ({BUILD_BUG(); 0; }) |
| 46 | #define HPAGE_SIZE ({BUILD_BUG(); 0; }) | 43 | #define HPAGE_SIZE ({BUILD_BUG(); 0; }) |
| 47 | #define HPAGE_MASK ({BUILD_BUG(); 0; }) | 44 | #define HPAGE_MASK ({BUILD_BUG(); 0; }) |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 58fe71afd879..d5e950ab8527 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | * SMP support for BMIPS | 8 | * SMP support for BMIPS |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/version.h> | ||
| 12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
| 13 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
| 14 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cc4a3f120f54..d79ae5437b58 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs) | |||
| 1135 | printk(KERN_DEBUG "YIELD Scheduler Exception\n"); | 1135 | printk(KERN_DEBUG "YIELD Scheduler Exception\n"); |
| 1136 | break; | 1136 | break; |
| 1137 | case 5: | 1137 | case 5: |
| 1138 | printk(KERN_DEBUG "Gating Storage Schedulier Exception\n"); | 1138 | printk(KERN_DEBUG "Gating Storage Scheduler Exception\n"); |
| 1139 | break; | 1139 | break; |
| 1140 | default: | 1140 | default: |
| 1141 | printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", | 1141 | printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index a81176f44c74..924da5eb7031 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
| @@ -69,7 +69,6 @@ SECTIONS | |||
| 69 | RODATA | 69 | RODATA |
| 70 | 70 | ||
| 71 | /* writeable */ | 71 | /* writeable */ |
| 72 | _sdata = .; /* Start of data section */ | ||
| 73 | .data : { /* Data */ | 72 | .data : { /* Data */ |
| 74 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | 73 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ |
| 75 | 74 | ||
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index 937cf3368164..69ebd586d7ff 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
| @@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ | |||
| 42 | const int field = sizeof(unsigned long) * 2; | 42 | const int field = sizeof(unsigned long) * 2; |
| 43 | siginfo_t info; | 43 | siginfo_t info; |
| 44 | int fault; | 44 | int fault; |
| 45 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | | ||
| 46 | (write ? FAULT_FLAG_WRITE : 0); | ||
| 45 | 47 | ||
| 46 | #if 0 | 48 | #if 0 |
| 47 | printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), | 49 | printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), |
| @@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ | |||
| 91 | if (in_atomic() || !mm) | 93 | if (in_atomic() || !mm) |
| 92 | goto bad_area_nosemaphore; | 94 | goto bad_area_nosemaphore; |
| 93 | 95 | ||
| 96 | retry: | ||
| 94 | down_read(&mm->mmap_sem); | 97 | down_read(&mm->mmap_sem); |
| 95 | vma = find_vma(mm, address); | 98 | vma = find_vma(mm, address); |
| 96 | if (!vma) | 99 | if (!vma) |
| @@ -144,7 +147,11 @@ good_area: | |||
| 144 | * make sure we exit gracefully rather than endlessly redo | 147 | * make sure we exit gracefully rather than endlessly redo |
| 145 | * the fault. | 148 | * the fault. |
| 146 | */ | 149 | */ |
| 147 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); | 150 | fault = handle_mm_fault(mm, vma, address, flags); |
| 151 | |||
| 152 | if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) | ||
| 153 | return; | ||
| 154 | |||
| 148 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); | 155 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); |
| 149 | if (unlikely(fault & VM_FAULT_ERROR)) { | 156 | if (unlikely(fault & VM_FAULT_ERROR)) { |
| 150 | if (fault & VM_FAULT_OOM) | 157 | if (fault & VM_FAULT_OOM) |
| @@ -153,12 +160,27 @@ good_area: | |||
| 153 | goto do_sigbus; | 160 | goto do_sigbus; |
| 154 | BUG(); | 161 | BUG(); |
| 155 | } | 162 | } |
| 156 | if (fault & VM_FAULT_MAJOR) { | 163 | if (flags & FAULT_FLAG_ALLOW_RETRY) { |
| 157 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); | 164 | if (fault & VM_FAULT_MAJOR) { |
| 158 | tsk->maj_flt++; | 165 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, |
| 159 | } else { | 166 | regs, address); |
| 160 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); | 167 | tsk->maj_flt++; |
| 161 | tsk->min_flt++; | 168 | } else { |
| 169 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, | ||
| 170 | regs, address); | ||
| 171 | tsk->min_flt++; | ||
| 172 | } | ||
| 173 | if (fault & VM_FAULT_RETRY) { | ||
| 174 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | ||
| 175 | |||
| 176 | /* | ||
| 177 | * No need to up_read(&mm->mmap_sem) as we would | ||
| 178 | * have already released it in __lock_page_or_retry | ||
| 179 | * in mm/filemap.c. | ||
| 180 | */ | ||
| 181 | |||
| 182 | goto retry; | ||
| 183 | } | ||
| 162 | } | 184 | } |
| 163 | 185 | ||
| 164 | up_read(&mm->mmap_sem); | 186 | up_read(&mm->mmap_sem); |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index aec2b111d35b..15521505ebe8 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
| 279 | { | 279 | { |
| 280 | /* Propagate hose info into the subordinate devices. */ | 280 | /* Propagate hose info into the subordinate devices. */ |
| 281 | 281 | ||
| 282 | struct list_head *ln; | ||
| 283 | struct pci_dev *dev = bus->self; | 282 | struct pci_dev *dev = bus->self; |
| 284 | 283 | ||
| 285 | if (pci_probe_only && dev && | 284 | if (pci_probe_only && dev && |
| @@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
| 288 | pcibios_fixup_device_resources(dev, bus); | 287 | pcibios_fixup_device_resources(dev, bus); |
| 289 | } | 288 | } |
| 290 | 289 | ||
| 291 | for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { | 290 | list_for_each_entry(dev, &bus->devices, bus_list) { |
| 292 | dev = pci_dev_b(ln); | ||
| 293 | |||
| 294 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) | 291 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) |
| 295 | pcibios_fixup_device_resources(dev, bus); | 292 | pcibios_fixup_device_resources(dev, bus); |
| 296 | } | 293 | } |
diff --git a/arch/mips/pmc-sierra/yosemite/ht-irq.c b/arch/mips/pmc-sierra/yosemite/ht-irq.c index 86b98e98fb4f..62ead6601c69 100644 --- a/arch/mips/pmc-sierra/yosemite/ht-irq.c +++ b/arch/mips/pmc-sierra/yosemite/ht-irq.c | |||
| @@ -35,16 +35,6 @@ | |||
| 35 | */ | 35 | */ |
| 36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) | 36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) |
| 37 | { | 37 | { |
| 38 | struct pci_bus *current_bus = bus; | ||
| 39 | struct pci_dev *devices; | ||
| 40 | struct list_head *devices_link; | ||
| 41 | |||
| 42 | list_for_each(devices_link, &(current_bus->devices)) { | ||
| 43 | devices = pci_dev_b(devices_link); | ||
| 44 | if (devices == NULL) | ||
| 45 | continue; | ||
| 46 | } | ||
| 47 | |||
| 48 | /* | 38 | /* |
| 49 | * PLX and SPKT related changes go here | 39 | * PLX and SPKT related changes go here |
| 50 | */ | 40 | */ |
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 8e93b2122524..4642f56e70e5 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c | |||
| @@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void) | |||
| 102 | break; | 102 | break; |
| 103 | } | 103 | } |
| 104 | dev->id = i; | 104 | dev->id = i; |
| 105 | dev->dev = &tx_7segled_subsys; | 105 | dev->bus = &tx_7segled_subsys; |
| 106 | error = device_register(dev); | 106 | error = device_register(dev); |
| 107 | if (!error) { | 107 | if (!error) { |
| 108 | device_create_file(dev, &dev_attr_ascii); | 108 | device_create_file(dev, &dev_attr_ascii); |
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h index 054537c5f9c9..e612ce4512c7 100644 --- a/arch/openrisc/include/asm/ptrace.h +++ b/arch/openrisc/include/asm/ptrace.h | |||
| @@ -77,7 +77,6 @@ struct pt_regs { | |||
| 77 | long syscallno; /* Syscall number (used by strace) */ | 77 | long syscallno; /* Syscall number (used by strace) */ |
| 78 | long dummy; /* Cheap alignment fix */ | 78 | long dummy; /* Cheap alignment fix */ |
| 79 | }; | 79 | }; |
| 80 | #endif /* __ASSEMBLY__ */ | ||
| 81 | 80 | ||
| 82 | /* TODO: Rename this to REDZONE because that's what it is */ | 81 | /* TODO: Rename this to REDZONE because that's what it is */ |
| 83 | #define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */ | 82 | #define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */ |
| @@ -87,6 +86,13 @@ struct pt_regs { | |||
| 87 | #define user_stack_pointer(regs) ((unsigned long)(regs)->sp) | 86 | #define user_stack_pointer(regs) ((unsigned long)(regs)->sp) |
| 88 | #define profile_pc(regs) instruction_pointer(regs) | 87 | #define profile_pc(regs) instruction_pointer(regs) |
| 89 | 88 | ||
| 89 | static inline long regs_return_value(struct pt_regs *regs) | ||
| 90 | { | ||
| 91 | return regs->gpr[11]; | ||
| 92 | } | ||
| 93 | |||
| 94 | #endif /* __ASSEMBLY__ */ | ||
| 95 | |||
| 90 | /* | 96 | /* |
| 91 | * Offsets used by 'ptrace' system call interface. | 97 | * Offsets used by 'ptrace' system call interface. |
| 92 | */ | 98 | */ |
diff --git a/arch/openrisc/kernel/init_task.c b/arch/openrisc/kernel/init_task.c index 45744a384927..ca534082d5f3 100644 --- a/arch/openrisc/kernel/init_task.c +++ b/arch/openrisc/kernel/init_task.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/init_task.h> | 18 | #include <linux/init_task.h> |
| 19 | #include <linux/mqueue.h> | 19 | #include <linux/mqueue.h> |
| 20 | #include <linux/export.h> | ||
| 20 | 21 | ||
| 21 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 22 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
| 22 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 23 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index 59b302338331..4bfead220956 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
| 24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
| 25 | #include <linux/kernel_stat.h> | 25 | #include <linux/kernel_stat.h> |
| 26 | #include <linux/export.h> | ||
| 26 | 27 | ||
| 27 | #include <linux/irqflags.h> | 28 | #include <linux/irqflags.h> |
| 28 | 29 | ||
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index 656b94beab89..7259047d5f9d 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c | |||
| @@ -188,11 +188,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
| 188 | */ | 188 | */ |
| 189 | ret = -1L; | 189 | ret = -1L; |
| 190 | 190 | ||
| 191 | /* Are these regs right??? */ | 191 | audit_syscall_entry(audit_arch(), regs->syscallno, |
| 192 | if (unlikely(current->audit_context)) | 192 | regs->gpr[3], regs->gpr[4], |
| 193 | audit_syscall_entry(audit_arch(), regs->syscallno, | 193 | regs->gpr[5], regs->gpr[6]); |
| 194 | regs->gpr[3], regs->gpr[4], | ||
| 195 | regs->gpr[5], regs->gpr[6]); | ||
| 196 | 194 | ||
| 197 | return ret ? : regs->syscallno; | 195 | return ret ? : regs->syscallno; |
| 198 | } | 196 | } |
| @@ -201,9 +199,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) | |||
| 201 | { | 199 | { |
| 202 | int step; | 200 | int step; |
| 203 | 201 | ||
| 204 | if (unlikely(current->audit_context)) | 202 | audit_syscall_exit(regs); |
| 205 | audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]), | ||
| 206 | regs->gpr[11]); | ||
| 207 | 203 | ||
| 208 | step = test_thread_flag(TIF_SINGLESTEP); | 204 | step = test_thread_flag(TIF_SINGLESTEP); |
| 209 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) | 205 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) |
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 55cca1dac431..19ab7b2ea1cd 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
| @@ -31,7 +31,11 @@ ifdef CONFIG_64BIT | |||
| 31 | UTS_MACHINE := parisc64 | 31 | UTS_MACHINE := parisc64 |
| 32 | CHECKFLAGS += -D__LP64__=1 -m64 | 32 | CHECKFLAGS += -D__LP64__=1 -m64 |
| 33 | WIDTH := 64 | 33 | WIDTH := 64 |
| 34 | |||
| 35 | # FIXME: if no default set, should really try to locate dynamically | ||
| 36 | ifeq ($(CROSS_COMPILE),) | ||
| 34 | CROSS_COMPILE := hppa64-linux-gnu- | 37 | CROSS_COMPILE := hppa64-linux-gnu- |
| 38 | endif | ||
| 35 | else # 32-bit | 39 | else # 32-bit |
| 36 | WIDTH := | 40 | WIDTH := |
| 37 | endif | 41 | endif |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index d1727584230a..6d99a5fcc090 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
| @@ -227,6 +227,9 @@ config COMPAT | |||
| 227 | config SYSVIPC_COMPAT | 227 | config SYSVIPC_COMPAT |
| 228 | def_bool y if COMPAT && SYSVIPC | 228 | def_bool y if COMPAT && SYSVIPC |
| 229 | 229 | ||
| 230 | config KEYS_COMPAT | ||
| 231 | def_bool y if COMPAT && KEYS | ||
| 232 | |||
| 230 | config AUDIT_ARCH | 233 | config AUDIT_ARCH |
| 231 | def_bool y | 234 | def_bool y |
| 232 | 235 | ||
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index 39f8fd4438fc..c383ce440d99 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
| 13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
| 14 | #include <linux/crash_dump.h> | ||
| 15 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
| 16 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
| 17 | #include <asm/ipl.h> | 16 | #include <asm/ipl.h> |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 5d633019d8f3..50236610de83 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
| @@ -223,16 +223,38 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
| 223 | #ifdef CONFIG_MEMORY_HOTPLUG | 223 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 224 | int arch_add_memory(int nid, u64 start, u64 size) | 224 | int arch_add_memory(int nid, u64 start, u64 size) |
| 225 | { | 225 | { |
| 226 | struct pglist_data *pgdat; | 226 | unsigned long zone_start_pfn, zone_end_pfn, nr_pages; |
| 227 | unsigned long start_pfn = PFN_DOWN(start); | ||
| 228 | unsigned long size_pages = PFN_DOWN(size); | ||
| 227 | struct zone *zone; | 229 | struct zone *zone; |
| 228 | int rc; | 230 | int rc; |
| 229 | 231 | ||
| 230 | pgdat = NODE_DATA(nid); | ||
| 231 | zone = pgdat->node_zones + ZONE_MOVABLE; | ||
| 232 | rc = vmem_add_mapping(start, size); | 232 | rc = vmem_add_mapping(start, size); |
| 233 | if (rc) | 233 | if (rc) |
| 234 | return rc; | 234 | return rc; |
| 235 | rc = __add_pages(nid, zone, PFN_DOWN(start), PFN_DOWN(size)); | 235 | for_each_zone(zone) { |
| 236 | if (zone_idx(zone) != ZONE_MOVABLE) { | ||
| 237 | /* Add range within existing zone limits */ | ||
| 238 | zone_start_pfn = zone->zone_start_pfn; | ||
| 239 | zone_end_pfn = zone->zone_start_pfn + | ||
| 240 | zone->spanned_pages; | ||
| 241 | } else { | ||
| 242 | /* Add remaining range to ZONE_MOVABLE */ | ||
| 243 | zone_start_pfn = start_pfn; | ||
| 244 | zone_end_pfn = start_pfn + size_pages; | ||
| 245 | } | ||
| 246 | if (start_pfn < zone_start_pfn || start_pfn >= zone_end_pfn) | ||
| 247 | continue; | ||
| 248 | nr_pages = (start_pfn + size_pages > zone_end_pfn) ? | ||
| 249 | zone_end_pfn - start_pfn : size_pages; | ||
| 250 | rc = __add_pages(nid, zone, start_pfn, nr_pages); | ||
| 251 | if (rc) | ||
| 252 | break; | ||
| 253 | start_pfn += nr_pages; | ||
| 254 | size_pages -= nr_pages; | ||
| 255 | if (!size_pages) | ||
| 256 | break; | ||
| 257 | } | ||
| 236 | if (rc) | 258 | if (rc) |
| 237 | vmem_remove_mapping(start, size); | 259 | vmem_remove_mapping(start, size); |
| 238 | return rc; | 260 | return rc; |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index fd843877e841..39e49091f648 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
| @@ -315,6 +315,13 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
| 315 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; | 315 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; |
| 316 | current->mm->cached_hole_size = 0; | 316 | current->mm->cached_hole_size = 0; |
| 317 | 317 | ||
| 318 | retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); | ||
| 319 | if (retval < 0) { | ||
| 320 | /* Someone check-me: is this error path enough? */ | ||
| 321 | send_sig(SIGKILL, current, 0); | ||
| 322 | return retval; | ||
| 323 | } | ||
| 324 | |||
| 318 | install_exec_creds(bprm); | 325 | install_exec_creds(bprm); |
| 319 | current->flags &= ~PF_FORKNOEXEC; | 326 | current->flags &= ~PF_FORKNOEXEC; |
| 320 | 327 | ||
| @@ -410,13 +417,6 @@ beyond_if: | |||
| 410 | 417 | ||
| 411 | set_brk(current->mm->start_brk, current->mm->brk); | 418 | set_brk(current->mm->start_brk, current->mm->brk); |
| 412 | 419 | ||
| 413 | retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); | ||
| 414 | if (retval < 0) { | ||
| 415 | /* Someone check-me: is this error path enough? */ | ||
| 416 | send_sig(SIGKILL, current, 0); | ||
| 417 | return retval; | ||
| 418 | } | ||
| 419 | |||
| 420 | current->mm->start_stack = | 420 | current->mm->start_stack = |
| 421 | (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); | 421 | (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); |
| 422 | /* start thread */ | 422 | /* start thread */ |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index a312e76063a7..49a5cb55429b 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -60,6 +60,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { | |||
| 60 | DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), | 60 | DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), |
| 61 | }, | 61 | }, |
| 62 | }, | 62 | }, |
| 63 | /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */ | ||
| 64 | { | ||
| 65 | .callback = set_use_crs, | ||
| 66 | .ident = "MSI MS-7253", | ||
| 67 | .matches = { | ||
| 68 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), | ||
| 69 | DMI_MATCH(DMI_BOARD_NAME, "MS-7253"), | ||
| 70 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), | ||
| 71 | }, | ||
| 72 | }, | ||
| 63 | 73 | ||
| 64 | /* Now for the blacklist.. */ | 74 | /* Now for the blacklist.. */ |
| 65 | 75 | ||
| @@ -282,9 +292,6 @@ static void add_resources(struct pci_root_info *info) | |||
| 282 | int i; | 292 | int i; |
| 283 | struct resource *res, *root, *conflict; | 293 | struct resource *res, *root, *conflict; |
| 284 | 294 | ||
| 285 | if (!pci_use_crs) | ||
| 286 | return; | ||
| 287 | |||
| 288 | coalesce_windows(info, IORESOURCE_MEM); | 295 | coalesce_windows(info, IORESOURCE_MEM); |
| 289 | coalesce_windows(info, IORESOURCE_IO); | 296 | coalesce_windows(info, IORESOURCE_IO); |
| 290 | 297 | ||
| @@ -336,8 +343,13 @@ get_current_resources(struct acpi_device *device, int busnum, | |||
| 336 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, | 343 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, |
| 337 | &info); | 344 | &info); |
| 338 | 345 | ||
| 339 | add_resources(&info); | 346 | if (pci_use_crs) { |
| 340 | return; | 347 | add_resources(&info); |
| 348 | |||
| 349 | return; | ||
| 350 | } | ||
| 351 | |||
| 352 | kfree(info.name); | ||
| 341 | 353 | ||
| 342 | name_alloc_fail: | 354 | name_alloc_fail: |
| 343 | kfree(info.res); | 355 | kfree(info.res); |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 9baf11e86362..744f078f4dd8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -3832,7 +3832,7 @@ static int __floppy_read_block_0(struct block_device *bdev) | |||
| 3832 | bio.bi_size = size; | 3832 | bio.bi_size = size; |
| 3833 | bio.bi_bdev = bdev; | 3833 | bio.bi_bdev = bdev; |
| 3834 | bio.bi_sector = 0; | 3834 | bio.bi_sector = 0; |
| 3835 | bio.bi_flags = BIO_QUIET; | 3835 | bio.bi_flags = (1 << BIO_QUIET); |
| 3836 | init_completion(&complete); | 3836 | init_completion(&complete); |
| 3837 | bio.bi_private = &complete; | 3837 | bio.bi_private = &complete; |
| 3838 | bio.bi_end_io = floppy_rb0_complete; | 3838 | bio.bi_end_io = floppy_rb0_complete; |
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 597235a2f8f9..0d40cf66b3cc 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
| @@ -714,6 +714,7 @@ static int mv_hash_final(struct ahash_request *req) | |||
| 714 | { | 714 | { |
| 715 | struct mv_req_hash_ctx *ctx = ahash_request_ctx(req); | 715 | struct mv_req_hash_ctx *ctx = ahash_request_ctx(req); |
| 716 | 716 | ||
| 717 | ahash_request_set_crypt(req, NULL, req->result, 0); | ||
| 717 | mv_update_hash_req_ctx(ctx, 1, 0); | 718 | mv_update_hash_req_ctx(ctx, 1, 0); |
| 718 | return mv_handle_req(&req->base); | 719 | return mv_handle_req(&req->base); |
| 719 | } | 720 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index d620b0784257..618bd4d87d28 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include "drmP.h" | 28 | #include "drmP.h" |
| 29 | #include "drm_crtc_helper.h" | 29 | #include "drm_crtc_helper.h" |
| 30 | 30 | ||
| 31 | #include <drm/exynos_drm.h> | ||
| 31 | #include "exynos_drm_drv.h" | 32 | #include "exynos_drm_drv.h" |
| 32 | #include "exynos_drm_encoder.h" | 33 | #include "exynos_drm_encoder.h" |
| 33 | 34 | ||
| @@ -44,8 +45,9 @@ struct exynos_drm_connector { | |||
| 44 | /* convert exynos_video_timings to drm_display_mode */ | 45 | /* convert exynos_video_timings to drm_display_mode */ |
| 45 | static inline void | 46 | static inline void |
| 46 | convert_to_display_mode(struct drm_display_mode *mode, | 47 | convert_to_display_mode(struct drm_display_mode *mode, |
| 47 | struct fb_videomode *timing) | 48 | struct exynos_drm_panel_info *panel) |
| 48 | { | 49 | { |
| 50 | struct fb_videomode *timing = &panel->timing; | ||
| 49 | DRM_DEBUG_KMS("%s\n", __FILE__); | 51 | DRM_DEBUG_KMS("%s\n", __FILE__); |
| 50 | 52 | ||
| 51 | mode->clock = timing->pixclock / 1000; | 53 | mode->clock = timing->pixclock / 1000; |
| @@ -60,6 +62,8 @@ convert_to_display_mode(struct drm_display_mode *mode, | |||
| 60 | mode->vsync_start = mode->vdisplay + timing->upper_margin; | 62 | mode->vsync_start = mode->vdisplay + timing->upper_margin; |
| 61 | mode->vsync_end = mode->vsync_start + timing->vsync_len; | 63 | mode->vsync_end = mode->vsync_start + timing->vsync_len; |
| 62 | mode->vtotal = mode->vsync_end + timing->lower_margin; | 64 | mode->vtotal = mode->vsync_end + timing->lower_margin; |
| 65 | mode->width_mm = panel->width_mm; | ||
| 66 | mode->height_mm = panel->height_mm; | ||
| 63 | 67 | ||
| 64 | if (timing->vmode & FB_VMODE_INTERLACED) | 68 | if (timing->vmode & FB_VMODE_INTERLACED) |
| 65 | mode->flags |= DRM_MODE_FLAG_INTERLACE; | 69 | mode->flags |= DRM_MODE_FLAG_INTERLACE; |
| @@ -148,16 +152,18 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector) | |||
| 148 | connector->display_info.raw_edid = edid; | 152 | connector->display_info.raw_edid = edid; |
| 149 | } else { | 153 | } else { |
| 150 | struct drm_display_mode *mode = drm_mode_create(connector->dev); | 154 | struct drm_display_mode *mode = drm_mode_create(connector->dev); |
| 151 | struct fb_videomode *timing; | 155 | struct exynos_drm_panel_info *panel; |
| 152 | 156 | ||
| 153 | if (display_ops->get_timing) | 157 | if (display_ops->get_panel) |
| 154 | timing = display_ops->get_timing(manager->dev); | 158 | panel = display_ops->get_panel(manager->dev); |
| 155 | else { | 159 | else { |
| 156 | drm_mode_destroy(connector->dev, mode); | 160 | drm_mode_destroy(connector->dev, mode); |
| 157 | return 0; | 161 | return 0; |
| 158 | } | 162 | } |
| 159 | 163 | ||
| 160 | convert_to_display_mode(mode, timing); | 164 | convert_to_display_mode(mode, panel); |
| 165 | connector->display_info.width_mm = mode->width_mm; | ||
| 166 | connector->display_info.height_mm = mode->height_mm; | ||
| 161 | 167 | ||
| 162 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; | 168 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; |
| 163 | drm_mode_set_name(mode); | 169 | drm_mode_set_name(mode); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index e685e1e33055..13540de90bfc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
| @@ -136,7 +136,7 @@ struct exynos_drm_overlay { | |||
| 136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. | 136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. |
| 137 | * @is_connected: check for that display is connected or not. | 137 | * @is_connected: check for that display is connected or not. |
| 138 | * @get_edid: get edid modes from display driver. | 138 | * @get_edid: get edid modes from display driver. |
| 139 | * @get_timing: get timing object from display driver. | 139 | * @get_panel: get panel object from display driver. |
| 140 | * @check_timing: check if timing is valid or not. | 140 | * @check_timing: check if timing is valid or not. |
| 141 | * @power_on: display device on or off. | 141 | * @power_on: display device on or off. |
| 142 | */ | 142 | */ |
| @@ -145,7 +145,7 @@ struct exynos_drm_display_ops { | |||
| 145 | bool (*is_connected)(struct device *dev); | 145 | bool (*is_connected)(struct device *dev); |
| 146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, | 146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, |
| 147 | u8 *edid, int len); | 147 | u8 *edid, int len); |
| 148 | void *(*get_timing)(struct device *dev); | 148 | void *(*get_panel)(struct device *dev); |
| 149 | int (*check_timing)(struct device *dev, void *timing); | 149 | int (*check_timing)(struct device *dev, void *timing); |
| 150 | int (*power_on)(struct device *dev, int mode); | 150 | int (*power_on)(struct device *dev, int mode); |
| 151 | }; | 151 | }; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0dbb32bb18a3..360adf2bba04 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
| @@ -89,7 +89,7 @@ struct fimd_context { | |||
| 89 | bool suspended; | 89 | bool suspended; |
| 90 | struct mutex lock; | 90 | struct mutex lock; |
| 91 | 91 | ||
| 92 | struct fb_videomode *timing; | 92 | struct exynos_drm_panel_info *panel; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static bool fimd_display_is_connected(struct device *dev) | 95 | static bool fimd_display_is_connected(struct device *dev) |
| @@ -101,13 +101,13 @@ static bool fimd_display_is_connected(struct device *dev) | |||
| 101 | return true; | 101 | return true; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static void *fimd_get_timing(struct device *dev) | 104 | static void *fimd_get_panel(struct device *dev) |
| 105 | { | 105 | { |
| 106 | struct fimd_context *ctx = get_fimd_context(dev); | 106 | struct fimd_context *ctx = get_fimd_context(dev); |
| 107 | 107 | ||
| 108 | DRM_DEBUG_KMS("%s\n", __FILE__); | 108 | DRM_DEBUG_KMS("%s\n", __FILE__); |
| 109 | 109 | ||
| 110 | return ctx->timing; | 110 | return ctx->panel; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static int fimd_check_timing(struct device *dev, void *timing) | 113 | static int fimd_check_timing(struct device *dev, void *timing) |
| @@ -131,7 +131,7 @@ static int fimd_display_power_on(struct device *dev, int mode) | |||
| 131 | static struct exynos_drm_display_ops fimd_display_ops = { | 131 | static struct exynos_drm_display_ops fimd_display_ops = { |
| 132 | .type = EXYNOS_DISPLAY_TYPE_LCD, | 132 | .type = EXYNOS_DISPLAY_TYPE_LCD, |
| 133 | .is_connected = fimd_display_is_connected, | 133 | .is_connected = fimd_display_is_connected, |
| 134 | .get_timing = fimd_get_timing, | 134 | .get_panel = fimd_get_panel, |
| 135 | .check_timing = fimd_check_timing, | 135 | .check_timing = fimd_check_timing, |
| 136 | .power_on = fimd_display_power_on, | 136 | .power_on = fimd_display_power_on, |
| 137 | }; | 137 | }; |
| @@ -193,7 +193,8 @@ static void fimd_apply(struct device *subdrv_dev) | |||
| 193 | static void fimd_commit(struct device *dev) | 193 | static void fimd_commit(struct device *dev) |
| 194 | { | 194 | { |
| 195 | struct fimd_context *ctx = get_fimd_context(dev); | 195 | struct fimd_context *ctx = get_fimd_context(dev); |
| 196 | struct fb_videomode *timing = ctx->timing; | 196 | struct exynos_drm_panel_info *panel = ctx->panel; |
| 197 | struct fb_videomode *timing = &panel->timing; | ||
| 197 | u32 val; | 198 | u32 val; |
| 198 | 199 | ||
| 199 | if (ctx->suspended) | 200 | if (ctx->suspended) |
| @@ -786,7 +787,7 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
| 786 | struct fimd_context *ctx; | 787 | struct fimd_context *ctx; |
| 787 | struct exynos_drm_subdrv *subdrv; | 788 | struct exynos_drm_subdrv *subdrv; |
| 788 | struct exynos_drm_fimd_pdata *pdata; | 789 | struct exynos_drm_fimd_pdata *pdata; |
| 789 | struct fb_videomode *timing; | 790 | struct exynos_drm_panel_info *panel; |
| 790 | struct resource *res; | 791 | struct resource *res; |
| 791 | int win; | 792 | int win; |
| 792 | int ret = -EINVAL; | 793 | int ret = -EINVAL; |
| @@ -799,9 +800,9 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
| 799 | return -EINVAL; | 800 | return -EINVAL; |
| 800 | } | 801 | } |
| 801 | 802 | ||
| 802 | timing = &pdata->timing; | 803 | panel = &pdata->panel; |
| 803 | if (!timing) { | 804 | if (!panel) { |
| 804 | dev_err(dev, "timing is null.\n"); | 805 | dev_err(dev, "panel is null.\n"); |
| 805 | return -EINVAL; | 806 | return -EINVAL; |
| 806 | } | 807 | } |
| 807 | 808 | ||
| @@ -863,16 +864,16 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
| 863 | goto err_req_irq; | 864 | goto err_req_irq; |
| 864 | } | 865 | } |
| 865 | 866 | ||
| 866 | ctx->clkdiv = fimd_calc_clkdiv(ctx, timing); | 867 | ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing); |
| 867 | ctx->vidcon0 = pdata->vidcon0; | 868 | ctx->vidcon0 = pdata->vidcon0; |
| 868 | ctx->vidcon1 = pdata->vidcon1; | 869 | ctx->vidcon1 = pdata->vidcon1; |
| 869 | ctx->default_win = pdata->default_win; | 870 | ctx->default_win = pdata->default_win; |
| 870 | ctx->timing = timing; | 871 | ctx->panel = panel; |
| 871 | 872 | ||
| 872 | timing->pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; | 873 | panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; |
| 873 | 874 | ||
| 874 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", | 875 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", |
| 875 | timing->pixclock, ctx->clkdiv); | 876 | panel->timing.pixclock, ctx->clkdiv); |
| 876 | 877 | ||
| 877 | subdrv = &ctx->subdrv; | 878 | subdrv = &ctx->subdrv; |
| 878 | 879 | ||
diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 4a5b099c3bc5..53404af2e748 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c | |||
| @@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev) | |||
| 321 | cdv_get_core_freq(dev); | 321 | cdv_get_core_freq(dev); |
| 322 | gma_intel_opregion_init(dev); | 322 | gma_intel_opregion_init(dev); |
| 323 | psb_intel_init_bios(dev); | 323 | psb_intel_init_bios(dev); |
| 324 | REG_WRITE(PORT_HOTPLUG_EN, 0); | ||
| 325 | REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT)); | ||
| 324 | return 0; | 326 | return 0; |
| 325 | } | 327 | } |
| 326 | 328 | ||
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 830dfdd6bf15..be616735ec91 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
| @@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = { | |||
| 247 | .fb_imageblit = cfb_imageblit, | 247 | .fb_imageblit = cfb_imageblit, |
| 248 | .fb_pan_display = psbfb_pan, | 248 | .fb_pan_display = psbfb_pan, |
| 249 | .fb_mmap = psbfb_mmap, | 249 | .fb_mmap = psbfb_mmap, |
| 250 | .fb_sync = psbfb_sync, | ||
| 251 | .fb_ioctl = psbfb_ioctl, | 250 | .fb_ioctl = psbfb_ioctl, |
| 252 | }; | 251 | }; |
| 253 | 252 | ||
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c index 5d5330f667f1..aff194fbe9f3 100644 --- a/drivers/gpu/drm/gma500/gtt.c +++ b/drivers/gpu/drm/gma500/gtt.c | |||
| @@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume) | |||
| 446 | pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE); | 446 | pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE); |
| 447 | gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE) | 447 | gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE) |
| 448 | >> PAGE_SHIFT; | 448 | >> PAGE_SHIFT; |
| 449 | /* Some CDV firmware doesn't report this currently. In which case the | 449 | /* CDV doesn't report this. In which case the system has 64 gtt pages */ |
| 450 | system has 64 gtt pages */ | ||
| 451 | if (pg->gtt_start == 0 || gtt_pages == 0) { | 450 | if (pg->gtt_start == 0 || gtt_pages == 0) { |
| 452 | dev_err(dev->dev, "GTT PCI BAR not initialized.\n"); | 451 | dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n"); |
| 453 | gtt_pages = 64; | 452 | gtt_pages = 64; |
| 454 | pg->gtt_start = dev_priv->pge_ctl; | 453 | pg->gtt_start = dev_priv->pge_ctl; |
| 455 | } | 454 | } |
| @@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume) | |||
| 461 | 460 | ||
| 462 | if (pg->gatt_pages == 0 || pg->gatt_start == 0) { | 461 | if (pg->gatt_pages == 0 || pg->gatt_start == 0) { |
| 463 | static struct resource fudge; /* Preferably peppermint */ | 462 | static struct resource fudge; /* Preferably peppermint */ |
| 464 | /* This can occur on CDV SDV systems. Fudge it in this case. | 463 | /* This can occur on CDV systems. Fudge it in this case. |
| 465 | We really don't care what imaginary space is being allocated | 464 | We really don't care what imaginary space is being allocated |
| 466 | at this point */ | 465 | at this point */ |
| 467 | dev_err(dev->dev, "GATT PCI BAR not initialized.\n"); | 466 | dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n"); |
| 468 | pg->gatt_start = 0x40000000; | 467 | pg->gatt_start = 0x40000000; |
| 469 | pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT; | 468 | pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT; |
| 470 | /* This is a little confusing but in fact the GTT is providing | 469 | /* This is a little confusing but in fact the GTT is providing |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f425b23e3803..f851db7be2cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -4680,8 +4680,17 @@ sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane, | |||
| 4680 | 4680 | ||
| 4681 | crtc = intel_get_crtc_for_plane(dev, plane); | 4681 | crtc = intel_get_crtc_for_plane(dev, plane); |
| 4682 | clock = crtc->mode.clock; | 4682 | clock = crtc->mode.clock; |
| 4683 | if (!clock) { | ||
| 4684 | *sprite_wm = 0; | ||
| 4685 | return false; | ||
| 4686 | } | ||
| 4683 | 4687 | ||
| 4684 | line_time_us = (sprite_width * 1000) / clock; | 4688 | line_time_us = (sprite_width * 1000) / clock; |
| 4689 | if (!line_time_us) { | ||
| 4690 | *sprite_wm = 0; | ||
| 4691 | return false; | ||
| 4692 | } | ||
| 4693 | |||
| 4685 | line_count = (latency_ns / line_time_us + 1000) / 1000; | 4694 | line_count = (latency_ns / line_time_us + 1000) / 1000; |
| 4686 | line_size = sprite_width * pixel_size; | 4695 | line_size = sprite_width * pixel_size; |
| 4687 | 4696 | ||
| @@ -6175,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) | |||
| 6175 | int i; | 6184 | int i; |
| 6176 | 6185 | ||
| 6177 | /* The clocks have to be on to load the palette. */ | 6186 | /* The clocks have to be on to load the palette. */ |
| 6178 | if (!crtc->enabled) | 6187 | if (!crtc->enabled || !intel_crtc->active) |
| 6179 | return; | 6188 | return; |
| 6180 | 6189 | ||
| 6181 | /* use legacy palette for Ironlake */ | 6190 | /* use legacy palette for Ironlake */ |
| @@ -6561,7 +6570,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev, | |||
| 6561 | mode_cmd.height = mode->vdisplay; | 6570 | mode_cmd.height = mode->vdisplay; |
| 6562 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, | 6571 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, |
| 6563 | bpp); | 6572 | bpp); |
| 6564 | mode_cmd.pixel_format = 0; | 6573 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth); |
| 6565 | 6574 | ||
| 6566 | return intel_framebuffer_create(dev, &mode_cmd, obj); | 6575 | return intel_framebuffer_create(dev, &mode_cmd, obj); |
| 6567 | } | 6576 | } |
| @@ -8185,7 +8194,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | |||
| 8185 | 8194 | ||
| 8186 | if (intel_enable_rc6(dev_priv->dev)) | 8195 | if (intel_enable_rc6(dev_priv->dev)) |
| 8187 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | | 8196 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | |
| 8188 | (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0; | 8197 | ((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0); |
| 8189 | 8198 | ||
| 8190 | I915_WRITE(GEN6_RC_CONTROL, | 8199 | I915_WRITE(GEN6_RC_CONTROL, |
| 8191 | rc6_mask | | 8200 | rc6_mask | |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 1ab842c6032e..536191540b03 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
| @@ -301,7 +301,7 @@ static int init_ring_common(struct intel_ring_buffer *ring) | |||
| 301 | 301 | ||
| 302 | I915_WRITE_CTL(ring, | 302 | I915_WRITE_CTL(ring, |
| 303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) | 303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) |
| 304 | | RING_REPORT_64K | RING_VALID); | 304 | | RING_VALID); |
| 305 | 305 | ||
| 306 | /* If the head is still not zero, the ring is dead */ | 306 | /* If the head is still not zero, the ring is dead */ |
| 307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || | 307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || |
| @@ -1132,18 +1132,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n) | |||
| 1132 | struct drm_device *dev = ring->dev; | 1132 | struct drm_device *dev = ring->dev; |
| 1133 | struct drm_i915_private *dev_priv = dev->dev_private; | 1133 | struct drm_i915_private *dev_priv = dev->dev_private; |
| 1134 | unsigned long end; | 1134 | unsigned long end; |
| 1135 | u32 head; | ||
| 1136 | |||
| 1137 | /* If the reported head position has wrapped or hasn't advanced, | ||
| 1138 | * fallback to the slow and accurate path. | ||
| 1139 | */ | ||
| 1140 | head = intel_read_status_page(ring, 4); | ||
| 1141 | if (head > ring->head) { | ||
| 1142 | ring->head = head; | ||
| 1143 | ring->space = ring_space(ring); | ||
| 1144 | if (ring->space >= n) | ||
| 1145 | return 0; | ||
| 1146 | } | ||
| 1147 | 1135 | ||
| 1148 | trace_i915_ring_wait_begin(ring); | 1136 | trace_i915_ring_wait_begin(ring); |
| 1149 | if (drm_core_check_feature(dev, DRIVER_GEM)) | 1137 | if (drm_core_check_feature(dev, DRIVER_GEM)) |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 38ce5d0427e3..387fcc9f03ef 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
| @@ -1304,6 +1304,7 @@ static int r600_check_texture_resource(struct radeon_cs_parser *p, u32 idx, | |||
| 1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; | 1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; |
| 1305 | d0 = G_038004_TEX_DEPTH(word1); | 1305 | d0 = G_038004_TEX_DEPTH(word1); |
| 1306 | nfaces = 1; | 1306 | nfaces = 1; |
| 1307 | array = 0; | ||
| 1307 | switch (G_038000_DIM(word0)) { | 1308 | switch (G_038000_DIM(word0)) { |
| 1308 | case V_038000_SQ_TEX_DIM_1D: | 1309 | case V_038000_SQ_TEX_DIM_1D: |
| 1309 | case V_038000_SQ_TEX_DIM_2D: | 1310 | case V_038000_SQ_TEX_DIM_2D: |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index e7cb3ab09243..8b3d8ed52ff6 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
| @@ -1117,13 +1117,23 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
| 1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { | 1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { |
| 1118 | struct drm_display_mode *mode; | 1118 | struct drm_display_mode *mode; |
| 1119 | 1119 | ||
| 1120 | if (!radeon_dig_connector->edp_on) | 1120 | if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { |
| 1121 | atombios_set_edp_panel_power(connector, | 1121 | if (!radeon_dig_connector->edp_on) |
| 1122 | ATOM_TRANSMITTER_ACTION_POWER_ON); | 1122 | atombios_set_edp_panel_power(connector, |
| 1123 | ret = radeon_ddc_get_modes(radeon_connector); | 1123 | ATOM_TRANSMITTER_ACTION_POWER_ON); |
| 1124 | if (!radeon_dig_connector->edp_on) | 1124 | ret = radeon_ddc_get_modes(radeon_connector); |
| 1125 | atombios_set_edp_panel_power(connector, | 1125 | if (!radeon_dig_connector->edp_on) |
| 1126 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | 1126 | atombios_set_edp_panel_power(connector, |
| 1127 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | ||
| 1128 | } else { | ||
| 1129 | /* need to setup ddc on the bridge */ | ||
| 1130 | if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != | ||
| 1131 | ENCODER_OBJECT_ID_NONE) { | ||
| 1132 | if (encoder) | ||
| 1133 | radeon_atom_ext_encoder_setup_ddc(encoder); | ||
| 1134 | } | ||
| 1135 | ret = radeon_ddc_get_modes(radeon_connector); | ||
| 1136 | } | ||
| 1127 | 1137 | ||
| 1128 | if (ret > 0) { | 1138 | if (ret > 0) { |
| 1129 | if (encoder) { | 1139 | if (encoder) { |
| @@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
| 1134 | return ret; | 1144 | return ret; |
| 1135 | } | 1145 | } |
| 1136 | 1146 | ||
| 1137 | encoder = radeon_best_single_encoder(connector); | ||
| 1138 | if (!encoder) | 1147 | if (!encoder) |
| 1139 | return 0; | 1148 | return 0; |
| 1140 | 1149 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 010dad8b66ae..c58a036233fb 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
| @@ -597,13 +597,13 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev, | |||
| 597 | if (bo_va == NULL) | 597 | if (bo_va == NULL) |
| 598 | return 0; | 598 | return 0; |
| 599 | 599 | ||
| 600 | list_del(&bo_va->bo_list); | ||
| 601 | mutex_lock(&vm->mutex); | 600 | mutex_lock(&vm->mutex); |
| 602 | radeon_mutex_lock(&rdev->cs_mutex); | 601 | radeon_mutex_lock(&rdev->cs_mutex); |
| 603 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); | 602 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); |
| 604 | radeon_mutex_unlock(&rdev->cs_mutex); | 603 | radeon_mutex_unlock(&rdev->cs_mutex); |
| 605 | list_del(&bo_va->vm_list); | 604 | list_del(&bo_va->vm_list); |
| 606 | mutex_unlock(&vm->mutex); | 605 | mutex_unlock(&vm->mutex); |
| 606 | list_del(&bo_va->bo_list); | ||
| 607 | 607 | ||
| 608 | kfree(bo_va); | 608 | kfree(bo_va); |
| 609 | return 0; | 609 | return 0; |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b8574cddd953..63552e30d0c3 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
| @@ -59,6 +59,9 @@ | |||
| 59 | #define USB_VENDOR_ID_AIRCABLE 0x16CA | 59 | #define USB_VENDOR_ID_AIRCABLE 0x16CA |
| 60 | #define USB_DEVICE_ID_AIRCABLE1 0x1502 | 60 | #define USB_DEVICE_ID_AIRCABLE1 0x1502 |
| 61 | 61 | ||
| 62 | #define USB_VENDOR_ID_AIREN 0x1a2c | ||
| 63 | #define USB_DEVICE_ID_AIREN_SLIMPLUS 0x0002 | ||
| 64 | |||
| 62 | #define USB_VENDOR_ID_ALCOR 0x058f | 65 | #define USB_VENDOR_ID_ALCOR 0x058f |
| 63 | #define USB_DEVICE_ID_ALCOR_USBRS232 0x9720 | 66 | #define USB_DEVICE_ID_ALCOR_USBRS232 0x9720 |
| 64 | 67 | ||
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 9333d692a786..627850a54d34 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
| @@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
| 986 | return; | 986 | return; |
| 987 | } | 987 | } |
| 988 | 988 | ||
| 989 | /* Ignore out-of-range values as per HID specification, section 5.10 */ | 989 | /* |
| 990 | if (value < field->logical_minimum || value > field->logical_maximum) { | 990 | * Ignore out-of-range values as per HID specification, |
| 991 | * section 5.10 and 6.2.25 | ||
| 992 | */ | ||
| 993 | if ((field->flags & HID_MAIN_ITEM_VARIABLE) && | ||
| 994 | (value < field->logical_minimum || | ||
| 995 | value > field->logical_maximum)) { | ||
| 991 | dbg_hid("Ignoring out-of-range value %x\n", value); | 996 | dbg_hid("Ignoring out-of-range value %x\n", value); |
| 992 | return; | 997 | return; |
| 993 | } | 998 | } |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index c831af937481..57d4e1e1df48 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
| @@ -54,6 +54,7 @@ static const struct hid_blacklist { | |||
| 54 | { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, | 54 | { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, |
| 55 | { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT }, | 55 | { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT }, |
| 56 | 56 | ||
| 57 | { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET }, | ||
| 57 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, | 58 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, |
| 58 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, | 59 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, |
| 59 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, | 60 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, |
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 6bab2001ef3b..6aa5a9fad879 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
| @@ -178,6 +178,16 @@ static inline void f75375_write16(struct i2c_client *client, u8 reg, | |||
| 178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); | 178 | i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF)); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | static void f75375_write_pwm(struct i2c_client *client, int nr) | ||
| 182 | { | ||
| 183 | struct f75375_data *data = i2c_get_clientdata(client); | ||
| 184 | if (data->kind == f75387) | ||
| 185 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->pwm[nr]); | ||
| 186 | else | ||
| 187 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
| 188 | data->pwm[nr]); | ||
| 189 | } | ||
| 190 | |||
| 181 | static struct f75375_data *f75375_update_device(struct device *dev) | 191 | static struct f75375_data *f75375_update_device(struct device *dev) |
| 182 | { | 192 | { |
| 183 | struct i2c_client *client = to_i2c_client(dev); | 193 | struct i2c_client *client = to_i2c_client(dev); |
| @@ -254,6 +264,36 @@ static inline u16 rpm_to_reg(int rpm) | |||
| 254 | return 1500000 / rpm; | 264 | return 1500000 / rpm; |
| 255 | } | 265 | } |
| 256 | 266 | ||
| 267 | static bool duty_mode_enabled(u8 pwm_enable) | ||
| 268 | { | ||
| 269 | switch (pwm_enable) { | ||
| 270 | case 0: /* Manual, duty mode (full speed) */ | ||
| 271 | case 1: /* Manual, duty mode */ | ||
| 272 | case 4: /* Auto, duty mode */ | ||
| 273 | return true; | ||
| 274 | case 2: /* Auto, speed mode */ | ||
| 275 | case 3: /* Manual, speed mode */ | ||
| 276 | return false; | ||
| 277 | default: | ||
| 278 | BUG(); | ||
| 279 | } | ||
| 280 | } | ||
| 281 | |||
| 282 | static bool auto_mode_enabled(u8 pwm_enable) | ||
| 283 | { | ||
| 284 | switch (pwm_enable) { | ||
| 285 | case 0: /* Manual, duty mode (full speed) */ | ||
| 286 | case 1: /* Manual, duty mode */ | ||
| 287 | case 3: /* Manual, speed mode */ | ||
| 288 | return false; | ||
| 289 | case 2: /* Auto, speed mode */ | ||
| 290 | case 4: /* Auto, duty mode */ | ||
| 291 | return true; | ||
| 292 | default: | ||
| 293 | BUG(); | ||
| 294 | } | ||
| 295 | } | ||
| 296 | |||
| 257 | static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, | 297 | static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, |
| 258 | const char *buf, size_t count) | 298 | const char *buf, size_t count) |
| 259 | { | 299 | { |
| @@ -287,6 +327,11 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *attr, | |||
| 287 | if (err < 0) | 327 | if (err < 0) |
| 288 | return err; | 328 | return err; |
| 289 | 329 | ||
| 330 | if (auto_mode_enabled(data->pwm_enable[nr])) | ||
| 331 | return -EINVAL; | ||
| 332 | if (data->kind == f75387 && duty_mode_enabled(data->pwm_enable[nr])) | ||
| 333 | return -EINVAL; | ||
| 334 | |||
| 290 | mutex_lock(&data->update_lock); | 335 | mutex_lock(&data->update_lock); |
| 291 | data->fan_target[nr] = rpm_to_reg(val); | 336 | data->fan_target[nr] = rpm_to_reg(val); |
| 292 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]); | 337 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]); |
| @@ -307,9 +352,13 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, | |||
| 307 | if (err < 0) | 352 | if (err < 0) |
| 308 | return err; | 353 | return err; |
| 309 | 354 | ||
| 355 | if (auto_mode_enabled(data->pwm_enable[nr]) || | ||
| 356 | !duty_mode_enabled(data->pwm_enable[nr])) | ||
| 357 | return -EINVAL; | ||
| 358 | |||
| 310 | mutex_lock(&data->update_lock); | 359 | mutex_lock(&data->update_lock); |
| 311 | data->pwm[nr] = SENSORS_LIMIT(val, 0, 255); | 360 | data->pwm[nr] = SENSORS_LIMIT(val, 0, 255); |
| 312 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), data->pwm[nr]); | 361 | f75375_write_pwm(client, nr); |
| 313 | mutex_unlock(&data->update_lock); | 362 | mutex_unlock(&data->update_lock); |
| 314 | return count; | 363 | return count; |
| 315 | } | 364 | } |
| @@ -327,11 +376,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
| 327 | struct f75375_data *data = i2c_get_clientdata(client); | 376 | struct f75375_data *data = i2c_get_clientdata(client); |
| 328 | u8 fanmode; | 377 | u8 fanmode; |
| 329 | 378 | ||
| 330 | if (val < 0 || val > 3) | 379 | if (val < 0 || val > 4) |
| 331 | return -EINVAL; | 380 | return -EINVAL; |
| 332 | 381 | ||
| 333 | fanmode = f75375_read8(client, F75375_REG_FAN_TIMER); | 382 | fanmode = f75375_read8(client, F75375_REG_FAN_TIMER); |
| 334 | if (data->kind == f75387) { | 383 | if (data->kind == f75387) { |
| 384 | /* For now, deny dangerous toggling of duty mode */ | ||
| 385 | if (duty_mode_enabled(data->pwm_enable[nr]) != | ||
| 386 | duty_mode_enabled(val)) | ||
| 387 | return -EOPNOTSUPP; | ||
| 335 | /* clear each fanX_mode bit before setting them properly */ | 388 | /* clear each fanX_mode bit before setting them properly */ |
| 336 | fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr)); | 389 | fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr)); |
| 337 | fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr)); | 390 | fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr)); |
| @@ -345,12 +398,14 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
| 345 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 398 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
| 346 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | 399 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); |
| 347 | break; | 400 | break; |
| 348 | case 2: /* AUTOMATIC*/ | 401 | case 2: /* Automatic, speed mode */ |
| 349 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | ||
| 350 | break; | 402 | break; |
| 351 | case 3: /* fan speed */ | 403 | case 3: /* fan speed */ |
| 352 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); | 404 | fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); |
| 353 | break; | 405 | break; |
| 406 | case 4: /* Automatic, pwm */ | ||
| 407 | fanmode |= (1 << F75387_FAN_DUTY_MODE(nr)); | ||
| 408 | break; | ||
| 354 | } | 409 | } |
| 355 | } else { | 410 | } else { |
| 356 | /* clear each fanX_mode bit before setting them properly */ | 411 | /* clear each fanX_mode bit before setting them properly */ |
| @@ -368,14 +423,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | |||
| 368 | break; | 423 | break; |
| 369 | case 3: /* fan speed */ | 424 | case 3: /* fan speed */ |
| 370 | break; | 425 | break; |
| 426 | case 4: /* Automatic pwm */ | ||
| 427 | return -EINVAL; | ||
| 371 | } | 428 | } |
| 372 | } | 429 | } |
| 373 | 430 | ||
| 374 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); | 431 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); |
| 375 | data->pwm_enable[nr] = val; | 432 | data->pwm_enable[nr] = val; |
| 376 | if (val == 0) | 433 | if (val == 0) |
| 377 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | 434 | f75375_write_pwm(client, nr); |
| 378 | data->pwm[nr]); | ||
| 379 | return 0; | 435 | return 0; |
| 380 | } | 436 | } |
| 381 | 437 | ||
| @@ -726,14 +782,17 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
| 726 | 782 | ||
| 727 | manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1); | 783 | manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1); |
| 728 | duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1); | 784 | duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1); |
| 729 | if (manu && duty) | 785 | if (!manu && duty) |
| 730 | /* speed */ | 786 | /* auto, pwm */ |
| 787 | data->pwm_enable[nr] = 4; | ||
| 788 | else if (manu && !duty) | ||
| 789 | /* manual, speed */ | ||
| 731 | data->pwm_enable[nr] = 3; | 790 | data->pwm_enable[nr] = 3; |
| 732 | else if (!manu && duty) | 791 | else if (!manu && !duty) |
| 733 | /* automatic */ | 792 | /* automatic, speed */ |
| 734 | data->pwm_enable[nr] = 2; | 793 | data->pwm_enable[nr] = 2; |
| 735 | else | 794 | else |
| 736 | /* manual */ | 795 | /* manual, pwm */ |
| 737 | data->pwm_enable[nr] = 1; | 796 | data->pwm_enable[nr] = 1; |
| 738 | } else { | 797 | } else { |
| 739 | if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr)))) | 798 | if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr)))) |
| @@ -758,9 +817,11 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
| 758 | set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]); | 817 | set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]); |
| 759 | set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]); | 818 | set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]); |
| 760 | for (nr = 0; nr < 2; nr++) { | 819 | for (nr = 0; nr < 2; nr++) { |
| 820 | if (auto_mode_enabled(f75375s_pdata->pwm_enable[nr]) || | ||
| 821 | !duty_mode_enabled(f75375s_pdata->pwm_enable[nr])) | ||
| 822 | continue; | ||
| 761 | data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255); | 823 | data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255); |
| 762 | f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | 824 | f75375_write_pwm(client, nr); |
| 763 | data->pwm[nr]); | ||
| 764 | } | 825 | } |
| 765 | 826 | ||
| 766 | } | 827 | } |
| @@ -787,7 +848,7 @@ static int f75375_probe(struct i2c_client *client, | |||
| 787 | if (err) | 848 | if (err) |
| 788 | goto exit_free; | 849 | goto exit_free; |
| 789 | 850 | ||
| 790 | if (data->kind == f75375) { | 851 | if (data->kind != f75373) { |
| 791 | err = sysfs_chmod_file(&client->dev.kobj, | 852 | err = sysfs_chmod_file(&client->dev.kobj, |
| 792 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, | 853 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, |
| 793 | S_IRUGO | S_IWUSR); | 854 | S_IRUGO | S_IWUSR); |
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 7e78f7c87857..3d471d56bf15 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
| @@ -72,6 +72,7 @@ | |||
| 72 | 72 | ||
| 73 | #define MXS_I2C_QUEUESTAT (0x70) | 73 | #define MXS_I2C_QUEUESTAT (0x70) |
| 74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 | 74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 |
| 75 | #define MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK 0x0000001F | ||
| 75 | 76 | ||
| 76 | #define MXS_I2C_QUEUECMD (0x80) | 77 | #define MXS_I2C_QUEUECMD (0x80) |
| 77 | 78 | ||
| @@ -219,14 +220,14 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
| 219 | int ret; | 220 | int ret; |
| 220 | int flags; | 221 | int flags; |
| 221 | 222 | ||
| 222 | init_completion(&i2c->cmd_complete); | ||
| 223 | |||
| 224 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", | 223 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", |
| 225 | msg->addr, msg->len, msg->flags, stop); | 224 | msg->addr, msg->len, msg->flags, stop); |
| 226 | 225 | ||
| 227 | if (msg->len == 0) | 226 | if (msg->len == 0) |
| 228 | return -EINVAL; | 227 | return -EINVAL; |
| 229 | 228 | ||
| 229 | init_completion(&i2c->cmd_complete); | ||
| 230 | |||
| 230 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; | 231 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; |
| 231 | 232 | ||
| 232 | if (msg->flags & I2C_M_RD) | 233 | if (msg->flags & I2C_M_RD) |
| @@ -286,6 +287,7 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
| 286 | { | 287 | { |
| 287 | struct mxs_i2c_dev *i2c = dev_id; | 288 | struct mxs_i2c_dev *i2c = dev_id; |
| 288 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; | 289 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; |
| 290 | bool is_last_cmd; | ||
| 289 | 291 | ||
| 290 | if (!stat) | 292 | if (!stat) |
| 291 | return IRQ_NONE; | 293 | return IRQ_NONE; |
| @@ -300,9 +302,14 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
| 300 | else | 302 | else |
| 301 | i2c->cmd_err = 0; | 303 | i2c->cmd_err = 0; |
| 302 | 304 | ||
| 303 | complete(&i2c->cmd_complete); | 305 | is_last_cmd = (readl(i2c->regs + MXS_I2C_QUEUESTAT) & |
| 306 | MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK) == 0; | ||
| 307 | |||
| 308 | if (is_last_cmd || i2c->cmd_err) | ||
| 309 | complete(&i2c->cmd_complete); | ||
| 304 | 310 | ||
| 305 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); | 311 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); |
| 312 | |||
| 306 | return IRQ_HANDLED; | 313 | return IRQ_HANDLED; |
| 307 | } | 314 | } |
| 308 | 315 | ||
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index 288da5c1499d..103dbd92e256 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c | |||
| @@ -44,7 +44,8 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf, | |||
| 44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | 44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, |
| 45 | size_t count, loff_t *ppos) | 45 | size_t count, loff_t *ppos) |
| 46 | { | 46 | { |
| 47 | struct omap_iommu *obj = file->private_data; | 47 | struct device *dev = file->private_data; |
| 48 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
| 48 | char *p, *buf; | 49 | char *p, *buf; |
| 49 | ssize_t bytes; | 50 | ssize_t bytes; |
| 50 | 51 | ||
| @@ -67,7 +68,8 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | |||
| 67 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, | 68 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, |
| 68 | size_t count, loff_t *ppos) | 69 | size_t count, loff_t *ppos) |
| 69 | { | 70 | { |
| 70 | struct omap_iommu *obj = file->private_data; | 71 | struct device *dev = file->private_data; |
| 72 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
| 71 | char *p, *buf; | 73 | char *p, *buf; |
| 72 | ssize_t bytes, rest; | 74 | ssize_t bytes, rest; |
| 73 | 75 | ||
| @@ -97,7 +99,8 @@ static ssize_t debug_write_pagetable(struct file *file, | |||
| 97 | struct iotlb_entry e; | 99 | struct iotlb_entry e; |
| 98 | struct cr_regs cr; | 100 | struct cr_regs cr; |
| 99 | int err; | 101 | int err; |
| 100 | struct omap_iommu *obj = file->private_data; | 102 | struct device *dev = file->private_data; |
| 103 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
| 101 | char buf[MAXCOLUMN], *p = buf; | 104 | char buf[MAXCOLUMN], *p = buf; |
| 102 | 105 | ||
| 103 | count = min(count, sizeof(buf)); | 106 | count = min(count, sizeof(buf)); |
| @@ -184,7 +187,8 @@ out: | |||
| 184 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | 187 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, |
| 185 | size_t count, loff_t *ppos) | 188 | size_t count, loff_t *ppos) |
| 186 | { | 189 | { |
| 187 | struct omap_iommu *obj = file->private_data; | 190 | struct device *dev = file->private_data; |
| 191 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
| 188 | char *p, *buf; | 192 | char *p, *buf; |
| 189 | size_t bytes; | 193 | size_t bytes; |
| 190 | 194 | ||
| @@ -212,7 +216,8 @@ static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | |||
| 212 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | 216 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, |
| 213 | size_t count, loff_t *ppos) | 217 | size_t count, loff_t *ppos) |
| 214 | { | 218 | { |
| 215 | struct omap_iommu *obj = file->private_data; | 219 | struct device *dev = file->private_data; |
| 220 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
| 216 | char *p, *buf; | 221 | char *p, *buf; |
| 217 | struct iovm_struct *tmp; | 222 | struct iovm_struct *tmp; |
| 218 | int uninitialized_var(i); | 223 | int uninitialized_var(i); |
| @@ -254,7 +259,7 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | |||
| 254 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | 259 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, |
| 255 | size_t count, loff_t *ppos) | 260 | size_t count, loff_t *ppos) |
| 256 | { | 261 | { |
| 257 | struct omap_iommu *obj = file->private_data; | 262 | struct device *dev = file->private_data; |
| 258 | char *p, *buf; | 263 | char *p, *buf; |
| 259 | struct iovm_struct *area; | 264 | struct iovm_struct *area; |
| 260 | ssize_t bytes; | 265 | ssize_t bytes; |
| @@ -268,8 +273,8 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | |||
| 268 | 273 | ||
| 269 | mutex_lock(&iommu_debug_lock); | 274 | mutex_lock(&iommu_debug_lock); |
| 270 | 275 | ||
| 271 | area = omap_find_iovm_area(obj, (u32)ppos); | 276 | area = omap_find_iovm_area(dev, (u32)ppos); |
| 272 | if (IS_ERR(area)) { | 277 | if (!area) { |
| 273 | bytes = -EINVAL; | 278 | bytes = -EINVAL; |
| 274 | goto err_out; | 279 | goto err_out; |
| 275 | } | 280 | } |
| @@ -287,7 +292,7 @@ err_out: | |||
| 287 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | 292 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, |
| 288 | size_t count, loff_t *ppos) | 293 | size_t count, loff_t *ppos) |
| 289 | { | 294 | { |
| 290 | struct omap_iommu *obj = file->private_data; | 295 | struct device *dev = file->private_data; |
| 291 | struct iovm_struct *area; | 296 | struct iovm_struct *area; |
| 292 | char *p, *buf; | 297 | char *p, *buf; |
| 293 | 298 | ||
| @@ -305,8 +310,8 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | |||
| 305 | goto err_out; | 310 | goto err_out; |
| 306 | } | 311 | } |
| 307 | 312 | ||
| 308 | area = omap_find_iovm_area(obj, (u32)ppos); | 313 | area = omap_find_iovm_area(dev, (u32)ppos); |
| 309 | if (IS_ERR(area)) { | 314 | if (!area) { |
| 310 | count = -EINVAL; | 315 | count = -EINVAL; |
| 311 | goto err_out; | 316 | goto err_out; |
| 312 | } | 317 | } |
| @@ -350,7 +355,7 @@ DEBUG_FOPS(mem); | |||
| 350 | { \ | 355 | { \ |
| 351 | struct dentry *dent; \ | 356 | struct dentry *dent; \ |
| 352 | dent = debugfs_create_file(#attr, mode, parent, \ | 357 | dent = debugfs_create_file(#attr, mode, parent, \ |
| 353 | obj, &debug_##attr##_fops); \ | 358 | dev, &debug_##attr##_fops); \ |
| 354 | if (!dent) \ | 359 | if (!dent) \ |
| 355 | return -ENOMEM; \ | 360 | return -ENOMEM; \ |
| 356 | } | 361 | } |
| @@ -362,20 +367,29 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
| 362 | { | 367 | { |
| 363 | struct platform_device *pdev = to_platform_device(dev); | 368 | struct platform_device *pdev = to_platform_device(dev); |
| 364 | struct omap_iommu *obj = platform_get_drvdata(pdev); | 369 | struct omap_iommu *obj = platform_get_drvdata(pdev); |
| 370 | struct omap_iommu_arch_data *arch_data; | ||
| 365 | struct dentry *d, *parent; | 371 | struct dentry *d, *parent; |
| 366 | 372 | ||
| 367 | if (!obj || !obj->dev) | 373 | if (!obj || !obj->dev) |
| 368 | return -EINVAL; | 374 | return -EINVAL; |
| 369 | 375 | ||
| 376 | arch_data = kzalloc(sizeof(*arch_data), GFP_KERNEL); | ||
| 377 | if (!arch_data) | ||
| 378 | return -ENOMEM; | ||
| 379 | |||
| 380 | arch_data->iommu_dev = obj; | ||
| 381 | |||
| 382 | dev->archdata.iommu = arch_data; | ||
| 383 | |||
| 370 | d = debugfs_create_dir(obj->name, iommu_debug_root); | 384 | d = debugfs_create_dir(obj->name, iommu_debug_root); |
| 371 | if (!d) | 385 | if (!d) |
| 372 | return -ENOMEM; | 386 | goto nomem; |
| 373 | parent = d; | 387 | parent = d; |
| 374 | 388 | ||
| 375 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, | 389 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, |
| 376 | (u8 *)&obj->nr_tlb_entries); | 390 | (u8 *)&obj->nr_tlb_entries); |
| 377 | if (!d) | 391 | if (!d) |
| 378 | return -ENOMEM; | 392 | goto nomem; |
| 379 | 393 | ||
| 380 | DEBUG_ADD_FILE_RO(ver); | 394 | DEBUG_ADD_FILE_RO(ver); |
| 381 | DEBUG_ADD_FILE_RO(regs); | 395 | DEBUG_ADD_FILE_RO(regs); |
| @@ -385,6 +399,22 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
| 385 | DEBUG_ADD_FILE(mem); | 399 | DEBUG_ADD_FILE(mem); |
| 386 | 400 | ||
| 387 | return 0; | 401 | return 0; |
| 402 | |||
| 403 | nomem: | ||
| 404 | kfree(arch_data); | ||
| 405 | return -ENOMEM; | ||
| 406 | } | ||
| 407 | |||
| 408 | static int iommu_debug_unregister(struct device *dev, void *data) | ||
| 409 | { | ||
| 410 | if (!dev->archdata.iommu) | ||
| 411 | return 0; | ||
| 412 | |||
| 413 | kfree(dev->archdata.iommu); | ||
| 414 | |||
| 415 | dev->archdata.iommu = NULL; | ||
| 416 | |||
| 417 | return 0; | ||
| 388 | } | 418 | } |
| 389 | 419 | ||
| 390 | static int __init iommu_debug_init(void) | 420 | static int __init iommu_debug_init(void) |
| @@ -411,6 +441,7 @@ module_init(iommu_debug_init) | |||
| 411 | static void __exit iommu_debugfs_exit(void) | 441 | static void __exit iommu_debugfs_exit(void) |
| 412 | { | 442 | { |
| 413 | debugfs_remove_recursive(iommu_debug_root); | 443 | debugfs_remove_recursive(iommu_debug_root); |
| 444 | omap_foreach_iommu_device(NULL, iommu_debug_unregister); | ||
| 414 | } | 445 | } |
| 415 | module_exit(iommu_debugfs_exit) | 446 | module_exit(iommu_debugfs_exit) |
| 416 | 447 | ||
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index d8edd979d01b..6899dcd02dfa 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
| @@ -1223,7 +1223,8 @@ static int __init omap_iommu_init(void) | |||
| 1223 | 1223 | ||
| 1224 | return platform_driver_register(&omap_iommu_driver); | 1224 | return platform_driver_register(&omap_iommu_driver); |
| 1225 | } | 1225 | } |
| 1226 | module_init(omap_iommu_init); | 1226 | /* must be ready before omap3isp is probed */ |
| 1227 | subsys_initcall(omap_iommu_init); | ||
| 1227 | 1228 | ||
| 1228 | static void __exit omap_iommu_exit(void) | 1229 | static void __exit omap_iommu_exit(void) |
| 1229 | { | 1230 | { |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index a368db2431a5..a0b225eb4ac4 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
| @@ -624,7 +624,7 @@ int md_raid1_congested(struct mddev *mddev, int bits) | |||
| 624 | return 1; | 624 | return 1; |
| 625 | 625 | ||
| 626 | rcu_read_lock(); | 626 | rcu_read_lock(); |
| 627 | for (i = 0; i < conf->raid_disks; i++) { | 627 | for (i = 0; i < conf->raid_disks * 2; i++) { |
| 628 | struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); | 628 | struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); |
| 629 | if (rdev && !test_bit(Faulty, &rdev->flags)) { | 629 | if (rdev && !test_bit(Faulty, &rdev->flags)) { |
| 630 | struct request_queue *q = bdev_get_queue(rdev->bdev); | 630 | struct request_queue *q = bdev_get_queue(rdev->bdev); |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 6e8aa213f0d5..58c44d6453a0 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
| @@ -67,6 +67,7 @@ static int max_queued_requests = 1024; | |||
| 67 | 67 | ||
| 68 | static void allow_barrier(struct r10conf *conf); | 68 | static void allow_barrier(struct r10conf *conf); |
| 69 | static void lower_barrier(struct r10conf *conf); | 69 | static void lower_barrier(struct r10conf *conf); |
| 70 | static int enough(struct r10conf *conf, int ignore); | ||
| 70 | 71 | ||
| 71 | static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data) | 72 | static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data) |
| 72 | { | 73 | { |
| @@ -347,6 +348,19 @@ static void raid10_end_read_request(struct bio *bio, int error) | |||
| 347 | * wait for the 'master' bio. | 348 | * wait for the 'master' bio. |
| 348 | */ | 349 | */ |
| 349 | set_bit(R10BIO_Uptodate, &r10_bio->state); | 350 | set_bit(R10BIO_Uptodate, &r10_bio->state); |
| 351 | } else { | ||
| 352 | /* If all other devices that store this block have | ||
| 353 | * failed, we want to return the error upwards rather | ||
| 354 | * than fail the last device. Here we redefine | ||
| 355 | * "uptodate" to mean "Don't want to retry" | ||
| 356 | */ | ||
| 357 | unsigned long flags; | ||
| 358 | spin_lock_irqsave(&conf->device_lock, flags); | ||
| 359 | if (!enough(conf, rdev->raid_disk)) | ||
| 360 | uptodate = 1; | ||
| 361 | spin_unlock_irqrestore(&conf->device_lock, flags); | ||
| 362 | } | ||
| 363 | if (uptodate) { | ||
| 350 | raid_end_bio_io(r10_bio); | 364 | raid_end_bio_io(r10_bio); |
| 351 | rdev_dec_pending(rdev, conf->mddev); | 365 | rdev_dec_pending(rdev, conf->mddev); |
| 352 | } else { | 366 | } else { |
| @@ -2052,6 +2066,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | |||
| 2052 | "md/raid10:%s: %s: Failing raid device\n", | 2066 | "md/raid10:%s: %s: Failing raid device\n", |
| 2053 | mdname(mddev), b); | 2067 | mdname(mddev), b); |
| 2054 | md_error(mddev, conf->mirrors[d].rdev); | 2068 | md_error(mddev, conf->mirrors[d].rdev); |
| 2069 | r10_bio->devs[r10_bio->read_slot].bio = IO_BLOCKED; | ||
| 2055 | return; | 2070 | return; |
| 2056 | } | 2071 | } |
| 2057 | 2072 | ||
| @@ -2105,8 +2120,11 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | |||
| 2105 | rdev, | 2120 | rdev, |
| 2106 | r10_bio->devs[r10_bio->read_slot].addr | 2121 | r10_bio->devs[r10_bio->read_slot].addr |
| 2107 | + sect, | 2122 | + sect, |
| 2108 | s, 0)) | 2123 | s, 0)) { |
| 2109 | md_error(mddev, rdev); | 2124 | md_error(mddev, rdev); |
| 2125 | r10_bio->devs[r10_bio->read_slot].bio | ||
| 2126 | = IO_BLOCKED; | ||
| 2127 | } | ||
| 2110 | break; | 2128 | break; |
| 2111 | } | 2129 | } |
| 2112 | 2130 | ||
| @@ -2299,17 +2317,20 @@ static void handle_read_error(struct mddev *mddev, struct r10bio *r10_bio) | |||
| 2299 | * This is all done synchronously while the array is | 2317 | * This is all done synchronously while the array is |
| 2300 | * frozen. | 2318 | * frozen. |
| 2301 | */ | 2319 | */ |
| 2320 | bio = r10_bio->devs[slot].bio; | ||
| 2321 | bdevname(bio->bi_bdev, b); | ||
| 2322 | bio_put(bio); | ||
| 2323 | r10_bio->devs[slot].bio = NULL; | ||
| 2324 | |||
| 2302 | if (mddev->ro == 0) { | 2325 | if (mddev->ro == 0) { |
| 2303 | freeze_array(conf); | 2326 | freeze_array(conf); |
| 2304 | fix_read_error(conf, mddev, r10_bio); | 2327 | fix_read_error(conf, mddev, r10_bio); |
| 2305 | unfreeze_array(conf); | 2328 | unfreeze_array(conf); |
| 2306 | } | 2329 | } else |
| 2330 | r10_bio->devs[slot].bio = IO_BLOCKED; | ||
| 2331 | |||
| 2307 | rdev_dec_pending(rdev, mddev); | 2332 | rdev_dec_pending(rdev, mddev); |
| 2308 | 2333 | ||
| 2309 | bio = r10_bio->devs[slot].bio; | ||
| 2310 | bdevname(bio->bi_bdev, b); | ||
| 2311 | r10_bio->devs[slot].bio = | ||
| 2312 | mddev->ro ? IO_BLOCKED : NULL; | ||
| 2313 | read_more: | 2334 | read_more: |
| 2314 | rdev = read_balance(conf, r10_bio, &max_sectors); | 2335 | rdev = read_balance(conf, r10_bio, &max_sectors); |
| 2315 | if (rdev == NULL) { | 2336 | if (rdev == NULL) { |
| @@ -2318,13 +2339,10 @@ read_more: | |||
| 2318 | mdname(mddev), b, | 2339 | mdname(mddev), b, |
| 2319 | (unsigned long long)r10_bio->sector); | 2340 | (unsigned long long)r10_bio->sector); |
| 2320 | raid_end_bio_io(r10_bio); | 2341 | raid_end_bio_io(r10_bio); |
| 2321 | bio_put(bio); | ||
| 2322 | return; | 2342 | return; |
| 2323 | } | 2343 | } |
| 2324 | 2344 | ||
| 2325 | do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC); | 2345 | do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC); |
| 2326 | if (bio) | ||
| 2327 | bio_put(bio); | ||
| 2328 | slot = r10_bio->read_slot; | 2346 | slot = r10_bio->read_slot; |
| 2329 | printk_ratelimited( | 2347 | printk_ratelimited( |
| 2330 | KERN_ERR | 2348 | KERN_ERR |
| @@ -2360,7 +2378,6 @@ read_more: | |||
| 2360 | mbio->bi_phys_segments++; | 2378 | mbio->bi_phys_segments++; |
| 2361 | spin_unlock_irq(&conf->device_lock); | 2379 | spin_unlock_irq(&conf->device_lock); |
| 2362 | generic_make_request(bio); | 2380 | generic_make_request(bio); |
| 2363 | bio = NULL; | ||
| 2364 | 2381 | ||
| 2365 | r10_bio = mempool_alloc(conf->r10bio_pool, | 2382 | r10_bio = mempool_alloc(conf->r10bio_pool, |
| 2366 | GFP_NOIO); | 2383 | GFP_NOIO); |
| @@ -3243,7 +3260,6 @@ static int run(struct mddev *mddev) | |||
| 3243 | disk->rdev = rdev; | 3260 | disk->rdev = rdev; |
| 3244 | } | 3261 | } |
| 3245 | 3262 | ||
| 3246 | disk->rdev = rdev; | ||
| 3247 | disk_stack_limits(mddev->gendisk, rdev->bdev, | 3263 | disk_stack_limits(mddev->gendisk, rdev->bdev, |
| 3248 | rdev->data_offset << 9); | 3264 | rdev->data_offset << 9); |
| 3249 | /* as we don't honour merge_bvec_fn, we must never risk | 3265 | /* as we don't honour merge_bvec_fn, we must never risk |
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 53e2a80f42fa..d295941c9a3d 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
| @@ -956,11 +956,12 @@ int __devinit ab8500_init(struct ab8500 *ab8500) | |||
| 956 | return ret; | 956 | return ret; |
| 957 | 957 | ||
| 958 | out_freeirq: | 958 | out_freeirq: |
| 959 | if (ab8500->irq_base) { | 959 | if (ab8500->irq_base) |
| 960 | free_irq(ab8500->irq, ab8500); | 960 | free_irq(ab8500->irq, ab8500); |
| 961 | out_removeirq: | 961 | out_removeirq: |
| 962 | if (ab8500->irq_base) | ||
| 962 | ab8500_irq_remove(ab8500); | 963 | ab8500_irq_remove(ab8500); |
| 963 | } | 964 | |
| 964 | return ret; | 965 | return ret; |
| 965 | } | 966 | } |
| 966 | 967 | ||
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0f5922812bff..411f523d4878 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c | |||
| @@ -123,7 +123,7 @@ static int mfd_add_device(struct device *parent, int id, | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | if (!cell->ignore_resource_conflicts) { | 125 | if (!cell->ignore_resource_conflicts) { |
| 126 | ret = acpi_check_resource_conflict(res); | 126 | ret = acpi_check_resource_conflict(&res[r]); |
| 127 | if (ret) | 127 | if (ret) |
| 128 | goto fail_res; | 128 | goto fail_res; |
| 129 | } | 129 | } |
diff --git a/drivers/mfd/s5m-core.c b/drivers/mfd/s5m-core.c index e075c113eec6..caadabeed8e9 100644 --- a/drivers/mfd/s5m-core.c +++ b/drivers/mfd/s5m-core.c | |||
| @@ -105,7 +105,7 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c, | |||
| 105 | s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); | 105 | s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); |
| 106 | i2c_set_clientdata(s5m87xx->rtc, s5m87xx); | 106 | i2c_set_clientdata(s5m87xx->rtc, s5m87xx); |
| 107 | 107 | ||
| 108 | if (pdata->cfg_pmic_irq) | 108 | if (pdata && pdata->cfg_pmic_irq) |
| 109 | pdata->cfg_pmic_irq(); | 109 | pdata->cfg_pmic_irq(); |
| 110 | 110 | ||
| 111 | s5m_irq_init(s5m87xx); | 111 | s5m_irq_init(s5m87xx); |
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 01cf5012a08f..4392f6bca156 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c | |||
| @@ -168,7 +168,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c, | |||
| 168 | goto err; | 168 | goto err; |
| 169 | 169 | ||
| 170 | init_data->irq = pmic_plat_data->irq; | 170 | init_data->irq = pmic_plat_data->irq; |
| 171 | init_data->irq_base = pmic_plat_data->irq; | 171 | init_data->irq_base = pmic_plat_data->irq_base; |
| 172 | 172 | ||
| 173 | tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base); | 173 | tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base); |
| 174 | 174 | ||
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c index 5fec23a9ac03..74fd8cb5f372 100644 --- a/drivers/mfd/tps65912-core.c +++ b/drivers/mfd/tps65912-core.c | |||
| @@ -151,7 +151,7 @@ int tps65912_device_init(struct tps65912 *tps65912) | |||
| 151 | goto err; | 151 | goto err; |
| 152 | 152 | ||
| 153 | init_data->irq = pmic_plat_data->irq; | 153 | init_data->irq = pmic_plat_data->irq; |
| 154 | init_data->irq_base = pmic_plat_data->irq; | 154 | init_data->irq_base = pmic_plat_data->irq_base; |
| 155 | ret = tps65912_irq_init(tps65912, init_data->irq, init_data); | 155 | ret = tps65912_irq_init(tps65912, init_data->irq, init_data); |
| 156 | if (ret < 0) | 156 | if (ret < 0) |
| 157 | goto err; | 157 | goto err; |
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c index 8a1fafd0bf7d..9fd01bf63c51 100644 --- a/drivers/mfd/wm8350-irq.c +++ b/drivers/mfd/wm8350-irq.c | |||
| @@ -496,7 +496,6 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq, | |||
| 496 | 496 | ||
| 497 | mutex_init(&wm8350->irq_lock); | 497 | mutex_init(&wm8350->irq_lock); |
| 498 | wm8350->chip_irq = irq; | 498 | wm8350->chip_irq = irq; |
| 499 | wm8350->irq_base = pdata->irq_base; | ||
| 500 | 499 | ||
| 501 | if (pdata && pdata->irq_base > 0) | 500 | if (pdata && pdata->irq_base > 0) |
| 502 | irq_base = pdata->irq_base; | 501 | irq_base = pdata->irq_base; |
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index f117e7fb9321..a04b3c108c8c 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
| @@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev) | |||
| 256 | break; | 256 | break; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | switch (wm8994->type) { | ||
| 260 | case WM1811: | ||
| 261 | ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2); | ||
| 262 | if (ret < 0) { | ||
| 263 | dev_err(dev, "Failed to read jackdet: %d\n", ret); | ||
| 264 | } else if (ret & WM1811_JACKDET_MODE_MASK) { | ||
| 265 | dev_dbg(dev, "CODEC still active, ignoring suspend\n"); | ||
| 266 | return 0; | ||
| 267 | } | ||
| 268 | break; | ||
| 269 | default: | ||
| 270 | break; | ||
| 271 | } | ||
| 272 | |||
| 259 | /* Disable LDO pulldowns while the device is suspended if we | 273 | /* Disable LDO pulldowns while the device is suspended if we |
| 260 | * don't know that something will be driving them. */ | 274 | * don't know that something will be driving them. */ |
| 261 | if (!wm8994->ldo_ena_always_driven) | 275 | if (!wm8994->ldo_ena_always_driven) |
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index c598ae69b8ff..bc0c5096539a 100644 --- a/drivers/mfd/wm8994-regmap.c +++ b/drivers/mfd/wm8994-regmap.c | |||
| @@ -806,6 +806,7 @@ static bool wm1811_readable_register(struct device *dev, unsigned int reg) | |||
| 806 | case WM8994_DC_SERVO_2: | 806 | case WM8994_DC_SERVO_2: |
| 807 | case WM8994_DC_SERVO_READBACK: | 807 | case WM8994_DC_SERVO_READBACK: |
| 808 | case WM8994_DC_SERVO_4: | 808 | case WM8994_DC_SERVO_4: |
| 809 | case WM8994_DC_SERVO_4E: | ||
| 809 | case WM8994_ANALOGUE_HP_1: | 810 | case WM8994_ANALOGUE_HP_1: |
| 810 | case WM8958_MIC_DETECT_1: | 811 | case WM8958_MIC_DETECT_1: |
| 811 | case WM8958_MIC_DETECT_2: | 812 | case WM8958_MIC_DETECT_2: |
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index 19fc7c1cb428..f428d86bfc10 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c | |||
| @@ -984,9 +984,9 @@ static int __init c2port_init(void) | |||
| 984 | " - (C) 2007 Rodolfo Giometti\n"); | 984 | " - (C) 2007 Rodolfo Giometti\n"); |
| 985 | 985 | ||
| 986 | c2port_class = class_create(THIS_MODULE, "c2port"); | 986 | c2port_class = class_create(THIS_MODULE, "c2port"); |
| 987 | if (!c2port_class) { | 987 | if (IS_ERR(c2port_class)) { |
| 988 | printk(KERN_ERR "c2port: failed to allocate class\n"); | 988 | printk(KERN_ERR "c2port: failed to allocate class\n"); |
| 989 | return -ENOMEM; | 989 | return PTR_ERR(c2port_class); |
| 990 | } | 990 | } |
| 991 | c2port_class->dev_attrs = c2port_attrs; | 991 | c2port_class->dev_attrs = c2port_attrs; |
| 992 | 992 | ||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 690255c7d4dc..132378b89d76 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
| @@ -2068,6 +2068,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) | |||
| 2068 | */ | 2068 | */ |
| 2069 | mmc_hw_reset_for_init(host); | 2069 | mmc_hw_reset_for_init(host); |
| 2070 | 2070 | ||
| 2071 | /* Initialization should be done at 3.3 V I/O voltage. */ | ||
| 2072 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 2073 | |||
| 2071 | /* | 2074 | /* |
| 2072 | * sdio_reset sends CMD52 to reset card. Since we do not know | 2075 | * sdio_reset sends CMD52 to reset card. Since we do not know |
| 2073 | * if the card is being re-initialized, just send it. CMD52 | 2076 | * if the card is being re-initialized, just send it. CMD52 |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 30055f2b0d44..c3704e293a7b 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
| @@ -238,10 +238,10 @@ static inline void mmc_host_clk_init(struct mmc_host *host) | |||
| 238 | /* Hold MCI clock for 8 cycles by default */ | 238 | /* Hold MCI clock for 8 cycles by default */ |
| 239 | host->clk_delay = 8; | 239 | host->clk_delay = 8; |
| 240 | /* | 240 | /* |
| 241 | * Default clock gating delay is 200ms. | 241 | * Default clock gating delay is 0ms to avoid wasting power. |
| 242 | * This value can be tuned by writing into sysfs entry. | 242 | * This value can be tuned by writing into sysfs entry. |
| 243 | */ | 243 | */ |
| 244 | host->clkgate_delay = 200; | 244 | host->clkgate_delay = 0; |
| 245 | host->clk_gated = false; | 245 | host->clk_gated = false; |
| 246 | INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work); | 246 | INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work); |
| 247 | spin_lock_init(&host->clk_lock); | 247 | spin_lock_init(&host->clk_lock); |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a48066344fa8..2b9ed1401dc4 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
| @@ -816,6 +816,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
| 816 | if (!mmc_host_is_spi(host)) | 816 | if (!mmc_host_is_spi(host)) |
| 817 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); | 817 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); |
| 818 | 818 | ||
| 819 | /* Initialization should be done at 3.3 V I/O voltage. */ | ||
| 820 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 821 | |||
| 819 | /* | 822 | /* |
| 820 | * Since we're changing the OCR value, we seem to | 823 | * Since we're changing the OCR value, we seem to |
| 821 | * need to tell some cards to go back to the idle | 824 | * need to tell some cards to go back to the idle |
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 5017f9354ce2..c272c6868ecf 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
| @@ -911,6 +911,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
| 911 | BUG_ON(!host); | 911 | BUG_ON(!host); |
| 912 | WARN_ON(!host->claimed); | 912 | WARN_ON(!host->claimed); |
| 913 | 913 | ||
| 914 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 915 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 916 | |||
| 914 | err = mmc_sd_get_cid(host, ocr, cid, &rocr); | 917 | err = mmc_sd_get_cid(host, ocr, cid, &rocr); |
| 915 | if (err) | 918 | if (err) |
| 916 | return err; | 919 | return err; |
| @@ -1156,11 +1159,6 @@ int mmc_attach_sd(struct mmc_host *host) | |||
| 1156 | BUG_ON(!host); | 1159 | BUG_ON(!host); |
| 1157 | WARN_ON(!host->claimed); | 1160 | WARN_ON(!host->claimed); |
| 1158 | 1161 | ||
| 1159 | /* Make sure we are at 3.3V signalling voltage */ | ||
| 1160 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false); | ||
| 1161 | if (err) | ||
| 1162 | return err; | ||
| 1163 | |||
| 1164 | /* Disable preset value enable if already set since last time */ | 1162 | /* Disable preset value enable if already set since last time */ |
| 1165 | if (host->ops->enable_preset_value) { | 1163 | if (host->ops->enable_preset_value) { |
| 1166 | mmc_host_clk_hold(host); | 1164 | mmc_host_clk_hold(host); |
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 12cde6ee17f5..2c7c83f832d2 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
| @@ -585,6 +585,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, | |||
| 585 | * Inform the card of the voltage | 585 | * Inform the card of the voltage |
| 586 | */ | 586 | */ |
| 587 | if (!powered_resume) { | 587 | if (!powered_resume) { |
| 588 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 589 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 590 | |||
| 588 | err = mmc_send_io_op_cond(host, host->ocr, &ocr); | 591 | err = mmc_send_io_op_cond(host, host->ocr, &ocr); |
| 589 | if (err) | 592 | if (err) |
| 590 | goto err; | 593 | goto err; |
| @@ -996,6 +999,11 @@ static int mmc_sdio_power_restore(struct mmc_host *host) | |||
| 996 | * With these steps taken, mmc_select_voltage() is also required to | 999 | * With these steps taken, mmc_select_voltage() is also required to |
| 997 | * restore the correct voltage setting of the card. | 1000 | * restore the correct voltage setting of the card. |
| 998 | */ | 1001 | */ |
| 1002 | |||
| 1003 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 1004 | if (!mmc_card_keep_power(host)) | ||
| 1005 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 1006 | |||
| 999 | sdio_reset(host); | 1007 | sdio_reset(host); |
| 1000 | mmc_go_idle(host); | 1008 | mmc_go_idle(host); |
| 1001 | mmc_send_if_cond(host, host->ocr_avail); | 1009 | mmc_send_if_cond(host, host->ocr_avail); |
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 6985cdb0bb26..e4449a54ae8f 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
| @@ -1948,12 +1948,12 @@ static bool atmci_filter(struct dma_chan *chan, void *slave) | |||
| 1948 | } | 1948 | } |
| 1949 | } | 1949 | } |
| 1950 | 1950 | ||
| 1951 | static void atmci_configure_dma(struct atmel_mci *host) | 1951 | static bool atmci_configure_dma(struct atmel_mci *host) |
| 1952 | { | 1952 | { |
| 1953 | struct mci_platform_data *pdata; | 1953 | struct mci_platform_data *pdata; |
| 1954 | 1954 | ||
| 1955 | if (host == NULL) | 1955 | if (host == NULL) |
| 1956 | return; | 1956 | return false; |
| 1957 | 1957 | ||
| 1958 | pdata = host->pdev->dev.platform_data; | 1958 | pdata = host->pdev->dev.platform_data; |
| 1959 | 1959 | ||
| @@ -1970,12 +1970,15 @@ static void atmci_configure_dma(struct atmel_mci *host) | |||
| 1970 | host->dma.chan = | 1970 | host->dma.chan = |
| 1971 | dma_request_channel(mask, atmci_filter, pdata->dma_slave); | 1971 | dma_request_channel(mask, atmci_filter, pdata->dma_slave); |
| 1972 | } | 1972 | } |
| 1973 | if (!host->dma.chan) | 1973 | if (!host->dma.chan) { |
| 1974 | dev_notice(&host->pdev->dev, "DMA not available, using PIO\n"); | 1974 | dev_warn(&host->pdev->dev, "no DMA channel available\n"); |
| 1975 | else | 1975 | return false; |
| 1976 | } else { | ||
| 1976 | dev_info(&host->pdev->dev, | 1977 | dev_info(&host->pdev->dev, |
| 1977 | "Using %s for DMA transfers\n", | 1978 | "Using %s for DMA transfers\n", |
| 1978 | dma_chan_name(host->dma.chan)); | 1979 | dma_chan_name(host->dma.chan)); |
| 1980 | return true; | ||
| 1981 | } | ||
| 1979 | } | 1982 | } |
| 1980 | 1983 | ||
| 1981 | static inline unsigned int atmci_get_version(struct atmel_mci *host) | 1984 | static inline unsigned int atmci_get_version(struct atmel_mci *host) |
| @@ -2085,8 +2088,7 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
| 2085 | 2088 | ||
| 2086 | /* Get MCI capabilities and set operations according to it */ | 2089 | /* Get MCI capabilities and set operations according to it */ |
| 2087 | atmci_get_cap(host); | 2090 | atmci_get_cap(host); |
| 2088 | if (host->caps.has_dma) { | 2091 | if (host->caps.has_dma && atmci_configure_dma(host)) { |
| 2089 | dev_info(&pdev->dev, "using DMA\n"); | ||
| 2090 | host->prepare_data = &atmci_prepare_data_dma; | 2092 | host->prepare_data = &atmci_prepare_data_dma; |
| 2091 | host->submit_data = &atmci_submit_data_dma; | 2093 | host->submit_data = &atmci_submit_data_dma; |
| 2092 | host->stop_transfer = &atmci_stop_transfer_dma; | 2094 | host->stop_transfer = &atmci_stop_transfer_dma; |
| @@ -2096,15 +2098,12 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
| 2096 | host->submit_data = &atmci_submit_data_pdc; | 2098 | host->submit_data = &atmci_submit_data_pdc; |
| 2097 | host->stop_transfer = &atmci_stop_transfer_pdc; | 2099 | host->stop_transfer = &atmci_stop_transfer_pdc; |
| 2098 | } else { | 2100 | } else { |
| 2099 | dev_info(&pdev->dev, "no DMA, no PDC\n"); | 2101 | dev_info(&pdev->dev, "using PIO\n"); |
| 2100 | host->prepare_data = &atmci_prepare_data; | 2102 | host->prepare_data = &atmci_prepare_data; |
| 2101 | host->submit_data = &atmci_submit_data; | 2103 | host->submit_data = &atmci_submit_data; |
| 2102 | host->stop_transfer = &atmci_stop_transfer; | 2104 | host->stop_transfer = &atmci_stop_transfer; |
| 2103 | } | 2105 | } |
| 2104 | 2106 | ||
| 2105 | if (host->caps.has_dma) | ||
| 2106 | atmci_configure_dma(host); | ||
| 2107 | |||
| 2108 | platform_set_drvdata(pdev, host); | 2107 | platform_set_drvdata(pdev, host); |
| 2109 | 2108 | ||
| 2110 | /* We need at least one slot to succeed */ | 2109 | /* We need at least one slot to succeed */ |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 0d955ffaf44e..11e589cd8233 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
| @@ -1271,12 +1271,13 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
| 1271 | /* | 1271 | /* |
| 1272 | * Block size can be up to 2048 bytes, but must be a power of two. | 1272 | * Block size can be up to 2048 bytes, but must be a power of two. |
| 1273 | */ | 1273 | */ |
| 1274 | mmc->max_blk_size = 2048; | 1274 | mmc->max_blk_size = 1 << 11; |
| 1275 | 1275 | ||
| 1276 | /* | 1276 | /* |
| 1277 | * No limit on the number of blocks transferred. | 1277 | * Limit the number of blocks transferred so that we don't overflow |
| 1278 | * the maximum request size. | ||
| 1278 | */ | 1279 | */ |
| 1279 | mmc->max_blk_count = mmc->max_req_size; | 1280 | mmc->max_blk_count = mmc->max_req_size >> 11; |
| 1280 | 1281 | ||
| 1281 | spin_lock_init(&host->lock); | 1282 | spin_lock_init(&host->lock); |
| 1282 | 1283 | ||
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d601e41af282..0be4e2013632 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
| @@ -269,8 +269,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) | |||
| 269 | imx_data->scratchpad = val; | 269 | imx_data->scratchpad = val; |
| 270 | return; | 270 | return; |
| 271 | case SDHCI_COMMAND: | 271 | case SDHCI_COMMAND: |
| 272 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) | 272 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION || |
| 273 | && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | 273 | host->cmd->opcode == MMC_SET_BLOCK_COUNT) && |
| 274 | (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | ||
| 274 | val |= SDHCI_CMD_ABORTCMD; | 275 | val |= SDHCI_CMD_ABORTCMD; |
| 275 | 276 | ||
| 276 | if (is_imx6q_usdhc(imx_data)) { | 277 | if (is_imx6q_usdhc(imx_data)) { |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a1f2e0fed78b..423d0235a878 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
| @@ -7886,10 +7886,8 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
| 7886 | return 0; | 7886 | return 0; |
| 7887 | } | 7887 | } |
| 7888 | 7888 | ||
| 7889 | static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *, | 7889 | static void tg3_get_nstats(struct tg3 *, struct rtnl_link_stats64 *); |
| 7890 | struct rtnl_link_stats64 *); | 7890 | static void tg3_get_estats(struct tg3 *, struct tg3_ethtool_stats *); |
| 7891 | static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *, | ||
| 7892 | struct tg3_ethtool_stats *); | ||
| 7893 | 7891 | ||
| 7894 | /* tp->lock is held. */ | 7892 | /* tp->lock is held. */ |
| 7895 | static int tg3_halt(struct tg3 *tp, int kind, int silent) | 7893 | static int tg3_halt(struct tg3 *tp, int kind, int silent) |
| @@ -7910,7 +7908,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent) | |||
| 7910 | 7908 | ||
| 7911 | if (tp->hw_stats) { | 7909 | if (tp->hw_stats) { |
| 7912 | /* Save the stats across chip resets... */ | 7910 | /* Save the stats across chip resets... */ |
| 7913 | tg3_get_stats64(tp->dev, &tp->net_stats_prev), | 7911 | tg3_get_nstats(tp, &tp->net_stats_prev), |
| 7914 | tg3_get_estats(tp, &tp->estats_prev); | 7912 | tg3_get_estats(tp, &tp->estats_prev); |
| 7915 | 7913 | ||
| 7916 | /* And make sure the next sample is new data */ | 7914 | /* And make sure the next sample is new data */ |
| @@ -9847,7 +9845,7 @@ static inline u64 get_stat64(tg3_stat64_t *val) | |||
| 9847 | return ((u64)val->high << 32) | ((u64)val->low); | 9845 | return ((u64)val->high << 32) | ((u64)val->low); |
| 9848 | } | 9846 | } |
| 9849 | 9847 | ||
| 9850 | static u64 calc_crc_errors(struct tg3 *tp) | 9848 | static u64 tg3_calc_crc_errors(struct tg3 *tp) |
| 9851 | { | 9849 | { |
| 9852 | struct tg3_hw_stats *hw_stats = tp->hw_stats; | 9850 | struct tg3_hw_stats *hw_stats = tp->hw_stats; |
| 9853 | 9851 | ||
| @@ -9856,14 +9854,12 @@ static u64 calc_crc_errors(struct tg3 *tp) | |||
| 9856 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { | 9854 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { |
| 9857 | u32 val; | 9855 | u32 val; |
| 9858 | 9856 | ||
| 9859 | spin_lock_bh(&tp->lock); | ||
| 9860 | if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) { | 9857 | if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) { |
| 9861 | tg3_writephy(tp, MII_TG3_TEST1, | 9858 | tg3_writephy(tp, MII_TG3_TEST1, |
| 9862 | val | MII_TG3_TEST1_CRC_EN); | 9859 | val | MII_TG3_TEST1_CRC_EN); |
| 9863 | tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val); | 9860 | tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val); |
| 9864 | } else | 9861 | } else |
| 9865 | val = 0; | 9862 | val = 0; |
| 9866 | spin_unlock_bh(&tp->lock); | ||
| 9867 | 9863 | ||
| 9868 | tp->phy_crc_errors += val; | 9864 | tp->phy_crc_errors += val; |
| 9869 | 9865 | ||
| @@ -9877,14 +9873,13 @@ static u64 calc_crc_errors(struct tg3 *tp) | |||
| 9877 | estats->member = old_estats->member + \ | 9873 | estats->member = old_estats->member + \ |
| 9878 | get_stat64(&hw_stats->member) | 9874 | get_stat64(&hw_stats->member) |
| 9879 | 9875 | ||
| 9880 | static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp, | 9876 | static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats) |
| 9881 | struct tg3_ethtool_stats *estats) | ||
| 9882 | { | 9877 | { |
| 9883 | struct tg3_ethtool_stats *old_estats = &tp->estats_prev; | 9878 | struct tg3_ethtool_stats *old_estats = &tp->estats_prev; |
| 9884 | struct tg3_hw_stats *hw_stats = tp->hw_stats; | 9879 | struct tg3_hw_stats *hw_stats = tp->hw_stats; |
| 9885 | 9880 | ||
| 9886 | if (!hw_stats) | 9881 | if (!hw_stats) |
| 9887 | return old_estats; | 9882 | return; |
| 9888 | 9883 | ||
| 9889 | ESTAT_ADD(rx_octets); | 9884 | ESTAT_ADD(rx_octets); |
| 9890 | ESTAT_ADD(rx_fragments); | 9885 | ESTAT_ADD(rx_fragments); |
| @@ -9963,20 +9958,13 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp, | |||
| 9963 | ESTAT_ADD(nic_tx_threshold_hit); | 9958 | ESTAT_ADD(nic_tx_threshold_hit); |
| 9964 | 9959 | ||
| 9965 | ESTAT_ADD(mbuf_lwm_thresh_hit); | 9960 | ESTAT_ADD(mbuf_lwm_thresh_hit); |
| 9966 | |||
| 9967 | return estats; | ||
| 9968 | } | 9961 | } |
| 9969 | 9962 | ||
| 9970 | static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, | 9963 | static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats) |
| 9971 | struct rtnl_link_stats64 *stats) | ||
| 9972 | { | 9964 | { |
| 9973 | struct tg3 *tp = netdev_priv(dev); | ||
| 9974 | struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev; | 9965 | struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev; |
| 9975 | struct tg3_hw_stats *hw_stats = tp->hw_stats; | 9966 | struct tg3_hw_stats *hw_stats = tp->hw_stats; |
| 9976 | 9967 | ||
| 9977 | if (!hw_stats) | ||
| 9978 | return old_stats; | ||
| 9979 | |||
| 9980 | stats->rx_packets = old_stats->rx_packets + | 9968 | stats->rx_packets = old_stats->rx_packets + |
| 9981 | get_stat64(&hw_stats->rx_ucast_packets) + | 9969 | get_stat64(&hw_stats->rx_ucast_packets) + |
| 9982 | get_stat64(&hw_stats->rx_mcast_packets) + | 9970 | get_stat64(&hw_stats->rx_mcast_packets) + |
| @@ -10019,15 +10007,13 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, | |||
| 10019 | get_stat64(&hw_stats->tx_carrier_sense_errors); | 10007 | get_stat64(&hw_stats->tx_carrier_sense_errors); |
| 10020 | 10008 | ||
| 10021 | stats->rx_crc_errors = old_stats->rx_crc_errors + | 10009 | stats->rx_crc_errors = old_stats->rx_crc_errors + |
| 10022 | calc_crc_errors(tp); | 10010 | tg3_calc_crc_errors(tp); |
| 10023 | 10011 | ||
| 10024 | stats->rx_missed_errors = old_stats->rx_missed_errors + | 10012 | stats->rx_missed_errors = old_stats->rx_missed_errors + |
| 10025 | get_stat64(&hw_stats->rx_discards); | 10013 | get_stat64(&hw_stats->rx_discards); |
| 10026 | 10014 | ||
| 10027 | stats->rx_dropped = tp->rx_dropped; | 10015 | stats->rx_dropped = tp->rx_dropped; |
| 10028 | stats->tx_dropped = tp->tx_dropped; | 10016 | stats->tx_dropped = tp->tx_dropped; |
| 10029 | |||
| 10030 | return stats; | ||
| 10031 | } | 10017 | } |
| 10032 | 10018 | ||
| 10033 | static inline u32 calc_crc(unsigned char *buf, int len) | 10019 | static inline u32 calc_crc(unsigned char *buf, int len) |
| @@ -15409,6 +15395,21 @@ static void __devinit tg3_init_coal(struct tg3 *tp) | |||
| 15409 | } | 15395 | } |
| 15410 | } | 15396 | } |
| 15411 | 15397 | ||
| 15398 | static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, | ||
| 15399 | struct rtnl_link_stats64 *stats) | ||
| 15400 | { | ||
| 15401 | struct tg3 *tp = netdev_priv(dev); | ||
| 15402 | |||
| 15403 | if (!tp->hw_stats) | ||
| 15404 | return &tp->net_stats_prev; | ||
| 15405 | |||
| 15406 | spin_lock_bh(&tp->lock); | ||
| 15407 | tg3_get_nstats(tp, stats); | ||
| 15408 | spin_unlock_bh(&tp->lock); | ||
| 15409 | |||
| 15410 | return stats; | ||
| 15411 | } | ||
| 15412 | |||
| 15412 | static const struct net_device_ops tg3_netdev_ops = { | 15413 | static const struct net_device_ops tg3_netdev_ops = { |
| 15413 | .ndo_open = tg3_open, | 15414 | .ndo_open = tg3_open, |
| 15414 | .ndo_stop = tg3_close, | 15415 | .ndo_stop = tg3_close, |
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h index ee93a2087fe6..c52295cd05ef 100644 --- a/drivers/net/ethernet/cisco/enic/enic.h +++ b/drivers/net/ethernet/cisco/enic/enic.h | |||
| @@ -94,7 +94,7 @@ struct enic { | |||
| 94 | u32 rx_coalesce_usecs; | 94 | u32 rx_coalesce_usecs; |
| 95 | u32 tx_coalesce_usecs; | 95 | u32 tx_coalesce_usecs; |
| 96 | #ifdef CONFIG_PCI_IOV | 96 | #ifdef CONFIG_PCI_IOV |
| 97 | u32 num_vfs; | 97 | u16 num_vfs; |
| 98 | #endif | 98 | #endif |
| 99 | struct enic_port_profile *pp; | 99 | struct enic_port_profile *pp; |
| 100 | 100 | ||
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index ab3f67f980d8..0e4edd3b6bee 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
| @@ -2370,7 +2370,7 @@ static int __devinit enic_probe(struct pci_dev *pdev, | |||
| 2370 | pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV); | 2370 | pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV); |
| 2371 | if (pos) { | 2371 | if (pos) { |
| 2372 | pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF, | 2372 | pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF, |
| 2373 | (u16 *)&enic->num_vfs); | 2373 | &enic->num_vfs); |
| 2374 | if (enic->num_vfs) { | 2374 | if (enic->num_vfs) { |
| 2375 | err = pci_enable_sriov(pdev, enic->num_vfs); | 2375 | err = pci_enable_sriov(pdev, enic->num_vfs); |
| 2376 | if (err) { | 2376 | if (err) { |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c index 9cb5f912e489..29e23bec809c 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c | |||
| @@ -321,10 +321,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) | |||
| 321 | pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n"); | 321 | pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n"); |
| 322 | hw->phy.autoneg_advertised = opt.def; | 322 | hw->phy.autoneg_advertised = opt.def; |
| 323 | } else { | 323 | } else { |
| 324 | hw->phy.autoneg_advertised = AutoNeg; | 324 | int tmp = AutoNeg; |
| 325 | pch_gbe_validate_option( | 325 | |
| 326 | (int *)(&hw->phy.autoneg_advertised), | 326 | pch_gbe_validate_option(&tmp, &opt, adapter); |
| 327 | &opt, adapter); | 327 | hw->phy.autoneg_advertised = tmp; |
| 328 | } | 328 | } |
| 329 | } | 329 | } |
| 330 | 330 | ||
| @@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gbe_adapter *adapter) | |||
| 495 | .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list), | 495 | .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list), |
| 496 | .p = fc_list } } | 496 | .p = fc_list } } |
| 497 | }; | 497 | }; |
| 498 | hw->mac.fc = FlowControl; | 498 | int tmp = FlowControl; |
| 499 | pch_gbe_validate_option((int *)(&hw->mac.fc), | 499 | |
| 500 | &opt, adapter); | 500 | pch_gbe_validate_option(&tmp, &opt, adapter); |
| 501 | hw->mac.fc = tmp; | ||
| 501 | } | 502 | } |
| 502 | 503 | ||
| 503 | pch_gbe_check_copper_options(adapter); | 504 | pch_gbe_check_copper_options(adapter); |
diff --git a/drivers/net/ethernet/packetengines/Kconfig b/drivers/net/ethernet/packetengines/Kconfig index b97132d9dff0..8f29feb35548 100644 --- a/drivers/net/ethernet/packetengines/Kconfig +++ b/drivers/net/ethernet/packetengines/Kconfig | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | config NET_PACKET_ENGINE | 5 | config NET_PACKET_ENGINE |
| 6 | bool "Packet Engine devices" | 6 | bool "Packet Engine devices" |
| 7 | default y | ||
| 7 | depends on PCI | 8 | depends on PCI |
| 8 | ---help--- | 9 | ---help--- |
| 9 | If you have a network (Ethernet) card belonging to this class, say Y | 10 | If you have a network (Ethernet) card belonging to this class, say Y |
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 7931531c3a40..e61560e16385 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c | |||
| @@ -3017,7 +3017,6 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) | |||
| 3017 | (void __iomem *)port_regs; | 3017 | (void __iomem *)port_regs; |
| 3018 | u32 delay = 10; | 3018 | u32 delay = 10; |
| 3019 | int status = 0; | 3019 | int status = 0; |
| 3020 | unsigned long hw_flags = 0; | ||
| 3021 | 3020 | ||
| 3022 | if (ql_mii_setup(qdev)) | 3021 | if (ql_mii_setup(qdev)) |
| 3023 | return -1; | 3022 | return -1; |
| @@ -3228,9 +3227,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) | |||
| 3228 | value = ql_read_page0_reg(qdev, &port_regs->portStatus); | 3227 | value = ql_read_page0_reg(qdev, &port_regs->portStatus); |
| 3229 | if (value & PORT_STATUS_IC) | 3228 | if (value & PORT_STATUS_IC) |
| 3230 | break; | 3229 | break; |
| 3231 | spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); | 3230 | spin_unlock_irq(&qdev->hw_lock); |
| 3232 | msleep(500); | 3231 | msleep(500); |
| 3233 | spin_lock_irqsave(&qdev->hw_lock, hw_flags); | 3232 | spin_lock_irq(&qdev->hw_lock); |
| 3234 | } while (--delay); | 3233 | } while (--delay); |
| 3235 | 3234 | ||
| 3236 | if (delay == 0) { | 3235 | if (delay == 0) { |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7a0c800b50ad..1adf17757cea 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
| @@ -3781,12 +3781,20 @@ static void rtl8169_init_ring_indexes(struct rtl8169_private *tp) | |||
| 3781 | 3781 | ||
| 3782 | static void rtl_hw_jumbo_enable(struct rtl8169_private *tp) | 3782 | static void rtl_hw_jumbo_enable(struct rtl8169_private *tp) |
| 3783 | { | 3783 | { |
| 3784 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 3785 | |||
| 3786 | RTL_W8(Cfg9346, Cfg9346_Unlock); | ||
| 3784 | rtl_generic_op(tp, tp->jumbo_ops.enable); | 3787 | rtl_generic_op(tp, tp->jumbo_ops.enable); |
| 3788 | RTL_W8(Cfg9346, Cfg9346_Lock); | ||
| 3785 | } | 3789 | } |
| 3786 | 3790 | ||
| 3787 | static void rtl_hw_jumbo_disable(struct rtl8169_private *tp) | 3791 | static void rtl_hw_jumbo_disable(struct rtl8169_private *tp) |
| 3788 | { | 3792 | { |
| 3793 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 3794 | |||
| 3795 | RTL_W8(Cfg9346, Cfg9346_Unlock); | ||
| 3789 | rtl_generic_op(tp, tp->jumbo_ops.disable); | 3796 | rtl_generic_op(tp, tp->jumbo_ops.disable); |
| 3797 | RTL_W8(Cfg9346, Cfg9346_Lock); | ||
| 3790 | } | 3798 | } |
| 3791 | 3799 | ||
| 3792 | static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp) | 3800 | static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp) |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3dcd3857a36c..756c0f5565a5 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
| @@ -830,13 +830,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
| 830 | ctx->l4_hdr_size = ((struct tcphdr *) | 830 | ctx->l4_hdr_size = ((struct tcphdr *) |
| 831 | skb_transport_header(skb))->doff * 4; | 831 | skb_transport_header(skb))->doff * 4; |
| 832 | else if (iph->protocol == IPPROTO_UDP) | 832 | else if (iph->protocol == IPPROTO_UDP) |
| 833 | /* | ||
| 834 | * Use tcp header size so that bytes to | ||
| 835 | * be copied are more than required by | ||
| 836 | * the device. | ||
| 837 | */ | ||
| 838 | ctx->l4_hdr_size = | 833 | ctx->l4_hdr_size = |
| 839 | sizeof(struct tcphdr); | 834 | sizeof(struct udphdr); |
| 840 | else | 835 | else |
| 841 | ctx->l4_hdr_size = 0; | 836 | ctx->l4_hdr_size = 0; |
| 842 | } else { | 837 | } else { |
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index ed54797db191..fc46a81ad538 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
| @@ -70,10 +70,10 @@ | |||
| 70 | /* | 70 | /* |
| 71 | * Version numbers | 71 | * Version numbers |
| 72 | */ | 72 | */ |
| 73 | #define VMXNET3_DRIVER_VERSION_STRING "1.1.18.0-k" | 73 | #define VMXNET3_DRIVER_VERSION_STRING "1.1.29.0-k" |
| 74 | 74 | ||
| 75 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ | 75 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ |
| 76 | #define VMXNET3_DRIVER_VERSION_NUM 0x01011200 | 76 | #define VMXNET3_DRIVER_VERSION_NUM 0x01011D00 |
| 77 | 77 | ||
| 78 | #if defined(CONFIG_PCI_MSI) | 78 | #if defined(CONFIG_PCI_MSI) |
| 79 | /* RSS only makes sense if MSI-X is supported. */ | 79 | /* RSS only makes sense if MSI-X is supported. */ |
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index f901a17f76ba..86a891f93fc9 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
| @@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah) | |||
| 489 | ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows); | 489 | ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows); |
| 490 | ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows); | 490 | ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows); |
| 491 | ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows); | 491 | ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows); |
| 492 | ATH_ALLOC_BANK(ah->addac5416_21, | ||
| 493 | ah->iniAddac.ia_rows * ah->iniAddac.ia_columns); | ||
| 494 | ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows); | 492 | ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows); |
| 495 | 493 | ||
| 496 | return 0; | 494 | return 0; |
| @@ -519,7 +517,6 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah) | |||
| 519 | ATH_FREE_BANK(ah->analogBank6Data); | 517 | ATH_FREE_BANK(ah->analogBank6Data); |
| 520 | ATH_FREE_BANK(ah->analogBank6TPCData); | 518 | ATH_FREE_BANK(ah->analogBank6TPCData); |
| 521 | ATH_FREE_BANK(ah->analogBank7Data); | 519 | ATH_FREE_BANK(ah->analogBank7Data); |
| 522 | ATH_FREE_BANK(ah->addac5416_21); | ||
| 523 | ATH_FREE_BANK(ah->bank6Temp); | 520 | ATH_FREE_BANK(ah->bank6Temp); |
| 524 | 521 | ||
| 525 | #undef ATH_FREE_BANK | 522 | #undef ATH_FREE_BANK |
| @@ -805,27 +802,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah, | |||
| 805 | if (ah->eep_ops->set_addac) | 802 | if (ah->eep_ops->set_addac) |
| 806 | ah->eep_ops->set_addac(ah, chan); | 803 | ah->eep_ops->set_addac(ah, chan); |
| 807 | 804 | ||
| 808 | if (AR_SREV_5416_22_OR_LATER(ah)) { | 805 | REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites); |
| 809 | REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites); | ||
| 810 | } else { | ||
| 811 | struct ar5416IniArray temp; | ||
| 812 | u32 addacSize = | ||
| 813 | sizeof(u32) * ah->iniAddac.ia_rows * | ||
| 814 | ah->iniAddac.ia_columns; | ||
| 815 | |||
| 816 | /* For AR5416 2.0/2.1 */ | ||
| 817 | memcpy(ah->addac5416_21, | ||
| 818 | ah->iniAddac.ia_array, addacSize); | ||
| 819 | |||
| 820 | /* override CLKDRV value at [row, column] = [31, 1] */ | ||
| 821 | (ah->addac5416_21)[31 * ah->iniAddac.ia_columns + 1] = 0; | ||
| 822 | |||
| 823 | temp.ia_array = ah->addac5416_21; | ||
| 824 | temp.ia_columns = ah->iniAddac.ia_columns; | ||
| 825 | temp.ia_rows = ah->iniAddac.ia_rows; | ||
| 826 | REG_WRITE_ARRAY(&temp, 1, regWrites); | ||
| 827 | } | ||
| 828 | |||
| 829 | REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); | 806 | REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); |
| 830 | 807 | ||
| 831 | ENABLE_REGWRITE_BUFFER(ah); | 808 | ENABLE_REGWRITE_BUFFER(ah); |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 11f192a1ceb7..d190411ac8f5 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
| @@ -180,6 +180,25 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah) | |||
| 180 | INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac, | 180 | INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac, |
| 181 | ARRAY_SIZE(ar5416Addac), 2); | 181 | ARRAY_SIZE(ar5416Addac), 2); |
| 182 | } | 182 | } |
| 183 | |||
| 184 | /* iniAddac needs to be modified for these chips */ | ||
| 185 | if (AR_SREV_9160(ah) || !AR_SREV_5416_22_OR_LATER(ah)) { | ||
| 186 | struct ar5416IniArray *addac = &ah->iniAddac; | ||
| 187 | u32 size = sizeof(u32) * addac->ia_rows * addac->ia_columns; | ||
| 188 | u32 *data; | ||
| 189 | |||
| 190 | data = kmalloc(size, GFP_KERNEL); | ||
| 191 | if (!data) | ||
| 192 | return; | ||
| 193 | |||
| 194 | memcpy(data, addac->ia_array, size); | ||
| 195 | addac->ia_array = data; | ||
| 196 | |||
| 197 | if (!AR_SREV_5416_22_OR_LATER(ah)) { | ||
| 198 | /* override CLKDRV value */ | ||
| 199 | INI_RA(addac, 31,1) = 0; | ||
| 200 | } | ||
| 201 | } | ||
| 183 | } | 202 | } |
| 184 | 203 | ||
| 185 | /* Support for Japan ch.14 (2484) spread */ | 204 | /* Support for Japan ch.14 (2484) spread */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 6a29004a71b0..c8261d4fc780 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
| @@ -940,7 +940,6 @@ struct ath_hw { | |||
| 940 | u32 *analogBank6Data; | 940 | u32 *analogBank6Data; |
| 941 | u32 *analogBank6TPCData; | 941 | u32 *analogBank6TPCData; |
| 942 | u32 *analogBank7Data; | 942 | u32 *analogBank7Data; |
| 943 | u32 *addac5416_21; | ||
| 944 | u32 *bank6Temp; | 943 | u32 *bank6Temp; |
| 945 | 944 | ||
| 946 | u8 txpower_limit; | 945 | u8 txpower_limit; |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c index 90911eec0cf5..30b58870b1b6 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | |||
| @@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
| 1051 | } | 1051 | } |
| 1052 | /* either retransmit or send bar if ack not recd */ | 1052 | /* either retransmit or send bar if ack not recd */ |
| 1053 | if (!ack_recd) { | 1053 | if (!ack_recd) { |
| 1054 | struct ieee80211_tx_rate *txrate = | 1054 | if (retry && (ini->txretry[index] < (int)retry_limit)) { |
| 1055 | tx_info->status.rates; | ||
| 1056 | if (retry && (txrate[0].count < (int)retry_limit)) { | ||
| 1057 | ini->txretry[index]++; | 1055 | ini->txretry[index]++; |
| 1058 | ini->tx_in_transit--; | 1056 | ini->tx_in_transit--; |
| 1059 | /* | 1057 | /* |
| 1060 | * Use high prededence for retransmit to | 1058 | * Use high prededence for retransmit to |
| 1061 | * give some punch | 1059 | * give some punch |
| 1062 | */ | 1060 | */ |
| 1063 | /* brcms_c_txq_enq(wlc, scb, p, | ||
| 1064 | * BRCMS_PRIO_TO_PREC(tid)); */ | ||
| 1065 | brcms_c_txq_enq(wlc, scb, p, | 1061 | brcms_c_txq_enq(wlc, scb, p, |
| 1066 | BRCMS_PRIO_TO_HI_PREC(tid)); | 1062 | BRCMS_PRIO_TO_HI_PREC(tid)); |
| 1067 | } else { | 1063 | } else { |
| @@ -1074,9 +1070,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
| 1074 | IEEE80211_TX_STAT_AMPDU_NO_BACK; | 1070 | IEEE80211_TX_STAT_AMPDU_NO_BACK; |
| 1075 | skb_pull(p, D11_PHY_HDR_LEN); | 1071 | skb_pull(p, D11_PHY_HDR_LEN); |
| 1076 | skb_pull(p, D11_TXH_LEN); | 1072 | skb_pull(p, D11_TXH_LEN); |
| 1077 | wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_" | 1073 | BCMMSG(wiphy, |
| 1078 | "transit %d\n", "AMPDU status", seq, | 1074 | "BA Timeout, seq %d, in_transit %d\n", |
| 1079 | ini->tx_in_transit); | 1075 | seq, ini->tx_in_transit); |
| 1080 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, | 1076 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, |
| 1081 | p); | 1077 | p); |
| 1082 | } | 1078 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 7353826095f1..e483cfa8d14e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
| @@ -1187,6 +1187,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, | |||
| 1187 | unsigned long flags; | 1187 | unsigned long flags; |
| 1188 | struct iwl_addsta_cmd sta_cmd; | 1188 | struct iwl_addsta_cmd sta_cmd; |
| 1189 | u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta); | 1189 | u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta); |
| 1190 | __le16 key_flags; | ||
| 1190 | 1191 | ||
| 1191 | /* if station isn't there, neither is the key */ | 1192 | /* if station isn't there, neither is the key */ |
| 1192 | if (sta_id == IWL_INVALID_STATION) | 1193 | if (sta_id == IWL_INVALID_STATION) |
| @@ -1212,7 +1213,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, | |||
| 1212 | IWL_ERR(priv, "offset %d not used in uCode key table.\n", | 1213 | IWL_ERR(priv, "offset %d not used in uCode key table.\n", |
| 1213 | keyconf->hw_key_idx); | 1214 | keyconf->hw_key_idx); |
| 1214 | 1215 | ||
| 1215 | sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID; | 1216 | key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); |
| 1217 | key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC | | ||
| 1218 | STA_KEY_FLG_INVALID; | ||
| 1219 | |||
| 1220 | if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE)) | ||
| 1221 | key_flags |= STA_KEY_MULTICAST_MSK; | ||
| 1222 | |||
| 1223 | sta_cmd.key.key_flags = key_flags; | ||
| 1216 | sta_cmd.key.key_offset = WEP_INVALID_OFFSET; | 1224 | sta_cmd.key.key_offset = WEP_INVALID_OFFSET; |
| 1217 | sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK; | 1225 | sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK; |
| 1218 | sta_cmd.mode = STA_CONTROL_MODIFY_MSK; | 1226 | sta_cmd.mode = STA_CONTROL_MODIFY_MSK; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index c3e1aa7c1a80..d2a1ea98d0f2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
| @@ -1220,7 +1220,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) | |||
| 1220 | cancel_work_sync(&rt2x00dev->rxdone_work); | 1220 | cancel_work_sync(&rt2x00dev->rxdone_work); |
| 1221 | cancel_work_sync(&rt2x00dev->txdone_work); | 1221 | cancel_work_sync(&rt2x00dev->txdone_work); |
| 1222 | } | 1222 | } |
| 1223 | destroy_workqueue(rt2x00dev->workqueue); | 1223 | if (rt2x00dev->workqueue) |
| 1224 | destroy_workqueue(rt2x00dev->workqueue); | ||
| 1224 | 1225 | ||
| 1225 | /* | 1226 | /* |
| 1226 | * Free the tx status fifo. | 1227 | * Free the tx status fifo. |
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h index a9c46cc2db37..8c33491b21fe 100644 --- a/drivers/parisc/iommu-helpers.h +++ b/drivers/parisc/iommu-helpers.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <linux/prefetch.h> | ||
| 2 | |||
| 1 | /** | 3 | /** |
| 2 | * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir. | 4 | * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir. |
| 3 | * @ioc: The I/O Controller. | 5 | * @ioc: The I/O Controller. |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index a87e2728b2c3..64d433ec4fc6 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
| @@ -328,21 +328,15 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | |||
| 328 | goto err1; | 328 | goto err1; |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | if (ret) { | 331 | pxa2xx_configure_sockets(&dev->dev); |
| 332 | while (--i >= 0) | 332 | dev_set_drvdata(&dev->dev, sinfo); |
| 333 | soc_pcmcia_remove_one(&sinfo->skt[i]); | ||
| 334 | kfree(sinfo); | ||
| 335 | clk_put(clk); | ||
| 336 | } else { | ||
| 337 | pxa2xx_configure_sockets(&dev->dev); | ||
| 338 | dev_set_drvdata(&dev->dev, sinfo); | ||
| 339 | } | ||
| 340 | 333 | ||
| 341 | return 0; | 334 | return 0; |
| 342 | 335 | ||
| 343 | err1: | 336 | err1: |
| 344 | while (--i >= 0) | 337 | while (--i >= 0) |
| 345 | soc_pcmcia_remove_one(&sinfo->skt[i]); | 338 | soc_pcmcia_remove_one(&sinfo->skt[i]); |
| 339 | clk_put(clk); | ||
| 346 | kfree(sinfo); | 340 | kfree(sinfo); |
| 347 | err0: | 341 | err0: |
| 348 | return ret; | 342 | return ret; |
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index 2baadd21b7a6..98fbe62694d4 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c | |||
| @@ -369,9 +369,9 @@ static int __init pps_init(void) | |||
| 369 | int err; | 369 | int err; |
| 370 | 370 | ||
| 371 | pps_class = class_create(THIS_MODULE, "pps"); | 371 | pps_class = class_create(THIS_MODULE, "pps"); |
| 372 | if (!pps_class) { | 372 | if (IS_ERR(pps_class)) { |
| 373 | pr_err("failed to allocate class\n"); | 373 | pr_err("failed to allocate class\n"); |
| 374 | return -ENOMEM; | 374 | return PTR_ERR(pps_class); |
| 375 | } | 375 | } |
| 376 | pps_class->dev_attrs = pps_attrs; | 376 | pps_class->dev_attrs = pps_attrs; |
| 377 | 377 | ||
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 691b1ab1a3d0..30d2072f480b 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c | |||
| @@ -410,13 +410,14 @@ static void tsi721_db_dpc(struct work_struct *work) | |||
| 410 | */ | 410 | */ |
| 411 | mport = priv->mport; | 411 | mport = priv->mport; |
| 412 | 412 | ||
| 413 | wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)); | 413 | wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)) % IDB_QSIZE; |
| 414 | rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE)); | 414 | rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE)) % IDB_QSIZE; |
| 415 | 415 | ||
| 416 | while (wr_ptr != rd_ptr) { | 416 | while (wr_ptr != rd_ptr) { |
| 417 | idb_entry = (u64 *)(priv->idb_base + | 417 | idb_entry = (u64 *)(priv->idb_base + |
| 418 | (TSI721_IDB_ENTRY_SIZE * rd_ptr)); | 418 | (TSI721_IDB_ENTRY_SIZE * rd_ptr)); |
| 419 | rd_ptr++; | 419 | rd_ptr++; |
| 420 | rd_ptr %= IDB_QSIZE; | ||
| 420 | idb.msg = *idb_entry; | 421 | idb.msg = *idb_entry; |
| 421 | *idb_entry = 0; | 422 | *idb_entry = 0; |
| 422 | 423 | ||
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index df33530cec4a..28b81ae4cf7f 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
| @@ -196,7 +196,7 @@ static const unsigned int LDO12_suspend_table[] = { | |||
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | static const unsigned int LDO13_table[] = { | 198 | static const unsigned int LDO13_table[] = { |
| 199 | 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, 0, | 199 | 1200000, 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, |
| 200 | }; | 200 | }; |
| 201 | 201 | ||
| 202 | static const unsigned int LDO13_suspend_table[] = { | 202 | static const unsigned int LDO13_suspend_table[] = { |
| @@ -389,10 +389,10 @@ static struct pm8607_regulator_info pm8607_regulator_info[] = { | |||
| 389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), | 389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), |
| 390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), | 390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), |
| 391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), | 391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), |
| 392 | PM8607_LDO(10, LDO10, 0, 3, SUPPLIES_EN12, 4), | 392 | PM8607_LDO(10, LDO10, 0, 4, SUPPLIES_EN12, 4), |
| 393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), | 393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), |
| 394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), | 394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), |
| 395 | PM8607_LDO(14, LDO14, 0, 4, SUPPLIES_EN12, 6), | 395 | PM8607_LDO(14, LDO14, 0, 3, SUPPLIES_EN12, 6), |
| 396 | }; | 396 | }; |
| 397 | 397 | ||
| 398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) | 398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) |
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c index 9beba49c3c5b..2853c2a6f10f 100644 --- a/drivers/rtc/rtc-r9701.c +++ b/drivers/rtc/rtc-r9701.c | |||
| @@ -125,6 +125,13 @@ static int __devinit r9701_probe(struct spi_device *spi) | |||
| 125 | unsigned char tmp; | 125 | unsigned char tmp; |
| 126 | int res; | 126 | int res; |
| 127 | 127 | ||
| 128 | tmp = R100CNT; | ||
| 129 | res = read_regs(&spi->dev, &tmp, 1); | ||
| 130 | if (res || tmp != 0x20) { | ||
| 131 | dev_err(&spi->dev, "cannot read RTC register\n"); | ||
| 132 | return -ENODEV; | ||
| 133 | } | ||
| 134 | |||
| 128 | rtc = rtc_device_register("r9701", | 135 | rtc = rtc_device_register("r9701", |
| 129 | &spi->dev, &r9701_rtc_ops, THIS_MODULE); | 136 | &spi->dev, &r9701_rtc_ops, THIS_MODULE); |
| 130 | if (IS_ERR(rtc)) | 137 | if (IS_ERR(rtc)) |
| @@ -132,13 +139,6 @@ static int __devinit r9701_probe(struct spi_device *spi) | |||
| 132 | 139 | ||
| 133 | dev_set_drvdata(&spi->dev, rtc); | 140 | dev_set_drvdata(&spi->dev, rtc); |
| 134 | 141 | ||
| 135 | tmp = R100CNT; | ||
| 136 | res = read_regs(&spi->dev, &tmp, 1); | ||
| 137 | if (res || tmp != 0x20) { | ||
| 138 | rtc_device_unregister(rtc); | ||
| 139 | return res; | ||
| 140 | } | ||
| 141 | |||
| 142 | return 0; | 142 | return 0; |
| 143 | } | 143 | } |
| 144 | 144 | ||
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index b31a8e3841d7..d4ed9eb52657 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c | |||
| @@ -69,10 +69,10 @@ | |||
| 69 | #ifndef SCSI_OSD_MAJOR | 69 | #ifndef SCSI_OSD_MAJOR |
| 70 | # define SCSI_OSD_MAJOR 260 | 70 | # define SCSI_OSD_MAJOR 260 |
| 71 | #endif | 71 | #endif |
| 72 | #define SCSI_OSD_MAX_MINOR 64 | 72 | #define SCSI_OSD_MAX_MINOR MINORMASK |
| 73 | 73 | ||
| 74 | static const char osd_name[] = "osd"; | 74 | static const char osd_name[] = "osd"; |
| 75 | static const char *osd_version_string = "open-osd 0.2.0"; | 75 | static const char *osd_version_string = "open-osd 0.2.1"; |
| 76 | 76 | ||
| 77 | MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>"); | 77 | MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>"); |
| 78 | MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko"); | 78 | MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko"); |
diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c index 0cb39ff21171..f8fb2d691c0a 100644 --- a/drivers/scsi/sd_dif.c +++ b/drivers/scsi/sd_dif.c | |||
| @@ -408,7 +408,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s | |||
| 408 | kunmap_atomic(sdt, KM_USER0); | 408 | kunmap_atomic(sdt, KM_USER0); |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | bio->bi_flags |= BIO_MAPPED_INTEGRITY; | 411 | bio->bi_flags |= (1 << BIO_MAPPED_INTEGRITY); |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | return 0; | 414 | return 0; |
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index b3d17416d86a..830cd62d8492 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig | |||
| @@ -365,7 +365,7 @@ config PPC_EPAPR_HV_BYTECHAN | |||
| 365 | 365 | ||
| 366 | config PPC_EARLY_DEBUG_EHV_BC | 366 | config PPC_EARLY_DEBUG_EHV_BC |
| 367 | bool "Early console (udbg) support for ePAPR hypervisors" | 367 | bool "Early console (udbg) support for ePAPR hypervisors" |
| 368 | depends on PPC_EPAPR_HV_BYTECHAN | 368 | depends on PPC_EPAPR_HV_BYTECHAN=y |
| 369 | help | 369 | help |
| 370 | Select this option to enable early console (a.k.a. "udbg") support | 370 | Select this option to enable early console (a.k.a. "udbg") support |
| 371 | via an ePAPR byte channel. You also need to choose the byte channel | 371 | via an ePAPR byte channel. You also need to choose the byte channel |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index c26a82e83f6e..b556a72264d1 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
| @@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci, | |||
| 239 | ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); | 239 | ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) | 242 | static void ehci_fsl_usb_setup(struct ehci_hcd *ehci) |
| 243 | { | 243 | { |
| 244 | struct usb_hcd *hcd = ehci_to_hcd(ehci); | 244 | struct usb_hcd *hcd = ehci_to_hcd(ehci); |
| 245 | struct fsl_usb2_platform_data *pdata; | 245 | struct fsl_usb2_platform_data *pdata; |
| @@ -299,19 +299,12 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) | |||
| 299 | #endif | 299 | #endif |
| 300 | out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); | 300 | out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); |
| 301 | } | 301 | } |
| 302 | |||
| 303 | if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) { | ||
| 304 | printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); | ||
| 305 | return -ENODEV; | ||
| 306 | } | ||
| 307 | return 0; | ||
| 308 | } | 302 | } |
| 309 | 303 | ||
| 310 | /* called after powerup, by probe or system-pm "wakeup" */ | 304 | /* called after powerup, by probe or system-pm "wakeup" */ |
| 311 | static int ehci_fsl_reinit(struct ehci_hcd *ehci) | 305 | static int ehci_fsl_reinit(struct ehci_hcd *ehci) |
| 312 | { | 306 | { |
| 313 | if (ehci_fsl_usb_setup(ehci)) | 307 | ehci_fsl_usb_setup(ehci); |
| 314 | return -ENODEV; | ||
| 315 | ehci_port_power(ehci, 0); | 308 | ehci_port_power(ehci, 0); |
| 316 | 309 | ||
| 317 | return 0; | 310 | return 0; |
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h index bdf43e2adc51..491806221165 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h | |||
| @@ -45,6 +45,5 @@ | |||
| 45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ | 45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ |
| 46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ | 46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ |
| 47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ | 47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ |
| 48 | #define CTRL_PHY_CLK_VALID (1 << 17) | ||
| 49 | #define SNOOP_SIZE_2GB 0x1e | 48 | #define SNOOP_SIZE_2GB 0x1e |
| 50 | #endif /* _EHCI_FSL_H */ | 49 | #endif /* _EHCI_FSL_H */ |
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig index 74d29b552901..408a9927be92 100644 --- a/drivers/video/omap2/displays/Kconfig +++ b/drivers/video/omap2/displays/Kconfig | |||
| @@ -12,7 +12,7 @@ config PANEL_GENERIC_DPI | |||
| 12 | 12 | ||
| 13 | config PANEL_DVI | 13 | config PANEL_DVI |
| 14 | tristate "DVI output" | 14 | tristate "DVI output" |
| 15 | depends on OMAP2_DSS_DPI | 15 | depends on OMAP2_DSS_DPI && I2C |
| 16 | help | 16 | help |
| 17 | Driver for external monitors, connected via DVI. The driver uses i2c | 17 | Driver for external monitors, connected via DVI. The driver uses i2c |
| 18 | to read EDID information from the monitor. | 18 | to read EDID information from the monitor. |
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 052dc874cd3d..87b3e25294cf 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c | |||
| @@ -1276,6 +1276,9 @@ int dss_ovl_enable(struct omap_overlay *ovl) | |||
| 1276 | 1276 | ||
| 1277 | spin_unlock_irqrestore(&data_lock, flags); | 1277 | spin_unlock_irqrestore(&data_lock, flags); |
| 1278 | 1278 | ||
| 1279 | /* wait for overlay to be enabled */ | ||
| 1280 | wait_pending_extra_info_updates(); | ||
| 1281 | |||
| 1279 | mutex_unlock(&apply_lock); | 1282 | mutex_unlock(&apply_lock); |
| 1280 | 1283 | ||
| 1281 | return 0; | 1284 | return 0; |
| @@ -1313,6 +1316,9 @@ int dss_ovl_disable(struct omap_overlay *ovl) | |||
| 1313 | 1316 | ||
| 1314 | spin_unlock_irqrestore(&data_lock, flags); | 1317 | spin_unlock_irqrestore(&data_lock, flags); |
| 1315 | 1318 | ||
| 1319 | /* wait for the overlay to be disabled */ | ||
| 1320 | wait_pending_extra_info_updates(); | ||
| 1321 | |||
| 1316 | mutex_unlock(&apply_lock); | 1322 | mutex_unlock(&apply_lock); |
| 1317 | 1323 | ||
| 1318 | return 0; | 1324 | return 0; |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index d7aa3b056529..a36b934b2db4 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
| @@ -165,9 +165,25 @@ static int hdmi_runtime_get(void) | |||
| 165 | 165 | ||
| 166 | DSSDBG("hdmi_runtime_get\n"); | 166 | DSSDBG("hdmi_runtime_get\n"); |
| 167 | 167 | ||
| 168 | /* | ||
| 169 | * HACK: Add dss_runtime_get() to ensure DSS clock domain is enabled. | ||
| 170 | * This should be removed later. | ||
| 171 | */ | ||
| 172 | r = dss_runtime_get(); | ||
| 173 | if (r < 0) | ||
| 174 | goto err_get_dss; | ||
| 175 | |||
| 168 | r = pm_runtime_get_sync(&hdmi.pdev->dev); | 176 | r = pm_runtime_get_sync(&hdmi.pdev->dev); |
| 169 | WARN_ON(r < 0); | 177 | WARN_ON(r < 0); |
| 170 | return r < 0 ? r : 0; | 178 | if (r < 0) |
| 179 | goto err_get_hdmi; | ||
| 180 | |||
| 181 | return 0; | ||
| 182 | |||
| 183 | err_get_hdmi: | ||
| 184 | dss_runtime_put(); | ||
| 185 | err_get_dss: | ||
| 186 | return r; | ||
| 171 | } | 187 | } |
| 172 | 188 | ||
| 173 | static void hdmi_runtime_put(void) | 189 | static void hdmi_runtime_put(void) |
| @@ -178,6 +194,12 @@ static void hdmi_runtime_put(void) | |||
| 178 | 194 | ||
| 179 | r = pm_runtime_put_sync(&hdmi.pdev->dev); | 195 | r = pm_runtime_put_sync(&hdmi.pdev->dev); |
| 180 | WARN_ON(r < 0); | 196 | WARN_ON(r < 0); |
| 197 | |||
| 198 | /* | ||
| 199 | * HACK: This is added to complement the dss_runtime_get() call in | ||
| 200 | * hdmi_runtime_get(). This should be removed later. | ||
| 201 | */ | ||
| 202 | dss_runtime_put(); | ||
| 181 | } | 203 | } |
| 182 | 204 | ||
| 183 | int hdmi_init_display(struct omap_dss_device *dssdev) | 205 | int hdmi_init_display(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 2d72334ca3da..6847a478b459 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
| @@ -479,14 +479,7 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, | |||
| 479 | 479 | ||
| 480 | bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data) | 480 | bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data) |
| 481 | { | 481 | { |
| 482 | int r; | 482 | return gpio_get_value(ip_data->hpd_gpio); |
| 483 | |||
| 484 | void __iomem *base = hdmi_core_sys_base(ip_data); | ||
| 485 | |||
| 486 | /* HPD */ | ||
| 487 | r = REG_GET(base, HDMI_CORE_SYS_SYS_STAT, 1, 1); | ||
| 488 | |||
| 489 | return r == 1; | ||
| 490 | } | 483 | } |
| 491 | 484 | ||
| 492 | static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, | 485 | static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index d5aaca9cfa7e..8497727d66de 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
| @@ -1810,7 +1810,11 @@ static void hw_init(void) | |||
| 1810 | break; | 1810 | break; |
| 1811 | } | 1811 | } |
| 1812 | 1812 | ||
| 1813 | /* magic required on VX900 for correct modesetting on IGA1 */ | ||
| 1814 | via_write_reg_mask(VIACR, 0x45, 0x00, 0x01); | ||
| 1815 | |||
| 1813 | /* probably this should go to the scaling code one day */ | 1816 | /* probably this should go to the scaling code one day */ |
| 1817 | via_write_reg_mask(VIACR, 0xFD, 0, 0x80); /* VX900 hw scale on IGA2 */ | ||
| 1814 | viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters)); | 1818 | viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters)); |
| 1815 | 1819 | ||
| 1816 | /* Fill VPIT Parameters */ | 1820 | /* Fill VPIT Parameters */ |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95aeedf198f8..958e5129c601 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
| @@ -367,29 +367,45 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev) | |||
| 367 | #ifdef CONFIG_PM | 367 | #ifdef CONFIG_PM |
| 368 | static int virtballoon_freeze(struct virtio_device *vdev) | 368 | static int virtballoon_freeze(struct virtio_device *vdev) |
| 369 | { | 369 | { |
| 370 | struct virtio_balloon *vb = vdev->priv; | ||
| 371 | |||
| 370 | /* | 372 | /* |
| 371 | * The kthread is already frozen by the PM core before this | 373 | * The kthread is already frozen by the PM core before this |
| 372 | * function is called. | 374 | * function is called. |
| 373 | */ | 375 | */ |
| 374 | 376 | ||
| 377 | while (vb->num_pages) | ||
| 378 | leak_balloon(vb, vb->num_pages); | ||
| 379 | update_balloon_size(vb); | ||
| 380 | |||
| 375 | /* Ensure we don't get any more requests from the host */ | 381 | /* Ensure we don't get any more requests from the host */ |
| 376 | vdev->config->reset(vdev); | 382 | vdev->config->reset(vdev); |
| 377 | vdev->config->del_vqs(vdev); | 383 | vdev->config->del_vqs(vdev); |
| 378 | return 0; | 384 | return 0; |
| 379 | } | 385 | } |
| 380 | 386 | ||
| 387 | static int restore_common(struct virtio_device *vdev) | ||
| 388 | { | ||
| 389 | struct virtio_balloon *vb = vdev->priv; | ||
| 390 | int ret; | ||
| 391 | |||
| 392 | ret = init_vqs(vdev->priv); | ||
| 393 | if (ret) | ||
| 394 | return ret; | ||
| 395 | |||
| 396 | fill_balloon(vb, towards_target(vb)); | ||
| 397 | update_balloon_size(vb); | ||
| 398 | return 0; | ||
| 399 | } | ||
| 400 | |||
| 381 | static int virtballoon_thaw(struct virtio_device *vdev) | 401 | static int virtballoon_thaw(struct virtio_device *vdev) |
| 382 | { | 402 | { |
| 383 | return init_vqs(vdev->priv); | 403 | return restore_common(vdev); |
| 384 | } | 404 | } |
| 385 | 405 | ||
| 386 | static int virtballoon_restore(struct virtio_device *vdev) | 406 | static int virtballoon_restore(struct virtio_device *vdev) |
| 387 | { | 407 | { |
| 388 | struct virtio_balloon *vb = vdev->priv; | 408 | struct virtio_balloon *vb = vdev->priv; |
| 389 | struct page *page, *page2; | ||
| 390 | |||
| 391 | /* We're starting from a clean slate */ | ||
| 392 | vb->num_pages = 0; | ||
| 393 | 409 | ||
| 394 | /* | 410 | /* |
| 395 | * If a request wasn't complete at the time of freezing, this | 411 | * If a request wasn't complete at the time of freezing, this |
| @@ -397,12 +413,7 @@ static int virtballoon_restore(struct virtio_device *vdev) | |||
| 397 | */ | 413 | */ |
| 398 | vb->need_stats_update = 0; | 414 | vb->need_stats_update = 0; |
| 399 | 415 | ||
| 400 | /* We don't have these pages in the balloon anymore! */ | 416 | return restore_common(vdev); |
| 401 | list_for_each_entry_safe(page, page2, &vb->pages, lru) { | ||
| 402 | list_del(&page->lru); | ||
| 403 | totalram_pages++; | ||
| 404 | } | ||
| 405 | return init_vqs(vdev->priv); | ||
| 406 | } | 417 | } |
| 407 | #endif | 418 | #endif |
| 408 | 419 | ||
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 877b107f77a7..df9e8f0e327d 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -1098,7 +1098,7 @@ config BOOKE_WDT_DEFAULT_TIMEOUT | |||
| 1098 | For Freescale Book-E processors, this is a number between 0 and 63. | 1098 | For Freescale Book-E processors, this is a number between 0 and 63. |
| 1099 | For other Book-E processors, this is a number between 0 and 3. | 1099 | For other Book-E processors, this is a number between 0 and 3. |
| 1100 | 1100 | ||
| 1101 | The value can be overidden by the wdt_period command-line parameter. | 1101 | The value can be overridden by the wdt_period command-line parameter. |
| 1102 | 1102 | ||
| 1103 | # PPC64 Architecture | 1103 | # PPC64 Architecture |
| 1104 | 1104 | ||
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 337265b47305..7c0fdfca2646 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
| @@ -198,9 +198,13 @@ static long booke_wdt_ioctl(struct file *file, | |||
| 198 | booke_wdt_period = tmp; | 198 | booke_wdt_period = tmp; |
| 199 | #endif | 199 | #endif |
| 200 | booke_wdt_set(); | 200 | booke_wdt_set(); |
| 201 | return 0; | 201 | /* Fall */ |
| 202 | case WDIOC_GETTIMEOUT: | 202 | case WDIOC_GETTIMEOUT: |
| 203 | #ifdef CONFIG_FSL_BOOKE | ||
| 204 | return put_user(period_to_sec(booke_wdt_period), p); | ||
| 205 | #else | ||
| 203 | return put_user(booke_wdt_period, p); | 206 | return put_user(booke_wdt_period, p); |
| 207 | #endif | ||
| 204 | default: | 208 | default: |
| 205 | return -ENOTTY; | 209 | return -ENOTTY; |
| 206 | } | 210 | } |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 8464ea1c36a1..3c166d3f4e55 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
| @@ -231,7 +231,7 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
| 231 | 231 | ||
| 232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; | 232 | cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; |
| 233 | 233 | ||
| 234 | set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE)); | 234 | set_memory_x((unsigned long)bios32_map, 2); |
| 235 | asminline_call(&cmn_regs, bios32_entrypoint); | 235 | asminline_call(&cmn_regs, bios32_entrypoint); |
| 236 | 236 | ||
| 237 | if (cmn_regs.u1.ral != 0) { | 237 | if (cmn_regs.u1.ral != 0) { |
| @@ -250,7 +250,8 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
| 250 | cru_rom_addr = | 250 | cru_rom_addr = |
| 251 | ioremap(cru_physical_address, cru_length); | 251 | ioremap(cru_physical_address, cru_length); |
| 252 | if (cru_rom_addr) { | 252 | if (cru_rom_addr) { |
| 253 | set_memory_x((unsigned long)cru_rom_addr, cru_length); | 253 | set_memory_x((unsigned long)cru_rom_addr & PAGE_MASK, |
| 254 | (cru_length + PAGE_SIZE - 1) >> PAGE_SHIFT); | ||
| 254 | retval = 0; | 255 | retval = 0; |
| 255 | } | 256 | } |
| 256 | } | 257 | } |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 8e210aafdfd0..dfae030a7ef2 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
| @@ -264,7 +264,7 @@ static int __devinit pnx4008_wdt_probe(struct platform_device *pdev) | |||
| 264 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 264 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 265 | if (wdt_mem == NULL) { | 265 | if (wdt_mem == NULL) { |
| 266 | printk(KERN_INFO MODULE_NAME | 266 | printk(KERN_INFO MODULE_NAME |
| 267 | "failed to get memory region resouce\n"); | 267 | "failed to get memory region resource\n"); |
| 268 | return -ENOENT; | 268 | return -ENOENT; |
| 269 | } | 269 | } |
| 270 | 270 | ||
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 4bc3744e14e4..404172f02c9b 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
| @@ -312,18 +312,26 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
| 312 | dev = &pdev->dev; | 312 | dev = &pdev->dev; |
| 313 | wdt_dev = &pdev->dev; | 313 | wdt_dev = &pdev->dev; |
| 314 | 314 | ||
| 315 | /* get the memory region for the watchdog timer */ | ||
| 316 | |||
| 317 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 315 | wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 318 | if (wdt_mem == NULL) { | 316 | if (wdt_mem == NULL) { |
| 319 | dev_err(dev, "no memory resource specified\n"); | 317 | dev_err(dev, "no memory resource specified\n"); |
| 320 | return -ENOENT; | 318 | return -ENOENT; |
| 321 | } | 319 | } |
| 322 | 320 | ||
| 321 | wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
| 322 | if (wdt_irq == NULL) { | ||
| 323 | dev_err(dev, "no irq resource specified\n"); | ||
| 324 | ret = -ENOENT; | ||
| 325 | goto err; | ||
| 326 | } | ||
| 327 | |||
| 328 | /* get the memory region for the watchdog timer */ | ||
| 329 | |||
| 323 | size = resource_size(wdt_mem); | 330 | size = resource_size(wdt_mem); |
| 324 | if (!request_mem_region(wdt_mem->start, size, pdev->name)) { | 331 | if (!request_mem_region(wdt_mem->start, size, pdev->name)) { |
| 325 | dev_err(dev, "failed to get memory region\n"); | 332 | dev_err(dev, "failed to get memory region\n"); |
| 326 | return -EBUSY; | 333 | ret = -EBUSY; |
| 334 | goto err; | ||
| 327 | } | 335 | } |
| 328 | 336 | ||
| 329 | wdt_base = ioremap(wdt_mem->start, size); | 337 | wdt_base = ioremap(wdt_mem->start, size); |
| @@ -335,29 +343,17 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
| 335 | 343 | ||
| 336 | DBG("probe: mapped wdt_base=%p\n", wdt_base); | 344 | DBG("probe: mapped wdt_base=%p\n", wdt_base); |
| 337 | 345 | ||
| 338 | wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
| 339 | if (wdt_irq == NULL) { | ||
| 340 | dev_err(dev, "no irq resource specified\n"); | ||
| 341 | ret = -ENOENT; | ||
| 342 | goto err_map; | ||
| 343 | } | ||
| 344 | |||
| 345 | ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev); | ||
| 346 | if (ret != 0) { | ||
| 347 | dev_err(dev, "failed to install irq (%d)\n", ret); | ||
| 348 | goto err_map; | ||
| 349 | } | ||
| 350 | |||
| 351 | wdt_clock = clk_get(&pdev->dev, "watchdog"); | 346 | wdt_clock = clk_get(&pdev->dev, "watchdog"); |
| 352 | if (IS_ERR(wdt_clock)) { | 347 | if (IS_ERR(wdt_clock)) { |
| 353 | dev_err(dev, "failed to find watchdog clock source\n"); | 348 | dev_err(dev, "failed to find watchdog clock source\n"); |
| 354 | ret = PTR_ERR(wdt_clock); | 349 | ret = PTR_ERR(wdt_clock); |
| 355 | goto err_irq; | 350 | goto err_map; |
| 356 | } | 351 | } |
| 357 | 352 | ||
| 358 | clk_enable(wdt_clock); | 353 | clk_enable(wdt_clock); |
| 359 | 354 | ||
| 360 | if (s3c2410wdt_cpufreq_register() < 0) { | 355 | ret = s3c2410wdt_cpufreq_register(); |
| 356 | if (ret < 0) { | ||
| 361 | printk(KERN_ERR PFX "failed to register cpufreq\n"); | 357 | printk(KERN_ERR PFX "failed to register cpufreq\n"); |
| 362 | goto err_clk; | 358 | goto err_clk; |
| 363 | } | 359 | } |
| @@ -378,12 +374,18 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
| 378 | "cannot start\n"); | 374 | "cannot start\n"); |
| 379 | } | 375 | } |
| 380 | 376 | ||
| 377 | ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev); | ||
| 378 | if (ret != 0) { | ||
| 379 | dev_err(dev, "failed to install irq (%d)\n", ret); | ||
| 380 | goto err_cpufreq; | ||
| 381 | } | ||
| 382 | |||
| 381 | watchdog_set_nowayout(&s3c2410_wdd, nowayout); | 383 | watchdog_set_nowayout(&s3c2410_wdd, nowayout); |
| 382 | 384 | ||
| 383 | ret = watchdog_register_device(&s3c2410_wdd); | 385 | ret = watchdog_register_device(&s3c2410_wdd); |
| 384 | if (ret) { | 386 | if (ret) { |
| 385 | dev_err(dev, "cannot register watchdog (%d)\n", ret); | 387 | dev_err(dev, "cannot register watchdog (%d)\n", ret); |
| 386 | goto err_cpufreq; | 388 | goto err_irq; |
| 387 | } | 389 | } |
| 388 | 390 | ||
| 389 | if (tmr_atboot && started == 0) { | 391 | if (tmr_atboot && started == 0) { |
| @@ -408,23 +410,26 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
| 408 | 410 | ||
| 409 | return 0; | 411 | return 0; |
| 410 | 412 | ||
| 413 | err_irq: | ||
| 414 | free_irq(wdt_irq->start, pdev); | ||
| 415 | |||
| 411 | err_cpufreq: | 416 | err_cpufreq: |
| 412 | s3c2410wdt_cpufreq_deregister(); | 417 | s3c2410wdt_cpufreq_deregister(); |
| 413 | 418 | ||
| 414 | err_clk: | 419 | err_clk: |
| 415 | clk_disable(wdt_clock); | 420 | clk_disable(wdt_clock); |
| 416 | clk_put(wdt_clock); | 421 | clk_put(wdt_clock); |
| 417 | 422 | wdt_clock = NULL; | |
| 418 | err_irq: | ||
| 419 | free_irq(wdt_irq->start, pdev); | ||
| 420 | 423 | ||
| 421 | err_map: | 424 | err_map: |
| 422 | iounmap(wdt_base); | 425 | iounmap(wdt_base); |
| 423 | 426 | ||
| 424 | err_req: | 427 | err_req: |
| 425 | release_mem_region(wdt_mem->start, size); | 428 | release_mem_region(wdt_mem->start, size); |
| 426 | wdt_mem = NULL; | ||
| 427 | 429 | ||
| 430 | err: | ||
| 431 | wdt_irq = NULL; | ||
| 432 | wdt_mem = NULL; | ||
| 428 | return ret; | 433 | return ret; |
| 429 | } | 434 | } |
| 430 | 435 | ||
| @@ -432,18 +437,18 @@ static int __devexit s3c2410wdt_remove(struct platform_device *dev) | |||
| 432 | { | 437 | { |
| 433 | watchdog_unregister_device(&s3c2410_wdd); | 438 | watchdog_unregister_device(&s3c2410_wdd); |
| 434 | 439 | ||
| 440 | free_irq(wdt_irq->start, dev); | ||
| 441 | |||
| 435 | s3c2410wdt_cpufreq_deregister(); | 442 | s3c2410wdt_cpufreq_deregister(); |
| 436 | 443 | ||
| 437 | clk_disable(wdt_clock); | 444 | clk_disable(wdt_clock); |
| 438 | clk_put(wdt_clock); | 445 | clk_put(wdt_clock); |
| 439 | wdt_clock = NULL; | 446 | wdt_clock = NULL; |
| 440 | 447 | ||
| 441 | free_irq(wdt_irq->start, dev); | ||
| 442 | wdt_irq = NULL; | ||
| 443 | |||
| 444 | iounmap(wdt_base); | 448 | iounmap(wdt_base); |
| 445 | 449 | ||
| 446 | release_mem_region(wdt_mem->start, resource_size(wdt_mem)); | 450 | release_mem_region(wdt_mem->start, resource_size(wdt_mem)); |
| 451 | wdt_irq = NULL; | ||
| 447 | wdt_mem = NULL; | 452 | wdt_mem = NULL; |
| 448 | return 0; | 453 | return 0; |
| 449 | } | 454 | } |
| @@ -490,6 +490,8 @@ static void kiocb_batch_free(struct kioctx *ctx, struct kiocb_batch *batch) | |||
| 490 | kmem_cache_free(kiocb_cachep, req); | 490 | kmem_cache_free(kiocb_cachep, req); |
| 491 | ctx->reqs_active--; | 491 | ctx->reqs_active--; |
| 492 | } | 492 | } |
| 493 | if (unlikely(!ctx->reqs_active && ctx->dead)) | ||
| 494 | wake_up_all(&ctx->wait); | ||
| 493 | spin_unlock_irq(&ctx->ctx_lock); | 495 | spin_unlock_irq(&ctx->ctx_lock); |
| 494 | } | 496 | } |
| 495 | 497 | ||
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index a6395bdb26ae..1ff94054d35a 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
| @@ -259,6 +259,13 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
| 259 | current->mm->free_area_cache = current->mm->mmap_base; | 259 | current->mm->free_area_cache = current->mm->mmap_base; |
| 260 | current->mm->cached_hole_size = 0; | 260 | current->mm->cached_hole_size = 0; |
| 261 | 261 | ||
| 262 | retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT); | ||
| 263 | if (retval < 0) { | ||
| 264 | /* Someone check-me: is this error path enough? */ | ||
| 265 | send_sig(SIGKILL, current, 0); | ||
| 266 | return retval; | ||
| 267 | } | ||
| 268 | |||
| 262 | install_exec_creds(bprm); | 269 | install_exec_creds(bprm); |
| 263 | current->flags &= ~PF_FORKNOEXEC; | 270 | current->flags &= ~PF_FORKNOEXEC; |
| 264 | 271 | ||
| @@ -352,13 +359,6 @@ beyond_if: | |||
| 352 | return retval; | 359 | return retval; |
| 353 | } | 360 | } |
| 354 | 361 | ||
| 355 | retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT); | ||
| 356 | if (retval < 0) { | ||
| 357 | /* Someone check-me: is this error path enough? */ | ||
| 358 | send_sig(SIGKILL, current, 0); | ||
| 359 | return retval; | ||
| 360 | } | ||
| 361 | |||
| 362 | current->mm->start_stack = | 362 | current->mm->start_stack = |
| 363 | (unsigned long) create_aout_tables((char __user *) bprm->p, bprm); | 363 | (unsigned long) create_aout_tables((char __user *) bprm->p, bprm); |
| 364 | #ifdef __alpha__ | 364 | #ifdef __alpha__ |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index bcb884e2d613..07d096c49920 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
| @@ -1421,7 +1421,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t, | |||
| 1421 | for (i = 1; i < view->n; ++i) { | 1421 | for (i = 1; i < view->n; ++i) { |
| 1422 | const struct user_regset *regset = &view->regsets[i]; | 1422 | const struct user_regset *regset = &view->regsets[i]; |
| 1423 | do_thread_regset_writeback(t->task, regset); | 1423 | do_thread_regset_writeback(t->task, regset); |
| 1424 | if (regset->core_note_type && | 1424 | if (regset->core_note_type && regset->get && |
| 1425 | (!regset->active || regset->active(t->task, regset))) { | 1425 | (!regset->active || regset->active(t->task, regset))) { |
| 1426 | int ret; | 1426 | int ret; |
| 1427 | size_t size = regset->n * regset->size; | 1427 | size_t size = regset->n * regset->size; |
diff --git a/fs/dcache.c b/fs/dcache.c index fe19ac13f75f..bcbdb33fcc20 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -104,7 +104,7 @@ static unsigned int d_hash_shift __read_mostly; | |||
| 104 | 104 | ||
| 105 | static struct hlist_bl_head *dentry_hashtable __read_mostly; | 105 | static struct hlist_bl_head *dentry_hashtable __read_mostly; |
| 106 | 106 | ||
| 107 | static inline struct hlist_bl_head *d_hash(struct dentry *parent, | 107 | static inline struct hlist_bl_head *d_hash(const struct dentry *parent, |
| 108 | unsigned long hash) | 108 | unsigned long hash) |
| 109 | { | 109 | { |
| 110 | hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES; | 110 | hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES; |
| @@ -137,6 +137,26 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer, | |||
| 137 | } | 137 | } |
| 138 | #endif | 138 | #endif |
| 139 | 139 | ||
| 140 | /* | ||
| 141 | * Compare 2 name strings, return 0 if they match, otherwise non-zero. | ||
| 142 | * The strings are both count bytes long, and count is non-zero. | ||
| 143 | */ | ||
| 144 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, | ||
| 145 | const unsigned char *ct, size_t tcount) | ||
| 146 | { | ||
| 147 | if (scount != tcount) | ||
| 148 | return 1; | ||
| 149 | |||
| 150 | do { | ||
| 151 | if (*cs != *ct) | ||
| 152 | return 1; | ||
| 153 | cs++; | ||
| 154 | ct++; | ||
| 155 | tcount--; | ||
| 156 | } while (tcount); | ||
| 157 | return 0; | ||
| 158 | } | ||
| 159 | |||
| 140 | static void __d_free(struct rcu_head *head) | 160 | static void __d_free(struct rcu_head *head) |
| 141 | { | 161 | { |
| 142 | struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); | 162 | struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); |
| @@ -1717,8 +1737,9 @@ EXPORT_SYMBOL(d_add_ci); | |||
| 1717 | * child is looked up. Thus, an interlocking stepping of sequence lock checks | 1737 | * child is looked up. Thus, an interlocking stepping of sequence lock checks |
| 1718 | * is formed, giving integrity down the path walk. | 1738 | * is formed, giving integrity down the path walk. |
| 1719 | */ | 1739 | */ |
| 1720 | struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | 1740 | struct dentry *__d_lookup_rcu(const struct dentry *parent, |
| 1721 | unsigned *seq, struct inode **inode) | 1741 | const struct qstr *name, |
| 1742 | unsigned *seqp, struct inode **inode) | ||
| 1722 | { | 1743 | { |
| 1723 | unsigned int len = name->len; | 1744 | unsigned int len = name->len; |
| 1724 | unsigned int hash = name->hash; | 1745 | unsigned int hash = name->hash; |
| @@ -1748,6 +1769,7 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | |||
| 1748 | * See Documentation/filesystems/path-lookup.txt for more details. | 1769 | * See Documentation/filesystems/path-lookup.txt for more details. |
| 1749 | */ | 1770 | */ |
| 1750 | hlist_bl_for_each_entry_rcu(dentry, node, b, d_hash) { | 1771 | hlist_bl_for_each_entry_rcu(dentry, node, b, d_hash) { |
| 1772 | unsigned seq; | ||
| 1751 | struct inode *i; | 1773 | struct inode *i; |
| 1752 | const char *tname; | 1774 | const char *tname; |
| 1753 | int tlen; | 1775 | int tlen; |
| @@ -1756,7 +1778,7 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | |||
| 1756 | continue; | 1778 | continue; |
| 1757 | 1779 | ||
| 1758 | seqretry: | 1780 | seqretry: |
| 1759 | *seq = read_seqcount_begin(&dentry->d_seq); | 1781 | seq = read_seqcount_begin(&dentry->d_seq); |
| 1760 | if (dentry->d_parent != parent) | 1782 | if (dentry->d_parent != parent) |
| 1761 | continue; | 1783 | continue; |
| 1762 | if (d_unhashed(dentry)) | 1784 | if (d_unhashed(dentry)) |
| @@ -1771,7 +1793,7 @@ seqretry: | |||
| 1771 | * edge of memory when walking. If we could load this | 1793 | * edge of memory when walking. If we could load this |
| 1772 | * atomically some other way, we could drop this check. | 1794 | * atomically some other way, we could drop this check. |
| 1773 | */ | 1795 | */ |
| 1774 | if (read_seqcount_retry(&dentry->d_seq, *seq)) | 1796 | if (read_seqcount_retry(&dentry->d_seq, seq)) |
| 1775 | goto seqretry; | 1797 | goto seqretry; |
| 1776 | if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) { | 1798 | if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) { |
| 1777 | if (parent->d_op->d_compare(parent, *inode, | 1799 | if (parent->d_op->d_compare(parent, *inode, |
| @@ -1788,6 +1810,7 @@ seqretry: | |||
| 1788 | * order to do anything useful with the returned dentry | 1810 | * order to do anything useful with the returned dentry |
| 1789 | * anyway. | 1811 | * anyway. |
| 1790 | */ | 1812 | */ |
| 1813 | *seqp = seq; | ||
| 1791 | *inode = i; | 1814 | *inode = i; |
| 1792 | return dentry; | 1815 | return dentry; |
| 1793 | } | 1816 | } |
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 349209dc6a91..3a06f4043df4 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c | |||
| @@ -429,7 +429,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf, | |||
| 429 | goto memdup; | 429 | goto memdup; |
| 430 | } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { | 430 | } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { |
| 431 | printk(KERN_WARNING "%s: Acceptable packet size range is " | 431 | printk(KERN_WARNING "%s: Acceptable packet size range is " |
| 432 | "[%d-%lu], but amount of data written is [%zu].", | 432 | "[%d-%zu], but amount of data written is [%zu].", |
| 433 | __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); | 433 | __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); |
| 434 | return -EINVAL; | 434 | return -EINVAL; |
| 435 | } | 435 | } |
| @@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state) | |||
| 1915 | { | 1915 | { |
| 1916 | struct task_struct *tsk = current; | 1916 | struct task_struct *tsk = current; |
| 1917 | struct mm_struct *mm = tsk->mm; | 1917 | struct mm_struct *mm = tsk->mm; |
| 1918 | struct completion *vfork_done; | ||
| 1919 | int core_waiters = -EBUSY; | 1918 | int core_waiters = -EBUSY; |
| 1920 | 1919 | ||
| 1921 | init_completion(&core_state->startup); | 1920 | init_completion(&core_state->startup); |
| @@ -1927,22 +1926,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state) | |||
| 1927 | core_waiters = zap_threads(tsk, mm, core_state, exit_code); | 1926 | core_waiters = zap_threads(tsk, mm, core_state, exit_code); |
| 1928 | up_write(&mm->mmap_sem); | 1927 | up_write(&mm->mmap_sem); |
| 1929 | 1928 | ||
| 1930 | if (unlikely(core_waiters < 0)) | 1929 | if (core_waiters > 0) |
| 1931 | goto fail; | ||
| 1932 | |||
| 1933 | /* | ||
| 1934 | * Make sure nobody is waiting for us to release the VM, | ||
| 1935 | * otherwise we can deadlock when we wait on each other | ||
| 1936 | */ | ||
| 1937 | vfork_done = tsk->vfork_done; | ||
| 1938 | if (vfork_done) { | ||
| 1939 | tsk->vfork_done = NULL; | ||
| 1940 | complete(vfork_done); | ||
| 1941 | } | ||
| 1942 | |||
| 1943 | if (core_waiters) | ||
| 1944 | wait_for_completion(&core_state->startup); | 1930 | wait_for_completion(&core_state->startup); |
| 1945 | fail: | 1931 | |
| 1946 | return core_waiters; | 1932 | return core_waiters; |
| 1947 | } | 1933 | } |
| 1948 | 1934 | ||
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 376816fcd040..351a3e797789 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
| @@ -167,14 +167,19 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl) | |||
| 167 | spin_unlock(&lru_lock); | 167 | spin_unlock(&lru_lock); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) | 170 | static void __gfs2_glock_remove_from_lru(struct gfs2_glock *gl) |
| 171 | { | 171 | { |
| 172 | spin_lock(&lru_lock); | ||
| 173 | if (!list_empty(&gl->gl_lru)) { | 172 | if (!list_empty(&gl->gl_lru)) { |
| 174 | list_del_init(&gl->gl_lru); | 173 | list_del_init(&gl->gl_lru); |
| 175 | atomic_dec(&lru_count); | 174 | atomic_dec(&lru_count); |
| 176 | clear_bit(GLF_LRU, &gl->gl_flags); | 175 | clear_bit(GLF_LRU, &gl->gl_flags); |
| 177 | } | 176 | } |
| 177 | } | ||
| 178 | |||
| 179 | static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) | ||
| 180 | { | ||
| 181 | spin_lock(&lru_lock); | ||
| 182 | __gfs2_glock_remove_from_lru(gl); | ||
| 178 | spin_unlock(&lru_lock); | 183 | spin_unlock(&lru_lock); |
| 179 | } | 184 | } |
| 180 | 185 | ||
| @@ -217,11 +222,12 @@ void gfs2_glock_put(struct gfs2_glock *gl) | |||
| 217 | struct gfs2_sbd *sdp = gl->gl_sbd; | 222 | struct gfs2_sbd *sdp = gl->gl_sbd; |
| 218 | struct address_space *mapping = gfs2_glock2aspace(gl); | 223 | struct address_space *mapping = gfs2_glock2aspace(gl); |
| 219 | 224 | ||
| 220 | if (atomic_dec_and_test(&gl->gl_ref)) { | 225 | if (atomic_dec_and_lock(&gl->gl_ref, &lru_lock)) { |
| 226 | __gfs2_glock_remove_from_lru(gl); | ||
| 227 | spin_unlock(&lru_lock); | ||
| 221 | spin_lock_bucket(gl->gl_hash); | 228 | spin_lock_bucket(gl->gl_hash); |
| 222 | hlist_bl_del_rcu(&gl->gl_list); | 229 | hlist_bl_del_rcu(&gl->gl_list); |
| 223 | spin_unlock_bucket(gl->gl_hash); | 230 | spin_unlock_bucket(gl->gl_hash); |
| 224 | gfs2_glock_remove_from_lru(gl); | ||
| 225 | GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); | 231 | GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); |
| 226 | GLOCK_BUG_ON(gl, mapping && mapping->nrpages); | 232 | GLOCK_BUG_ON(gl, mapping && mapping->nrpages); |
| 227 | trace_gfs2_glock_put(gl); | 233 | trace_gfs2_glock_put(gl); |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index a7d611b93f0f..56987460cdae 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
| @@ -391,10 +391,6 @@ static int alloc_dinode(struct gfs2_inode *dip, u64 *no_addr, u64 *generation) | |||
| 391 | int error; | 391 | int error; |
| 392 | int dblocks = 1; | 392 | int dblocks = 1; |
| 393 | 393 | ||
| 394 | error = gfs2_rindex_update(sdp); | ||
| 395 | if (error) | ||
| 396 | fs_warn(sdp, "rindex update returns %d\n", error); | ||
| 397 | |||
| 398 | error = gfs2_inplace_reserve(dip, RES_DINODE); | 394 | error = gfs2_inplace_reserve(dip, RES_DINODE); |
| 399 | if (error) | 395 | if (error) |
| 400 | goto out; | 396 | goto out; |
| @@ -1043,6 +1039,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) | |||
| 1043 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); | 1039 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); |
| 1044 | if (!rgd) | 1040 | if (!rgd) |
| 1045 | goto out_inodes; | 1041 | goto out_inodes; |
| 1042 | |||
| 1046 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); | 1043 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); |
| 1047 | 1044 | ||
| 1048 | 1045 | ||
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 6aacf3f230a2..24f609c9ef91 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
| @@ -800,6 +800,11 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) | |||
| 800 | fs_err(sdp, "can't get quota file inode: %d\n", error); | 800 | fs_err(sdp, "can't get quota file inode: %d\n", error); |
| 801 | goto fail_rindex; | 801 | goto fail_rindex; |
| 802 | } | 802 | } |
| 803 | |||
| 804 | error = gfs2_rindex_update(sdp); | ||
| 805 | if (error) | ||
| 806 | goto fail_qinode; | ||
| 807 | |||
| 803 | return 0; | 808 | return 0; |
| 804 | 809 | ||
| 805 | fail_qinode: | 810 | fail_qinode: |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 981bfa32121a..49ada95209d0 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
| @@ -683,16 +683,21 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp) | |||
| 683 | struct gfs2_glock *gl = ip->i_gl; | 683 | struct gfs2_glock *gl = ip->i_gl; |
| 684 | struct gfs2_holder ri_gh; | 684 | struct gfs2_holder ri_gh; |
| 685 | int error = 0; | 685 | int error = 0; |
| 686 | int unlock_required = 0; | ||
| 686 | 687 | ||
| 687 | /* Read new copy from disk if we don't have the latest */ | 688 | /* Read new copy from disk if we don't have the latest */ |
| 688 | if (!sdp->sd_rindex_uptodate) { | 689 | if (!sdp->sd_rindex_uptodate) { |
| 689 | mutex_lock(&sdp->sd_rindex_mutex); | 690 | mutex_lock(&sdp->sd_rindex_mutex); |
| 690 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); | 691 | if (!gfs2_glock_is_locked_by_me(gl)) { |
| 691 | if (error) | 692 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); |
| 692 | return error; | 693 | if (error) |
| 694 | return error; | ||
| 695 | unlock_required = 1; | ||
| 696 | } | ||
| 693 | if (!sdp->sd_rindex_uptodate) | 697 | if (!sdp->sd_rindex_uptodate) |
| 694 | error = gfs2_ri_update(ip); | 698 | error = gfs2_ri_update(ip); |
| 695 | gfs2_glock_dq_uninit(&ri_gh); | 699 | if (unlock_required) |
| 700 | gfs2_glock_dq_uninit(&ri_gh); | ||
| 696 | mutex_unlock(&sdp->sd_rindex_mutex); | 701 | mutex_unlock(&sdp->sd_rindex_mutex); |
| 697 | } | 702 | } |
| 698 | 703 | ||
diff --git a/fs/namei.c b/fs/namei.c index a780ea515c47..e2ba62820a0f 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -1374,6 +1374,34 @@ static inline int can_lookup(struct inode *inode) | |||
| 1374 | return 1; | 1374 | return 1; |
| 1375 | } | 1375 | } |
| 1376 | 1376 | ||
| 1377 | unsigned int full_name_hash(const unsigned char *name, unsigned int len) | ||
| 1378 | { | ||
| 1379 | unsigned long hash = init_name_hash(); | ||
| 1380 | while (len--) | ||
| 1381 | hash = partial_name_hash(*name++, hash); | ||
| 1382 | return end_name_hash(hash); | ||
| 1383 | } | ||
| 1384 | EXPORT_SYMBOL(full_name_hash); | ||
| 1385 | |||
| 1386 | /* | ||
| 1387 | * We know there's a real path component here of at least | ||
| 1388 | * one character. | ||
| 1389 | */ | ||
| 1390 | static inline unsigned long hash_name(const char *name, unsigned int *hashp) | ||
| 1391 | { | ||
| 1392 | unsigned long hash = init_name_hash(); | ||
| 1393 | unsigned long len = 0, c; | ||
| 1394 | |||
| 1395 | c = (unsigned char)*name; | ||
| 1396 | do { | ||
| 1397 | len++; | ||
| 1398 | hash = partial_name_hash(c, hash); | ||
| 1399 | c = (unsigned char)name[len]; | ||
| 1400 | } while (c && c != '/'); | ||
| 1401 | *hashp = end_name_hash(hash); | ||
| 1402 | return len; | ||
| 1403 | } | ||
| 1404 | |||
| 1377 | /* | 1405 | /* |
| 1378 | * Name resolution. | 1406 | * Name resolution. |
| 1379 | * This is the basic name resolution function, turning a pathname into | 1407 | * This is the basic name resolution function, turning a pathname into |
| @@ -1394,31 +1422,22 @@ static int link_path_walk(const char *name, struct nameidata *nd) | |||
| 1394 | 1422 | ||
| 1395 | /* At this point we know we have a real path component. */ | 1423 | /* At this point we know we have a real path component. */ |
| 1396 | for(;;) { | 1424 | for(;;) { |
| 1397 | unsigned long hash; | ||
| 1398 | struct qstr this; | 1425 | struct qstr this; |
| 1399 | unsigned int c; | 1426 | long len; |
| 1400 | int type; | 1427 | int type; |
| 1401 | 1428 | ||
| 1402 | err = may_lookup(nd); | 1429 | err = may_lookup(nd); |
| 1403 | if (err) | 1430 | if (err) |
| 1404 | break; | 1431 | break; |
| 1405 | 1432 | ||
| 1433 | len = hash_name(name, &this.hash); | ||
| 1406 | this.name = name; | 1434 | this.name = name; |
| 1407 | c = *(const unsigned char *)name; | 1435 | this.len = len; |
| 1408 | |||
| 1409 | hash = init_name_hash(); | ||
| 1410 | do { | ||
| 1411 | name++; | ||
| 1412 | hash = partial_name_hash(c, hash); | ||
| 1413 | c = *(const unsigned char *)name; | ||
| 1414 | } while (c && (c != '/')); | ||
| 1415 | this.len = name - (const char *) this.name; | ||
| 1416 | this.hash = end_name_hash(hash); | ||
| 1417 | 1436 | ||
| 1418 | type = LAST_NORM; | 1437 | type = LAST_NORM; |
| 1419 | if (this.name[0] == '.') switch (this.len) { | 1438 | if (name[0] == '.') switch (len) { |
| 1420 | case 2: | 1439 | case 2: |
| 1421 | if (this.name[1] == '.') { | 1440 | if (name[1] == '.') { |
| 1422 | type = LAST_DOTDOT; | 1441 | type = LAST_DOTDOT; |
| 1423 | nd->flags |= LOOKUP_JUMPED; | 1442 | nd->flags |= LOOKUP_JUMPED; |
| 1424 | } | 1443 | } |
| @@ -1437,12 +1456,18 @@ static int link_path_walk(const char *name, struct nameidata *nd) | |||
| 1437 | } | 1456 | } |
| 1438 | } | 1457 | } |
| 1439 | 1458 | ||
| 1440 | /* remove trailing slashes? */ | 1459 | if (!name[len]) |
| 1441 | if (!c) | ||
| 1442 | goto last_component; | 1460 | goto last_component; |
| 1443 | while (*++name == '/'); | 1461 | /* |
| 1444 | if (!*name) | 1462 | * If it wasn't NUL, we know it was '/'. Skip that |
| 1463 | * slash, and continue until no more slashes. | ||
| 1464 | */ | ||
| 1465 | do { | ||
| 1466 | len++; | ||
| 1467 | } while (unlikely(name[len] == '/')); | ||
| 1468 | if (!name[len]) | ||
| 1445 | goto last_component; | 1469 | goto last_component; |
| 1470 | name += len; | ||
| 1446 | 1471 | ||
| 1447 | err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW); | 1472 | err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW); |
| 1448 | if (err < 0) | 1473 | if (err < 0) |
| @@ -1775,24 +1800,21 @@ static struct dentry *lookup_hash(struct nameidata *nd) | |||
| 1775 | struct dentry *lookup_one_len(const char *name, struct dentry *base, int len) | 1800 | struct dentry *lookup_one_len(const char *name, struct dentry *base, int len) |
| 1776 | { | 1801 | { |
| 1777 | struct qstr this; | 1802 | struct qstr this; |
| 1778 | unsigned long hash; | ||
| 1779 | unsigned int c; | 1803 | unsigned int c; |
| 1780 | 1804 | ||
| 1781 | WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex)); | 1805 | WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex)); |
| 1782 | 1806 | ||
| 1783 | this.name = name; | 1807 | this.name = name; |
| 1784 | this.len = len; | 1808 | this.len = len; |
| 1809 | this.hash = full_name_hash(name, len); | ||
| 1785 | if (!len) | 1810 | if (!len) |
| 1786 | return ERR_PTR(-EACCES); | 1811 | return ERR_PTR(-EACCES); |
| 1787 | 1812 | ||
| 1788 | hash = init_name_hash(); | ||
| 1789 | while (len--) { | 1813 | while (len--) { |
| 1790 | c = *(const unsigned char *)name++; | 1814 | c = *(const unsigned char *)name++; |
| 1791 | if (c == '/' || c == '\0') | 1815 | if (c == '/' || c == '\0') |
| 1792 | return ERR_PTR(-EACCES); | 1816 | return ERR_PTR(-EACCES); |
| 1793 | hash = partial_name_hash(c, hash); | ||
| 1794 | } | 1817 | } |
| 1795 | this.hash = end_name_hash(hash); | ||
| 1796 | /* | 1818 | /* |
| 1797 | * See if the low-level filesystem might want | 1819 | * See if the low-level filesystem might want |
| 1798 | * to use its own hash.. | 1820 | * to use its own hash.. |
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 8a3d4fde2604..6afd7d6a9899 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h | |||
| @@ -70,7 +70,7 @@ extern void ioport_unmap(void __iomem *); | |||
| 70 | /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ | 70 | /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ |
| 71 | struct pci_dev; | 71 | struct pci_dev; |
| 72 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | 72 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); |
| 73 | #else | 73 | #elif defined(CONFIG_GENERIC_IOMAP) |
| 74 | struct pci_dev; | 74 | struct pci_dev; |
| 75 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 75 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
| 76 | { } | 76 | { } |
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h index e58fcf891370..ce37349860fe 100644 --- a/include/asm-generic/pci_iomap.h +++ b/include/asm-generic/pci_iomap.h | |||
| @@ -25,7 +25,7 @@ extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, | |||
| 25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) | 25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | #else | 28 | #elif defined(CONFIG_GENERIC_PCI_IOMAP) |
| 29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
| 30 | { | 30 | { |
| 31 | return NULL; | 31 | return NULL; |
diff --git a/include/drm/Kbuild b/include/drm/Kbuild index a5c0e10fd47d..1e38a19d68f6 100644 --- a/include/drm/Kbuild +++ b/include/drm/Kbuild | |||
| @@ -2,6 +2,7 @@ header-y += drm.h | |||
| 2 | header-y += drm_fourcc.h | 2 | header-y += drm_fourcc.h |
| 3 | header-y += drm_mode.h | 3 | header-y += drm_mode.h |
| 4 | header-y += drm_sarea.h | 4 | header-y += drm_sarea.h |
| 5 | header-y += exynos_drm.h | ||
| 5 | header-y += i810_drm.h | 6 | header-y += i810_drm.h |
| 6 | header-y += i915_drm.h | 7 | header-y += i915_drm.h |
| 7 | header-y += mga_drm.h | 8 | header-y += mga_drm.h |
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h index 5e120f1c5cd9..1ed3aae893a5 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
| @@ -97,15 +97,30 @@ struct drm_exynos_plane_set_zpos { | |||
| 97 | #define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \ | 97 | #define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \ |
| 98 | DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos) | 98 | DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos) |
| 99 | 99 | ||
| 100 | #ifdef __KERNEL__ | ||
| 101 | |||
| 100 | /** | 102 | /** |
| 101 | * Platform Specific Structure for DRM based FIMD. | 103 | * A structure for lcd panel information. |
| 102 | * | 104 | * |
| 103 | * @timing: default video mode for initializing | 105 | * @timing: default video mode for initializing |
| 106 | * @width_mm: physical size of lcd width. | ||
| 107 | * @height_mm: physical size of lcd height. | ||
| 108 | */ | ||
| 109 | struct exynos_drm_panel_info { | ||
| 110 | struct fb_videomode timing; | ||
| 111 | u32 width_mm; | ||
| 112 | u32 height_mm; | ||
| 113 | }; | ||
| 114 | |||
| 115 | /** | ||
| 116 | * Platform Specific Structure for DRM based FIMD. | ||
| 117 | * | ||
| 118 | * @panel: default panel info for initializing | ||
| 104 | * @default_win: default window layer number to be used for UI. | 119 | * @default_win: default window layer number to be used for UI. |
| 105 | * @bpp: default bit per pixel. | 120 | * @bpp: default bit per pixel. |
| 106 | */ | 121 | */ |
| 107 | struct exynos_drm_fimd_pdata { | 122 | struct exynos_drm_fimd_pdata { |
| 108 | struct fb_videomode timing; | 123 | struct exynos_drm_panel_info panel; |
| 109 | u32 vidcon0; | 124 | u32 vidcon0; |
| 110 | u32 vidcon1; | 125 | u32 vidcon1; |
| 111 | unsigned int default_win; | 126 | unsigned int default_win; |
| @@ -139,4 +154,5 @@ struct exynos_drm_hdmi_pdata { | |||
| 139 | unsigned int bpp; | 154 | unsigned int bpp; |
| 140 | }; | 155 | }; |
| 141 | 156 | ||
| 142 | #endif | 157 | #endif /* __KERNEL__ */ |
| 158 | #endif /* _EXYNOS_DRM_H_ */ | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index d64a55b23afd..ff5f5256d175 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -47,27 +47,6 @@ struct dentry_stat_t { | |||
| 47 | }; | 47 | }; |
| 48 | extern struct dentry_stat_t dentry_stat; | 48 | extern struct dentry_stat_t dentry_stat; |
| 49 | 49 | ||
| 50 | /* | ||
| 51 | * Compare 2 name strings, return 0 if they match, otherwise non-zero. | ||
| 52 | * The strings are both count bytes long, and count is non-zero. | ||
| 53 | */ | ||
| 54 | static inline int dentry_cmp(const unsigned char *cs, size_t scount, | ||
| 55 | const unsigned char *ct, size_t tcount) | ||
| 56 | { | ||
| 57 | int ret; | ||
| 58 | if (scount != tcount) | ||
| 59 | return 1; | ||
| 60 | do { | ||
| 61 | ret = (*cs != *ct); | ||
| 62 | if (ret) | ||
| 63 | break; | ||
| 64 | cs++; | ||
| 65 | ct++; | ||
| 66 | tcount--; | ||
| 67 | } while (tcount); | ||
| 68 | return ret; | ||
| 69 | } | ||
| 70 | |||
| 71 | /* Name hashing routines. Initial hash value */ | 50 | /* Name hashing routines. Initial hash value */ |
| 72 | /* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ | 51 | /* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ |
| 73 | #define init_name_hash() 0 | 52 | #define init_name_hash() 0 |
| @@ -89,14 +68,7 @@ static inline unsigned long end_name_hash(unsigned long hash) | |||
| 89 | } | 68 | } |
| 90 | 69 | ||
| 91 | /* Compute the hash for a name string. */ | 70 | /* Compute the hash for a name string. */ |
| 92 | static inline unsigned int | 71 | extern unsigned int full_name_hash(const unsigned char *, unsigned int); |
| 93 | full_name_hash(const unsigned char *name, unsigned int len) | ||
| 94 | { | ||
| 95 | unsigned long hash = init_name_hash(); | ||
| 96 | while (len--) | ||
| 97 | hash = partial_name_hash(*name++, hash); | ||
| 98 | return end_name_hash(hash); | ||
| 99 | } | ||
| 100 | 72 | ||
| 101 | /* | 73 | /* |
| 102 | * Try to keep struct dentry aligned on 64 byte cachelines (this will | 74 | * Try to keep struct dentry aligned on 64 byte cachelines (this will |
| @@ -309,7 +281,8 @@ extern struct dentry *d_ancestor(struct dentry *, struct dentry *); | |||
| 309 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); | 281 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); |
| 310 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); | 282 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
| 311 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); | 283 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); |
| 312 | extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, | 284 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, |
| 285 | const struct qstr *name, | ||
| 313 | unsigned *seq, struct inode **inode); | 286 | unsigned *seq, struct inode **inode); |
| 314 | 287 | ||
| 315 | /** | 288 | /** |
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index fee66317e071..35f7237ec972 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h | |||
| @@ -15,13 +15,18 @@ | |||
| 15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
| 16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
| 17 | 17 | ||
| 18 | /* | ||
| 19 | * Keep this list arranged in rough order of priority. Anything listed after | ||
| 20 | * KMSG_DUMP_OOPS will not be logged by default unless printk.always_kmsg_dump | ||
| 21 | * is passed to the kernel. | ||
| 22 | */ | ||
| 18 | enum kmsg_dump_reason { | 23 | enum kmsg_dump_reason { |
| 19 | KMSG_DUMP_OOPS, | ||
| 20 | KMSG_DUMP_PANIC, | 24 | KMSG_DUMP_PANIC, |
| 25 | KMSG_DUMP_OOPS, | ||
| 26 | KMSG_DUMP_EMERG, | ||
| 21 | KMSG_DUMP_RESTART, | 27 | KMSG_DUMP_RESTART, |
| 22 | KMSG_DUMP_HALT, | 28 | KMSG_DUMP_HALT, |
| 23 | KMSG_DUMP_POWEROFF, | 29 | KMSG_DUMP_POWEROFF, |
| 24 | KMSG_DUMP_EMERG, | ||
| 25 | }; | 30 | }; |
| 26 | 31 | ||
| 27 | /** | 32 | /** |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 4d34356fe644..b80de520670b 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -129,7 +129,6 @@ extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | |||
| 129 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, | 129 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, |
| 130 | struct page *newpage); | 130 | struct page *newpage); |
| 131 | 131 | ||
| 132 | extern void mem_cgroup_reset_owner(struct page *page); | ||
| 133 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 132 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
| 134 | extern int do_swap_account; | 133 | extern int do_swap_account; |
| 135 | #endif | 134 | #endif |
| @@ -392,10 +391,6 @@ static inline void mem_cgroup_replace_page_cache(struct page *oldpage, | |||
| 392 | struct page *newpage) | 391 | struct page *newpage) |
| 393 | { | 392 | { |
| 394 | } | 393 | } |
| 395 | |||
| 396 | static inline void mem_cgroup_reset_owner(struct page *page) | ||
| 397 | { | ||
| 398 | } | ||
| 399 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 394 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
| 400 | 395 | ||
| 401 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | 396 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 32cd1f67462e..21638ae14e07 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -348,9 +348,9 @@ do { \ | |||
| 348 | #define _this_cpu_generic_to_op(pcp, val, op) \ | 348 | #define _this_cpu_generic_to_op(pcp, val, op) \ |
| 349 | do { \ | 349 | do { \ |
| 350 | unsigned long flags; \ | 350 | unsigned long flags; \ |
| 351 | local_irq_save(flags); \ | 351 | raw_local_irq_save(flags); \ |
| 352 | *__this_cpu_ptr(&(pcp)) op val; \ | 352 | *__this_cpu_ptr(&(pcp)) op val; \ |
| 353 | local_irq_restore(flags); \ | 353 | raw_local_irq_restore(flags); \ |
| 354 | } while (0) | 354 | } while (0) |
| 355 | 355 | ||
| 356 | #ifndef this_cpu_write | 356 | #ifndef this_cpu_write |
| @@ -449,10 +449,10 @@ do { \ | |||
| 449 | ({ \ | 449 | ({ \ |
| 450 | typeof(pcp) ret__; \ | 450 | typeof(pcp) ret__; \ |
| 451 | unsigned long flags; \ | 451 | unsigned long flags; \ |
| 452 | local_irq_save(flags); \ | 452 | raw_local_irq_save(flags); \ |
| 453 | __this_cpu_add(pcp, val); \ | 453 | __this_cpu_add(pcp, val); \ |
| 454 | ret__ = __this_cpu_read(pcp); \ | 454 | ret__ = __this_cpu_read(pcp); \ |
| 455 | local_irq_restore(flags); \ | 455 | raw_local_irq_restore(flags); \ |
| 456 | ret__; \ | 456 | ret__; \ |
| 457 | }) | 457 | }) |
| 458 | 458 | ||
| @@ -479,10 +479,10 @@ do { \ | |||
| 479 | #define _this_cpu_generic_xchg(pcp, nval) \ | 479 | #define _this_cpu_generic_xchg(pcp, nval) \ |
| 480 | ({ typeof(pcp) ret__; \ | 480 | ({ typeof(pcp) ret__; \ |
| 481 | unsigned long flags; \ | 481 | unsigned long flags; \ |
| 482 | local_irq_save(flags); \ | 482 | raw_local_irq_save(flags); \ |
| 483 | ret__ = __this_cpu_read(pcp); \ | 483 | ret__ = __this_cpu_read(pcp); \ |
| 484 | __this_cpu_write(pcp, nval); \ | 484 | __this_cpu_write(pcp, nval); \ |
| 485 | local_irq_restore(flags); \ | 485 | raw_local_irq_restore(flags); \ |
| 486 | ret__; \ | 486 | ret__; \ |
| 487 | }) | 487 | }) |
| 488 | 488 | ||
| @@ -507,11 +507,11 @@ do { \ | |||
| 507 | ({ \ | 507 | ({ \ |
| 508 | typeof(pcp) ret__; \ | 508 | typeof(pcp) ret__; \ |
| 509 | unsigned long flags; \ | 509 | unsigned long flags; \ |
| 510 | local_irq_save(flags); \ | 510 | raw_local_irq_save(flags); \ |
| 511 | ret__ = __this_cpu_read(pcp); \ | 511 | ret__ = __this_cpu_read(pcp); \ |
| 512 | if (ret__ == (oval)) \ | 512 | if (ret__ == (oval)) \ |
| 513 | __this_cpu_write(pcp, nval); \ | 513 | __this_cpu_write(pcp, nval); \ |
| 514 | local_irq_restore(flags); \ | 514 | raw_local_irq_restore(flags); \ |
| 515 | ret__; \ | 515 | ret__; \ |
| 516 | }) | 516 | }) |
| 517 | 517 | ||
| @@ -544,10 +544,10 @@ do { \ | |||
| 544 | ({ \ | 544 | ({ \ |
| 545 | int ret__; \ | 545 | int ret__; \ |
| 546 | unsigned long flags; \ | 546 | unsigned long flags; \ |
| 547 | local_irq_save(flags); \ | 547 | raw_local_irq_save(flags); \ |
| 548 | ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \ | 548 | ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \ |
| 549 | oval1, oval2, nval1, nval2); \ | 549 | oval1, oval2, nval1, nval2); \ |
| 550 | local_irq_restore(flags); \ | 550 | raw_local_irq_restore(flags); \ |
| 551 | ret__; \ | 551 | ret__; \ |
| 552 | }) | 552 | }) |
| 553 | 553 | ||
| @@ -718,12 +718,13 @@ do { \ | |||
| 718 | # ifndef __this_cpu_add_return_8 | 718 | # ifndef __this_cpu_add_return_8 |
| 719 | # define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) | 719 | # define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) |
| 720 | # endif | 720 | # endif |
| 721 | # define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | 721 | # define __this_cpu_add_return(pcp, val) \ |
| 722 | __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val) | ||
| 722 | #endif | 723 | #endif |
| 723 | 724 | ||
| 724 | #define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | 725 | #define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(val)) |
| 725 | #define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | 726 | #define __this_cpu_inc_return(pcp) __this_cpu_add_return(pcp, 1) |
| 726 | #define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | 727 | #define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1) |
| 727 | 728 | ||
| 728 | #define __this_cpu_generic_xchg(pcp, nval) \ | 729 | #define __this_cpu_generic_xchg(pcp, nval) \ |
| 729 | ({ typeof(pcp) ret__; \ | 730 | ({ typeof(pcp) ret__; \ |
diff --git a/include/linux/regset.h b/include/linux/regset.h index 8abee6556223..686f37327a49 100644 --- a/include/linux/regset.h +++ b/include/linux/regset.h | |||
| @@ -335,8 +335,11 @@ static inline int copy_regset_to_user(struct task_struct *target, | |||
| 335 | { | 335 | { |
| 336 | const struct user_regset *regset = &view->regsets[setno]; | 336 | const struct user_regset *regset = &view->regsets[setno]; |
| 337 | 337 | ||
| 338 | if (!regset->get) | ||
| 339 | return -EOPNOTSUPP; | ||
| 340 | |||
| 338 | if (!access_ok(VERIFY_WRITE, data, size)) | 341 | if (!access_ok(VERIFY_WRITE, data, size)) |
| 339 | return -EIO; | 342 | return -EFAULT; |
| 340 | 343 | ||
| 341 | return regset->get(target, regset, offset, size, NULL, data); | 344 | return regset->get(target, regset, offset, size, NULL, data); |
| 342 | } | 345 | } |
| @@ -358,8 +361,11 @@ static inline int copy_regset_from_user(struct task_struct *target, | |||
| 358 | { | 361 | { |
| 359 | const struct user_regset *regset = &view->regsets[setno]; | 362 | const struct user_regset *regset = &view->regsets[setno]; |
| 360 | 363 | ||
| 364 | if (!regset->set) | ||
| 365 | return -EOPNOTSUPP; | ||
| 366 | |||
| 361 | if (!access_ok(VERIFY_READ, data, size)) | 367 | if (!access_ok(VERIFY_READ, data, size)) |
| 362 | return -EIO; | 368 | return -EFAULT; |
| 363 | 369 | ||
| 364 | return regset->set(target, regset, offset, size, NULL, data); | 370 | return regset->set(target, regset, offset, size, NULL, data); |
| 365 | } | 371 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7d379a6bfd88..0657368bd78f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1777,7 +1777,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
| 1777 | /* | 1777 | /* |
| 1778 | * Per process flags | 1778 | * Per process flags |
| 1779 | */ | 1779 | */ |
| 1780 | #define PF_STARTING 0x00000002 /* being created */ | ||
| 1781 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1780 | #define PF_EXITING 0x00000004 /* getting shut down */ |
| 1782 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1781 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ |
| 1783 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ | 1782 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ |
| @@ -2371,7 +2370,7 @@ static inline int thread_group_empty(struct task_struct *p) | |||
| 2371 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring | 2370 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring |
| 2372 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | 2371 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
| 2373 | * pins the final release of task.io_context. Also protects ->cpuset and | 2372 | * pins the final release of task.io_context. Also protects ->cpuset and |
| 2374 | * ->cgroup.subsys[]. | 2373 | * ->cgroup.subsys[]. And ->vfork_done. |
| 2375 | * | 2374 | * |
| 2376 | * Nests both inside and outside of read_lock(&tasklist_lock). | 2375 | * Nests both inside and outside of read_lock(&tasklist_lock). |
| 2377 | * It must not be nested with write_lock_irq(&tasklist_lock), | 2376 | * It must not be nested with write_lock_irq(&tasklist_lock), |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 46a85c9e1f25..3c7ffdb40dc6 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -412,7 +412,8 @@ struct tcp_sock { | |||
| 412 | 412 | ||
| 413 | struct tcp_sack_block recv_sack_cache[4]; | 413 | struct tcp_sack_block recv_sack_cache[4]; |
| 414 | 414 | ||
| 415 | struct sk_buff *highest_sack; /* highest skb with SACK received | 415 | struct sk_buff *highest_sack; /* skb just after the highest |
| 416 | * skb with SACKed bit set | ||
| 416 | * (validity guaranteed only if | 417 | * (validity guaranteed only if |
| 417 | * sacked_out > 0) | 418 | * sacked_out > 0) |
| 418 | */ | 419 | */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 42c29bfbcee3..2d80c291fffb 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -1364,8 +1364,9 @@ static inline void tcp_push_pending_frames(struct sock *sk) | |||
| 1364 | } | 1364 | } |
| 1365 | } | 1365 | } |
| 1366 | 1366 | ||
| 1367 | /* Start sequence of the highest skb with SACKed bit, valid only if | 1367 | /* Start sequence of the skb just after the highest skb with SACKed |
| 1368 | * sacked > 0 or when the caller has ensured validity by itself. | 1368 | * bit, valid only if sacked_out > 0 or when the caller has ensured |
| 1369 | * validity by itself. | ||
| 1369 | */ | 1370 | */ |
| 1370 | static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) | 1371 | static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) |
| 1371 | { | 1372 | { |
diff --git a/kernel/fork.c b/kernel/fork.c index e2cd3e2a5ae8..26a7a6707fa7 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -668,6 +668,38 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode) | |||
| 668 | return mm; | 668 | return mm; |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | static void complete_vfork_done(struct task_struct *tsk) | ||
| 672 | { | ||
| 673 | struct completion *vfork; | ||
| 674 | |||
| 675 | task_lock(tsk); | ||
| 676 | vfork = tsk->vfork_done; | ||
| 677 | if (likely(vfork)) { | ||
| 678 | tsk->vfork_done = NULL; | ||
| 679 | complete(vfork); | ||
| 680 | } | ||
| 681 | task_unlock(tsk); | ||
| 682 | } | ||
| 683 | |||
| 684 | static int wait_for_vfork_done(struct task_struct *child, | ||
| 685 | struct completion *vfork) | ||
| 686 | { | ||
| 687 | int killed; | ||
| 688 | |||
| 689 | freezer_do_not_count(); | ||
| 690 | killed = wait_for_completion_killable(vfork); | ||
| 691 | freezer_count(); | ||
| 692 | |||
| 693 | if (killed) { | ||
| 694 | task_lock(child); | ||
| 695 | child->vfork_done = NULL; | ||
| 696 | task_unlock(child); | ||
| 697 | } | ||
| 698 | |||
| 699 | put_task_struct(child); | ||
| 700 | return killed; | ||
| 701 | } | ||
| 702 | |||
| 671 | /* Please note the differences between mmput and mm_release. | 703 | /* Please note the differences between mmput and mm_release. |
| 672 | * mmput is called whenever we stop holding onto a mm_struct, | 704 | * mmput is called whenever we stop holding onto a mm_struct, |
| 673 | * error success whatever. | 705 | * error success whatever. |
| @@ -683,8 +715,6 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode) | |||
| 683 | */ | 715 | */ |
| 684 | void mm_release(struct task_struct *tsk, struct mm_struct *mm) | 716 | void mm_release(struct task_struct *tsk, struct mm_struct *mm) |
| 685 | { | 717 | { |
| 686 | struct completion *vfork_done = tsk->vfork_done; | ||
| 687 | |||
| 688 | /* Get rid of any futexes when releasing the mm */ | 718 | /* Get rid of any futexes when releasing the mm */ |
| 689 | #ifdef CONFIG_FUTEX | 719 | #ifdef CONFIG_FUTEX |
| 690 | if (unlikely(tsk->robust_list)) { | 720 | if (unlikely(tsk->robust_list)) { |
| @@ -704,17 +734,15 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
| 704 | /* Get rid of any cached register state */ | 734 | /* Get rid of any cached register state */ |
| 705 | deactivate_mm(tsk, mm); | 735 | deactivate_mm(tsk, mm); |
| 706 | 736 | ||
| 707 | /* notify parent sleeping on vfork() */ | 737 | if (tsk->vfork_done) |
| 708 | if (vfork_done) { | 738 | complete_vfork_done(tsk); |
| 709 | tsk->vfork_done = NULL; | ||
| 710 | complete(vfork_done); | ||
| 711 | } | ||
| 712 | 739 | ||
| 713 | /* | 740 | /* |
| 714 | * If we're exiting normally, clear a user-space tid field if | 741 | * If we're exiting normally, clear a user-space tid field if |
| 715 | * requested. We leave this alone when dying by signal, to leave | 742 | * requested. We leave this alone when dying by signal, to leave |
| 716 | * the value intact in a core dump, and to save the unnecessary | 743 | * the value intact in a core dump, and to save the unnecessary |
| 717 | * trouble otherwise. Userland only wants this done for a sys_exit. | 744 | * trouble, say, a killed vfork parent shouldn't touch this mm. |
| 745 | * Userland only wants this done for a sys_exit. | ||
| 718 | */ | 746 | */ |
| 719 | if (tsk->clear_child_tid) { | 747 | if (tsk->clear_child_tid) { |
| 720 | if (!(tsk->flags & PF_SIGNALED) && | 748 | if (!(tsk->flags & PF_SIGNALED) && |
| @@ -1018,7 +1046,6 @@ static void copy_flags(unsigned long clone_flags, struct task_struct *p) | |||
| 1018 | 1046 | ||
| 1019 | new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER); | 1047 | new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER); |
| 1020 | new_flags |= PF_FORKNOEXEC; | 1048 | new_flags |= PF_FORKNOEXEC; |
| 1021 | new_flags |= PF_STARTING; | ||
| 1022 | p->flags = new_flags; | 1049 | p->flags = new_flags; |
| 1023 | } | 1050 | } |
| 1024 | 1051 | ||
| @@ -1548,16 +1575,9 @@ long do_fork(unsigned long clone_flags, | |||
| 1548 | if (clone_flags & CLONE_VFORK) { | 1575 | if (clone_flags & CLONE_VFORK) { |
| 1549 | p->vfork_done = &vfork; | 1576 | p->vfork_done = &vfork; |
| 1550 | init_completion(&vfork); | 1577 | init_completion(&vfork); |
| 1578 | get_task_struct(p); | ||
| 1551 | } | 1579 | } |
| 1552 | 1580 | ||
| 1553 | /* | ||
| 1554 | * We set PF_STARTING at creation in case tracing wants to | ||
| 1555 | * use this to distinguish a fully live task from one that | ||
| 1556 | * hasn't finished SIGSTOP raising yet. Now we clear it | ||
| 1557 | * and set the child going. | ||
| 1558 | */ | ||
| 1559 | p->flags &= ~PF_STARTING; | ||
| 1560 | |||
| 1561 | wake_up_new_task(p); | 1581 | wake_up_new_task(p); |
| 1562 | 1582 | ||
| 1563 | /* forking complete and child started to run, tell ptracer */ | 1583 | /* forking complete and child started to run, tell ptracer */ |
| @@ -1565,10 +1585,8 @@ long do_fork(unsigned long clone_flags, | |||
| 1565 | ptrace_event(trace, nr); | 1585 | ptrace_event(trace, nr); |
| 1566 | 1586 | ||
| 1567 | if (clone_flags & CLONE_VFORK) { | 1587 | if (clone_flags & CLONE_VFORK) { |
| 1568 | freezer_do_not_count(); | 1588 | if (!wait_for_vfork_done(p, &vfork)) |
| 1569 | wait_for_completion(&vfork); | 1589 | ptrace_event(PTRACE_EVENT_VFORK_DONE, nr); |
| 1570 | freezer_count(); | ||
| 1571 | ptrace_event(PTRACE_EVENT_VFORK_DONE, nr); | ||
| 1572 | } | 1590 | } |
| 1573 | } else { | 1591 | } else { |
| 1574 | nr = PTR_ERR(p); | 1592 | nr = PTR_ERR(p); |
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 2e48ec0c2e91..c21449f85a2a 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
| @@ -119,15 +119,20 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) | |||
| 119 | * For preemptible RCU it is sufficient to call rcu_read_unlock in order | 119 | * For preemptible RCU it is sufficient to call rcu_read_unlock in order |
| 120 | * to exit the grace period. For classic RCU, a reschedule is required. | 120 | * to exit the grace period. For classic RCU, a reschedule is required. |
| 121 | */ | 121 | */ |
| 122 | static void rcu_lock_break(struct task_struct *g, struct task_struct *t) | 122 | static bool rcu_lock_break(struct task_struct *g, struct task_struct *t) |
| 123 | { | 123 | { |
| 124 | bool can_cont; | ||
| 125 | |||
| 124 | get_task_struct(g); | 126 | get_task_struct(g); |
| 125 | get_task_struct(t); | 127 | get_task_struct(t); |
| 126 | rcu_read_unlock(); | 128 | rcu_read_unlock(); |
| 127 | cond_resched(); | 129 | cond_resched(); |
| 128 | rcu_read_lock(); | 130 | rcu_read_lock(); |
| 131 | can_cont = pid_alive(g) && pid_alive(t); | ||
| 129 | put_task_struct(t); | 132 | put_task_struct(t); |
| 130 | put_task_struct(g); | 133 | put_task_struct(g); |
| 134 | |||
| 135 | return can_cont; | ||
| 131 | } | 136 | } |
| 132 | 137 | ||
| 133 | /* | 138 | /* |
| @@ -154,9 +159,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) | |||
| 154 | goto unlock; | 159 | goto unlock; |
| 155 | if (!--batch_count) { | 160 | if (!--batch_count) { |
| 156 | batch_count = HUNG_TASK_BATCHING; | 161 | batch_count = HUNG_TASK_BATCHING; |
| 157 | rcu_lock_break(g, t); | 162 | if (!rcu_lock_break(g, t)) |
| 158 | /* Exit if t or g was unhashed during refresh. */ | ||
| 159 | if (t->state == TASK_DEAD || g->state == TASK_DEAD) | ||
| 160 | goto unlock; | 163 | goto unlock; |
| 161 | } | 164 | } |
| 162 | /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ | 165 | /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9788c0ec6f43..c62b8546cc90 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
| @@ -1334,8 +1334,10 @@ int __kprobes register_kprobe(struct kprobe *p) | |||
| 1334 | if (!kernel_text_address((unsigned long) p->addr) || | 1334 | if (!kernel_text_address((unsigned long) p->addr) || |
| 1335 | in_kprobes_functions((unsigned long) p->addr) || | 1335 | in_kprobes_functions((unsigned long) p->addr) || |
| 1336 | ftrace_text_reserved(p->addr, p->addr) || | 1336 | ftrace_text_reserved(p->addr, p->addr) || |
| 1337 | jump_label_text_reserved(p->addr, p->addr)) | 1337 | jump_label_text_reserved(p->addr, p->addr)) { |
| 1338 | goto fail_with_jump_label; | 1338 | ret = -EINVAL; |
| 1339 | goto cannot_probe; | ||
| 1340 | } | ||
| 1339 | 1341 | ||
| 1340 | /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */ | 1342 | /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */ |
| 1341 | p->flags &= KPROBE_FLAG_DISABLED; | 1343 | p->flags &= KPROBE_FLAG_DISABLED; |
| @@ -1352,7 +1354,7 @@ int __kprobes register_kprobe(struct kprobe *p) | |||
| 1352 | * its code to prohibit unexpected unloading. | 1354 | * its code to prohibit unexpected unloading. |
| 1353 | */ | 1355 | */ |
| 1354 | if (unlikely(!try_module_get(probed_mod))) | 1356 | if (unlikely(!try_module_get(probed_mod))) |
| 1355 | goto fail_with_jump_label; | 1357 | goto cannot_probe; |
| 1356 | 1358 | ||
| 1357 | /* | 1359 | /* |
| 1358 | * If the module freed .init.text, we couldn't insert | 1360 | * If the module freed .init.text, we couldn't insert |
| @@ -1361,7 +1363,7 @@ int __kprobes register_kprobe(struct kprobe *p) | |||
| 1361 | if (within_module_init((unsigned long)p->addr, probed_mod) && | 1363 | if (within_module_init((unsigned long)p->addr, probed_mod) && |
| 1362 | probed_mod->state != MODULE_STATE_COMING) { | 1364 | probed_mod->state != MODULE_STATE_COMING) { |
| 1363 | module_put(probed_mod); | 1365 | module_put(probed_mod); |
| 1364 | goto fail_with_jump_label; | 1366 | goto cannot_probe; |
| 1365 | } | 1367 | } |
| 1366 | /* ret will be updated by following code */ | 1368 | /* ret will be updated by following code */ |
| 1367 | } | 1369 | } |
| @@ -1409,7 +1411,7 @@ out: | |||
| 1409 | 1411 | ||
| 1410 | return ret; | 1412 | return ret; |
| 1411 | 1413 | ||
| 1412 | fail_with_jump_label: | 1414 | cannot_probe: |
| 1413 | preempt_enable(); | 1415 | preempt_enable(); |
| 1414 | jump_label_unlock(); | 1416 | jump_label_unlock(); |
| 1415 | return ret; | 1417 | return ret; |
diff --git a/kernel/printk.c b/kernel/printk.c index 13c0a1143f49..32690a0b7a18 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -702,6 +702,9 @@ static bool printk_time = 0; | |||
| 702 | #endif | 702 | #endif |
| 703 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); | 703 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); |
| 704 | 704 | ||
| 705 | static bool always_kmsg_dump; | ||
| 706 | module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR); | ||
| 707 | |||
| 705 | /* Check if we have any console registered that can be called early in boot. */ | 708 | /* Check if we have any console registered that can be called early in boot. */ |
| 706 | static int have_callable_console(void) | 709 | static int have_callable_console(void) |
| 707 | { | 710 | { |
| @@ -1732,6 +1735,9 @@ void kmsg_dump(enum kmsg_dump_reason reason) | |||
| 1732 | unsigned long l1, l2; | 1735 | unsigned long l1, l2; |
| 1733 | unsigned long flags; | 1736 | unsigned long flags; |
| 1734 | 1737 | ||
| 1738 | if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump) | ||
| 1739 | return; | ||
| 1740 | |||
| 1735 | /* Theoretically, the log could move on after we do this, but | 1741 | /* Theoretically, the log could move on after we do this, but |
| 1736 | there's not a lot we can do about that. The new messages | 1742 | there's not a lot we can do about that. The new messages |
| 1737 | will overwrite the start of what we dump. */ | 1743 | will overwrite the start of what we dump. */ |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b342f57879e6..33a0676ea744 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -6728,7 +6728,7 @@ int __init sched_create_sysfs_power_savings_entries(struct device *dev) | |||
| 6728 | static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action, | 6728 | static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action, |
| 6729 | void *hcpu) | 6729 | void *hcpu) |
| 6730 | { | 6730 | { |
| 6731 | switch (action & ~CPU_TASKS_FROZEN) { | 6731 | switch (action) { |
| 6732 | case CPU_ONLINE: | 6732 | case CPU_ONLINE: |
| 6733 | case CPU_DOWN_FAILED: | 6733 | case CPU_DOWN_FAILED: |
| 6734 | cpuset_update_active_cpus(); | 6734 | cpuset_update_active_cpus(); |
| @@ -6741,7 +6741,7 @@ static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action, | |||
| 6741 | static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action, | 6741 | static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action, |
| 6742 | void *hcpu) | 6742 | void *hcpu) |
| 6743 | { | 6743 | { |
| 6744 | switch (action & ~CPU_TASKS_FROZEN) { | 6744 | switch (action) { |
| 6745 | case CPU_DOWN_PREPARE: | 6745 | case CPU_DOWN_PREPARE: |
| 6746 | cpuset_update_active_cpus(); | 6746 | cpuset_update_active_cpus(); |
| 6747 | return NOTIFY_OK; | 6747 | return NOTIFY_OK; |
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 77cb245f8e7b..0ab9ae8057f0 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
| @@ -818,17 +818,9 @@ static int __init fixup_activate(void *addr, enum debug_obj_state state) | |||
| 818 | if (obj->static_init == 1) { | 818 | if (obj->static_init == 1) { |
| 819 | debug_object_init(obj, &descr_type_test); | 819 | debug_object_init(obj, &descr_type_test); |
| 820 | debug_object_activate(obj, &descr_type_test); | 820 | debug_object_activate(obj, &descr_type_test); |
| 821 | /* | 821 | return 0; |
| 822 | * Real code should return 0 here ! This is | ||
| 823 | * not a fixup of some bad behaviour. We | ||
| 824 | * merily call the debug_init function to keep | ||
| 825 | * track of the object. | ||
| 826 | */ | ||
| 827 | return 1; | ||
| 828 | } else { | ||
| 829 | /* Real code needs to emit a warning here */ | ||
| 830 | } | 822 | } |
| 831 | return 0; | 823 | return 1; |
| 832 | 824 | ||
| 833 | case ODEBUG_STATE_ACTIVE: | 825 | case ODEBUG_STATE_ACTIVE: |
| 834 | debug_object_deactivate(obj, &descr_type_test); | 826 | debug_object_deactivate(obj, &descr_type_test); |
| @@ -967,7 +959,7 @@ static void __init debug_objects_selftest(void) | |||
| 967 | 959 | ||
| 968 | obj.static_init = 1; | 960 | obj.static_init = 1; |
| 969 | debug_object_activate(&obj, &descr_type_test); | 961 | debug_object_activate(&obj, &descr_type_test); |
| 970 | if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings)) | 962 | if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings)) |
| 971 | goto out; | 963 | goto out; |
| 972 | debug_object_init(&obj, &descr_type_test); | 964 | debug_object_init(&obj, &descr_type_test); |
| 973 | if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings)) | 965 | if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings)) |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 91d3efb25d15..8f7fc394f636 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
| @@ -671,6 +671,7 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct *mm, | |||
| 671 | set_pmd_at(mm, haddr, pmd, entry); | 671 | set_pmd_at(mm, haddr, pmd, entry); |
| 672 | prepare_pmd_huge_pte(pgtable, mm); | 672 | prepare_pmd_huge_pte(pgtable, mm); |
| 673 | add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR); | 673 | add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR); |
| 674 | mm->nr_ptes++; | ||
| 674 | spin_unlock(&mm->page_table_lock); | 675 | spin_unlock(&mm->page_table_lock); |
| 675 | } | 676 | } |
| 676 | 677 | ||
| @@ -789,6 +790,7 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
| 789 | pmd = pmd_mkold(pmd_wrprotect(pmd)); | 790 | pmd = pmd_mkold(pmd_wrprotect(pmd)); |
| 790 | set_pmd_at(dst_mm, addr, dst_pmd, pmd); | 791 | set_pmd_at(dst_mm, addr, dst_pmd, pmd); |
| 791 | prepare_pmd_huge_pte(pgtable, dst_mm); | 792 | prepare_pmd_huge_pte(pgtable, dst_mm); |
| 793 | dst_mm->nr_ptes++; | ||
| 792 | 794 | ||
| 793 | ret = 0; | 795 | ret = 0; |
| 794 | out_unlock: | 796 | out_unlock: |
| @@ -887,7 +889,6 @@ static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm, | |||
| 887 | } | 889 | } |
| 888 | kfree(pages); | 890 | kfree(pages); |
| 889 | 891 | ||
| 890 | mm->nr_ptes++; | ||
| 891 | smp_wmb(); /* make pte visible before pmd */ | 892 | smp_wmb(); /* make pte visible before pmd */ |
| 892 | pmd_populate(mm, pmd, pgtable); | 893 | pmd_populate(mm, pmd, pgtable); |
| 893 | page_remove_rmap(page); | 894 | page_remove_rmap(page); |
| @@ -1047,6 +1048,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, | |||
| 1047 | VM_BUG_ON(page_mapcount(page) < 0); | 1048 | VM_BUG_ON(page_mapcount(page) < 0); |
| 1048 | add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR); | 1049 | add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR); |
| 1049 | VM_BUG_ON(!PageHead(page)); | 1050 | VM_BUG_ON(!PageHead(page)); |
| 1051 | tlb->mm->nr_ptes--; | ||
| 1050 | spin_unlock(&tlb->mm->page_table_lock); | 1052 | spin_unlock(&tlb->mm->page_table_lock); |
| 1051 | tlb_remove_page(tlb, page); | 1053 | tlb_remove_page(tlb, page); |
| 1052 | pte_free(tlb->mm, pgtable); | 1054 | pte_free(tlb->mm, pgtable); |
| @@ -1375,7 +1377,6 @@ static int __split_huge_page_map(struct page *page, | |||
| 1375 | pte_unmap(pte); | 1377 | pte_unmap(pte); |
| 1376 | } | 1378 | } |
| 1377 | 1379 | ||
| 1378 | mm->nr_ptes++; | ||
| 1379 | smp_wmb(); /* make pte visible before pmd */ | 1380 | smp_wmb(); /* make pte visible before pmd */ |
| 1380 | /* | 1381 | /* |
| 1381 | * Up to this point the pmd is present and huge and | 1382 | * Up to this point the pmd is present and huge and |
| @@ -1988,7 +1989,6 @@ static void collapse_huge_page(struct mm_struct *mm, | |||
| 1988 | set_pmd_at(mm, address, pmd, _pmd); | 1989 | set_pmd_at(mm, address, pmd, _pmd); |
| 1989 | update_mmu_cache(vma, address, _pmd); | 1990 | update_mmu_cache(vma, address, _pmd); |
| 1990 | prepare_pmd_huge_pte(pgtable, mm); | 1991 | prepare_pmd_huge_pte(pgtable, mm); |
| 1991 | mm->nr_ptes--; | ||
| 1992 | spin_unlock(&mm->page_table_lock); | 1992 | spin_unlock(&mm->page_table_lock); |
| 1993 | 1993 | ||
| 1994 | #ifndef CONFIG_NUMA | 1994 | #ifndef CONFIG_NUMA |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 5f34bd8dda34..a876871f6be5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
| @@ -2277,8 +2277,8 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, | |||
| 2277 | set_page_dirty(page); | 2277 | set_page_dirty(page); |
| 2278 | list_add(&page->lru, &page_list); | 2278 | list_add(&page->lru, &page_list); |
| 2279 | } | 2279 | } |
| 2280 | spin_unlock(&mm->page_table_lock); | ||
| 2281 | flush_tlb_range(vma, start, end); | 2280 | flush_tlb_range(vma, start, end); |
| 2281 | spin_unlock(&mm->page_table_lock); | ||
| 2282 | mmu_notifier_invalidate_range_end(mm, start, end); | 2282 | mmu_notifier_invalidate_range_end(mm, start, end); |
| 2283 | list_for_each_entry_safe(page, tmp, &page_list, lru) { | 2283 | list_for_each_entry_safe(page, tmp, &page_list, lru) { |
| 2284 | page_remove_rmap(page); | 2284 | page_remove_rmap(page); |
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <linux/kthread.h> | 28 | #include <linux/kthread.h> |
| 29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
| 30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
| 31 | #include <linux/memcontrol.h> | ||
| 32 | #include <linux/rbtree.h> | 31 | #include <linux/rbtree.h> |
| 33 | #include <linux/memory.h> | 32 | #include <linux/memory.h> |
| 34 | #include <linux/mmu_notifier.h> | 33 | #include <linux/mmu_notifier.h> |
| @@ -1572,16 +1571,6 @@ struct page *ksm_does_need_to_copy(struct page *page, | |||
| 1572 | 1571 | ||
| 1573 | new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); | 1572 | new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); |
| 1574 | if (new_page) { | 1573 | if (new_page) { |
| 1575 | /* | ||
| 1576 | * The memcg-specific accounting when moving | ||
| 1577 | * pages around the LRU lists relies on the | ||
| 1578 | * page's owner (memcg) to be valid. Usually, | ||
| 1579 | * pages are assigned to a new owner before | ||
| 1580 | * being put on the LRU list, but since this | ||
| 1581 | * is not the case here, the stale owner from | ||
| 1582 | * a previous allocation cycle must be reset. | ||
| 1583 | */ | ||
| 1584 | mem_cgroup_reset_owner(new_page); | ||
| 1585 | copy_user_highpage(new_page, page, address, vma); | 1574 | copy_user_highpage(new_page, page, address, vma); |
| 1586 | 1575 | ||
| 1587 | SetPageDirty(new_page); | 1576 | SetPageDirty(new_page); |
diff --git a/mm/memblock.c b/mm/memblock.c index 77b5f227e1d8..99f285599501 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
| @@ -99,9 +99,6 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start, | |||
| 99 | phys_addr_t this_start, this_end, cand; | 99 | phys_addr_t this_start, this_end, cand; |
| 100 | u64 i; | 100 | u64 i; |
| 101 | 101 | ||
| 102 | /* align @size to avoid excessive fragmentation on reserved array */ | ||
| 103 | size = round_up(size, align); | ||
| 104 | |||
| 105 | /* pump up @end */ | 102 | /* pump up @end */ |
| 106 | if (end == MEMBLOCK_ALLOC_ACCESSIBLE) | 103 | if (end == MEMBLOCK_ALLOC_ACCESSIBLE) |
| 107 | end = memblock.current_limit; | 104 | end = memblock.current_limit; |
| @@ -731,6 +728,9 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, | |||
| 731 | { | 728 | { |
| 732 | phys_addr_t found; | 729 | phys_addr_t found; |
| 733 | 730 | ||
| 731 | /* align @size to avoid excessive fragmentation on reserved array */ | ||
| 732 | size = round_up(size, align); | ||
| 733 | |||
| 734 | found = memblock_find_in_range_node(0, max_addr, size, align, nid); | 734 | found = memblock_find_in_range_node(0, max_addr, size, align, nid); |
| 735 | if (found && !memblock_reserve(found, size)) | 735 | if (found && !memblock_reserve(found, size)) |
| 736 | return found; | 736 | return found; |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 228d6461c12a..5585dc3d3646 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -1042,6 +1042,19 @@ struct lruvec *mem_cgroup_lru_add_list(struct zone *zone, struct page *page, | |||
| 1042 | 1042 | ||
| 1043 | pc = lookup_page_cgroup(page); | 1043 | pc = lookup_page_cgroup(page); |
| 1044 | memcg = pc->mem_cgroup; | 1044 | memcg = pc->mem_cgroup; |
| 1045 | |||
| 1046 | /* | ||
| 1047 | * Surreptitiously switch any uncharged page to root: | ||
| 1048 | * an uncharged page off lru does nothing to secure | ||
| 1049 | * its former mem_cgroup from sudden removal. | ||
| 1050 | * | ||
| 1051 | * Our caller holds lru_lock, and PageCgroupUsed is updated | ||
| 1052 | * under page_cgroup lock: between them, they make all uses | ||
| 1053 | * of pc->mem_cgroup safe. | ||
| 1054 | */ | ||
| 1055 | if (!PageCgroupUsed(pc) && memcg != root_mem_cgroup) | ||
| 1056 | pc->mem_cgroup = memcg = root_mem_cgroup; | ||
| 1057 | |||
| 1045 | mz = page_cgroup_zoneinfo(memcg, page); | 1058 | mz = page_cgroup_zoneinfo(memcg, page); |
| 1046 | /* compound_order() is stabilized through lru_lock */ | 1059 | /* compound_order() is stabilized through lru_lock */ |
| 1047 | MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page); | 1060 | MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page); |
| @@ -2408,8 +2421,12 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg, | |||
| 2408 | struct page *page, | 2421 | struct page *page, |
| 2409 | unsigned int nr_pages, | 2422 | unsigned int nr_pages, |
| 2410 | struct page_cgroup *pc, | 2423 | struct page_cgroup *pc, |
| 2411 | enum charge_type ctype) | 2424 | enum charge_type ctype, |
| 2425 | bool lrucare) | ||
| 2412 | { | 2426 | { |
| 2427 | struct zone *uninitialized_var(zone); | ||
| 2428 | bool was_on_lru = false; | ||
| 2429 | |||
| 2413 | lock_page_cgroup(pc); | 2430 | lock_page_cgroup(pc); |
| 2414 | if (unlikely(PageCgroupUsed(pc))) { | 2431 | if (unlikely(PageCgroupUsed(pc))) { |
| 2415 | unlock_page_cgroup(pc); | 2432 | unlock_page_cgroup(pc); |
| @@ -2420,6 +2437,21 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg, | |||
| 2420 | * we don't need page_cgroup_lock about tail pages, becase they are not | 2437 | * we don't need page_cgroup_lock about tail pages, becase they are not |
| 2421 | * accessed by any other context at this point. | 2438 | * accessed by any other context at this point. |
| 2422 | */ | 2439 | */ |
| 2440 | |||
| 2441 | /* | ||
| 2442 | * In some cases, SwapCache and FUSE(splice_buf->radixtree), the page | ||
| 2443 | * may already be on some other mem_cgroup's LRU. Take care of it. | ||
| 2444 | */ | ||
| 2445 | if (lrucare) { | ||
| 2446 | zone = page_zone(page); | ||
| 2447 | spin_lock_irq(&zone->lru_lock); | ||
| 2448 | if (PageLRU(page)) { | ||
| 2449 | ClearPageLRU(page); | ||
| 2450 | del_page_from_lru_list(zone, page, page_lru(page)); | ||
| 2451 | was_on_lru = true; | ||
| 2452 | } | ||
| 2453 | } | ||
| 2454 | |||
| 2423 | pc->mem_cgroup = memcg; | 2455 | pc->mem_cgroup = memcg; |
| 2424 | /* | 2456 | /* |
| 2425 | * We access a page_cgroup asynchronously without lock_page_cgroup(). | 2457 | * We access a page_cgroup asynchronously without lock_page_cgroup(). |
| @@ -2443,9 +2475,18 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg, | |||
| 2443 | break; | 2475 | break; |
| 2444 | } | 2476 | } |
| 2445 | 2477 | ||
| 2478 | if (lrucare) { | ||
| 2479 | if (was_on_lru) { | ||
| 2480 | VM_BUG_ON(PageLRU(page)); | ||
| 2481 | SetPageLRU(page); | ||
| 2482 | add_page_to_lru_list(zone, page, page_lru(page)); | ||
| 2483 | } | ||
| 2484 | spin_unlock_irq(&zone->lru_lock); | ||
| 2485 | } | ||
| 2486 | |||
| 2446 | mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages); | 2487 | mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages); |
| 2447 | unlock_page_cgroup(pc); | 2488 | unlock_page_cgroup(pc); |
| 2448 | WARN_ON_ONCE(PageLRU(page)); | 2489 | |
| 2449 | /* | 2490 | /* |
| 2450 | * "charge_statistics" updated event counter. Then, check it. | 2491 | * "charge_statistics" updated event counter. Then, check it. |
| 2451 | * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree. | 2492 | * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree. |
| @@ -2643,7 +2684,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm, | |||
| 2643 | ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom); | 2684 | ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom); |
| 2644 | if (ret == -ENOMEM) | 2685 | if (ret == -ENOMEM) |
| 2645 | return ret; | 2686 | return ret; |
| 2646 | __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype); | 2687 | __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype, false); |
| 2647 | return 0; | 2688 | return 0; |
| 2648 | } | 2689 | } |
| 2649 | 2690 | ||
| @@ -2663,35 +2704,6 @@ static void | |||
| 2663 | __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr, | 2704 | __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr, |
| 2664 | enum charge_type ctype); | 2705 | enum charge_type ctype); |
| 2665 | 2706 | ||
| 2666 | static void | ||
| 2667 | __mem_cgroup_commit_charge_lrucare(struct page *page, struct mem_cgroup *memcg, | ||
| 2668 | enum charge_type ctype) | ||
| 2669 | { | ||
| 2670 | struct page_cgroup *pc = lookup_page_cgroup(page); | ||
| 2671 | struct zone *zone = page_zone(page); | ||
| 2672 | unsigned long flags; | ||
| 2673 | bool removed = false; | ||
| 2674 | |||
| 2675 | /* | ||
| 2676 | * In some case, SwapCache, FUSE(splice_buf->radixtree), the page | ||
| 2677 | * is already on LRU. It means the page may on some other page_cgroup's | ||
| 2678 | * LRU. Take care of it. | ||
| 2679 | */ | ||
| 2680 | spin_lock_irqsave(&zone->lru_lock, flags); | ||
| 2681 | if (PageLRU(page)) { | ||
| 2682 | del_page_from_lru_list(zone, page, page_lru(page)); | ||
| 2683 | ClearPageLRU(page); | ||
| 2684 | removed = true; | ||
| 2685 | } | ||
| 2686 | __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype); | ||
| 2687 | if (removed) { | ||
| 2688 | add_page_to_lru_list(zone, page, page_lru(page)); | ||
| 2689 | SetPageLRU(page); | ||
| 2690 | } | ||
| 2691 | spin_unlock_irqrestore(&zone->lru_lock, flags); | ||
| 2692 | return; | ||
| 2693 | } | ||
| 2694 | |||
| 2695 | int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | 2707 | int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, |
| 2696 | gfp_t gfp_mask) | 2708 | gfp_t gfp_mask) |
| 2697 | { | 2709 | { |
| @@ -2769,13 +2781,16 @@ static void | |||
| 2769 | __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg, | 2781 | __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg, |
| 2770 | enum charge_type ctype) | 2782 | enum charge_type ctype) |
| 2771 | { | 2783 | { |
| 2784 | struct page_cgroup *pc; | ||
| 2785 | |||
| 2772 | if (mem_cgroup_disabled()) | 2786 | if (mem_cgroup_disabled()) |
| 2773 | return; | 2787 | return; |
| 2774 | if (!memcg) | 2788 | if (!memcg) |
| 2775 | return; | 2789 | return; |
| 2776 | cgroup_exclude_rmdir(&memcg->css); | 2790 | cgroup_exclude_rmdir(&memcg->css); |
| 2777 | 2791 | ||
| 2778 | __mem_cgroup_commit_charge_lrucare(page, memcg, ctype); | 2792 | pc = lookup_page_cgroup(page); |
| 2793 | __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype, true); | ||
| 2779 | /* | 2794 | /* |
| 2780 | * Now swap is on-memory. This means this page may be | 2795 | * Now swap is on-memory. This means this page may be |
| 2781 | * counted both as mem and swap....double count. | 2796 | * counted both as mem and swap....double count. |
| @@ -3027,23 +3042,6 @@ void mem_cgroup_uncharge_end(void) | |||
| 3027 | batch->memcg = NULL; | 3042 | batch->memcg = NULL; |
| 3028 | } | 3043 | } |
| 3029 | 3044 | ||
| 3030 | /* | ||
| 3031 | * A function for resetting pc->mem_cgroup for newly allocated pages. | ||
| 3032 | * This function should be called if the newpage will be added to LRU | ||
| 3033 | * before start accounting. | ||
| 3034 | */ | ||
| 3035 | void mem_cgroup_reset_owner(struct page *newpage) | ||
| 3036 | { | ||
| 3037 | struct page_cgroup *pc; | ||
| 3038 | |||
| 3039 | if (mem_cgroup_disabled()) | ||
| 3040 | return; | ||
| 3041 | |||
| 3042 | pc = lookup_page_cgroup(newpage); | ||
| 3043 | VM_BUG_ON(PageCgroupUsed(pc)); | ||
| 3044 | pc->mem_cgroup = root_mem_cgroup; | ||
| 3045 | } | ||
| 3046 | |||
| 3047 | #ifdef CONFIG_SWAP | 3045 | #ifdef CONFIG_SWAP |
| 3048 | /* | 3046 | /* |
| 3049 | * called after __delete_from_swap_cache() and drop "page" account. | 3047 | * called after __delete_from_swap_cache() and drop "page" account. |
| @@ -3248,7 +3246,7 @@ int mem_cgroup_prepare_migration(struct page *page, | |||
| 3248 | ctype = MEM_CGROUP_CHARGE_TYPE_CACHE; | 3246 | ctype = MEM_CGROUP_CHARGE_TYPE_CACHE; |
| 3249 | else | 3247 | else |
| 3250 | ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM; | 3248 | ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM; |
| 3251 | __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype); | 3249 | __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype, false); |
| 3252 | return ret; | 3250 | return ret; |
| 3253 | } | 3251 | } |
| 3254 | 3252 | ||
| @@ -3332,7 +3330,7 @@ void mem_cgroup_replace_page_cache(struct page *oldpage, | |||
| 3332 | * the newpage may be on LRU(or pagevec for LRU) already. We lock | 3330 | * the newpage may be on LRU(or pagevec for LRU) already. We lock |
| 3333 | * LRU while we overwrite pc->mem_cgroup. | 3331 | * LRU while we overwrite pc->mem_cgroup. |
| 3334 | */ | 3332 | */ |
| 3335 | __mem_cgroup_commit_charge_lrucare(newpage, memcg, type); | 3333 | __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true); |
| 3336 | } | 3334 | } |
| 3337 | 3335 | ||
| 3338 | #ifdef CONFIG_DEBUG_VM | 3336 | #ifdef CONFIG_DEBUG_VM |
| @@ -5077,7 +5075,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma, | |||
| 5077 | return NULL; | 5075 | return NULL; |
| 5078 | if (PageAnon(page)) { | 5076 | if (PageAnon(page)) { |
| 5079 | /* we don't move shared anon */ | 5077 | /* we don't move shared anon */ |
| 5080 | if (!move_anon() || page_mapcount(page) > 2) | 5078 | if (!move_anon() || page_mapcount(page) > 1) |
| 5081 | return NULL; | 5079 | return NULL; |
| 5082 | } else if (!move_file()) | 5080 | } else if (!move_file()) |
| 5083 | /* we ignore mapcount for file pages */ | 5081 | /* we ignore mapcount for file pages */ |
diff --git a/mm/migrate.c b/mm/migrate.c index df141f60289e..1503b6b54ecb 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
| @@ -839,8 +839,6 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private, | |||
| 839 | if (!newpage) | 839 | if (!newpage) |
| 840 | return -ENOMEM; | 840 | return -ENOMEM; |
| 841 | 841 | ||
| 842 | mem_cgroup_reset_owner(newpage); | ||
| 843 | |||
| 844 | if (page_count(page) == 1) { | 842 | if (page_count(page) == 1) { |
| 845 | /* page was freed from under us. So we are done. */ | 843 | /* page was freed from under us. So we are done. */ |
| 846 | goto out; | 844 | goto out; |
| @@ -1293,6 +1293,8 @@ munmap_back: | |||
| 1293 | pgoff = vma->vm_pgoff; | 1293 | pgoff = vma->vm_pgoff; |
| 1294 | vm_flags = vma->vm_flags; | 1294 | vm_flags = vma->vm_flags; |
| 1295 | } else if (vm_flags & VM_SHARED) { | 1295 | } else if (vm_flags & VM_SHARED) { |
| 1296 | if (unlikely(vm_flags & (VM_GROWSDOWN|VM_GROWSUP))) | ||
| 1297 | goto free_vma; | ||
| 1296 | error = shmem_zero_setup(vma); | 1298 | error = shmem_zero_setup(vma); |
| 1297 | if (error) | 1299 | if (error) |
| 1298 | goto free_vma; | 1300 | goto free_vma; |
diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c index 12a48a88c0d8..405d331804c3 100644 --- a/mm/percpu-vm.c +++ b/mm/percpu-vm.c | |||
| @@ -184,8 +184,7 @@ static void pcpu_unmap_pages(struct pcpu_chunk *chunk, | |||
| 184 | page_end - page_start); | 184 | page_end - page_start); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | for (i = page_start; i < page_end; i++) | 187 | bitmap_clear(populated, page_start, page_end - page_start); |
| 188 | __clear_bit(i, populated); | ||
| 189 | } | 188 | } |
| 190 | 189 | ||
| 191 | /** | 190 | /** |
| @@ -652,7 +652,7 @@ EXPORT_SYMBOL(__pagevec_release); | |||
| 652 | void lru_add_page_tail(struct zone* zone, | 652 | void lru_add_page_tail(struct zone* zone, |
| 653 | struct page *page, struct page *page_tail) | 653 | struct page *page, struct page *page_tail) |
| 654 | { | 654 | { |
| 655 | int active; | 655 | int uninitialized_var(active); |
| 656 | enum lru_list lru; | 656 | enum lru_list lru; |
| 657 | const int file = 0; | 657 | const int file = 0; |
| 658 | 658 | ||
| @@ -672,7 +672,6 @@ void lru_add_page_tail(struct zone* zone, | |||
| 672 | active = 0; | 672 | active = 0; |
| 673 | lru = LRU_INACTIVE_ANON; | 673 | lru = LRU_INACTIVE_ANON; |
| 674 | } | 674 | } |
| 675 | update_page_reclaim_stat(zone, page_tail, file, active); | ||
| 676 | } else { | 675 | } else { |
| 677 | SetPageUnevictable(page_tail); | 676 | SetPageUnevictable(page_tail); |
| 678 | lru = LRU_UNEVICTABLE; | 677 | lru = LRU_UNEVICTABLE; |
| @@ -693,6 +692,9 @@ void lru_add_page_tail(struct zone* zone, | |||
| 693 | list_head = page_tail->lru.prev; | 692 | list_head = page_tail->lru.prev; |
| 694 | list_move_tail(&page_tail->lru, list_head); | 693 | list_move_tail(&page_tail->lru, list_head); |
| 695 | } | 694 | } |
| 695 | |||
| 696 | if (!PageUnevictable(page)) | ||
| 697 | update_page_reclaim_stat(zone, page_tail, file, active); | ||
| 696 | } | 698 | } |
| 697 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 699 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
| 698 | 700 | ||
| @@ -710,8 +712,8 @@ static void __pagevec_lru_add_fn(struct page *page, void *arg) | |||
| 710 | SetPageLRU(page); | 712 | SetPageLRU(page); |
| 711 | if (active) | 713 | if (active) |
| 712 | SetPageActive(page); | 714 | SetPageActive(page); |
| 713 | update_page_reclaim_stat(zone, page, file, active); | ||
| 714 | add_page_to_lru_list(zone, page, lru); | 715 | add_page_to_lru_list(zone, page, lru); |
| 716 | update_page_reclaim_stat(zone, page, file, active); | ||
| 715 | } | 717 | } |
| 716 | 718 | ||
| 717 | /* | 719 | /* |
diff --git a/mm/swap_state.c b/mm/swap_state.c index 470038a91873..ea6b32d61873 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
| @@ -300,16 +300,6 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, | |||
| 300 | new_page = alloc_page_vma(gfp_mask, vma, addr); | 300 | new_page = alloc_page_vma(gfp_mask, vma, addr); |
| 301 | if (!new_page) | 301 | if (!new_page) |
| 302 | break; /* Out of memory */ | 302 | break; /* Out of memory */ |
| 303 | /* | ||
| 304 | * The memcg-specific accounting when moving | ||
| 305 | * pages around the LRU lists relies on the | ||
| 306 | * page's owner (memcg) to be valid. Usually, | ||
| 307 | * pages are assigned to a new owner before | ||
| 308 | * being put on the LRU list, but since this | ||
| 309 | * is not the case here, the stale owner from | ||
| 310 | * a previous allocation cycle must be reset. | ||
| 311 | */ | ||
| 312 | mem_cgroup_reset_owner(new_page); | ||
| 313 | } | 303 | } |
| 314 | 304 | ||
| 315 | /* | 305 | /* |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 568d5bf17534..702a1ae9220b 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
| @@ -446,8 +446,11 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, | |||
| 446 | ip6h->nexthdr = IPPROTO_HOPOPTS; | 446 | ip6h->nexthdr = IPPROTO_HOPOPTS; |
| 447 | ip6h->hop_limit = 1; | 447 | ip6h->hop_limit = 1; |
| 448 | ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); | 448 | ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); |
| 449 | ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, | 449 | if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, |
| 450 | &ip6h->saddr); | 450 | &ip6h->saddr)) { |
| 451 | kfree_skb(skb); | ||
| 452 | return NULL; | ||
| 453 | } | ||
| 451 | ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest); | 454 | ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest); |
| 452 | 455 | ||
| 453 | hopopt = (u8 *)(ip6h + 1); | 456 | hopopt = (u8 *)(ip6h + 1); |
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index dd147d78a588..6751ed4e0c07 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #include "br_private_stp.h" | 17 | #include "br_private_stp.h" |
| 18 | 18 | ||
| 19 | /* since time values in bpdu are in jiffies and then scaled (1/256) | 19 | /* since time values in bpdu are in jiffies and then scaled (1/256) |
| 20 | * before sending, make sure that is at least one. | 20 | * before sending, make sure that is at least one STP tick. |
| 21 | */ | 21 | */ |
| 22 | #define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) | 22 | #define MESSAGE_AGE_INCR ((HZ / 256) + 1) |
| 23 | 23 | ||
| 24 | static const char *const br_port_state_names[] = { | 24 | static const char *const br_port_state_names[] = { |
| 25 | [BR_STATE_DISABLED] = "disabled", | 25 | [BR_STATE_DISABLED] = "disabled", |
| @@ -186,7 +186,7 @@ static void br_record_config_information(struct net_bridge_port *p, | |||
| 186 | p->designated_cost = bpdu->root_path_cost; | 186 | p->designated_cost = bpdu->root_path_cost; |
| 187 | p->designated_bridge = bpdu->bridge_id; | 187 | p->designated_bridge = bpdu->bridge_id; |
| 188 | p->designated_port = bpdu->port_id; | 188 | p->designated_port = bpdu->port_id; |
| 189 | p->designated_age = jiffies + bpdu->message_age; | 189 | p->designated_age = jiffies - bpdu->message_age; |
| 190 | 190 | ||
| 191 | mod_timer(&p->message_age_timer, jiffies | 191 | mod_timer(&p->message_age_timer, jiffies |
| 192 | + (p->br->max_age - bpdu->message_age)); | 192 | + (p->br->max_age - bpdu->message_age)); |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 5864cc491369..8aa4ad0e06af 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
| @@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, | |||
| 1893 | 1893 | ||
| 1894 | switch (compat_mwt) { | 1894 | switch (compat_mwt) { |
| 1895 | case EBT_COMPAT_MATCH: | 1895 | case EBT_COMPAT_MATCH: |
| 1896 | match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE, | 1896 | match = xt_request_find_match(NFPROTO_BRIDGE, name, 0); |
| 1897 | name, 0), "ebt_%s", name); | ||
| 1898 | if (match == NULL) | ||
| 1899 | return -ENOENT; | ||
| 1900 | if (IS_ERR(match)) | 1897 | if (IS_ERR(match)) |
| 1901 | return PTR_ERR(match); | 1898 | return PTR_ERR(match); |
| 1902 | 1899 | ||
| @@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, | |||
| 1915 | break; | 1912 | break; |
| 1916 | case EBT_COMPAT_WATCHER: /* fallthrough */ | 1913 | case EBT_COMPAT_WATCHER: /* fallthrough */ |
| 1917 | case EBT_COMPAT_TARGET: | 1914 | case EBT_COMPAT_TARGET: |
| 1918 | wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE, | 1915 | wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0); |
| 1919 | name, 0), "ebt_%s", name); | ||
| 1920 | if (wt == NULL) | ||
| 1921 | return -ENOENT; | ||
| 1922 | if (IS_ERR(wt)) | 1916 | if (IS_ERR(wt)) |
| 1923 | return PTR_ERR(wt); | 1917 | return PTR_ERR(wt); |
| 1924 | off = xt_compat_target_offset(wt); | 1918 | off = xt_compat_target_offset(wt); |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 606a6e8f3671..f965dce6f20f 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
| @@ -1060,11 +1060,12 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 1060 | rcu_read_lock(); | 1060 | rcu_read_lock(); |
| 1061 | cb->seq = net->dev_base_seq; | 1061 | cb->seq = net->dev_base_seq; |
| 1062 | 1062 | ||
| 1063 | nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, | 1063 | if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, |
| 1064 | ifla_policy); | 1064 | ifla_policy) >= 0) { |
| 1065 | 1065 | ||
| 1066 | if (tb[IFLA_EXT_MASK]) | 1066 | if (tb[IFLA_EXT_MASK]) |
| 1067 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); | 1067 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); |
| 1068 | } | ||
| 1068 | 1069 | ||
| 1069 | for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { | 1070 | for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { |
| 1070 | idx = 0; | 1071 | idx = 0; |
| @@ -1900,10 +1901,11 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 1900 | u32 ext_filter_mask = 0; | 1901 | u32 ext_filter_mask = 0; |
| 1901 | u16 min_ifinfo_dump_size = 0; | 1902 | u16 min_ifinfo_dump_size = 0; |
| 1902 | 1903 | ||
| 1903 | nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, ifla_policy); | 1904 | if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, |
| 1904 | 1905 | ifla_policy) >= 0) { | |
| 1905 | if (tb[IFLA_EXT_MASK]) | 1906 | if (tb[IFLA_EXT_MASK]) |
| 1906 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); | 1907 | ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); |
| 1908 | } | ||
| 1907 | 1909 | ||
| 1908 | if (!ext_filter_mask) | 1910 | if (!ext_filter_mask) |
| 1909 | return NLMSG_GOODSIZE; | 1911 | return NLMSG_GOODSIZE; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 53c8ce4046b2..d9b83d198c3d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -1403,8 +1403,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | |||
| 1403 | 1403 | ||
| 1404 | BUG_ON(!pcount); | 1404 | BUG_ON(!pcount); |
| 1405 | 1405 | ||
| 1406 | /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ | 1406 | /* Adjust counters and hints for the newly sacked sequence |
| 1407 | if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) | 1407 | * range but discard the return value since prev is already |
| 1408 | * marked. We must tag the range first because the seq | ||
| 1409 | * advancement below implicitly advances | ||
| 1410 | * tcp_highest_sack_seq() when skb is highest_sack. | ||
| 1411 | */ | ||
| 1412 | tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked, | ||
| 1413 | start_seq, end_seq, dup_sack, pcount); | ||
| 1414 | |||
| 1415 | if (skb == tp->lost_skb_hint) | ||
| 1408 | tp->lost_cnt_hint += pcount; | 1416 | tp->lost_cnt_hint += pcount; |
| 1409 | 1417 | ||
| 1410 | TCP_SKB_CB(prev)->end_seq += shifted; | 1418 | TCP_SKB_CB(prev)->end_seq += shifted; |
| @@ -1430,12 +1438,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | |||
| 1430 | skb_shinfo(skb)->gso_type = 0; | 1438 | skb_shinfo(skb)->gso_type = 0; |
| 1431 | } | 1439 | } |
| 1432 | 1440 | ||
| 1433 | /* Adjust counters and hints for the newly sacked sequence range but | ||
| 1434 | * discard the return value since prev is already marked. | ||
| 1435 | */ | ||
| 1436 | tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked, | ||
| 1437 | start_seq, end_seq, dup_sack, pcount); | ||
| 1438 | |||
| 1439 | /* Difference in this won't matter, both ACKed by the same cumul. ACK */ | 1441 | /* Difference in this won't matter, both ACKed by the same cumul. ACK */ |
| 1440 | TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); | 1442 | TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); |
| 1441 | 1443 | ||
| @@ -2567,6 +2569,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head) | |||
| 2567 | 2569 | ||
| 2568 | if (cnt > packets) { | 2570 | if (cnt > packets) { |
| 2569 | if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) || | 2571 | if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) || |
| 2572 | (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) || | ||
| 2570 | (oldcnt >= packets)) | 2573 | (oldcnt >= packets)) |
| 2571 | break; | 2574 | break; |
| 2572 | 2575 | ||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 01a21c2f6ab3..8e2137bd87e2 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
| @@ -1332,6 +1332,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 1332 | hw_roc = true; | 1332 | hw_roc = true; |
| 1333 | 1333 | ||
| 1334 | list_for_each_entry(sdata, &local->interfaces, list) { | 1334 | list_for_each_entry(sdata, &local->interfaces, list) { |
| 1335 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || | ||
| 1336 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | ||
| 1337 | continue; | ||
| 1335 | if (sdata->old_idle == sdata->vif.bss_conf.idle) | 1338 | if (sdata->old_idle == sdata->vif.bss_conf.idle) |
| 1336 | continue; | 1339 | continue; |
| 1337 | if (!ieee80211_sdata_running(sdata)) | 1340 | if (!ieee80211_sdata_running(sdata)) |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index ad64f4d5271a..f9b8e819ca63 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
| @@ -344,7 +344,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
| 344 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { | 344 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |
| 345 | info->control.rates[i].idx = -1; | 345 | info->control.rates[i].idx = -1; |
| 346 | info->control.rates[i].flags = 0; | 346 | info->control.rates[i].flags = 0; |
| 347 | info->control.rates[i].count = 1; | 347 | info->control.rates[i].count = 0; |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) | 350 | if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 95ffa6a9db6e..496f14c1a731 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
| @@ -2684,10 +2684,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
| 2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 2684 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
| 2685 | if (err < 0) | 2685 | if (err < 0) |
| 2686 | goto out_err; | 2686 | goto out_err; |
| 2687 | opl3->private_data = chip; | ||
| 2687 | } | 2688 | } |
| 2688 | 2689 | ||
| 2689 | opl3->private_data = chip; | ||
| 2690 | |||
| 2691 | sprintf(card->longname, "%s at 0x%lx, irq %i", | 2690 | sprintf(card->longname, "%s at 0x%lx, irq %i", |
| 2692 | card->shortname, chip->ctrl_io, chip->irq); | 2691 | card->shortname, chip->ctrl_io, chip->irq); |
| 2693 | 2692 | ||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c2c65f63bf06..684307372d73 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -1759,7 +1759,11 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info, | |||
| 1759 | parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; | 1759 | parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; |
| 1760 | parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; | 1760 | parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; |
| 1761 | parm |= index << AC_AMP_SET_INDEX_SHIFT; | 1761 | parm |= index << AC_AMP_SET_INDEX_SHIFT; |
| 1762 | parm |= val; | 1762 | if ((val & HDA_AMP_MUTE) && !(info->amp_caps & AC_AMPCAP_MUTE) && |
| 1763 | (info->amp_caps & AC_AMPCAP_MIN_MUTE)) | ||
| 1764 | ; /* set the zero value as a fake mute */ | ||
| 1765 | else | ||
| 1766 | parm |= val; | ||
| 1763 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); | 1767 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); |
| 1764 | info->vol[ch] = val; | 1768 | info->vol[ch] = val; |
| 1765 | } | 1769 | } |
| @@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
| 2026 | val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); | 2030 | val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); |
| 2027 | val1 += ofs; | 2031 | val1 += ofs; |
| 2028 | val1 = ((int)val1) * ((int)val2); | 2032 | val1 = ((int)val1) * ((int)val2); |
| 2029 | if (min_mute) | 2033 | if (min_mute || (caps & AC_AMPCAP_MIN_MUTE)) |
| 2030 | val2 |= TLV_DB_SCALE_MUTE; | 2034 | val2 |= TLV_DB_SCALE_MUTE; |
| 2031 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) | 2035 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) |
| 2032 | return -EFAULT; | 2036 | return -EFAULT; |
| @@ -5114,7 +5118,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid, | |||
| 5114 | const char *pfx = "", *sfx = ""; | 5118 | const char *pfx = "", *sfx = ""; |
| 5115 | 5119 | ||
| 5116 | /* handle as a speaker if it's a fixed line-out */ | 5120 | /* handle as a speaker if it's a fixed line-out */ |
| 5117 | if (!strcmp(name, "Line-Out") && attr == INPUT_PIN_ATTR_INT) | 5121 | if (!strcmp(name, "Line Out") && attr == INPUT_PIN_ATTR_INT) |
| 5118 | name = "Speaker"; | 5122 | name = "Speaker"; |
| 5119 | /* check the location */ | 5123 | /* check the location */ |
| 5120 | switch (attr) { | 5124 | switch (attr) { |
| @@ -5173,7 +5177,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, | |||
| 5173 | 5177 | ||
| 5174 | switch (get_defcfg_device(def_conf)) { | 5178 | switch (get_defcfg_device(def_conf)) { |
| 5175 | case AC_JACK_LINE_OUT: | 5179 | case AC_JACK_LINE_OUT: |
| 5176 | return fill_audio_out_name(codec, nid, cfg, "Line-Out", | 5180 | return fill_audio_out_name(codec, nid, cfg, "Line Out", |
| 5177 | label, maxlen, indexp); | 5181 | label, maxlen, indexp); |
| 5178 | case AC_JACK_SPEAKER: | 5182 | case AC_JACK_SPEAKER: |
| 5179 | return fill_audio_out_name(codec, nid, cfg, "Speaker", | 5183 | return fill_audio_out_name(codec, nid, cfg, "Speaker", |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index e9f71dc0d464..f0f1943a4b2c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
| @@ -298,6 +298,9 @@ enum { | |||
| 298 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ | 298 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ |
| 299 | #define AC_AMPCAP_MUTE_SHIFT 31 | 299 | #define AC_AMPCAP_MUTE_SHIFT 31 |
| 300 | 300 | ||
| 301 | /* driver-specific amp-caps: using bits 24-30 */ | ||
| 302 | #define AC_AMPCAP_MIN_MUTE (1 << 30) /* min-volume = mute */ | ||
| 303 | |||
| 301 | /* Connection list */ | 304 | /* Connection list */ |
| 302 | #define AC_CLIST_LENGTH (0x7f<<0) | 305 | #define AC_CLIST_LENGTH (0x7f<<0) |
| 303 | #define AC_CLIST_LONG (1<<7) | 306 | #define AC_CLIST_LONG (1<<7) |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index bc5a993d1146..c83ccdba1e5a 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
| @@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, | |||
| 609 | "Front Speaker", "Surround Speaker", "Bass Speaker" | 609 | "Front Speaker", "Surround Speaker", "Bass Speaker" |
| 610 | }; | 610 | }; |
| 611 | static const char * const line_outs[] = { | 611 | static const char * const line_outs[] = { |
| 612 | "Front Line-Out", "Surround Line-Out", "Bass Line-Out" | 612 | "Front Line Out", "Surround Line Out", "Bass Line Out" |
| 613 | }; | 613 | }; |
| 614 | 614 | ||
| 615 | fix_volume_caps(codec, dac); | 615 | fix_volume_caps(codec, dac); |
| @@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, | |||
| 635 | if (num_ctls > 1) | 635 | if (num_ctls > 1) |
| 636 | name = line_outs[idx]; | 636 | name = line_outs[idx]; |
| 637 | else | 637 | else |
| 638 | name = "Line-Out"; | 638 | name = "Line Out"; |
| 639 | break; | 639 | break; |
| 640 | } | 640 | } |
| 641 | 641 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index a7a5733aa4d2..d29d6d377904 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -3482,7 +3482,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol, | |||
| 3482 | "Disabled", "Enabled" | 3482 | "Disabled", "Enabled" |
| 3483 | }; | 3483 | }; |
| 3484 | static const char * const texts3[] = { | 3484 | static const char * const texts3[] = { |
| 3485 | "Disabled", "Speaker Only", "Line-Out+Speaker" | 3485 | "Disabled", "Speaker Only", "Line Out+Speaker" |
| 3486 | }; | 3486 | }; |
| 3487 | const char * const *texts; | 3487 | const char * const *texts; |
| 3488 | 3488 | ||
| @@ -4079,7 +4079,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename, | |||
| 4079 | err = snd_hda_ctl_add(codec, nid, kctl); | 4079 | err = snd_hda_ctl_add(codec, nid, kctl); |
| 4080 | if (err < 0) | 4080 | if (err < 0) |
| 4081 | return err; | 4081 | return err; |
| 4082 | if (!(query_amp_caps(codec, nid, hda_dir) & AC_AMPCAP_MUTE)) | 4082 | if (!(query_amp_caps(codec, nid, hda_dir) & |
| 4083 | (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))) | ||
| 4083 | break; | 4084 | break; |
| 4084 | } | 4085 | } |
| 4085 | return 0; | 4086 | return 0; |
| @@ -4379,6 +4380,22 @@ static const struct snd_pci_quirk cxt_fixups[] = { | |||
| 4379 | {} | 4380 | {} |
| 4380 | }; | 4381 | }; |
| 4381 | 4382 | ||
| 4383 | /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches | ||
| 4384 | * can be created (bko#42825) | ||
| 4385 | */ | ||
| 4386 | static void add_cx5051_fake_mutes(struct hda_codec *codec) | ||
| 4387 | { | ||
| 4388 | static hda_nid_t out_nids[] = { | ||
| 4389 | 0x10, 0x11, 0 | ||
| 4390 | }; | ||
| 4391 | hda_nid_t *p; | ||
| 4392 | |||
| 4393 | for (p = out_nids; *p; p++) | ||
| 4394 | snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT, | ||
| 4395 | AC_AMPCAP_MIN_MUTE | | ||
| 4396 | query_amp_caps(codec, *p, HDA_OUTPUT)); | ||
| 4397 | } | ||
| 4398 | |||
| 4382 | static int patch_conexant_auto(struct hda_codec *codec) | 4399 | static int patch_conexant_auto(struct hda_codec *codec) |
| 4383 | { | 4400 | { |
| 4384 | struct conexant_spec *spec; | 4401 | struct conexant_spec *spec; |
| @@ -4397,6 +4414,9 @@ static int patch_conexant_auto(struct hda_codec *codec) | |||
| 4397 | case 0x14f15045: | 4414 | case 0x14f15045: |
| 4398 | spec->single_adc_amp = 1; | 4415 | spec->single_adc_amp = 1; |
| 4399 | break; | 4416 | break; |
| 4417 | case 0x14f15051: | ||
| 4418 | add_cx5051_fake_mutes(codec); | ||
| 4419 | break; | ||
| 4400 | } | 4420 | } |
| 4401 | 4421 | ||
| 4402 | apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); | 4422 | apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3647baa9bfed..f286bb8fda13 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -802,7 +802,7 @@ static int alc_automute_mode_info(struct snd_kcontrol *kcontrol, | |||
| 802 | "Disabled", "Enabled" | 802 | "Disabled", "Enabled" |
| 803 | }; | 803 | }; |
| 804 | static const char * const texts3[] = { | 804 | static const char * const texts3[] = { |
| 805 | "Disabled", "Speaker Only", "Line-Out+Speaker" | 805 | "Disabled", "Speaker Only", "Line Out+Speaker" |
| 806 | }; | 806 | }; |
| 807 | const char * const *texts; | 807 | const char * const *texts; |
| 808 | 808 | ||
| @@ -1856,7 +1856,7 @@ static const char * const alc_slave_vols[] = { | |||
| 1856 | "Headphone Playback Volume", | 1856 | "Headphone Playback Volume", |
| 1857 | "Speaker Playback Volume", | 1857 | "Speaker Playback Volume", |
| 1858 | "Mono Playback Volume", | 1858 | "Mono Playback Volume", |
| 1859 | "Line-Out Playback Volume", | 1859 | "Line Out Playback Volume", |
| 1860 | "CLFE Playback Volume", | 1860 | "CLFE Playback Volume", |
| 1861 | "Bass Speaker Playback Volume", | 1861 | "Bass Speaker Playback Volume", |
| 1862 | "PCM Playback Volume", | 1862 | "PCM Playback Volume", |
| @@ -1873,7 +1873,7 @@ static const char * const alc_slave_sws[] = { | |||
| 1873 | "Speaker Playback Switch", | 1873 | "Speaker Playback Switch", |
| 1874 | "Mono Playback Switch", | 1874 | "Mono Playback Switch", |
| 1875 | "IEC958 Playback Switch", | 1875 | "IEC958 Playback Switch", |
| 1876 | "Line-Out Playback Switch", | 1876 | "Line Out Playback Switch", |
| 1877 | "CLFE Playback Switch", | 1877 | "CLFE Playback Switch", |
| 1878 | "Bass Speaker Playback Switch", | 1878 | "Bass Speaker Playback Switch", |
| 1879 | "PCM Playback Switch", | 1879 | "PCM Playback Switch", |
| @@ -3797,7 +3797,7 @@ static void alc_auto_init_input_src(struct hda_codec *codec) | |||
| 3797 | else | 3797 | else |
| 3798 | nums = spec->num_adc_nids; | 3798 | nums = spec->num_adc_nids; |
| 3799 | for (c = 0; c < nums; c++) | 3799 | for (c = 0; c < nums; c++) |
| 3800 | alc_mux_select(codec, 0, spec->cur_mux[c], true); | 3800 | alc_mux_select(codec, c, spec->cur_mux[c], true); |
| 3801 | } | 3801 | } |
| 3802 | 3802 | ||
| 3803 | /* add mic boosts if needed */ | 3803 | /* add mic boosts if needed */ |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 6345df131a00..9dbb5735d778 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -4629,7 +4629,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec) | |||
| 4629 | unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN; | 4629 | unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN; |
| 4630 | if (no_hp_sensing(spec, i)) | 4630 | if (no_hp_sensing(spec, i)) |
| 4631 | continue; | 4631 | continue; |
| 4632 | if (presence) | 4632 | if (1 /*presence*/) |
| 4633 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); | 4633 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); |
| 4634 | #if 0 /* FIXME */ | 4634 | #if 0 /* FIXME */ |
| 4635 | /* Resetting the pinctl like below may lead to (a sort of) regressions | 4635 | /* Resetting the pinctl like below may lead to (a sort of) regressions |
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 01d1f749cf02..b6adbed6e506 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
| @@ -112,7 +112,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) | |||
| 112 | break; | 112 | break; |
| 113 | case SND_SOC_DAIFMT_DSP_A: | 113 | case SND_SOC_DAIFMT_DSP_A: |
| 114 | /* data on rising edge of bclk, frame high 1clk before data */ | 114 | /* data on rising edge of bclk, frame high 1clk before data */ |
| 115 | strcr |= SSI_STCR_TFSL | SSI_STCR_TEFS; | 115 | strcr |= SSI_STCR_TFSL | SSI_STCR_TXBIT0 | SSI_STCR_TEFS; |
| 116 | break; | 116 | break; |
| 117 | } | 117 | } |
| 118 | 118 | ||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1f55ded4047f..1315663c1c09 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
| @@ -3068,9 +3068,13 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | |||
| 3068 | * standby. | 3068 | * standby. |
| 3069 | */ | 3069 | */ |
| 3070 | if (powerdown) { | 3070 | if (powerdown) { |
| 3071 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE); | 3071 | if (dapm->bias_level == SND_SOC_BIAS_ON) |
| 3072 | snd_soc_dapm_set_bias_level(dapm, | ||
| 3073 | SND_SOC_BIAS_PREPARE); | ||
| 3072 | dapm_seq_run(dapm, &down_list, 0, false); | 3074 | dapm_seq_run(dapm, &down_list, 0, false); |
| 3073 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY); | 3075 | if (dapm->bias_level == SND_SOC_BIAS_PREPARE) |
| 3076 | snd_soc_dapm_set_bias_level(dapm, | ||
| 3077 | SND_SOC_BIAS_STANDBY); | ||
| 3074 | } | 3078 | } |
| 3075 | } | 3079 | } |
| 3076 | 3080 | ||
| @@ -3083,7 +3087,9 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | |||
| 3083 | 3087 | ||
| 3084 | list_for_each_entry(codec, &card->codec_dev_list, list) { | 3088 | list_for_each_entry(codec, &card->codec_dev_list, list) { |
| 3085 | soc_dapm_shutdown_codec(&codec->dapm); | 3089 | soc_dapm_shutdown_codec(&codec->dapm); |
| 3086 | snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); | 3090 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) |
| 3091 | snd_soc_dapm_set_bias_level(&codec->dapm, | ||
| 3092 | SND_SOC_BIAS_OFF); | ||
| 3087 | } | 3093 | } |
| 3088 | } | 3094 | } |
| 3089 | 3095 | ||
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 62a134dc421a..9507c4b251a8 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
| @@ -3244,9 +3244,11 @@ sub make_min_config { | |||
| 3244 | $in_bisect = 1; | 3244 | $in_bisect = 1; |
| 3245 | 3245 | ||
| 3246 | my $failed = 0; | 3246 | my $failed = 0; |
| 3247 | build "oldconfig"; | 3247 | build "oldconfig" or $failed = 1; |
| 3248 | start_monitor_and_boot or $failed = 1; | 3248 | if (!$failed) { |
| 3249 | end_monitor; | 3249 | start_monitor_and_boot or $failed = 1; |
| 3250 | end_monitor; | ||
| 3251 | } | ||
| 3250 | 3252 | ||
| 3251 | $in_bisect = 0; | 3253 | $in_bisect = 0; |
| 3252 | 3254 | ||
