diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-15 09:49:36 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-15 09:49:42 -0400 |
commit | 695d82fae9160406acb9de204c471248abcc2a9f (patch) | |
tree | 1a3b3f48e3e0d1783fc75fa50dc77b41a1a88b88 /arch | |
parent | 74c46469a5f70a29ac961cfaa90a0422f1d09230 (diff) | |
parent | 1dde9f75b658edcd4fb7e00259206d727702ce61 (diff) |
Merge tag 'imx25-iomux-ds' of git://git.pengutronix.de/git/imx/linux-2.6 into next/fixes-non-critical
* tag 'imx25-iomux-ds' of git://git.pengutronix.de/git/imx/linux-2.6:
iomux-mx25.h slew rate adjusted for LCD __LD pins
(update to v3.3-rc6)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
51 files changed, 345 insertions, 110 deletions
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 337f98dd8148..21a4095a1000 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-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 6b77ad95981d..a659e198892b 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/io.c b/arch/arm/mach-omap2/io.c index 3fbb0c0b84a4..24ad0d154519 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -306,6 +306,7 @@ void __init omapam33xx_map_common_io(void) | |||
306 | void __init omap44xx_map_common_io(void) | 306 | void __init omap44xx_map_common_io(void) |
307 | { | 307 | { |
308 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 308 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
309 | omap_barriers_init(); | ||
309 | } | 310 | } |
310 | #endif | 311 | #endif |
311 | 312 | ||
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/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 03f038c9b879..184ae21feea7 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-mxc/include/mach/iomux-mx25.h b/arch/arm/plat-mxc/include/mach/iomux-mx25.h index f0726d48df22..c61ec0fc10d4 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx25.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx25.h | |||
@@ -139,15 +139,15 @@ | |||
139 | #define MX25_PAD_NFRB__GPIO_3_31 IOMUX_PAD(0x27c, 0x084, 0x15, 0, 0, NO_PAD_CTRL) | 139 | #define MX25_PAD_NFRB__GPIO_3_31 IOMUX_PAD(0x27c, 0x084, 0x15, 0, 0, NO_PAD_CTRL) |
140 | 140 | ||
141 | #define MX25_PAD_D15__D15 IOMUX_PAD(0x280, 0x088, 0x00, 0, 0, NO_PAD_CTRL) | 141 | #define MX25_PAD_D15__D15 IOMUX_PAD(0x280, 0x088, 0x00, 0, 0, NO_PAD_CTRL) |
142 | #define MX25_PAD_D15__LD16 IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, NO_PAD_CTRL) | 142 | #define MX25_PAD_D15__LD16 IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, PAD_CTL_SRE_FAST) |
143 | #define MX25_PAD_D15__GPIO_4_5 IOMUX_PAD(0x280, 0x088, 0x05, 0, 0, NO_PAD_CTRL) | 143 | #define MX25_PAD_D15__GPIO_4_5 IOMUX_PAD(0x280, 0x088, 0x05, 0, 0, NO_PAD_CTRL) |
144 | 144 | ||
145 | #define MX25_PAD_D14__D14 IOMUX_PAD(0x284, 0x08c, 0x00, 0, 0, NO_PAD_CTRL) | 145 | #define MX25_PAD_D14__D14 IOMUX_PAD(0x284, 0x08c, 0x00, 0, 0, NO_PAD_CTRL) |
146 | #define MX25_PAD_D14__LD17 IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, NO_PAD_CTRL) | 146 | #define MX25_PAD_D14__LD17 IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, PAD_CTL_SRE_FAST) |
147 | #define MX25_PAD_D14__GPIO_4_6 IOMUX_PAD(0x284, 0x08c, 0x05, 0, 0, NO_PAD_CTRL) | 147 | #define MX25_PAD_D14__GPIO_4_6 IOMUX_PAD(0x284, 0x08c, 0x05, 0, 0, NO_PAD_CTRL) |
148 | 148 | ||
149 | #define MX25_PAD_D13__D13 IOMUX_PAD(0x288, 0x090, 0x00, 0, 0, NO_PAD_CTRL) | 149 | #define MX25_PAD_D13__D13 IOMUX_PAD(0x288, 0x090, 0x00, 0, 0, NO_PAD_CTRL) |
150 | #define MX25_PAD_D13__LD18 IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, NO_PAD_CTRL) | 150 | #define MX25_PAD_D13__LD18 IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, PAD_CTL_SRE_FAST) |
151 | #define MX25_PAD_D13__GPIO_4_7 IOMUX_PAD(0x288, 0x090, 0x05, 0, 0, NO_PAD_CTRL) | 151 | #define MX25_PAD_D13__GPIO_4_7 IOMUX_PAD(0x288, 0x090, 0x05, 0, 0, NO_PAD_CTRL) |
152 | 152 | ||
153 | #define MX25_PAD_D12__D12 IOMUX_PAD(0x28c, 0x094, 0x00, 0, 0, NO_PAD_CTRL) | 153 | #define MX25_PAD_D12__D12 IOMUX_PAD(0x28c, 0x094, 0x00, 0, 0, NO_PAD_CTRL) |
@@ -192,54 +192,54 @@ | |||
192 | #define MX25_PAD_D0__D0 IOMUX_PAD(0x2bc, 0x0c4, 0x00, 0, 0, NO_PAD_CTRL) | 192 | #define MX25_PAD_D0__D0 IOMUX_PAD(0x2bc, 0x0c4, 0x00, 0, 0, NO_PAD_CTRL) |
193 | #define MX25_PAD_D0__GPIO_4_20 IOMUX_PAD(0x2bc, 0x0c4, 0x05, 0, 0, NO_PAD_CTRL) | 193 | #define MX25_PAD_D0__GPIO_4_20 IOMUX_PAD(0x2bc, 0x0c4, 0x05, 0, 0, NO_PAD_CTRL) |
194 | 194 | ||
195 | #define MX25_PAD_LD0__LD0 IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, NO_PAD_CTRL) | 195 | #define MX25_PAD_LD0__LD0 IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
196 | #define MX25_PAD_LD0__CSI_D0 IOMUX_PAD(0x2c0, 0x0c8, 0x12, 0x488, 0, NO_PAD_CTRL) | 196 | #define MX25_PAD_LD0__CSI_D0 IOMUX_PAD(0x2c0, 0x0c8, 0x12, 0x488, 0, NO_PAD_CTRL) |
197 | #define MX25_PAD_LD0__GPIO_2_15 IOMUX_PAD(0x2c0, 0x0c8, 0x15, 0, 0, NO_PAD_CTRL) | 197 | #define MX25_PAD_LD0__GPIO_2_15 IOMUX_PAD(0x2c0, 0x0c8, 0x15, 0, 0, NO_PAD_CTRL) |
198 | 198 | ||
199 | #define MX25_PAD_LD1__LD1 IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, NO_PAD_CTRL) | 199 | #define MX25_PAD_LD1__LD1 IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
200 | #define MX25_PAD_LD1__CSI_D1 IOMUX_PAD(0x2c4, 0x0cc, 0x12, 0x48c, 0, NO_PAD_CTRL) | 200 | #define MX25_PAD_LD1__CSI_D1 IOMUX_PAD(0x2c4, 0x0cc, 0x12, 0x48c, 0, NO_PAD_CTRL) |
201 | #define MX25_PAD_LD1__GPIO_2_16 IOMUX_PAD(0x2c4, 0x0cc, 0x15, 0, 0, NO_PAD_CTRL) | 201 | #define MX25_PAD_LD1__GPIO_2_16 IOMUX_PAD(0x2c4, 0x0cc, 0x15, 0, 0, NO_PAD_CTRL) |
202 | 202 | ||
203 | #define MX25_PAD_LD2__LD2 IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, NO_PAD_CTRL) | 203 | #define MX25_PAD_LD2__LD2 IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
204 | #define MX25_PAD_LD2__GPIO_2_17 IOMUX_PAD(0x2c8, 0x0d0, 0x15, 0, 0, NO_PAD_CTRL) | 204 | #define MX25_PAD_LD2__GPIO_2_17 IOMUX_PAD(0x2c8, 0x0d0, 0x15, 0, 0, NO_PAD_CTRL) |
205 | 205 | ||
206 | #define MX25_PAD_LD3__LD3 IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, NO_PAD_CTRL) | 206 | #define MX25_PAD_LD3__LD3 IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
207 | #define MX25_PAD_LD3__GPIO_2_18 IOMUX_PAD(0x2cc, 0x0d4, 0x15, 0, 0, NO_PAD_CTRL) | 207 | #define MX25_PAD_LD3__GPIO_2_18 IOMUX_PAD(0x2cc, 0x0d4, 0x15, 0, 0, NO_PAD_CTRL) |
208 | 208 | ||
209 | #define MX25_PAD_LD4__LD4 IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, NO_PAD_CTRL) | 209 | #define MX25_PAD_LD4__LD4 IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
210 | #define MX25_PAD_LD4__GPIO_2_19 IOMUX_PAD(0x2d0, 0x0d8, 0x15, 0, 0, NO_PAD_CTRL) | 210 | #define MX25_PAD_LD4__GPIO_2_19 IOMUX_PAD(0x2d0, 0x0d8, 0x15, 0, 0, NO_PAD_CTRL) |
211 | 211 | ||
212 | #define MX25_PAD_LD5__LD5 IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, NO_PAD_CTRL) | 212 | #define MX25_PAD_LD5__LD5 IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
213 | #define MX25_PAD_LD5__GPIO_1_19 IOMUX_PAD(0x2d4, 0x0dc, 0x15, 0, 0, NO_PAD_CTRL) | 213 | #define MX25_PAD_LD5__GPIO_1_19 IOMUX_PAD(0x2d4, 0x0dc, 0x15, 0, 0, NO_PAD_CTRL) |
214 | 214 | ||
215 | #define MX25_PAD_LD6__LD6 IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, NO_PAD_CTRL) | 215 | #define MX25_PAD_LD6__LD6 IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
216 | #define MX25_PAD_LD6__GPIO_1_20 IOMUX_PAD(0x2d8, 0x0e0, 0x15, 0, 0, NO_PAD_CTRL) | 216 | #define MX25_PAD_LD6__GPIO_1_20 IOMUX_PAD(0x2d8, 0x0e0, 0x15, 0, 0, NO_PAD_CTRL) |
217 | 217 | ||
218 | #define MX25_PAD_LD7__LD7 IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, NO_PAD_CTRL) | 218 | #define MX25_PAD_LD7__LD7 IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
219 | #define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL) | 219 | #define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL) |
220 | 220 | ||
221 | #define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, NO_PAD_CTRL) | 221 | #define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
222 | #define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL) | 222 | #define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL) |
223 | 223 | ||
224 | #define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, NO_PAD_CTRL) | 224 | #define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
225 | #define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL) | 225 | #define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL) |
226 | 226 | ||
227 | #define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, NO_PAD_CTRL) | 227 | #define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
228 | #define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL) | 228 | #define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL) |
229 | 229 | ||
230 | #define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, NO_PAD_CTRL) | 230 | #define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
231 | #define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL) | 231 | #define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL) |
232 | 232 | ||
233 | #define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, NO_PAD_CTRL) | 233 | #define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
234 | #define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL) | 234 | #define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL) |
235 | 235 | ||
236 | #define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, NO_PAD_CTRL) | 236 | #define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
237 | #define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL) | 237 | #define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL) |
238 | 238 | ||
239 | #define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, NO_PAD_CTRL) | 239 | #define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
240 | #define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL) | 240 | #define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL) |
241 | 241 | ||
242 | #define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, NO_PAD_CTRL) | 242 | #define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, PAD_CTL_SRE_FAST) |
243 | #define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL) | 243 | #define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL) |
244 | 244 | ||
245 | #define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL) | 245 | #define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL) |
@@ -468,11 +468,11 @@ | |||
468 | #define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) | 468 | #define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) |
469 | 469 | ||
470 | #define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL) | 470 | #define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL) |
471 | #define MX25_PAD_GPIO_E__LD16 IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, NO_PAD_CTRL) | 471 | #define MX25_PAD_GPIO_E__LD16 IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, PAD_CTL_SRE_FAST) |
472 | #define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP) | 472 | #define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP) |
473 | 473 | ||
474 | #define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL) | 474 | #define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL) |
475 | #define MX25_PAD_GPIO_F__LD17 IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, NO_PAD_CTRL) | 475 | #define MX25_PAD_GPIO_F__LD17 IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, PAD_CTL_SRE_FAST) |
476 | #define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL) | 476 | #define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL) |
477 | 477 | ||
478 | #define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL) | 478 | #define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL) |
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/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/include/asm/compat.h b/arch/s390/include/asm/compat.h index 2e49748b27da..234f1d859cea 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -172,13 +172,6 @@ static inline int is_compat_task(void) | |||
172 | return is_32bit_task(); | 172 | return is_32bit_task(); |
173 | } | 173 | } |
174 | 174 | ||
175 | #else | ||
176 | |||
177 | static inline int is_compat_task(void) | ||
178 | { | ||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | #endif | 175 | #endif |
183 | 176 | ||
184 | static inline void __user *arch_compat_alloc_user_space(long len) | 177 | static inline void __user *arch_compat_alloc_user_space(long len) |
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/kernel/process.c b/arch/s390/kernel/process.c index 4261aa799774..e795933eb2cb 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/timer.h> | 30 | #include <asm/timer.h> |
31 | #include <asm/nmi.h> | 31 | #include <asm/nmi.h> |
32 | #include <asm/compat.h> | ||
33 | #include <asm/smp.h> | 32 | #include <asm/smp.h> |
34 | #include "entry.h" | 33 | #include "entry.h" |
35 | 34 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 9d82ed4bcb27..61f95489d70c 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/regset.h> | 20 | #include <linux/regset.h> |
21 | #include <linux/tracehook.h> | 21 | #include <linux/tracehook.h> |
22 | #include <linux/seccomp.h> | 22 | #include <linux/seccomp.h> |
23 | #include <linux/compat.h> | ||
23 | #include <trace/syscall.h> | 24 | #include <trace/syscall.h> |
24 | #include <asm/compat.h> | ||
25 | #include <asm/segment.h> | 25 | #include <asm/segment.h> |
26 | #include <asm/page.h> | 26 | #include <asm/page.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 354de0763eff..3b2efc81f34e 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/kexec.h> | 46 | #include <linux/kexec.h> |
47 | #include <linux/crash_dump.h> | 47 | #include <linux/crash_dump.h> |
48 | #include <linux/memory.h> | 48 | #include <linux/memory.h> |
49 | #include <linux/compat.h> | ||
49 | 50 | ||
50 | #include <asm/ipl.h> | 51 | #include <asm/ipl.h> |
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
@@ -59,7 +60,6 @@ | |||
59 | #include <asm/ptrace.h> | 60 | #include <asm/ptrace.h> |
60 | #include <asm/sections.h> | 61 | #include <asm/sections.h> |
61 | #include <asm/ebcdic.h> | 62 | #include <asm/ebcdic.h> |
62 | #include <asm/compat.h> | ||
63 | #include <asm/kvm_virtio.h> | 63 | #include <asm/kvm_virtio.h> |
64 | #include <asm/diag.h> | 64 | #include <asm/diag.h> |
65 | 65 | ||
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index a8ba840294ff..2d421d90fada 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/ucontext.h> | 30 | #include <asm/ucontext.h> |
31 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
32 | #include <asm/lowcore.h> | 32 | #include <asm/lowcore.h> |
33 | #include <asm/compat.h> | ||
34 | #include "entry.h" | 33 | #include "entry.h" |
35 | 34 | ||
36 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 35 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 354dd39073ef..e8fcd928dc78 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/mmu_context.h> | 38 | #include <asm/mmu_context.h> |
39 | #include <asm/compat.h> | ||
40 | #include "../kernel/entry.h" | 39 | #include "../kernel/entry.h" |
41 | 40 | ||
42 | #ifndef CONFIG_64BIT | 41 | #ifndef CONFIG_64BIT |
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/s390/mm/mmap.c b/arch/s390/mm/mmap.c index f09c74881b7e..a0155c02e324 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/mman.h> | 29 | #include <linux/mman.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/random.h> | 31 | #include <linux/random.h> |
32 | #include <linux/compat.h> | ||
32 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
33 | #include <asm/compat.h> | ||
34 | 34 | ||
35 | static unsigned long stack_maxrandom_size(void) | 35 | static unsigned long stack_maxrandom_size(void) |
36 | { | 36 | { |
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 096c975e099f..461ce432b1c2 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h | |||
@@ -242,4 +242,12 @@ static inline void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap) | |||
242 | static inline void perf_events_lapic_init(void) { } | 242 | static inline void perf_events_lapic_init(void) { } |
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD) | ||
246 | extern void amd_pmu_enable_virt(void); | ||
247 | extern void amd_pmu_disable_virt(void); | ||
248 | #else | ||
249 | static inline void amd_pmu_enable_virt(void) { } | ||
250 | static inline void amd_pmu_disable_virt(void) { } | ||
251 | #endif | ||
252 | |||
245 | #endif /* _ASM_X86_PERF_EVENT_H */ | 253 | #endif /* _ASM_X86_PERF_EVENT_H */ |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 6b45e5e7a901..73d08ed98a64 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -326,8 +326,7 @@ static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb) | |||
326 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; | 326 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; |
327 | } | 327 | } |
328 | 328 | ||
329 | static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, | 329 | static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) |
330 | int index) | ||
331 | { | 330 | { |
332 | int node; | 331 | int node; |
333 | 332 | ||
@@ -725,14 +724,16 @@ static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); | |||
725 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) | 724 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) |
726 | 725 | ||
727 | #ifdef CONFIG_SMP | 726 | #ifdef CONFIG_SMP |
728 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | 727 | |
728 | static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index) | ||
729 | { | 729 | { |
730 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 730 | struct _cpuid4_info *this_leaf; |
731 | unsigned long num_threads_sharing; | 731 | int ret, i, sibling; |
732 | int index_msb, i, sibling; | ||
733 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 732 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
734 | 733 | ||
735 | if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) { | 734 | ret = 0; |
735 | if (index == 3) { | ||
736 | ret = 1; | ||
736 | for_each_cpu(i, cpu_llc_shared_mask(cpu)) { | 737 | for_each_cpu(i, cpu_llc_shared_mask(cpu)) { |
737 | if (!per_cpu(ici_cpuid4_info, i)) | 738 | if (!per_cpu(ici_cpuid4_info, i)) |
738 | continue; | 739 | continue; |
@@ -743,8 +744,35 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
743 | set_bit(sibling, this_leaf->shared_cpu_map); | 744 | set_bit(sibling, this_leaf->shared_cpu_map); |
744 | } | 745 | } |
745 | } | 746 | } |
746 | return; | 747 | } else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) { |
748 | ret = 1; | ||
749 | for_each_cpu(i, cpu_sibling_mask(cpu)) { | ||
750 | if (!per_cpu(ici_cpuid4_info, i)) | ||
751 | continue; | ||
752 | this_leaf = CPUID4_INFO_IDX(i, index); | ||
753 | for_each_cpu(sibling, cpu_sibling_mask(cpu)) { | ||
754 | if (!cpu_online(sibling)) | ||
755 | continue; | ||
756 | set_bit(sibling, this_leaf->shared_cpu_map); | ||
757 | } | ||
758 | } | ||
747 | } | 759 | } |
760 | |||
761 | return ret; | ||
762 | } | ||
763 | |||
764 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | ||
765 | { | ||
766 | struct _cpuid4_info *this_leaf, *sibling_leaf; | ||
767 | unsigned long num_threads_sharing; | ||
768 | int index_msb, i; | ||
769 | struct cpuinfo_x86 *c = &cpu_data(cpu); | ||
770 | |||
771 | if (c->x86_vendor == X86_VENDOR_AMD) { | ||
772 | if (cache_shared_amd_cpu_map_setup(cpu, index)) | ||
773 | return; | ||
774 | } | ||
775 | |||
748 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 776 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
749 | num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; | 777 | num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; |
750 | 778 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 786e76a86322..e4eeaaf58a47 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -528,6 +528,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
528 | 528 | ||
529 | sprintf(name, "threshold_bank%i", bank); | 529 | sprintf(name, "threshold_bank%i", bank); |
530 | 530 | ||
531 | #ifdef CONFIG_SMP | ||
531 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ | 532 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ |
532 | i = cpumask_first(cpu_llc_shared_mask(cpu)); | 533 | i = cpumask_first(cpu_llc_shared_mask(cpu)); |
533 | 534 | ||
@@ -553,6 +554,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
553 | 554 | ||
554 | goto out; | 555 | goto out; |
555 | } | 556 | } |
557 | #endif | ||
556 | 558 | ||
557 | b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL); | 559 | b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL); |
558 | if (!b) { | 560 | if (!b) { |
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index 8944062f46e2..c30c807ddc72 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h | |||
@@ -147,7 +147,9 @@ struct cpu_hw_events { | |||
147 | /* | 147 | /* |
148 | * AMD specific bits | 148 | * AMD specific bits |
149 | */ | 149 | */ |
150 | struct amd_nb *amd_nb; | 150 | struct amd_nb *amd_nb; |
151 | /* Inverted mask of bits to clear in the perf_ctr ctrl registers */ | ||
152 | u64 perf_ctr_virt_mask; | ||
151 | 153 | ||
152 | void *kfree_on_online; | 154 | void *kfree_on_online; |
153 | }; | 155 | }; |
@@ -417,9 +419,11 @@ void x86_pmu_disable_all(void); | |||
417 | static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc, | 419 | static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc, |
418 | u64 enable_mask) | 420 | u64 enable_mask) |
419 | { | 421 | { |
422 | u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask); | ||
423 | |||
420 | if (hwc->extra_reg.reg) | 424 | if (hwc->extra_reg.reg) |
421 | wrmsrl(hwc->extra_reg.reg, hwc->extra_reg.config); | 425 | wrmsrl(hwc->extra_reg.reg, hwc->extra_reg.config); |
422 | wrmsrl(hwc->config_base, hwc->config | enable_mask); | 426 | wrmsrl(hwc->config_base, (hwc->config | enable_mask) & ~disable_mask); |
423 | } | 427 | } |
424 | 428 | ||
425 | void x86_pmu_enable_all(int added); | 429 | void x86_pmu_enable_all(int added); |
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index 0397b23be8e9..67250a52430b 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/perf_event.h> | 1 | #include <linux/perf_event.h> |
2 | #include <linux/export.h> | ||
2 | #include <linux/types.h> | 3 | #include <linux/types.h> |
3 | #include <linux/init.h> | 4 | #include <linux/init.h> |
4 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
@@ -357,7 +358,9 @@ static void amd_pmu_cpu_starting(int cpu) | |||
357 | struct amd_nb *nb; | 358 | struct amd_nb *nb; |
358 | int i, nb_id; | 359 | int i, nb_id; |
359 | 360 | ||
360 | if (boot_cpu_data.x86_max_cores < 2) | 361 | cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY; |
362 | |||
363 | if (boot_cpu_data.x86_max_cores < 2 || boot_cpu_data.x86 == 0x15) | ||
361 | return; | 364 | return; |
362 | 365 | ||
363 | nb_id = amd_get_nb_id(cpu); | 366 | nb_id = amd_get_nb_id(cpu); |
@@ -587,9 +590,9 @@ static __initconst const struct x86_pmu amd_pmu_f15h = { | |||
587 | .put_event_constraints = amd_put_event_constraints, | 590 | .put_event_constraints = amd_put_event_constraints, |
588 | 591 | ||
589 | .cpu_prepare = amd_pmu_cpu_prepare, | 592 | .cpu_prepare = amd_pmu_cpu_prepare, |
590 | .cpu_starting = amd_pmu_cpu_starting, | ||
591 | .cpu_dead = amd_pmu_cpu_dead, | 593 | .cpu_dead = amd_pmu_cpu_dead, |
592 | #endif | 594 | #endif |
595 | .cpu_starting = amd_pmu_cpu_starting, | ||
593 | }; | 596 | }; |
594 | 597 | ||
595 | __init int amd_pmu_init(void) | 598 | __init int amd_pmu_init(void) |
@@ -621,3 +624,33 @@ __init int amd_pmu_init(void) | |||
621 | 624 | ||
622 | return 0; | 625 | return 0; |
623 | } | 626 | } |
627 | |||
628 | void amd_pmu_enable_virt(void) | ||
629 | { | ||
630 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
631 | |||
632 | cpuc->perf_ctr_virt_mask = 0; | ||
633 | |||
634 | /* Reload all events */ | ||
635 | x86_pmu_disable_all(); | ||
636 | x86_pmu_enable_all(0); | ||
637 | } | ||
638 | EXPORT_SYMBOL_GPL(amd_pmu_enable_virt); | ||
639 | |||
640 | void amd_pmu_disable_virt(void) | ||
641 | { | ||
642 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
643 | |||
644 | /* | ||
645 | * We only mask out the Host-only bit so that host-only counting works | ||
646 | * when SVM is disabled. If someone sets up a guest-only counter when | ||
647 | * SVM is disabled the Guest-only bits still gets set and the counter | ||
648 | * will not count anything. | ||
649 | */ | ||
650 | cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY; | ||
651 | |||
652 | /* Reload all events */ | ||
653 | x86_pmu_disable_all(); | ||
654 | x86_pmu_enable_all(0); | ||
655 | } | ||
656 | EXPORT_SYMBOL_GPL(amd_pmu_disable_virt); | ||
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 3fe8239fd8fb..1333d9851778 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1532,10 +1532,17 @@ ENTRY(nmi) | |||
1532 | pushq_cfi %rdx | 1532 | pushq_cfi %rdx |
1533 | 1533 | ||
1534 | /* | 1534 | /* |
1535 | * If %cs was not the kernel segment, then the NMI triggered in user | ||
1536 | * space, which means it is definitely not nested. | ||
1537 | */ | ||
1538 | cmpl $__KERNEL_CS, 16(%rsp) | ||
1539 | jne first_nmi | ||
1540 | |||
1541 | /* | ||
1535 | * Check the special variable on the stack to see if NMIs are | 1542 | * Check the special variable on the stack to see if NMIs are |
1536 | * executing. | 1543 | * executing. |
1537 | */ | 1544 | */ |
1538 | cmp $1, -8(%rsp) | 1545 | cmpl $1, -8(%rsp) |
1539 | je nested_nmi | 1546 | je nested_nmi |
1540 | 1547 | ||
1541 | /* | 1548 | /* |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index ac0417be9131..73465aab28f8 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -360,7 +360,6 @@ out: | |||
360 | static enum ucode_state | 360 | static enum ucode_state |
361 | request_microcode_user(int cpu, const void __user *buf, size_t size) | 361 | request_microcode_user(int cpu, const void __user *buf, size_t size) |
362 | { | 362 | { |
363 | pr_info("AMD microcode update via /dev/cpu/microcode not supported\n"); | ||
364 | return UCODE_ERROR; | 363 | return UCODE_ERROR; |
365 | } | 364 | } |
366 | 365 | ||
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 5fa553babe56..e385214711cb 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/ftrace_event.h> | 29 | #include <linux/ftrace_event.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | 31 | ||
32 | #include <asm/perf_event.h> | ||
32 | #include <asm/tlbflush.h> | 33 | #include <asm/tlbflush.h> |
33 | #include <asm/desc.h> | 34 | #include <asm/desc.h> |
34 | #include <asm/kvm_para.h> | 35 | #include <asm/kvm_para.h> |
@@ -575,6 +576,8 @@ static void svm_hardware_disable(void *garbage) | |||
575 | wrmsrl(MSR_AMD64_TSC_RATIO, TSC_RATIO_DEFAULT); | 576 | wrmsrl(MSR_AMD64_TSC_RATIO, TSC_RATIO_DEFAULT); |
576 | 577 | ||
577 | cpu_svm_disable(); | 578 | cpu_svm_disable(); |
579 | |||
580 | amd_pmu_disable_virt(); | ||
578 | } | 581 | } |
579 | 582 | ||
580 | static int svm_hardware_enable(void *garbage) | 583 | static int svm_hardware_enable(void *garbage) |
@@ -622,6 +625,8 @@ static int svm_hardware_enable(void *garbage) | |||
622 | 625 | ||
623 | svm_init_erratum_383(); | 626 | svm_init_erratum_383(); |
624 | 627 | ||
628 | amd_pmu_enable_virt(); | ||
629 | |||
625 | return 0; | 630 | return 0; |
626 | } | 631 | } |
627 | 632 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 12eb07bfb267..4172af8ceeb3 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1141,7 +1141,9 @@ asmlinkage void __init xen_start_kernel(void) | |||
1141 | 1141 | ||
1142 | /* Prevent unwanted bits from being set in PTEs. */ | 1142 | /* Prevent unwanted bits from being set in PTEs. */ |
1143 | __supported_pte_mask &= ~_PAGE_GLOBAL; | 1143 | __supported_pte_mask &= ~_PAGE_GLOBAL; |
1144 | #if 0 | ||
1144 | if (!xen_initial_domain()) | 1145 | if (!xen_initial_domain()) |
1146 | #endif | ||
1145 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); | 1147 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); |
1146 | 1148 | ||
1147 | __supported_pte_mask |= _PAGE_IOMAP; | 1149 | __supported_pte_mask |= _PAGE_IOMAP; |
@@ -1204,10 +1206,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
1204 | 1206 | ||
1205 | pgd = (pgd_t *)xen_start_info->pt_base; | 1207 | pgd = (pgd_t *)xen_start_info->pt_base; |
1206 | 1208 | ||
1207 | if (!xen_initial_domain()) | ||
1208 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); | ||
1209 | |||
1210 | __supported_pte_mask |= _PAGE_IOMAP; | ||
1211 | /* Don't do the full vcpu_info placement stuff until we have a | 1209 | /* Don't do the full vcpu_info placement stuff until we have a |
1212 | possible map and a non-dummy shared_info. */ | 1210 | possible map and a non-dummy shared_info. */ |
1213 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; | 1211 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 58a0e46c404d..95c1cf60c669 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -415,13 +415,13 @@ static pteval_t iomap_pte(pteval_t val) | |||
415 | static pteval_t xen_pte_val(pte_t pte) | 415 | static pteval_t xen_pte_val(pte_t pte) |
416 | { | 416 | { |
417 | pteval_t pteval = pte.pte; | 417 | pteval_t pteval = pte.pte; |
418 | 418 | #if 0 | |
419 | /* If this is a WC pte, convert back from Xen WC to Linux WC */ | 419 | /* If this is a WC pte, convert back from Xen WC to Linux WC */ |
420 | if ((pteval & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)) == _PAGE_PAT) { | 420 | if ((pteval & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)) == _PAGE_PAT) { |
421 | WARN_ON(!pat_enabled); | 421 | WARN_ON(!pat_enabled); |
422 | pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT; | 422 | pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT; |
423 | } | 423 | } |
424 | 424 | #endif | |
425 | if (xen_initial_domain() && (pteval & _PAGE_IOMAP)) | 425 | if (xen_initial_domain() && (pteval & _PAGE_IOMAP)) |
426 | return pteval; | 426 | return pteval; |
427 | 427 | ||
@@ -463,7 +463,7 @@ void xen_set_pat(u64 pat) | |||
463 | static pte_t xen_make_pte(pteval_t pte) | 463 | static pte_t xen_make_pte(pteval_t pte) |
464 | { | 464 | { |
465 | phys_addr_t addr = (pte & PTE_PFN_MASK); | 465 | phys_addr_t addr = (pte & PTE_PFN_MASK); |
466 | 466 | #if 0 | |
467 | /* If Linux is trying to set a WC pte, then map to the Xen WC. | 467 | /* If Linux is trying to set a WC pte, then map to the Xen WC. |
468 | * If _PAGE_PAT is set, then it probably means it is really | 468 | * If _PAGE_PAT is set, then it probably means it is really |
469 | * _PAGE_PSE, so avoid fiddling with the PAT mapping and hope | 469 | * _PAGE_PSE, so avoid fiddling with the PAT mapping and hope |
@@ -476,7 +476,7 @@ static pte_t xen_make_pte(pteval_t pte) | |||
476 | if ((pte & (_PAGE_PCD | _PAGE_PWT)) == _PAGE_PWT) | 476 | if ((pte & (_PAGE_PCD | _PAGE_PWT)) == _PAGE_PWT) |
477 | pte = (pte & ~(_PAGE_PCD | _PAGE_PWT)) | _PAGE_PAT; | 477 | pte = (pte & ~(_PAGE_PCD | _PAGE_PWT)) | _PAGE_PAT; |
478 | } | 478 | } |
479 | 479 | #endif | |
480 | /* | 480 | /* |
481 | * Unprivileged domains are allowed to do IOMAPpings for | 481 | * Unprivileged domains are allowed to do IOMAPpings for |
482 | * PCI passthrough, but not map ISA space. The ISA | 482 | * PCI passthrough, but not map ISA space. The ISA |