diff options
Diffstat (limited to 'arch')
69 files changed, 354 insertions, 228 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 78589a1b0d03..34cef2546e42 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1173,6 +1173,7 @@ config HZ | |||
1173 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210 | 1173 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210 |
1174 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER | 1174 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER |
1175 | default AT91_TIMER_HZ if ARCH_AT91 | 1175 | default AT91_TIMER_HZ if ARCH_AT91 |
1176 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE | ||
1176 | default 100 | 1177 | default 100 |
1177 | 1178 | ||
1178 | config THUMB2_KERNEL | 1179 | config THUMB2_KERNEL |
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index fedd8076a689..072cc6b61ba3 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S | |||
@@ -11,6 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <mach/hardware.h> | ||
14 | #include <asm/hardware/clps7111.h> | 15 | #include <asm/hardware/clps7111.h> |
15 | 16 | ||
16 | .macro addruart, rx, tmp | 17 | .macro addruart, rx, tmp |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 2ec3095ffb7b..b280efb1fa12 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
27 | #include <linux/regulator/machine.h> | 27 | #include <linux/regulator/machine.h> |
28 | #include <linux/regulator/tps6507x.h> | ||
28 | #include <linux/mfd/tps6507x.h> | 29 | #include <linux/mfd/tps6507x.h> |
29 | #include <linux/input/tps6507x-ts.h> | 30 | #include <linux/input/tps6507x-ts.h> |
30 | 31 | ||
@@ -469,6 +470,11 @@ struct regulator_consumer_supply tps65070_ldo2_consumers[] = { | |||
469 | }, | 470 | }, |
470 | }; | 471 | }; |
471 | 472 | ||
473 | /* We take advantage of the fact that both defdcdc{2,3} are tied high */ | ||
474 | static struct tps6507x_reg_platform_data tps6507x_platform_data = { | ||
475 | .defdcdc_default = true, | ||
476 | }; | ||
477 | |||
472 | struct regulator_init_data tps65070_regulator_data[] = { | 478 | struct regulator_init_data tps65070_regulator_data[] = { |
473 | /* dcdc1 */ | 479 | /* dcdc1 */ |
474 | { | 480 | { |
@@ -494,6 +500,7 @@ struct regulator_init_data tps65070_regulator_data[] = { | |||
494 | }, | 500 | }, |
495 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), | 501 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), |
496 | .consumer_supplies = tps65070_dcdc2_consumers, | 502 | .consumer_supplies = tps65070_dcdc2_consumers, |
503 | .driver_data = &tps6507x_platform_data, | ||
497 | }, | 504 | }, |
498 | 505 | ||
499 | /* dcdc3 */ | 506 | /* dcdc3 */ |
@@ -507,6 +514,7 @@ struct regulator_init_data tps65070_regulator_data[] = { | |||
507 | }, | 514 | }, |
508 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), | 515 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), |
509 | .consumer_supplies = tps65070_dcdc3_consumers, | 516 | .consumer_supplies = tps65070_dcdc3_consumers, |
517 | .driver_data = &tps6507x_platform_data, | ||
510 | }, | 518 | }, |
511 | 519 | ||
512 | /* ldo1 */ | 520 | /* ldo1 */ |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index e3bc3f6f6b10..88b3dd89be89 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(__bus_to_virt); | |||
232 | 232 | ||
233 | unsigned long __pfn_to_bus(unsigned long pfn) | 233 | unsigned long __pfn_to_bus(unsigned long pfn) |
234 | { | 234 | { |
235 | return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET)); | 235 | return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET); |
236 | } | 236 | } |
237 | EXPORT_SYMBOL(__pfn_to_bus); | 237 | EXPORT_SYMBOL(__pfn_to_bus); |
238 | 238 | ||
diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S index a9ee8f0d48b7..27cafd12f033 100644 --- a/arch/arm/mach-h720x/include/mach/debug-macro.S +++ b/arch/arm/mach-h720x/include/mach/debug-macro.S | |||
@@ -11,8 +11,10 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .equ io_virt, IO_BASE | 14 | #include <mach/hardware.h> |
15 | .equ io_phys, IO_START | 15 | |
16 | .equ io_virt, IO_VIRT | ||
17 | .equ io_phys, IO_PHYS | ||
16 | 18 | ||
17 | .macro addruart, rx, tmp | 19 | .macro addruart, rx, tmp |
18 | mrc p15, 0, \rx, c1, c0 | 20 | mrc p15, 0, \rx, c1, c0 |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index 7221c20b2afa..f781164e623f 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c | |||
@@ -77,7 +77,7 @@ struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { | |||
77 | }, | 77 | }, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | void qnap_tsx1x_register_flash(void) | 80 | void __init qnap_tsx1x_register_flash(void) |
81 | { | 81 | { |
82 | spi_register_board_info(qnap_tsx1x_spi_slave_info, | 82 | spi_register_board_info(qnap_tsx1x_spi_slave_info, |
83 | ARRAY_SIZE(qnap_tsx1x_spi_slave_info)); | 83 | ARRAY_SIZE(qnap_tsx1x_spi_slave_info)); |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.h b/arch/arm/mach-kirkwood/tsx1x-common.h index 9a592962a6ea..7fa037361b55 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.h +++ b/arch/arm/mach-kirkwood/tsx1x-common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H | 1 | #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H |
2 | #define __ARCH_KIRKWOOD_TSX1X_COMMON_H | 2 | #define __ARCH_KIRKWOOD_TSX1X_COMMON_H |
3 | 3 | ||
4 | extern void qnap_tsx1x_register_flash(void); | 4 | extern void __init qnap_tsx1x_register_flash(void); |
5 | extern void qnap_tsx1x_power_off(void); | 5 | extern void qnap_tsx1x_power_off(void); |
6 | 6 | ||
7 | #endif | 7 | #endif |
diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S index 0859336a8e6d..5c934bdb7158 100644 --- a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S +++ b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * the Free Software Foundation. | 8 | * the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <asm/memory.h> | ||
11 | 12 | ||
12 | #include <mach/regs-board-a9m9750dev.h> | 13 | #include <mach/regs-board-a9m9750dev.h> |
13 | 14 | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h index 1b12d324b087..770a68c46e81 100644 --- a/arch/arm/mach-ns9xxx/include/mach/uncompress.h +++ b/arch/arm/mach-ns9xxx/include/mach/uncompress.h | |||
@@ -20,50 +20,49 @@ static void putc_dummy(char c, void __iomem *base) | |||
20 | /* nothing */ | 20 | /* nothing */ |
21 | } | 21 | } |
22 | 22 | ||
23 | static int timeout; | ||
24 | |||
23 | static void putc_ns9360(char c, void __iomem *base) | 25 | static void putc_ns9360(char c, void __iomem *base) |
24 | { | 26 | { |
25 | static int t = 0x10000; | ||
26 | do { | 27 | do { |
27 | if (t) | 28 | if (timeout) |
28 | --t; | 29 | --timeout; |
29 | 30 | ||
30 | if (__raw_readl(base + 8) & (1 << 3)) { | 31 | if (__raw_readl(base + 8) & (1 << 3)) { |
31 | __raw_writeb(c, base + 16); | 32 | __raw_writeb(c, base + 16); |
32 | t = 0x10000; | 33 | timeout = 0x10000; |
33 | break; | 34 | break; |
34 | } | 35 | } |
35 | } while (t); | 36 | } while (timeout); |
36 | } | 37 | } |
37 | 38 | ||
38 | static void putc_a9m9750dev(char c, void __iomem *base) | 39 | static void putc_a9m9750dev(char c, void __iomem *base) |
39 | { | 40 | { |
40 | static int t = 0x10000; | ||
41 | do { | 41 | do { |
42 | if (t) | 42 | if (timeout) |
43 | --t; | 43 | --timeout; |
44 | 44 | ||
45 | if (__raw_readb(base + 5) & (1 << 5)) { | 45 | if (__raw_readb(base + 5) & (1 << 5)) { |
46 | __raw_writeb(c, base); | 46 | __raw_writeb(c, base); |
47 | t = 0x10000; | 47 | timeout = 0x10000; |
48 | break; | 48 | break; |
49 | } | 49 | } |
50 | } while (t); | 50 | } while (timeout); |
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | static void putc_ns921x(char c, void __iomem *base) | 54 | static void putc_ns921x(char c, void __iomem *base) |
55 | { | 55 | { |
56 | static int t = 0x10000; | ||
57 | do { | 56 | do { |
58 | if (t) | 57 | if (timeout) |
59 | --t; | 58 | --timeout; |
60 | 59 | ||
61 | if (!(__raw_readl(base) & (1 << 11))) { | 60 | if (!(__raw_readl(base) & (1 << 11))) { |
62 | __raw_writeb(c, base + 0x0028); | 61 | __raw_writeb(c, base + 0x0028); |
63 | t = 0x10000; | 62 | timeout = 0x10000; |
64 | break; | 63 | break; |
65 | } | 64 | } |
66 | } while (t); | 65 | } while (timeout); |
67 | } | 66 | } |
68 | 67 | ||
69 | #define MSCS __REG(0xA0900184) | 68 | #define MSCS __REG(0xA0900184) |
@@ -89,6 +88,7 @@ static void putc_ns921x(char c, void __iomem *base) | |||
89 | 88 | ||
90 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) | 89 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) |
91 | { | 90 | { |
91 | timeout = 0x10000; | ||
92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { | 92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { |
93 | /* ns9360 or ns9750 */ | 93 | /* ns9360 or ns9750 */ |
94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { | 94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index abdf321c2d41..03483920ed6e 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -175,6 +175,10 @@ static void __init rx51_add_gpio_keys(void) | |||
175 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ | 175 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ |
176 | 176 | ||
177 | static int board_keymap[] = { | 177 | static int board_keymap[] = { |
178 | /* | ||
179 | * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row | ||
180 | * connected to the ground" matrix state. | ||
181 | */ | ||
178 | KEY(0, 0, KEY_Q), | 182 | KEY(0, 0, KEY_Q), |
179 | KEY(0, 1, KEY_O), | 183 | KEY(0, 1, KEY_O), |
180 | KEY(0, 2, KEY_P), | 184 | KEY(0, 2, KEY_P), |
@@ -182,6 +186,7 @@ static int board_keymap[] = { | |||
182 | KEY(0, 4, KEY_BACKSPACE), | 186 | KEY(0, 4, KEY_BACKSPACE), |
183 | KEY(0, 6, KEY_A), | 187 | KEY(0, 6, KEY_A), |
184 | KEY(0, 7, KEY_S), | 188 | KEY(0, 7, KEY_S), |
189 | |||
185 | KEY(1, 0, KEY_W), | 190 | KEY(1, 0, KEY_W), |
186 | KEY(1, 1, KEY_D), | 191 | KEY(1, 1, KEY_D), |
187 | KEY(1, 2, KEY_F), | 192 | KEY(1, 2, KEY_F), |
@@ -190,6 +195,7 @@ static int board_keymap[] = { | |||
190 | KEY(1, 5, KEY_J), | 195 | KEY(1, 5, KEY_J), |
191 | KEY(1, 6, KEY_K), | 196 | KEY(1, 6, KEY_K), |
192 | KEY(1, 7, KEY_L), | 197 | KEY(1, 7, KEY_L), |
198 | |||
193 | KEY(2, 0, KEY_E), | 199 | KEY(2, 0, KEY_E), |
194 | KEY(2, 1, KEY_DOT), | 200 | KEY(2, 1, KEY_DOT), |
195 | KEY(2, 2, KEY_UP), | 201 | KEY(2, 2, KEY_UP), |
@@ -197,6 +203,8 @@ static int board_keymap[] = { | |||
197 | KEY(2, 5, KEY_Z), | 203 | KEY(2, 5, KEY_Z), |
198 | KEY(2, 6, KEY_X), | 204 | KEY(2, 6, KEY_X), |
199 | KEY(2, 7, KEY_C), | 205 | KEY(2, 7, KEY_C), |
206 | KEY(2, 8, KEY_F9), | ||
207 | |||
200 | KEY(3, 0, KEY_R), | 208 | KEY(3, 0, KEY_R), |
201 | KEY(3, 1, KEY_V), | 209 | KEY(3, 1, KEY_V), |
202 | KEY(3, 2, KEY_B), | 210 | KEY(3, 2, KEY_B), |
@@ -205,20 +213,23 @@ static int board_keymap[] = { | |||
205 | KEY(3, 5, KEY_SPACE), | 213 | KEY(3, 5, KEY_SPACE), |
206 | KEY(3, 6, KEY_SPACE), | 214 | KEY(3, 6, KEY_SPACE), |
207 | KEY(3, 7, KEY_LEFT), | 215 | KEY(3, 7, KEY_LEFT), |
216 | |||
208 | KEY(4, 0, KEY_T), | 217 | KEY(4, 0, KEY_T), |
209 | KEY(4, 1, KEY_DOWN), | 218 | KEY(4, 1, KEY_DOWN), |
210 | KEY(4, 2, KEY_RIGHT), | 219 | KEY(4, 2, KEY_RIGHT), |
211 | KEY(4, 4, KEY_LEFTCTRL), | 220 | KEY(4, 4, KEY_LEFTCTRL), |
212 | KEY(4, 5, KEY_RIGHTALT), | 221 | KEY(4, 5, KEY_RIGHTALT), |
213 | KEY(4, 6, KEY_LEFTSHIFT), | 222 | KEY(4, 6, KEY_LEFTSHIFT), |
223 | KEY(4, 8, KEY_F10), | ||
224 | |||
214 | KEY(5, 0, KEY_Y), | 225 | KEY(5, 0, KEY_Y), |
226 | KEY(5, 8, KEY_F11), | ||
227 | |||
215 | KEY(6, 0, KEY_U), | 228 | KEY(6, 0, KEY_U), |
229 | |||
216 | KEY(7, 0, KEY_I), | 230 | KEY(7, 0, KEY_I), |
217 | KEY(7, 1, KEY_F7), | 231 | KEY(7, 1, KEY_F7), |
218 | KEY(7, 2, KEY_F8), | 232 | KEY(7, 2, KEY_F8), |
219 | KEY(0xff, 2, KEY_F9), | ||
220 | KEY(0xff, 4, KEY_F10), | ||
221 | KEY(0xff, 5, KEY_F11), | ||
222 | }; | 233 | }; |
223 | 234 | ||
224 | static struct matrix_keymap_data board_map_data = { | 235 | static struct matrix_keymap_data board_map_data = { |
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 45c23fd6df31..40b6ac2de876 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <mach/colibri.h> | 26 | #include <mach/colibri.h> |
27 | #include <mach/ohci.h> | 27 | #include <mach/ohci.h> |
28 | #include <mach/pxafb.h> | 28 | #include <mach/pxafb.h> |
29 | #include <mach/audio.h> | ||
29 | 30 | ||
30 | #include "generic.h" | 31 | #include "generic.h" |
31 | #include "devices.h" | 32 | #include "devices.h" |
@@ -145,7 +146,7 @@ static void __init colibri_pxa300_init_lcd(void) | |||
145 | static inline void colibri_pxa300_init_lcd(void) {} | 146 | static inline void colibri_pxa300_init_lcd(void) {} |
146 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ | 147 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
147 | 148 | ||
148 | #if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) | 149 | #if defined(CONFIG_SND_AC97_CODEC) || defined(CONFIG_SND_AC97_CODEC_MODULE) |
149 | static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = { | 150 | static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = { |
150 | GPIO24_AC97_SYSCLK, | 151 | GPIO24_AC97_SYSCLK, |
151 | GPIO23_AC97_nACRESET, | 152 | GPIO23_AC97_nACRESET, |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 3d1dcb9ac08f..51ffa6afb675 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -446,7 +446,7 @@ static struct platform_device corgiled_device = { | |||
446 | static struct pxamci_platform_data corgi_mci_platform_data = { | 446 | static struct pxamci_platform_data corgi_mci_platform_data = { |
447 | .detect_delay_ms = 250, | 447 | .detect_delay_ms = 250, |
448 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 448 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
449 | .gpio_card_detect = -1, | 449 | .gpio_card_detect = CORGI_GPIO_nSD_DETECT, |
450 | .gpio_card_ro = CORGI_GPIO_nSD_WP, | 450 | .gpio_card_ro = CORGI_GPIO_nSD_WP, |
451 | .gpio_power = CORGI_GPIO_SD_PWR, | 451 | .gpio_power = CORGI_GPIO_SD_PWR, |
452 | }; | 452 | }; |
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c index 9e4d9816726a..268a9bc6be8a 100644 --- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c +++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c | |||
@@ -256,13 +256,9 @@ static void init_sdram_rows(void) | |||
256 | 256 | ||
257 | static u32 mdrefr_dri(unsigned int freq) | 257 | static u32 mdrefr_dri(unsigned int freq) |
258 | { | 258 | { |
259 | u32 dri = 0; | 259 | u32 interval = freq * SDRAM_TREF / sdram_rows; |
260 | 260 | ||
261 | if (cpu_is_pxa25x()) | 261 | return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32; |
262 | dri = ((freq * SDRAM_TREF) / (sdram_rows * 32)); | ||
263 | if (cpu_is_pxa27x()) | ||
264 | dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32; | ||
265 | return dri; | ||
266 | } | 262 | } |
267 | 263 | ||
268 | /* find a valid frequency point */ | 264 | /* find a valid frequency point */ |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 0af36177ff08..c059dac02b61 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -41,10 +41,10 @@ void pxa27x_clear_otgph(void) | |||
41 | EXPORT_SYMBOL(pxa27x_clear_otgph); | 41 | EXPORT_SYMBOL(pxa27x_clear_otgph); |
42 | 42 | ||
43 | static unsigned long ac97_reset_config[] = { | 43 | static unsigned long ac97_reset_config[] = { |
44 | GPIO95_AC97_nRESET, | ||
45 | GPIO95_GPIO, | ||
46 | GPIO113_AC97_nRESET, | ||
47 | GPIO113_GPIO, | 44 | GPIO113_GPIO, |
45 | GPIO113_AC97_nRESET, | ||
46 | GPIO95_GPIO, | ||
47 | GPIO95_AC97_nRESET, | ||
48 | }; | 48 | }; |
49 | 49 | ||
50 | void pxa27x_assert_ac97reset(int reset_gpio, int on) | 50 | void pxa27x_assert_ac97reset(int reset_gpio, int on) |
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S index 50f071c5bf4d..5ea24d4d1ba6 100644 --- a/arch/arm/mach-shark/include/mach/debug-macro.S +++ b/arch/arm/mach-shark/include/mach/debug-macro.S | |||
@@ -20,6 +20,9 @@ | |||
20 | strb \rd, [\rx] | 20 | strb \rd, [\rx] |
21 | .endm | 21 | .endm |
22 | 22 | ||
23 | .macro waituart,rd,rx | ||
24 | .endm | ||
25 | |||
23 | .macro busyuart,rd,rx | 26 | .macro busyuart,rd,rx |
24 | mov \rd, #0 | 27 | mov \rd, #0 |
25 | 1001: add \rd, \rd, #1 | 28 | 1001: add \rd, \rd, #1 |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index f2b88c5fe142..4c704b4e8b34 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -70,6 +70,18 @@ endmenu | |||
70 | 70 | ||
71 | menu "Timer and clock configuration" | 71 | menu "Timer and clock configuration" |
72 | 72 | ||
73 | config SHMOBILE_TIMER_HZ | ||
74 | int "Kernel HZ (jiffies per second)" | ||
75 | range 32 1024 | ||
76 | default "128" | ||
77 | help | ||
78 | Allows the configuration of the timer frequency. It is customary | ||
79 | to have the timer interrupt run at 1000 Hz or 100 Hz, but in the | ||
80 | case of low timer frequencies other values may be more suitable. | ||
81 | SH-Mobile systems using a 32768 Hz RCLK for clock events may want | ||
82 | to select a HZ value such as 128 that can evenly divide RCLK. | ||
83 | A HZ value that does not divide evenly may cause timer drift. | ||
84 | |||
73 | config SH_TIMER_CMT | 85 | config SH_TIMER_CMT |
74 | bool "CMT timer driver" | 86 | bool "CMT timer driver" |
75 | default y | 87 | default y |
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index 5179b72e1ee3..132256bb8c81 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __ASM_MACH_IRQS_H | 2 | #define __ASM_MACH_IRQS_H |
3 | 3 | ||
4 | #define NR_IRQS 512 | 4 | #define NR_IRQS 512 |
5 | #define NR_IRQS_LEGACY 8 | ||
6 | 5 | ||
7 | #define evt2irq(evt) (((evt) >> 5) - 16) | 6 | #define evt2irq(evt) (((evt) >> 5) - 16) |
8 | #define irq2evt(irq) (((irq) + 16) << 5) | 7 | #define irq2evt(irq) (((irq) + 16) << 5) |
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 642207e18198..83c56324a472 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -93,7 +93,7 @@ static struct clk_lookup nuc900_clkregs[] = { | |||
93 | DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), | 93 | DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), |
94 | DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL), | 94 | DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL), |
95 | DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL), | 95 | DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL), |
96 | DEF_CLKLOOK(&clk_adc, "nuc900-adc", NULL), | 96 | DEF_CLKLOOK(&clk_adc, "nuc900-ts", NULL), |
97 | DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL), | 97 | DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL), |
98 | DEF_CLKLOOK(&clk_ext, NULL, "ext"), | 98 | DEF_CLKLOOK(&clk_ext, NULL, "ext"), |
99 | DEF_CLKLOOK(&clk_timer0, NULL, "timer0"), | 99 | DEF_CLKLOOK(&clk_timer0, NULL, "timer0"), |
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index 1670734b7e51..37fa593884ee 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | .macro addruart, rx | 17 | .macro addruart, rx |
18 | mrc p15, 0, \rx, c1, c0 | 18 | mrc p15, 0, \rx, c1, c0 |
19 | tst \rx, #1 @ MMU enabled? | 19 | tst \rx, #1 @ MMU enabled? |
20 | moveq \rx, =SPEAR_DBG_UART_BASE @ Physical base | 20 | moveq \rx, #SPEAR_DBG_UART_BASE @ Physical base |
21 | movne \rx, =VA_SPEAR_DBG_UART_BASE @ Virtual base | 21 | movne \rx, #VA_SPEAR_DBG_UART_BASE @ Virtual base |
22 | .endm | 22 | .endm |
23 | 23 | ||
24 | .macro senduart, rd, rx | 24 | .macro senduart, rd, rx |
diff --git a/arch/avr32/include/asm/ioctls.h b/arch/avr32/include/asm/ioctls.h index 0cf2c0a4502b..e6ac0b661076 100644 --- a/arch/avr32/include/asm/ioctls.h +++ b/arch/avr32/include/asm/ioctls.h | |||
@@ -54,6 +54,9 @@ | |||
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
56 | 56 | ||
57 | #define TIOCGRS485 0x542E | ||
58 | #define TIOCSRS485 0x542F | ||
59 | |||
57 | #define FIONCLEX 0x5450 | 60 | #define FIONCLEX 0x5450 |
58 | #define FIOCLEX 0x5451 | 61 | #define FIOCLEX 0x5451 |
59 | #define FIOASYNC 0x5452 | 62 | #define FIOASYNC 0x5452 |
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index c7f25bb1d068..61740201b311 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define __ASM_ARCH_BOARD_H | 5 | #define __ASM_ARCH_BOARD_H |
6 | 6 | ||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/serial.h> | ||
8 | 9 | ||
9 | #define GPIO_PIN_NONE (-1) | 10 | #define GPIO_PIN_NONE (-1) |
10 | 11 | ||
@@ -35,6 +36,7 @@ struct atmel_uart_data { | |||
35 | short use_dma_tx; /* use transmit DMA? */ | 36 | short use_dma_tx; /* use transmit DMA? */ |
36 | short use_dma_rx; /* use receive DMA? */ | 37 | short use_dma_rx; /* use receive DMA? */ |
37 | void __iomem *regs; /* virtual base address, if any */ | 38 | void __iomem *regs; /* virtual base address, if any */ |
39 | struct serial_rs485 rs485; /* rs485 settings */ | ||
38 | }; | 40 | }; |
39 | void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); | 41 | void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); |
40 | struct platform_device *at32_add_device_usart(unsigned int id); | 42 | struct platform_device *at32_add_device_usart(unsigned int id); |
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 2580e77624d2..f9e5622ebc95 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c | |||
@@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = { | |||
435 | static int __init au1xxx_platform_init(void) | 435 | static int __init au1xxx_platform_init(void) |
436 | { | 436 | { |
437 | unsigned int uartclk = get_au1x00_uart_baud_base() * 16; | 437 | unsigned int uartclk = get_au1x00_uart_baud_base() * 16; |
438 | int i; | 438 | int err, i; |
439 | 439 | ||
440 | /* Fill up uartclk. */ | 440 | /* Fill up uartclk. */ |
441 | for (i = 0; au1x00_uart_data[i].flags; i++) | 441 | for (i = 0; au1x00_uart_data[i].flags; i++) |
442 | au1x00_uart_data[i].uartclk = uartclk; | 442 | au1x00_uart_data[i].uartclk = uartclk; |
443 | 443 | ||
444 | err = platform_add_devices(au1xxx_platform_devices, | ||
445 | ARRAY_SIZE(au1xxx_platform_devices)); | ||
444 | #ifndef CONFIG_SOC_AU1100 | 446 | #ifndef CONFIG_SOC_AU1100 |
445 | /* Register second MAC if enabled in pinfunc */ | 447 | /* Register second MAC if enabled in pinfunc */ |
446 | if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) | 448 | if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) |
447 | platform_device_register(&au1xxx_eth1_device); | 449 | platform_device_register(&au1xxx_eth1_device); |
448 | #endif | 450 | #endif |
449 | 451 | ||
450 | return platform_add_devices(au1xxx_platform_devices, | 452 | return err; |
451 | ARRAY_SIZE(au1xxx_platform_devices)); | ||
452 | } | 453 | } |
453 | 454 | ||
454 | arch_initcall(au1xxx_platform_init); | 455 | arch_initcall(au1xxx_platform_init); |
diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c index a9f0336e1f1f..52d883d37dd7 100644 --- a/arch/mips/alchemy/mtx-1/board_setup.c +++ b/arch/mips/alchemy/mtx-1/board_setup.c | |||
@@ -67,8 +67,6 @@ static void mtx1_power_off(void) | |||
67 | 67 | ||
68 | void __init board_setup(void) | 68 | void __init board_setup(void) |
69 | { | 69 | { |
70 | alchemy_gpio2_enable(); | ||
71 | |||
72 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 70 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
73 | /* Enable USB power switch */ | 71 | /* Enable USB power switch */ |
74 | alchemy_gpio_direction_output(204, 0); | 72 | alchemy_gpio_direction_output(204, 0); |
@@ -117,11 +115,11 @@ mtx1_pci_idsel(unsigned int devsel, int assert) | |||
117 | 115 | ||
118 | if (assert && devsel != 0) | 116 | if (assert && devsel != 0) |
119 | /* Suppress signal to Cardbus */ | 117 | /* Suppress signal to Cardbus */ |
120 | gpio_set_value(1, 0); /* set EXT_IO3 OFF */ | 118 | alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */ |
121 | else | 119 | else |
122 | gpio_set_value(1, 1); /* set EXT_IO3 ON */ | 120 | alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */ |
123 | 121 | ||
124 | au_sync_udelay(1); | 122 | udelay(1); |
125 | return 1; | 123 | return 1; |
126 | } | 124 | } |
127 | 125 | ||
diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c index 9f544badd0b4..39c23366c5c7 100644 --- a/arch/mips/bcm63xx/dev-enet.c +++ b/arch/mips/bcm63xx/dev-enet.c | |||
@@ -104,6 +104,9 @@ int __init bcm63xx_enet_register(int unit, | |||
104 | if (unit > 1) | 104 | if (unit > 1) |
105 | return -ENODEV; | 105 | return -ENODEV; |
106 | 106 | ||
107 | if (unit == 1 && BCMCPU_IS_6338()) | ||
108 | return -ENODEV; | ||
109 | |||
107 | if (!shared_device_registered) { | 110 | if (!shared_device_registered) { |
108 | shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA); | 111 | shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA); |
109 | shared_res[0].end = shared_res[0].start; | 112 | shared_res[0].end = shared_res[0].start; |
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 59dc0c7ef733..c63c56bfd184 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -434,7 +434,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
434 | __asm__ __volatile__( | 434 | __asm__ __volatile__( |
435 | " .set mips3 \n" | 435 | " .set mips3 \n" |
436 | "1: lld %0, %1 # atomic64_add \n" | 436 | "1: lld %0, %1 # atomic64_add \n" |
437 | " addu %0, %2 \n" | 437 | " daddu %0, %2 \n" |
438 | " scd %0, %1 \n" | 438 | " scd %0, %1 \n" |
439 | " beqzl %0, 1b \n" | 439 | " beqzl %0, 1b \n" |
440 | " .set mips0 \n" | 440 | " .set mips0 \n" |
@@ -446,7 +446,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
446 | __asm__ __volatile__( | 446 | __asm__ __volatile__( |
447 | " .set mips3 \n" | 447 | " .set mips3 \n" |
448 | "1: lld %0, %1 # atomic64_add \n" | 448 | "1: lld %0, %1 # atomic64_add \n" |
449 | " addu %0, %2 \n" | 449 | " daddu %0, %2 \n" |
450 | " scd %0, %1 \n" | 450 | " scd %0, %1 \n" |
451 | " beqz %0, 2f \n" | 451 | " beqz %0, 2f \n" |
452 | " .subsection 2 \n" | 452 | " .subsection 2 \n" |
@@ -479,7 +479,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
479 | __asm__ __volatile__( | 479 | __asm__ __volatile__( |
480 | " .set mips3 \n" | 480 | " .set mips3 \n" |
481 | "1: lld %0, %1 # atomic64_sub \n" | 481 | "1: lld %0, %1 # atomic64_sub \n" |
482 | " subu %0, %2 \n" | 482 | " dsubu %0, %2 \n" |
483 | " scd %0, %1 \n" | 483 | " scd %0, %1 \n" |
484 | " beqzl %0, 1b \n" | 484 | " beqzl %0, 1b \n" |
485 | " .set mips0 \n" | 485 | " .set mips0 \n" |
@@ -491,7 +491,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
491 | __asm__ __volatile__( | 491 | __asm__ __volatile__( |
492 | " .set mips3 \n" | 492 | " .set mips3 \n" |
493 | "1: lld %0, %1 # atomic64_sub \n" | 493 | "1: lld %0, %1 # atomic64_sub \n" |
494 | " subu %0, %2 \n" | 494 | " dsubu %0, %2 \n" |
495 | " scd %0, %1 \n" | 495 | " scd %0, %1 \n" |
496 | " beqz %0, 2f \n" | 496 | " beqz %0, 2f \n" |
497 | " .subsection 2 \n" | 497 | " .subsection 2 \n" |
@@ -524,10 +524,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
524 | __asm__ __volatile__( | 524 | __asm__ __volatile__( |
525 | " .set mips3 \n" | 525 | " .set mips3 \n" |
526 | "1: lld %1, %2 # atomic64_add_return \n" | 526 | "1: lld %1, %2 # atomic64_add_return \n" |
527 | " addu %0, %1, %3 \n" | 527 | " daddu %0, %1, %3 \n" |
528 | " scd %0, %2 \n" | 528 | " scd %0, %2 \n" |
529 | " beqzl %0, 1b \n" | 529 | " beqzl %0, 1b \n" |
530 | " addu %0, %1, %3 \n" | 530 | " daddu %0, %1, %3 \n" |
531 | " .set mips0 \n" | 531 | " .set mips0 \n" |
532 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 532 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
533 | : "Ir" (i), "m" (v->counter) | 533 | : "Ir" (i), "m" (v->counter) |
@@ -538,10 +538,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
538 | __asm__ __volatile__( | 538 | __asm__ __volatile__( |
539 | " .set mips3 \n" | 539 | " .set mips3 \n" |
540 | "1: lld %1, %2 # atomic64_add_return \n" | 540 | "1: lld %1, %2 # atomic64_add_return \n" |
541 | " addu %0, %1, %3 \n" | 541 | " daddu %0, %1, %3 \n" |
542 | " scd %0, %2 \n" | 542 | " scd %0, %2 \n" |
543 | " beqz %0, 2f \n" | 543 | " beqz %0, 2f \n" |
544 | " addu %0, %1, %3 \n" | 544 | " daddu %0, %1, %3 \n" |
545 | " .subsection 2 \n" | 545 | " .subsection 2 \n" |
546 | "2: b 1b \n" | 546 | "2: b 1b \n" |
547 | " .previous \n" | 547 | " .previous \n" |
@@ -576,10 +576,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
576 | __asm__ __volatile__( | 576 | __asm__ __volatile__( |
577 | " .set mips3 \n" | 577 | " .set mips3 \n" |
578 | "1: lld %1, %2 # atomic64_sub_return \n" | 578 | "1: lld %1, %2 # atomic64_sub_return \n" |
579 | " subu %0, %1, %3 \n" | 579 | " dsubu %0, %1, %3 \n" |
580 | " scd %0, %2 \n" | 580 | " scd %0, %2 \n" |
581 | " beqzl %0, 1b \n" | 581 | " beqzl %0, 1b \n" |
582 | " subu %0, %1, %3 \n" | 582 | " dsubu %0, %1, %3 \n" |
583 | " .set mips0 \n" | 583 | " .set mips0 \n" |
584 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 584 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
585 | : "Ir" (i), "m" (v->counter) | 585 | : "Ir" (i), "m" (v->counter) |
@@ -590,10 +590,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
590 | __asm__ __volatile__( | 590 | __asm__ __volatile__( |
591 | " .set mips3 \n" | 591 | " .set mips3 \n" |
592 | "1: lld %1, %2 # atomic64_sub_return \n" | 592 | "1: lld %1, %2 # atomic64_sub_return \n" |
593 | " subu %0, %1, %3 \n" | 593 | " dsubu %0, %1, %3 \n" |
594 | " scd %0, %2 \n" | 594 | " scd %0, %2 \n" |
595 | " beqz %0, 2f \n" | 595 | " beqz %0, 2f \n" |
596 | " subu %0, %1, %3 \n" | 596 | " dsubu %0, %1, %3 \n" |
597 | " .subsection 2 \n" | 597 | " .subsection 2 \n" |
598 | "2: b 1b \n" | 598 | "2: b 1b \n" |
599 | " .previous \n" | 599 | " .previous \n" |
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index 1b5a6648eb86..baa318a59c97 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
@@ -984,16 +984,17 @@ | |||
984 | #define __NR_perf_event_open (__NR_Linux + 296) | 984 | #define __NR_perf_event_open (__NR_Linux + 296) |
985 | #define __NR_accept4 (__NR_Linux + 297) | 985 | #define __NR_accept4 (__NR_Linux + 297) |
986 | #define __NR_recvmmsg (__NR_Linux + 298) | 986 | #define __NR_recvmmsg (__NR_Linux + 298) |
987 | #define __NR_getdents64 (__NR_Linux + 299) | ||
987 | 988 | ||
988 | /* | 989 | /* |
989 | * Offset of the last N32 flavoured syscall | 990 | * Offset of the last N32 flavoured syscall |
990 | */ | 991 | */ |
991 | #define __NR_Linux_syscalls 298 | 992 | #define __NR_Linux_syscalls 299 |
992 | 993 | ||
993 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 994 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
994 | 995 | ||
995 | #define __NR_N32_Linux 6000 | 996 | #define __NR_N32_Linux 6000 |
996 | #define __NR_N32_Linux_syscalls 298 | 997 | #define __NR_N32_Linux_syscalls 299 |
997 | 998 | ||
998 | #ifdef __KERNEL__ | 999 | #ifdef __KERNEL__ |
999 | 1000 | ||
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index a5297e2a353a..a4faceea9d88 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -419,4 +419,5 @@ EXPORT(sysn32_call_table) | |||
419 | PTR sys_perf_event_open | 419 | PTR sys_perf_event_open |
420 | PTR sys_accept4 | 420 | PTR sys_accept4 |
421 | PTR compat_sys_recvmmsg | 421 | PTR compat_sys_recvmmsg |
422 | PTR sys_getdents | ||
422 | .size sysn32_call_table,.-sysn32_call_table | 423 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c index b773c1112b14..e5cdfd603f8f 100644 --- a/arch/mips/kernel/vdso.c +++ b/arch/mips/kernel/vdso.c | |||
@@ -61,11 +61,9 @@ static int __init init_vdso(void) | |||
61 | 61 | ||
62 | vunmap(vdso); | 62 | vunmap(vdso); |
63 | 63 | ||
64 | pr_notice("init_vdso successfull\n"); | ||
65 | |||
66 | return 0; | 64 | return 0; |
67 | } | 65 | } |
68 | device_initcall(init_vdso); | 66 | subsys_initcall(init_vdso); |
69 | 67 | ||
70 | static unsigned long vdso_addr(unsigned long start) | 68 | static unsigned long vdso_addr(unsigned long start) |
71 | { | 69 | { |
diff --git a/arch/mips/mti-malta/malta-pci.c b/arch/mips/mti-malta/malta-pci.c index 2fbfa1a8c3a9..bf80921f2f56 100644 --- a/arch/mips/mti-malta/malta-pci.c +++ b/arch/mips/mti-malta/malta-pci.c | |||
@@ -247,6 +247,8 @@ void __init mips_pcibios_init(void) | |||
247 | iomem_resource.end &= 0xfffffffffULL; /* 64 GB */ | 247 | iomem_resource.end &= 0xfffffffffULL; /* 64 GB */ |
248 | ioport_resource.end = controller->io_resource->end; | 248 | ioport_resource.end = controller->io_resource->end; |
249 | 249 | ||
250 | controller->io_map_base = mips_io_port_base; | ||
251 | |||
250 | register_pci_controller(controller); | 252 | register_pci_controller(controller); |
251 | } | 253 | } |
252 | 254 | ||
diff --git a/arch/mips/nxp/pnx8550/common/pci.c b/arch/mips/nxp/pnx8550/common/pci.c index eee4f3dfc410..98e86ddb86cc 100644 --- a/arch/mips/nxp/pnx8550/common/pci.c +++ b/arch/mips/nxp/pnx8550/common/pci.c | |||
@@ -44,6 +44,7 @@ extern struct pci_ops pnx8550_pci_ops; | |||
44 | 44 | ||
45 | static struct pci_controller pnx8550_controller = { | 45 | static struct pci_controller pnx8550_controller = { |
46 | .pci_ops = &pnx8550_pci_ops, | 46 | .pci_ops = &pnx8550_pci_ops, |
47 | .io_map_base = PNX8550_PORT_BASE, | ||
47 | .io_resource = &pci_io_resource, | 48 | .io_resource = &pci_io_resource, |
48 | .mem_resource = &pci_mem_resource, | 49 | .mem_resource = &pci_mem_resource, |
49 | }; | 50 | }; |
diff --git a/arch/mips/nxp/pnx8550/common/setup.c b/arch/mips/nxp/pnx8550/common/setup.c index 2aed50fef10f..64246c9c875c 100644 --- a/arch/mips/nxp/pnx8550/common/setup.c +++ b/arch/mips/nxp/pnx8550/common/setup.c | |||
@@ -113,7 +113,7 @@ void __init plat_mem_setup(void) | |||
113 | PNX8550_GLB2_ENAB_INTA_O = 0; | 113 | PNX8550_GLB2_ENAB_INTA_O = 0; |
114 | 114 | ||
115 | /* IO/MEM resources. */ | 115 | /* IO/MEM resources. */ |
116 | set_io_port_base(KSEG1); | 116 | set_io_port_base(PNX8550_PORT_BASE); |
117 | ioport_resource.start = 0; | 117 | ioport_resource.start = 0; |
118 | ioport_resource.end = ~0; | 118 | ioport_resource.end = ~0; |
119 | iomem_resource.start = 0; | 119 | iomem_resource.start = 0; |
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 04b31478a6d7..b7c03d80c88c 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c | |||
@@ -944,6 +944,7 @@ static struct pci_controller msp_pci_controller = { | |||
944 | .pci_ops = &msp_pci_ops, | 944 | .pci_ops = &msp_pci_ops, |
945 | .mem_resource = &pci_mem_resource, | 945 | .mem_resource = &pci_mem_resource, |
946 | .mem_offset = 0, | 946 | .mem_offset = 0, |
947 | .io_map_base = MSP_PCI_IOSPACE_BASE, | ||
947 | .io_resource = &pci_io_resource, | 948 | .io_resource = &pci_io_resource, |
948 | .io_offset = 0 | 949 | .io_offset = 0 |
949 | }; | 950 | }; |
diff --git a/arch/mips/pci/pci-yosemite.c b/arch/mips/pci/pci-yosemite.c index 0357946f30e6..cf5e1a25cb7d 100644 --- a/arch/mips/pci/pci-yosemite.c +++ b/arch/mips/pci/pci-yosemite.c | |||
@@ -54,6 +54,7 @@ static int __init pmc_yosemite_setup(void) | |||
54 | panic(ioremap_failed); | 54 | panic(ioremap_failed); |
55 | 55 | ||
56 | set_io_port_base(io_v_base); | 56 | set_io_port_base(io_v_base); |
57 | py_controller.io_map_base = io_v_base; | ||
57 | TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1); | 58 | TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1); |
58 | 59 | ||
59 | ioport_resource.end = TITAN_IO_SIZE - 1; | 60 | ioport_resource.end = TITAN_IO_SIZE - 1; |
diff --git a/arch/mips/powertv/asic/asic_devices.c b/arch/mips/powertv/asic/asic_devices.c index 8ee77887306a..9ec523e4dd06 100644 --- a/arch/mips/powertv/asic/asic_devices.c +++ b/arch/mips/powertv/asic/asic_devices.c | |||
@@ -472,6 +472,9 @@ void __init configure_platform(void) | |||
472 | * it*/ | 472 | * it*/ |
473 | platform_features = FFS_CAPABLE | DISPLAY_CAPABLE; | 473 | platform_features = FFS_CAPABLE | DISPLAY_CAPABLE; |
474 | 474 | ||
475 | /* Cronus and Cronus Lite have the same register map */ | ||
476 | set_register_map(CRONUS_IO_BASE, &cronus_register_map); | ||
477 | |||
475 | /* ASIC version will determine if this is a real CronusLite or | 478 | /* ASIC version will determine if this is a real CronusLite or |
476 | * Castrati(Cronus) */ | 479 | * Castrati(Cronus) */ |
477 | chipversion = asic_read(chipver3) << 24; | 480 | chipversion = asic_read(chipver3) << 24; |
@@ -484,8 +487,6 @@ void __init configure_platform(void) | |||
484 | else | 487 | else |
485 | asic = ASIC_CRONUSLITE; | 488 | asic = ASIC_CRONUSLITE; |
486 | 489 | ||
487 | /* Cronus and Cronus Lite have the same register map */ | ||
488 | set_register_map(CRONUS_IO_BASE, &cronus_register_map); | ||
489 | gp_resources = non_dvr_cronuslite_resources; | 490 | gp_resources = non_dvr_cronuslite_resources; |
490 | pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, " | 491 | pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, " |
491 | "chipversion=0x%08X\n", | 492 | "chipversion=0x%08X\n", |
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 2a9cd74a841e..076327f2eff7 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h | |||
@@ -8,9 +8,9 @@ | |||
8 | * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory | 8 | * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory |
9 | * and therefore we can only deal with memory within this range | 9 | * and therefore we can only deal with memory within this range |
10 | */ | 10 | */ |
11 | #define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) | 11 | #define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) |
12 | #define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) | 12 | #define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) |
13 | #define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) | 13 | #define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) |
14 | 14 | ||
15 | #else | 15 | #else |
16 | 16 | ||
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index 2102b214a87c..0e398cfee2c8 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -250,7 +250,9 @@ extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
250 | int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, | 250 | int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, |
251 | pte_t *ptep, unsigned long trap, int local, int ssize, | 251 | pte_t *ptep, unsigned long trap, int local, int ssize, |
252 | unsigned int shift, unsigned int mmu_psize); | 252 | unsigned int shift, unsigned int mmu_psize); |
253 | 253 | extern void hash_failure_debug(unsigned long ea, unsigned long access, | |
254 | unsigned long vsid, unsigned long trap, | ||
255 | int ssize, int psize, unsigned long pte); | ||
254 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | 256 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, |
255 | unsigned long pstart, unsigned long prot, | 257 | unsigned long pstart, unsigned long prot, |
256 | int psize, int ssize); | 258 | int psize, int ssize); |
diff --git a/arch/powerpc/kernel/perf_event_fsl_emb.c b/arch/powerpc/kernel/perf_event_fsl_emb.c index 369872f6cf78..babcceecd2ea 100644 --- a/arch/powerpc/kernel/perf_event_fsl_emb.c +++ b/arch/powerpc/kernel/perf_event_fsl_emb.c | |||
@@ -566,9 +566,9 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
566 | * Finally record data if requested. | 566 | * Finally record data if requested. |
567 | */ | 567 | */ |
568 | if (record) { | 568 | if (record) { |
569 | struct perf_sample_data data = { | 569 | struct perf_sample_data data; |
570 | .period = event->hw.last_period, | 570 | |
571 | }; | 571 | perf_sample_data_init(&data, 0); |
572 | 572 | ||
573 | if (perf_event_overflow(event, nmi, &data, regs)) { | 573 | if (perf_event_overflow(event, nmi, &data, regs)) { |
574 | /* | 574 | /* |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9d3953983fb7..fed9bf6187d1 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -414,7 +414,7 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node) | |||
414 | u64 base, size, memblock_size; | 414 | u64 base, size, memblock_size; |
415 | unsigned int is_kexec_kdump = 0, rngs; | 415 | unsigned int is_kexec_kdump = 0, rngs; |
416 | 416 | ||
417 | ls = of_get_flat_dt_prop(node, "ibm,memblock-size", &l); | 417 | ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l); |
418 | if (ls == NULL || l < dt_root_size_cells * sizeof(__be32)) | 418 | if (ls == NULL || l < dt_root_size_cells * sizeof(__be32)) |
419 | return 0; | 419 | return 0; |
420 | memblock_size = dt_mem_next_cell(dt_root_size_cells, &ls); | 420 | memblock_size = dt_mem_next_cell(dt_root_size_cells, &ls); |
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index a719f53921a5..3079f6b44cf5 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
@@ -68,9 +68,6 @@ _GLOBAL(__hash_page_4K) | |||
68 | std r8,STK_PARM(r8)(r1) | 68 | std r8,STK_PARM(r8)(r1) |
69 | std r9,STK_PARM(r9)(r1) | 69 | std r9,STK_PARM(r9)(r1) |
70 | 70 | ||
71 | /* Add _PAGE_PRESENT to access */ | ||
72 | ori r4,r4,_PAGE_PRESENT | ||
73 | |||
74 | /* Save non-volatile registers. | 71 | /* Save non-volatile registers. |
75 | * r31 will hold "old PTE" | 72 | * r31 will hold "old PTE" |
76 | * r30 is "new PTE" | 73 | * r30 is "new PTE" |
@@ -347,9 +344,6 @@ _GLOBAL(__hash_page_4K) | |||
347 | std r8,STK_PARM(r8)(r1) | 344 | std r8,STK_PARM(r8)(r1) |
348 | std r9,STK_PARM(r9)(r1) | 345 | std r9,STK_PARM(r9)(r1) |
349 | 346 | ||
350 | /* Add _PAGE_PRESENT to access */ | ||
351 | ori r4,r4,_PAGE_PRESENT | ||
352 | |||
353 | /* Save non-volatile registers. | 347 | /* Save non-volatile registers. |
354 | * r31 will hold "old PTE" | 348 | * r31 will hold "old PTE" |
355 | * r30 is "new PTE" | 349 | * r30 is "new PTE" |
@@ -687,9 +681,6 @@ _GLOBAL(__hash_page_64K) | |||
687 | std r8,STK_PARM(r8)(r1) | 681 | std r8,STK_PARM(r8)(r1) |
688 | std r9,STK_PARM(r9)(r1) | 682 | std r9,STK_PARM(r9)(r1) |
689 | 683 | ||
690 | /* Add _PAGE_PRESENT to access */ | ||
691 | ori r4,r4,_PAGE_PRESENT | ||
692 | |||
693 | /* Save non-volatile registers. | 684 | /* Save non-volatile registers. |
694 | * r31 will hold "old PTE" | 685 | * r31 will hold "old PTE" |
695 | * r30 is "new PTE" | 686 | * r30 is "new PTE" |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 98f262de5585..09dffe6efa46 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -871,6 +871,18 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea) | |||
871 | } | 871 | } |
872 | #endif | 872 | #endif |
873 | 873 | ||
874 | void hash_failure_debug(unsigned long ea, unsigned long access, | ||
875 | unsigned long vsid, unsigned long trap, | ||
876 | int ssize, int psize, unsigned long pte) | ||
877 | { | ||
878 | if (!printk_ratelimit()) | ||
879 | return; | ||
880 | pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n", | ||
881 | ea, access, current->comm); | ||
882 | pr_info(" trap=0x%lx vsid=0x%lx ssize=%d psize=%d pte=0x%lx\n", | ||
883 | trap, vsid, ssize, psize, pte); | ||
884 | } | ||
885 | |||
874 | /* Result code is: | 886 | /* Result code is: |
875 | * 0 - handled | 887 | * 0 - handled |
876 | * 1 - normal page fault | 888 | * 1 - normal page fault |
@@ -955,6 +967,17 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
955 | return 1; | 967 | return 1; |
956 | } | 968 | } |
957 | 969 | ||
970 | /* Add _PAGE_PRESENT to the required access perm */ | ||
971 | access |= _PAGE_PRESENT; | ||
972 | |||
973 | /* Pre-check access permissions (will be re-checked atomically | ||
974 | * in __hash_page_XX but this pre-check is a fast path | ||
975 | */ | ||
976 | if (access & ~pte_val(*ptep)) { | ||
977 | DBG_LOW(" no access !\n"); | ||
978 | return 1; | ||
979 | } | ||
980 | |||
958 | #ifdef CONFIG_HUGETLB_PAGE | 981 | #ifdef CONFIG_HUGETLB_PAGE |
959 | if (hugeshift) | 982 | if (hugeshift) |
960 | return __hash_page_huge(ea, access, vsid, ptep, trap, local, | 983 | return __hash_page_huge(ea, access, vsid, ptep, trap, local, |
@@ -967,14 +990,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
967 | DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep), | 990 | DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep), |
968 | pte_val(*(ptep + PTRS_PER_PTE))); | 991 | pte_val(*(ptep + PTRS_PER_PTE))); |
969 | #endif | 992 | #endif |
970 | /* Pre-check access permissions (will be re-checked atomically | ||
971 | * in __hash_page_XX but this pre-check is a fast path | ||
972 | */ | ||
973 | if (access & ~pte_val(*ptep)) { | ||
974 | DBG_LOW(" no access !\n"); | ||
975 | return 1; | ||
976 | } | ||
977 | |||
978 | /* Do actual hashing */ | 993 | /* Do actual hashing */ |
979 | #ifdef CONFIG_PPC_64K_PAGES | 994 | #ifdef CONFIG_PPC_64K_PAGES |
980 | /* If _PAGE_4K_PFN is set, make sure this is a 4k segment */ | 995 | /* If _PAGE_4K_PFN is set, make sure this is a 4k segment */ |
@@ -1033,6 +1048,12 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
1033 | local, ssize, spp); | 1048 | local, ssize, spp); |
1034 | } | 1049 | } |
1035 | 1050 | ||
1051 | /* Dump some info in case of hash insertion failure, they should | ||
1052 | * never happen so it is really useful to know if/when they do | ||
1053 | */ | ||
1054 | if (rc == -1) | ||
1055 | hash_failure_debug(ea, access, vsid, trap, ssize, psize, | ||
1056 | pte_val(*ptep)); | ||
1036 | #ifndef CONFIG_PPC_64K_PAGES | 1057 | #ifndef CONFIG_PPC_64K_PAGES |
1037 | DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); | 1058 | DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); |
1038 | #else | 1059 | #else |
@@ -1051,8 +1072,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, | |||
1051 | void *pgdir; | 1072 | void *pgdir; |
1052 | pte_t *ptep; | 1073 | pte_t *ptep; |
1053 | unsigned long flags; | 1074 | unsigned long flags; |
1054 | int local = 0; | 1075 | int rc, ssize, local = 0; |
1055 | int ssize; | ||
1056 | 1076 | ||
1057 | BUG_ON(REGION_ID(ea) != USER_REGION_ID); | 1077 | BUG_ON(REGION_ID(ea) != USER_REGION_ID); |
1058 | 1078 | ||
@@ -1098,11 +1118,18 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, | |||
1098 | /* Hash it in */ | 1118 | /* Hash it in */ |
1099 | #ifdef CONFIG_PPC_HAS_HASH_64K | 1119 | #ifdef CONFIG_PPC_HAS_HASH_64K |
1100 | if (mm->context.user_psize == MMU_PAGE_64K) | 1120 | if (mm->context.user_psize == MMU_PAGE_64K) |
1101 | __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); | 1121 | rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); |
1102 | else | 1122 | else |
1103 | #endif /* CONFIG_PPC_HAS_HASH_64K */ | 1123 | #endif /* CONFIG_PPC_HAS_HASH_64K */ |
1104 | __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize, | 1124 | rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize, |
1105 | subpage_protection(pgdir, ea)); | 1125 | subpage_protection(pgdir, ea)); |
1126 | |||
1127 | /* Dump some info in case of hash insertion failure, they should | ||
1128 | * never happen so it is really useful to know if/when they do | ||
1129 | */ | ||
1130 | if (rc == -1) | ||
1131 | hash_failure_debug(ea, access, vsid, trap, ssize, | ||
1132 | mm->context.user_psize, pte_val(*ptep)); | ||
1106 | 1133 | ||
1107 | local_irq_restore(flags); | 1134 | local_irq_restore(flags); |
1108 | } | 1135 | } |
diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c index 199539882f92..cc5c273086cf 100644 --- a/arch/powerpc/mm/hugetlbpage-hash64.c +++ b/arch/powerpc/mm/hugetlbpage-hash64.c | |||
@@ -21,21 +21,13 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, | |||
21 | unsigned long old_pte, new_pte; | 21 | unsigned long old_pte, new_pte; |
22 | unsigned long va, rflags, pa, sz; | 22 | unsigned long va, rflags, pa, sz; |
23 | long slot; | 23 | long slot; |
24 | int err = 1; | ||
25 | 24 | ||
26 | BUG_ON(shift != mmu_psize_defs[mmu_psize].shift); | 25 | BUG_ON(shift != mmu_psize_defs[mmu_psize].shift); |
27 | 26 | ||
28 | /* Search the Linux page table for a match with va */ | 27 | /* Search the Linux page table for a match with va */ |
29 | va = hpt_va(ea, vsid, ssize); | 28 | va = hpt_va(ea, vsid, ssize); |
30 | 29 | ||
31 | /* | 30 | /* At this point, we have a pte (old_pte) which can be used to build |
32 | * Check the user's access rights to the page. If access should be | ||
33 | * prevented then send the problem up to do_page_fault. | ||
34 | */ | ||
35 | if (unlikely(access & ~pte_val(*ptep))) | ||
36 | goto out; | ||
37 | /* | ||
38 | * At this point, we have a pte (old_pte) which can be used to build | ||
39 | * or update an HPTE. There are 2 cases: | 31 | * or update an HPTE. There are 2 cases: |
40 | * | 32 | * |
41 | * 1. There is a valid (present) pte with no associated HPTE (this is | 33 | * 1. There is a valid (present) pte with no associated HPTE (this is |
@@ -49,9 +41,17 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, | |||
49 | 41 | ||
50 | do { | 42 | do { |
51 | old_pte = pte_val(*ptep); | 43 | old_pte = pte_val(*ptep); |
52 | if (old_pte & _PAGE_BUSY) | 44 | /* If PTE busy, retry the access */ |
53 | goto out; | 45 | if (unlikely(old_pte & _PAGE_BUSY)) |
46 | return 0; | ||
47 | /* If PTE permissions don't match, take page fault */ | ||
48 | if (unlikely(access & ~old_pte)) | ||
49 | return 1; | ||
50 | /* Try to lock the PTE, add ACCESSED and DIRTY if it was | ||
51 | * a write access */ | ||
54 | new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED; | 52 | new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED; |
53 | if (access & _PAGE_RW) | ||
54 | new_pte |= _PAGE_DIRTY; | ||
55 | } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, | 55 | } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, |
56 | old_pte, new_pte)); | 56 | old_pte, new_pte)); |
57 | 57 | ||
@@ -121,8 +121,16 @@ repeat: | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | if (unlikely(slot == -2)) | 124 | /* |
125 | panic("hash_huge_page: pte_insert failed\n"); | 125 | * Hypervisor failure. Restore old pte and return -1 |
126 | * similar to __hash_page_* | ||
127 | */ | ||
128 | if (unlikely(slot == -2)) { | ||
129 | *ptep = __pte(old_pte); | ||
130 | hash_failure_debug(ea, access, vsid, trap, ssize, | ||
131 | mmu_psize, old_pte); | ||
132 | return -1; | ||
133 | } | ||
126 | 134 | ||
127 | new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX); | 135 | new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX); |
128 | } | 136 | } |
@@ -131,9 +139,5 @@ repeat: | |||
131 | * No need to use ldarx/stdcx here | 139 | * No need to use ldarx/stdcx here |
132 | */ | 140 | */ |
133 | *ptep = __pte(new_pte & ~_PAGE_BUSY); | 141 | *ptep = __pte(new_pte & ~_PAGE_BUSY); |
134 | 142 | return 0; | |
135 | err = 0; | ||
136 | |||
137 | out: | ||
138 | return err; | ||
139 | } | 143 | } |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f47364585ecd..aa731af720c0 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -398,15 +398,15 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | |||
398 | } | 398 | } |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Retreive and validate the ibm,memblock-size property for drconf memory | 401 | * Retreive and validate the ibm,lmb-size property for drconf memory |
402 | * from the device tree. | 402 | * from the device tree. |
403 | */ | 403 | */ |
404 | static u64 of_get_memblock_size(struct device_node *memory) | 404 | static u64 of_get_lmb_size(struct device_node *memory) |
405 | { | 405 | { |
406 | const u32 *prop; | 406 | const u32 *prop; |
407 | u32 len; | 407 | u32 len; |
408 | 408 | ||
409 | prop = of_get_property(memory, "ibm,memblock-size", &len); | 409 | prop = of_get_property(memory, "ibm,lmb-size", &len); |
410 | if (!prop || len < sizeof(unsigned int)) | 410 | if (!prop || len < sizeof(unsigned int)) |
411 | return 0; | 411 | return 0; |
412 | 412 | ||
@@ -562,7 +562,7 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start, | |||
562 | static inline int __init read_usm_ranges(const u32 **usm) | 562 | static inline int __init read_usm_ranges(const u32 **usm) |
563 | { | 563 | { |
564 | /* | 564 | /* |
565 | * For each memblock in ibm,dynamic-memory a corresponding | 565 | * For each lmb in ibm,dynamic-memory a corresponding |
566 | * entry in linux,drconf-usable-memory property contains | 566 | * entry in linux,drconf-usable-memory property contains |
567 | * a counter followed by that many (base, size) duple. | 567 | * a counter followed by that many (base, size) duple. |
568 | * read the counter from linux,drconf-usable-memory | 568 | * read the counter from linux,drconf-usable-memory |
@@ -578,7 +578,7 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
578 | { | 578 | { |
579 | const u32 *dm, *usm; | 579 | const u32 *dm, *usm; |
580 | unsigned int n, rc, ranges, is_kexec_kdump = 0; | 580 | unsigned int n, rc, ranges, is_kexec_kdump = 0; |
581 | unsigned long memblock_size, base, size, sz; | 581 | unsigned long lmb_size, base, size, sz; |
582 | int nid; | 582 | int nid; |
583 | struct assoc_arrays aa; | 583 | struct assoc_arrays aa; |
584 | 584 | ||
@@ -586,8 +586,8 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
586 | if (!n) | 586 | if (!n) |
587 | return; | 587 | return; |
588 | 588 | ||
589 | memblock_size = of_get_memblock_size(memory); | 589 | lmb_size = of_get_lmb_size(memory); |
590 | if (!memblock_size) | 590 | if (!lmb_size) |
591 | return; | 591 | return; |
592 | 592 | ||
593 | rc = of_get_assoc_arrays(memory, &aa); | 593 | rc = of_get_assoc_arrays(memory, &aa); |
@@ -611,7 +611,7 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
611 | continue; | 611 | continue; |
612 | 612 | ||
613 | base = drmem.base_addr; | 613 | base = drmem.base_addr; |
614 | size = memblock_size; | 614 | size = lmb_size; |
615 | ranges = 1; | 615 | ranges = 1; |
616 | 616 | ||
617 | if (is_kexec_kdump) { | 617 | if (is_kexec_kdump) { |
@@ -1072,7 +1072,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1072 | { | 1072 | { |
1073 | const u32 *dm; | 1073 | const u32 *dm; |
1074 | unsigned int drconf_cell_cnt, rc; | 1074 | unsigned int drconf_cell_cnt, rc; |
1075 | unsigned long memblock_size; | 1075 | unsigned long lmb_size; |
1076 | struct assoc_arrays aa; | 1076 | struct assoc_arrays aa; |
1077 | int nid = -1; | 1077 | int nid = -1; |
1078 | 1078 | ||
@@ -1080,8 +1080,8 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1080 | if (!drconf_cell_cnt) | 1080 | if (!drconf_cell_cnt) |
1081 | return -1; | 1081 | return -1; |
1082 | 1082 | ||
1083 | memblock_size = of_get_memblock_size(memory); | 1083 | lmb_size = of_get_lmb_size(memory); |
1084 | if (!memblock_size) | 1084 | if (!lmb_size) |
1085 | return -1; | 1085 | return -1; |
1086 | 1086 | ||
1087 | rc = of_get_assoc_arrays(memory, &aa); | 1087 | rc = of_get_assoc_arrays(memory, &aa); |
@@ -1100,7 +1100,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1100 | continue; | 1100 | continue; |
1101 | 1101 | ||
1102 | if ((scn_addr < drmem.base_addr) | 1102 | if ((scn_addr < drmem.base_addr) |
1103 | || (scn_addr >= (drmem.base_addr + memblock_size))) | 1103 | || (scn_addr >= (drmem.base_addr + lmb_size))) |
1104 | continue; | 1104 | continue; |
1105 | 1105 | ||
1106 | nid = of_drconf_to_nid_single(&drmem, &aa); | 1106 | nid = of_drconf_to_nid_single(&drmem, &aa); |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index deab5f946090..bc8803664140 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -69,7 +69,7 @@ static int pseries_remove_memory(struct device_node *np) | |||
69 | const char *type; | 69 | const char *type; |
70 | const unsigned int *regs; | 70 | const unsigned int *regs; |
71 | unsigned long base; | 71 | unsigned long base; |
72 | unsigned int memblock_size; | 72 | unsigned int lmb_size; |
73 | int ret = -EINVAL; | 73 | int ret = -EINVAL; |
74 | 74 | ||
75 | /* | 75 | /* |
@@ -87,9 +87,9 @@ static int pseries_remove_memory(struct device_node *np) | |||
87 | return ret; | 87 | return ret; |
88 | 88 | ||
89 | base = *(unsigned long *)regs; | 89 | base = *(unsigned long *)regs; |
90 | memblock_size = regs[3]; | 90 | lmb_size = regs[3]; |
91 | 91 | ||
92 | ret = pseries_remove_memblock(base, memblock_size); | 92 | ret = pseries_remove_memblock(base, lmb_size); |
93 | return ret; | 93 | return ret; |
94 | } | 94 | } |
95 | 95 | ||
@@ -98,7 +98,7 @@ static int pseries_add_memory(struct device_node *np) | |||
98 | const char *type; | 98 | const char *type; |
99 | const unsigned int *regs; | 99 | const unsigned int *regs; |
100 | unsigned long base; | 100 | unsigned long base; |
101 | unsigned int memblock_size; | 101 | unsigned int lmb_size; |
102 | int ret = -EINVAL; | 102 | int ret = -EINVAL; |
103 | 103 | ||
104 | /* | 104 | /* |
@@ -116,36 +116,36 @@ static int pseries_add_memory(struct device_node *np) | |||
116 | return ret; | 116 | return ret; |
117 | 117 | ||
118 | base = *(unsigned long *)regs; | 118 | base = *(unsigned long *)regs; |
119 | memblock_size = regs[3]; | 119 | lmb_size = regs[3]; |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Update memory region to represent the memory add | 122 | * Update memory region to represent the memory add |
123 | */ | 123 | */ |
124 | ret = memblock_add(base, memblock_size); | 124 | ret = memblock_add(base, lmb_size); |
125 | return (ret < 0) ? -EINVAL : 0; | 125 | return (ret < 0) ? -EINVAL : 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | static int pseries_drconf_memory(unsigned long *base, unsigned int action) | 128 | static int pseries_drconf_memory(unsigned long *base, unsigned int action) |
129 | { | 129 | { |
130 | struct device_node *np; | 130 | struct device_node *np; |
131 | const unsigned long *memblock_size; | 131 | const unsigned long *lmb_size; |
132 | int rc; | 132 | int rc; |
133 | 133 | ||
134 | np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); | 134 | np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); |
135 | if (!np) | 135 | if (!np) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | 137 | ||
138 | memblock_size = of_get_property(np, "ibm,memblock-size", NULL); | 138 | lmb_size = of_get_property(np, "ibm,lmb-size", NULL); |
139 | if (!memblock_size) { | 139 | if (!lmb_size) { |
140 | of_node_put(np); | 140 | of_node_put(np); |
141 | return -EINVAL; | 141 | return -EINVAL; |
142 | } | 142 | } |
143 | 143 | ||
144 | if (action == PSERIES_DRCONF_MEM_ADD) { | 144 | if (action == PSERIES_DRCONF_MEM_ADD) { |
145 | rc = memblock_add(*base, *memblock_size); | 145 | rc = memblock_add(*base, *lmb_size); |
146 | rc = (rc < 0) ? -EINVAL : 0; | 146 | rc = (rc < 0) ? -EINVAL : 0; |
147 | } else if (action == PSERIES_DRCONF_MEM_REMOVE) { | 147 | } else if (action == PSERIES_DRCONF_MEM_REMOVE) { |
148 | rc = pseries_remove_memblock(*base, *memblock_size); | 148 | rc = pseries_remove_memblock(*base, *lmb_size); |
149 | } else { | 149 | } else { |
150 | rc = -EINVAL; | 150 | rc = -EINVAL; |
151 | } | 151 | } |
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 259e3fd50993..1dc07a0014c1 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.34-rc3 | 3 | # Linux kernel version: 2.6.34 |
4 | # Sat Apr 3 15:49:56 2010 | 4 | # Wed May 26 21:14:01 2010 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
@@ -107,10 +107,9 @@ CONFIG_PERF_COUNTERS=y | |||
107 | # CONFIG_DEBUG_PERF_USE_VMALLOC is not set | 107 | # CONFIG_DEBUG_PERF_USE_VMALLOC is not set |
108 | CONFIG_VM_EVENT_COUNTERS=y | 108 | CONFIG_VM_EVENT_COUNTERS=y |
109 | CONFIG_PCI_QUIRKS=y | 109 | CONFIG_PCI_QUIRKS=y |
110 | CONFIG_SLUB_DEBUG=y | ||
111 | # CONFIG_COMPAT_BRK is not set | 110 | # CONFIG_COMPAT_BRK is not set |
112 | # CONFIG_SLAB is not set | 111 | CONFIG_SLAB=y |
113 | CONFIG_SLUB=y | 112 | # CONFIG_SLUB is not set |
114 | # CONFIG_SLOB is not set | 113 | # CONFIG_SLOB is not set |
115 | CONFIG_PROFILING=y | 114 | CONFIG_PROFILING=y |
116 | CONFIG_TRACEPOINTS=y | 115 | CONFIG_TRACEPOINTS=y |
@@ -239,6 +238,7 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | |||
239 | CONFIG_SPARSEMEM_VMEMMAP=y | 238 | CONFIG_SPARSEMEM_VMEMMAP=y |
240 | CONFIG_PAGEFLAGS_EXTENDED=y | 239 | CONFIG_PAGEFLAGS_EXTENDED=y |
241 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 240 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
241 | # CONFIG_COMPACTION is not set | ||
242 | CONFIG_MIGRATION=y | 242 | CONFIG_MIGRATION=y |
243 | CONFIG_PHYS_ADDR_T_64BIT=y | 243 | CONFIG_PHYS_ADDR_T_64BIT=y |
244 | CONFIG_ZONE_DMA_FLAG=0 | 244 | CONFIG_ZONE_DMA_FLAG=0 |
@@ -351,6 +351,7 @@ CONFIG_IPV6_TUNNEL=m | |||
351 | # CONFIG_RDS is not set | 351 | # CONFIG_RDS is not set |
352 | # CONFIG_TIPC is not set | 352 | # CONFIG_TIPC is not set |
353 | # CONFIG_ATM is not set | 353 | # CONFIG_ATM is not set |
354 | # CONFIG_L2TP is not set | ||
354 | # CONFIG_BRIDGE is not set | 355 | # CONFIG_BRIDGE is not set |
355 | # CONFIG_NET_DSA is not set | 356 | # CONFIG_NET_DSA is not set |
356 | CONFIG_VLAN_8021Q=m | 357 | CONFIG_VLAN_8021Q=m |
@@ -367,6 +368,7 @@ CONFIG_VLAN_8021Q=m | |||
367 | # CONFIG_IEEE802154 is not set | 368 | # CONFIG_IEEE802154 is not set |
368 | # CONFIG_NET_SCHED is not set | 369 | # CONFIG_NET_SCHED is not set |
369 | # CONFIG_DCB is not set | 370 | # CONFIG_DCB is not set |
371 | CONFIG_RPS=y | ||
370 | 372 | ||
371 | # | 373 | # |
372 | # Network testing | 374 | # Network testing |
@@ -386,9 +388,14 @@ CONFIG_WIRELESS=y | |||
386 | # | 388 | # |
387 | # CFG80211 needs to be enabled for MAC80211 | 389 | # CFG80211 needs to be enabled for MAC80211 |
388 | # | 390 | # |
391 | |||
392 | # | ||
393 | # Some wireless drivers require a rate control algorithm | ||
394 | # | ||
389 | # CONFIG_WIMAX is not set | 395 | # CONFIG_WIMAX is not set |
390 | # CONFIG_RFKILL is not set | 396 | # CONFIG_RFKILL is not set |
391 | # CONFIG_NET_9P is not set | 397 | # CONFIG_NET_9P is not set |
398 | # CONFIG_CAIF is not set | ||
392 | 399 | ||
393 | # | 400 | # |
394 | # Device Drivers | 401 | # Device Drivers |
@@ -658,6 +665,7 @@ CONFIG_PHYLIB=m | |||
658 | # CONFIG_NATIONAL_PHY is not set | 665 | # CONFIG_NATIONAL_PHY is not set |
659 | # CONFIG_STE10XP is not set | 666 | # CONFIG_STE10XP is not set |
660 | # CONFIG_LSI_ET1011C_PHY is not set | 667 | # CONFIG_LSI_ET1011C_PHY is not set |
668 | # CONFIG_MICREL_PHY is not set | ||
661 | # CONFIG_MDIO_BITBANG is not set | 669 | # CONFIG_MDIO_BITBANG is not set |
662 | CONFIG_NET_ETHERNET=y | 670 | CONFIG_NET_ETHERNET=y |
663 | CONFIG_MII=m | 671 | CONFIG_MII=m |
@@ -734,6 +742,8 @@ CONFIG_NETDEV_10000=y | |||
734 | # CONFIG_CHELSIO_T1 is not set | 742 | # CONFIG_CHELSIO_T1 is not set |
735 | CONFIG_CHELSIO_T3_DEPENDS=y | 743 | CONFIG_CHELSIO_T3_DEPENDS=y |
736 | # CONFIG_CHELSIO_T3 is not set | 744 | # CONFIG_CHELSIO_T3 is not set |
745 | CONFIG_CHELSIO_T4_DEPENDS=y | ||
746 | # CONFIG_CHELSIO_T4 is not set | ||
737 | # CONFIG_ENIC is not set | 747 | # CONFIG_ENIC is not set |
738 | # CONFIG_IXGBE is not set | 748 | # CONFIG_IXGBE is not set |
739 | # CONFIG_IXGBEVF is not set | 749 | # CONFIG_IXGBEVF is not set |
@@ -766,6 +776,7 @@ CONFIG_NIU=m | |||
766 | # CONFIG_USB_PEGASUS is not set | 776 | # CONFIG_USB_PEGASUS is not set |
767 | # CONFIG_USB_RTL8150 is not set | 777 | # CONFIG_USB_RTL8150 is not set |
768 | # CONFIG_USB_USBNET is not set | 778 | # CONFIG_USB_USBNET is not set |
779 | # CONFIG_USB_IPHETH is not set | ||
769 | # CONFIG_WAN is not set | 780 | # CONFIG_WAN is not set |
770 | # CONFIG_FDDI is not set | 781 | # CONFIG_FDDI is not set |
771 | # CONFIG_HIPPI is not set | 782 | # CONFIG_HIPPI is not set |
@@ -778,7 +789,6 @@ CONFIG_PPP_DEFLATE=m | |||
778 | CONFIG_PPP_BSDCOMP=m | 789 | CONFIG_PPP_BSDCOMP=m |
779 | CONFIG_PPP_MPPE=m | 790 | CONFIG_PPP_MPPE=m |
780 | CONFIG_PPPOE=m | 791 | CONFIG_PPPOE=m |
781 | # CONFIG_PPPOL2TP is not set | ||
782 | # CONFIG_SLIP is not set | 792 | # CONFIG_SLIP is not set |
783 | CONFIG_SLHC=m | 793 | CONFIG_SLHC=m |
784 | # CONFIG_NET_FC is not set | 794 | # CONFIG_NET_FC is not set |
@@ -816,6 +826,7 @@ CONFIG_INPUT_KEYBOARD=y | |||
816 | CONFIG_KEYBOARD_ATKBD=y | 826 | CONFIG_KEYBOARD_ATKBD=y |
817 | # CONFIG_QT2160 is not set | 827 | # CONFIG_QT2160 is not set |
818 | CONFIG_KEYBOARD_LKKBD=m | 828 | CONFIG_KEYBOARD_LKKBD=m |
829 | # CONFIG_KEYBOARD_TCA6416 is not set | ||
819 | # CONFIG_KEYBOARD_MAX7359 is not set | 830 | # CONFIG_KEYBOARD_MAX7359 is not set |
820 | # CONFIG_KEYBOARD_NEWTON is not set | 831 | # CONFIG_KEYBOARD_NEWTON is not set |
821 | # CONFIG_KEYBOARD_OPENCORES is not set | 832 | # CONFIG_KEYBOARD_OPENCORES is not set |
@@ -840,6 +851,7 @@ CONFIG_MOUSE_SERIAL=y | |||
840 | # CONFIG_INPUT_TABLET is not set | 851 | # CONFIG_INPUT_TABLET is not set |
841 | # CONFIG_INPUT_TOUCHSCREEN is not set | 852 | # CONFIG_INPUT_TOUCHSCREEN is not set |
842 | CONFIG_INPUT_MISC=y | 853 | CONFIG_INPUT_MISC=y |
854 | # CONFIG_INPUT_AD714X is not set | ||
843 | CONFIG_INPUT_SPARCSPKR=y | 855 | CONFIG_INPUT_SPARCSPKR=y |
844 | # CONFIG_INPUT_ATI_REMOTE is not set | 856 | # CONFIG_INPUT_ATI_REMOTE is not set |
845 | # CONFIG_INPUT_ATI_REMOTE2 is not set | 857 | # CONFIG_INPUT_ATI_REMOTE2 is not set |
@@ -848,6 +860,7 @@ CONFIG_INPUT_SPARCSPKR=y | |||
848 | # CONFIG_INPUT_YEALINK is not set | 860 | # CONFIG_INPUT_YEALINK is not set |
849 | # CONFIG_INPUT_CM109 is not set | 861 | # CONFIG_INPUT_CM109 is not set |
850 | # CONFIG_INPUT_UINPUT is not set | 862 | # CONFIG_INPUT_UINPUT is not set |
863 | # CONFIG_INPUT_PCF8574 is not set | ||
851 | 864 | ||
852 | # | 865 | # |
853 | # Hardware I/O ports | 866 | # Hardware I/O ports |
@@ -871,6 +884,7 @@ CONFIG_HW_CONSOLE=y | |||
871 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 884 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
872 | # CONFIG_DEVKMEM is not set | 885 | # CONFIG_DEVKMEM is not set |
873 | # CONFIG_SERIAL_NONSTANDARD is not set | 886 | # CONFIG_SERIAL_NONSTANDARD is not set |
887 | # CONFIG_N_GSM is not set | ||
874 | # CONFIG_NOZOMI is not set | 888 | # CONFIG_NOZOMI is not set |
875 | 889 | ||
876 | # | 890 | # |
@@ -893,6 +907,8 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
893 | # CONFIG_SERIAL_JSM is not set | 907 | # CONFIG_SERIAL_JSM is not set |
894 | # CONFIG_SERIAL_TIMBERDALE is not set | 908 | # CONFIG_SERIAL_TIMBERDALE is not set |
895 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | 909 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set |
910 | # CONFIG_SERIAL_ALTERA_JTAGUART is not set | ||
911 | # CONFIG_SERIAL_ALTERA_UART is not set | ||
896 | CONFIG_UNIX98_PTYS=y | 912 | CONFIG_UNIX98_PTYS=y |
897 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 913 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
898 | # CONFIG_LEGACY_PTYS is not set | 914 | # CONFIG_LEGACY_PTYS is not set |
@@ -1306,11 +1322,14 @@ CONFIG_USB_HIDDEV=y | |||
1306 | CONFIG_HID_A4TECH=y | 1322 | CONFIG_HID_A4TECH=y |
1307 | CONFIG_HID_APPLE=y | 1323 | CONFIG_HID_APPLE=y |
1308 | CONFIG_HID_BELKIN=y | 1324 | CONFIG_HID_BELKIN=y |
1325 | # CONFIG_HID_CANDO is not set | ||
1309 | CONFIG_HID_CHERRY=y | 1326 | CONFIG_HID_CHERRY=y |
1310 | CONFIG_HID_CHICONY=y | 1327 | CONFIG_HID_CHICONY=y |
1328 | # CONFIG_HID_PRODIKEYS is not set | ||
1311 | CONFIG_HID_CYPRESS=y | 1329 | CONFIG_HID_CYPRESS=y |
1312 | CONFIG_HID_DRAGONRISE=y | 1330 | CONFIG_HID_DRAGONRISE=y |
1313 | # CONFIG_DRAGONRISE_FF is not set | 1331 | # CONFIG_DRAGONRISE_FF is not set |
1332 | # CONFIG_HID_EGALAX is not set | ||
1314 | CONFIG_HID_EZKEY=y | 1333 | CONFIG_HID_EZKEY=y |
1315 | CONFIG_HID_KYE=y | 1334 | CONFIG_HID_KYE=y |
1316 | CONFIG_HID_GYRATION=y | 1335 | CONFIG_HID_GYRATION=y |
@@ -1328,7 +1347,9 @@ CONFIG_HID_ORTEK=y | |||
1328 | CONFIG_HID_PANTHERLORD=y | 1347 | CONFIG_HID_PANTHERLORD=y |
1329 | # CONFIG_PANTHERLORD_FF is not set | 1348 | # CONFIG_PANTHERLORD_FF is not set |
1330 | CONFIG_HID_PETALYNX=y | 1349 | CONFIG_HID_PETALYNX=y |
1350 | # CONFIG_HID_PICOLCD is not set | ||
1331 | # CONFIG_HID_QUANTA is not set | 1351 | # CONFIG_HID_QUANTA is not set |
1352 | # CONFIG_HID_ROCCAT_KONE is not set | ||
1332 | CONFIG_HID_SAMSUNG=y | 1353 | CONFIG_HID_SAMSUNG=y |
1333 | CONFIG_HID_SONY=y | 1354 | CONFIG_HID_SONY=y |
1334 | # CONFIG_HID_STANTUM is not set | 1355 | # CONFIG_HID_STANTUM is not set |
@@ -1342,6 +1363,7 @@ CONFIG_HID_THRUSTMASTER=y | |||
1342 | # CONFIG_THRUSTMASTER_FF is not set | 1363 | # CONFIG_THRUSTMASTER_FF is not set |
1343 | CONFIG_HID_ZEROPLUS=y | 1364 | CONFIG_HID_ZEROPLUS=y |
1344 | # CONFIG_ZEROPLUS_FF is not set | 1365 | # CONFIG_ZEROPLUS_FF is not set |
1366 | # CONFIG_HID_ZYDACRON is not set | ||
1345 | CONFIG_USB_SUPPORT=y | 1367 | CONFIG_USB_SUPPORT=y |
1346 | CONFIG_USB_ARCH_HAS_HCD=y | 1368 | CONFIG_USB_ARCH_HAS_HCD=y |
1347 | CONFIG_USB_ARCH_HAS_OHCI=y | 1369 | CONFIG_USB_ARCH_HAS_OHCI=y |
@@ -1356,7 +1378,6 @@ CONFIG_USB=y | |||
1356 | # CONFIG_USB_DEVICEFS is not set | 1378 | # CONFIG_USB_DEVICEFS is not set |
1357 | # CONFIG_USB_DEVICE_CLASS is not set | 1379 | # CONFIG_USB_DEVICE_CLASS is not set |
1358 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1380 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1359 | # CONFIG_USB_OTG is not set | ||
1360 | # CONFIG_USB_MON is not set | 1381 | # CONFIG_USB_MON is not set |
1361 | # CONFIG_USB_WUSB is not set | 1382 | # CONFIG_USB_WUSB is not set |
1362 | # CONFIG_USB_WUSB_CBAF is not set | 1383 | # CONFIG_USB_WUSB_CBAF is not set |
@@ -1521,10 +1542,6 @@ CONFIG_RTC_DRV_STARFIRE=y | |||
1521 | # CONFIG_DMADEVICES is not set | 1542 | # CONFIG_DMADEVICES is not set |
1522 | # CONFIG_AUXDISPLAY is not set | 1543 | # CONFIG_AUXDISPLAY is not set |
1523 | # CONFIG_UIO is not set | 1544 | # CONFIG_UIO is not set |
1524 | |||
1525 | # | ||
1526 | # TI VLYNQ | ||
1527 | # | ||
1528 | # CONFIG_STAGING is not set | 1545 | # CONFIG_STAGING is not set |
1529 | 1546 | ||
1530 | # | 1547 | # |
@@ -1706,8 +1723,8 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | |||
1706 | CONFIG_SCHEDSTATS=y | 1723 | CONFIG_SCHEDSTATS=y |
1707 | # CONFIG_TIMER_STATS is not set | 1724 | # CONFIG_TIMER_STATS is not set |
1708 | # CONFIG_DEBUG_OBJECTS is not set | 1725 | # CONFIG_DEBUG_OBJECTS is not set |
1709 | # CONFIG_SLUB_DEBUG_ON is not set | 1726 | # CONFIG_DEBUG_SLAB is not set |
1710 | # CONFIG_SLUB_STATS is not set | 1727 | # CONFIG_DEBUG_KMEMLEAK is not set |
1711 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1728 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1712 | # CONFIG_RT_MUTEX_TESTER is not set | 1729 | # CONFIG_RT_MUTEX_TESTER is not set |
1713 | # CONFIG_DEBUG_SPINLOCK is not set | 1730 | # CONFIG_DEBUG_SPINLOCK is not set |
@@ -1742,6 +1759,9 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y | |||
1742 | # CONFIG_DEBUG_PAGEALLOC is not set | 1759 | # CONFIG_DEBUG_PAGEALLOC is not set |
1743 | CONFIG_NOP_TRACER=y | 1760 | CONFIG_NOP_TRACER=y |
1744 | CONFIG_HAVE_FUNCTION_TRACER=y | 1761 | CONFIG_HAVE_FUNCTION_TRACER=y |
1762 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
1763 | CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y | ||
1764 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
1745 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1765 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
1746 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 1766 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
1747 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y | 1767 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y |
@@ -1769,12 +1789,12 @@ CONFIG_BLK_DEV_IO_TRACE=y | |||
1769 | # CONFIG_RING_BUFFER_BENCHMARK is not set | 1789 | # CONFIG_RING_BUFFER_BENCHMARK is not set |
1770 | # CONFIG_DYNAMIC_DEBUG is not set | 1790 | # CONFIG_DYNAMIC_DEBUG is not set |
1771 | # CONFIG_DMA_API_DEBUG is not set | 1791 | # CONFIG_DMA_API_DEBUG is not set |
1792 | # CONFIG_ATOMIC64_SELFTEST is not set | ||
1772 | # CONFIG_SAMPLES is not set | 1793 | # CONFIG_SAMPLES is not set |
1773 | CONFIG_HAVE_ARCH_KGDB=y | 1794 | CONFIG_HAVE_ARCH_KGDB=y |
1774 | # CONFIG_KGDB is not set | 1795 | # CONFIG_KGDB is not set |
1775 | # CONFIG_DEBUG_STACK_USAGE is not set | 1796 | # CONFIG_DEBUG_STACK_USAGE is not set |
1776 | # CONFIG_DEBUG_DCFLUSH is not set | 1797 | # CONFIG_DEBUG_DCFLUSH is not set |
1777 | # CONFIG_STACK_DEBUG is not set | ||
1778 | # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set | 1798 | # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set |
1779 | 1799 | ||
1780 | # | 1800 | # |
@@ -1895,6 +1915,7 @@ CONFIG_CRYPTO_DEFLATE=y | |||
1895 | # | 1915 | # |
1896 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 1916 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
1897 | CONFIG_CRYPTO_HW=y | 1917 | CONFIG_CRYPTO_HW=y |
1918 | # CONFIG_CRYPTO_DEV_NIAGARA2 is not set | ||
1898 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 1919 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
1899 | CONFIG_BINARY_PRINTF=y | 1920 | CONFIG_BINARY_PRINTF=y |
1900 | 1921 | ||
diff --git a/arch/sparc/include/asm/cache.h b/arch/sparc/include/asm/cache.h index 0588b8c7faa2..69358b590c91 100644 --- a/arch/sparc/include/asm/cache.h +++ b/arch/sparc/include/asm/cache.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #define L1_CACHE_SHIFT 5 | 12 | #define L1_CACHE_SHIFT 5 |
13 | #define L1_CACHE_BYTES 32 | 13 | #define L1_CACHE_BYTES 32 |
14 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) | ||
15 | 14 | ||
16 | #ifdef CONFIG_SPARC32 | 15 | #ifdef CONFIG_SPARC32 |
17 | #define SMP_CACHE_BYTES_SHIFT 5 | 16 | #define SMP_CACHE_BYTES_SHIFT 5 |
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 77f906d8cc21..0ece77f47753 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -142,13 +142,12 @@ BTFIXUPDEF_CALL_CONST(unsigned long, pgd_page_vaddr, pgd_t) | |||
142 | #define pmd_page(pmd) BTFIXUP_CALL(pmd_page)(pmd) | 142 | #define pmd_page(pmd) BTFIXUP_CALL(pmd_page)(pmd) |
143 | #define pgd_page_vaddr(pgd) BTFIXUP_CALL(pgd_page_vaddr)(pgd) | 143 | #define pgd_page_vaddr(pgd) BTFIXUP_CALL(pgd_page_vaddr)(pgd) |
144 | 144 | ||
145 | BTFIXUPDEF_SETHI(none_mask) | ||
146 | BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) | 145 | BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) |
147 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) | 146 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) |
148 | 147 | ||
149 | static inline int pte_none(pte_t pte) | 148 | static inline int pte_none(pte_t pte) |
150 | { | 149 | { |
151 | return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); | 150 | return !pte_val(pte); |
152 | } | 151 | } |
153 | 152 | ||
154 | #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) | 153 | #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) |
@@ -160,7 +159,7 @@ BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) | |||
160 | 159 | ||
161 | static inline int pmd_none(pmd_t pmd) | 160 | static inline int pmd_none(pmd_t pmd) |
162 | { | 161 | { |
163 | return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); | 162 | return !pmd_val(pmd); |
164 | } | 163 | } |
165 | 164 | ||
166 | #define pmd_bad(pmd) BTFIXUP_CALL(pmd_bad)(pmd) | 165 | #define pmd_bad(pmd) BTFIXUP_CALL(pmd_bad)(pmd) |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 0ec92c8861dd..44faabc3c02c 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -657,6 +657,7 @@ static u64 maybe_change_configuration(struct cpu_hw_events *cpuc, u64 pcr) | |||
657 | cpuc->current_idx[i] = idx; | 657 | cpuc->current_idx[i] = idx; |
658 | 658 | ||
659 | enc = perf_event_get_enc(cpuc->events[i]); | 659 | enc = perf_event_get_enc(cpuc->events[i]); |
660 | pcr &= ~mask_for_index(idx); | ||
660 | pcr |= event_encoding(enc, idx); | 661 | pcr |= event_encoding(enc, idx); |
661 | } | 662 | } |
662 | out: | 663 | out: |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index ab036a72de5a..e11b4612dabb 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -183,7 +183,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id) | |||
183 | goto out_unlock; | 183 | goto out_unlock; |
184 | } | 184 | } |
185 | 185 | ||
186 | if (action && tmp) | 186 | if (tmp) |
187 | tmp->next = action->next; | 187 | tmp->next = action->next; |
188 | else | 188 | else |
189 | *actionp = action->next; | 189 | *actionp = action->next; |
diff --git a/arch/sparc/kernel/ttable.S b/arch/sparc/kernel/ttable.S index 76d837fc47d3..c6dfdaa29e20 100644 --- a/arch/sparc/kernel/ttable.S +++ b/arch/sparc/kernel/ttable.S | |||
@@ -64,7 +64,7 @@ tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6) | |||
64 | tl0_irq6: BTRAP(0x46) | 64 | tl0_irq6: BTRAP(0x46) |
65 | #endif | 65 | #endif |
66 | tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) | 66 | tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) |
67 | #ifdef CONFIG_KGDB | 67 | #if defined(CONFIG_KGDB) && defined(CONFIG_SMP) |
68 | tl0_irq8: TRAP_IRQ(smp_kgdb_capture_client, 8) | 68 | tl0_irq8: TRAP_IRQ(smp_kgdb_capture_client, 8) |
69 | #else | 69 | #else |
70 | tl0_irq8: BTRAP(0x48) | 70 | tl0_irq8: BTRAP(0x48) |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index f5f75a58e0b3..b0b43aa5e45a 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -2215,8 +2215,6 @@ void __init ld_mmu_srmmu(void) | |||
2215 | BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM); | 2215 | BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM); |
2216 | BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); | 2216 | BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); |
2217 | 2217 | ||
2218 | BTFIXUPSET_SETHI(none_mask, 0xF0000000); | ||
2219 | |||
2220 | BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); | 2218 | BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); |
2221 | BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0); | 2219 | BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0); |
2222 | 2220 | ||
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index cf38846753dd..4289f90f8697 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -2087,9 +2087,6 @@ void __init ld_mmu_sun4c(void) | |||
2087 | 2087 | ||
2088 | BTFIXUPSET_CALL(set_pte, sun4c_set_pte, BTFIXUPCALL_STO1O0); | 2088 | BTFIXUPSET_CALL(set_pte, sun4c_set_pte, BTFIXUPCALL_STO1O0); |
2089 | 2089 | ||
2090 | /* The 2.4.18 code does not set this on sun4c, how does it work? XXX */ | ||
2091 | /* BTFIXUPSET_SETHI(none_mask, 0x00000000); */ /* Defaults to zero? */ | ||
2092 | |||
2093 | BTFIXUPSET_CALL(pte_pfn, sun4c_pte_pfn, BTFIXUPCALL_NORM); | 2090 | BTFIXUPSET_CALL(pte_pfn, sun4c_pte_pfn, BTFIXUPCALL_NORM); |
2094 | #if 0 /* PAGE_SHIFT <= 12 */ /* Eek. Investigate. XXX */ | 2091 | #if 0 /* PAGE_SHIFT <= 12 */ /* Eek. Investigate. XXX */ |
2095 | BTFIXUPSET_CALL(pmd_page, sun4c_pmd_page, BTFIXUPCALL_ANDNINT(PAGE_SIZE - 1)); | 2092 | BTFIXUPSET_CALL(pmd_page, sun4c_pmd_page, BTFIXUPCALL_ANDNINT(PAGE_SIZE - 1)); |
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 2e837f5080fe..fb7a5f052e2b 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -145,6 +145,15 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
145 | percpu_entry->states[cx->index].eax = cx->address; | 145 | percpu_entry->states[cx->index].eax = cx->address; |
146 | percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; | 146 | percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; |
147 | } | 147 | } |
148 | |||
149 | /* | ||
150 | * For _CST FFH on Intel, if GAS.access_size bit 1 is cleared, | ||
151 | * then we should skip checking BM_STS for this C-state. | ||
152 | * ref: "Intel Processor Vendor-Specific ACPI Interface Specification" | ||
153 | */ | ||
154 | if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2)) | ||
155 | cx->bm_sts_skip = 1; | ||
156 | |||
148 | return retval; | 157 | return retval; |
149 | } | 158 | } |
150 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); | 159 | EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 82e508677b91..fcc3c61fdecc 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -157,9 +157,14 @@ static int __init acpi_sleep_setup(char *str) | |||
157 | #ifdef CONFIG_HIBERNATION | 157 | #ifdef CONFIG_HIBERNATION |
158 | if (strncmp(str, "s4_nohwsig", 10) == 0) | 158 | if (strncmp(str, "s4_nohwsig", 10) == 0) |
159 | acpi_no_s4_hw_signature(); | 159 | acpi_no_s4_hw_signature(); |
160 | if (strncmp(str, "s4_nonvs", 8) == 0) | 160 | if (strncmp(str, "s4_nonvs", 8) == 0) { |
161 | acpi_s4_no_nvs(); | 161 | pr_warning("ACPI: acpi_sleep=s4_nonvs is deprecated, " |
162 | "please use acpi_sleep=nonvs instead"); | ||
163 | acpi_nvs_nosave(); | ||
164 | } | ||
162 | #endif | 165 | #endif |
166 | if (strncmp(str, "nonvs", 5) == 0) | ||
167 | acpi_nvs_nosave(); | ||
163 | if (strncmp(str, "old_ordering", 12) == 0) | 168 | if (strncmp(str, "old_ordering", 12) == 0) |
164 | acpi_old_suspend_ordering(); | 169 | acpi_old_suspend_ordering(); |
165 | str = strchr(str, ','); | 170 | str = strchr(str, ','); |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index c02cc692985c..a96489ee6cab 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -921,7 +921,7 @@ void disable_local_APIC(void) | |||
921 | unsigned int value; | 921 | unsigned int value; |
922 | 922 | ||
923 | /* APIC hasn't been mapped yet */ | 923 | /* APIC hasn't been mapped yet */ |
924 | if (!apic_phys) | 924 | if (!x2apic_mode && !apic_phys) |
925 | return; | 925 | return; |
926 | 926 | ||
927 | clear_local_APIC(); | 927 | clear_local_APIC(); |
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index ce7cde713e71..a36de5bbb622 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
@@ -368,22 +368,16 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle) | |||
368 | return -ENODEV; | 368 | return -ENODEV; |
369 | 369 | ||
370 | out_obj = output.pointer; | 370 | out_obj = output.pointer; |
371 | if (out_obj->type != ACPI_TYPE_BUFFER) { | 371 | if (out_obj->type != ACPI_TYPE_BUFFER) |
372 | ret = -ENODEV; | 372 | return -ENODEV; |
373 | goto out_free; | ||
374 | } | ||
375 | 373 | ||
376 | errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); | 374 | errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); |
377 | if (errors) { | 375 | if (errors) |
378 | ret = -ENODEV; | 376 | return -ENODEV; |
379 | goto out_free; | ||
380 | } | ||
381 | 377 | ||
382 | supported = *((u32 *)(out_obj->buffer.pointer + 4)); | 378 | supported = *((u32 *)(out_obj->buffer.pointer + 4)); |
383 | if (!(supported & 0x1)) { | 379 | if (!(supported & 0x1)) |
384 | ret = -ENODEV; | 380 | return -ENODEV; |
385 | goto out_free; | ||
386 | } | ||
387 | 381 | ||
388 | out_free: | 382 | out_free: |
389 | kfree(output.pointer); | 383 | kfree(output.pointer); |
@@ -397,13 +391,17 @@ static int __init pcc_cpufreq_probe(void) | |||
397 | struct pcc_memory_resource *mem_resource; | 391 | struct pcc_memory_resource *mem_resource; |
398 | struct pcc_register_resource *reg_resource; | 392 | struct pcc_register_resource *reg_resource; |
399 | union acpi_object *out_obj, *member; | 393 | union acpi_object *out_obj, *member; |
400 | acpi_handle handle, osc_handle; | 394 | acpi_handle handle, osc_handle, pcch_handle; |
401 | int ret = 0; | 395 | int ret = 0; |
402 | 396 | ||
403 | status = acpi_get_handle(NULL, "\\_SB", &handle); | 397 | status = acpi_get_handle(NULL, "\\_SB", &handle); |
404 | if (ACPI_FAILURE(status)) | 398 | if (ACPI_FAILURE(status)) |
405 | return -ENODEV; | 399 | return -ENODEV; |
406 | 400 | ||
401 | status = acpi_get_handle(handle, "PCCH", &pcch_handle); | ||
402 | if (ACPI_FAILURE(status)) | ||
403 | return -ENODEV; | ||
404 | |||
407 | status = acpi_get_handle(handle, "_OSC", &osc_handle); | 405 | status = acpi_get_handle(handle, "_OSC", &osc_handle); |
408 | if (ACPI_SUCCESS(status)) { | 406 | if (ACPI_SUCCESS(status)) { |
409 | ret = pcc_cpufreq_do_osc(&osc_handle); | 407 | ret = pcc_cpufreq_do_osc(&osc_handle); |
@@ -543,13 +541,13 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
543 | 541 | ||
544 | if (!pcch_virt_addr) { | 542 | if (!pcch_virt_addr) { |
545 | result = -1; | 543 | result = -1; |
546 | goto pcch_null; | 544 | goto out; |
547 | } | 545 | } |
548 | 546 | ||
549 | result = pcc_get_offset(cpu); | 547 | result = pcc_get_offset(cpu); |
550 | if (result) { | 548 | if (result) { |
551 | dprintk("init: PCCP evaluation failed\n"); | 549 | dprintk("init: PCCP evaluation failed\n"); |
552 | goto free; | 550 | goto out; |
553 | } | 551 | } |
554 | 552 | ||
555 | policy->max = policy->cpuinfo.max_freq = | 553 | policy->max = policy->cpuinfo.max_freq = |
@@ -558,14 +556,15 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
558 | ioread32(&pcch_hdr->minimum_frequency) * 1000; | 556 | ioread32(&pcch_hdr->minimum_frequency) * 1000; |
559 | policy->cur = pcc_get_freq(cpu); | 557 | policy->cur = pcc_get_freq(cpu); |
560 | 558 | ||
559 | if (!policy->cur) { | ||
560 | dprintk("init: Unable to get current CPU frequency\n"); | ||
561 | result = -EINVAL; | ||
562 | goto out; | ||
563 | } | ||
564 | |||
561 | dprintk("init: policy->max is %d, policy->min is %d\n", | 565 | dprintk("init: policy->max is %d, policy->min is %d\n", |
562 | policy->max, policy->min); | 566 | policy->max, policy->min); |
563 | 567 | out: | |
564 | return 0; | ||
565 | free: | ||
566 | pcc_clear_mapping(); | ||
567 | free_percpu(pcc_cpu_info); | ||
568 | pcch_null: | ||
569 | return result; | 568 | return result; |
570 | } | 569 | } |
571 | 570 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 7ec2123838e6..3e90cce3dc8b 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1023,13 +1023,12 @@ static int get_transition_latency(struct powernow_k8_data *data) | |||
1023 | } | 1023 | } |
1024 | if (max_latency == 0) { | 1024 | if (max_latency == 0) { |
1025 | /* | 1025 | /* |
1026 | * Fam 11h always returns 0 as transition latency. | 1026 | * Fam 11h and later may return 0 as transition latency. This |
1027 | * This is intended and means "very fast". While cpufreq core | 1027 | * is intended and means "very fast". While cpufreq core and |
1028 | * and governors currently can handle that gracefully, better | 1028 | * governors currently can handle that gracefully, better set it |
1029 | * set it to 1 to avoid problems in the future. | 1029 | * to 1 to avoid problems in the future. |
1030 | * For all others it's a BIOS bug. | ||
1031 | */ | 1030 | */ |
1032 | if (boot_cpu_data.x86 != 0x11) | 1031 | if (boot_cpu_data.x86 < 0x11) |
1033 | printk(KERN_ERR FW_WARN PFX "Invalid zero transition " | 1032 | printk(KERN_ERR FW_WARN PFX "Invalid zero transition " |
1034 | "latency\n"); | 1033 | "latency\n"); |
1035 | max_latency = 1; | 1034 | max_latency = 1; |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index ebdb85cf2686..e5cc7e82e60d 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/apic.h> | 18 | #include <asm/apic.h> |
19 | #include <asm/iommu.h> | 19 | #include <asm/iommu.h> |
20 | #include <asm/gart.h> | 20 | #include <asm/gart.h> |
21 | #include <asm/hpet.h> | ||
21 | 22 | ||
22 | static void __init fix_hypertransport_config(int num, int slot, int func) | 23 | static void __init fix_hypertransport_config(int num, int slot, int func) |
23 | { | 24 | { |
@@ -191,6 +192,21 @@ static void __init ati_bugs_contd(int num, int slot, int func) | |||
191 | } | 192 | } |
192 | #endif | 193 | #endif |
193 | 194 | ||
195 | /* | ||
196 | * Force the read back of the CMP register in hpet_next_event() | ||
197 | * to work around the problem that the CMP register write seems to be | ||
198 | * delayed. See hpet_next_event() for details. | ||
199 | * | ||
200 | * We do this on all SMBUS incarnations for now until we have more | ||
201 | * information about the affected chipsets. | ||
202 | */ | ||
203 | static void __init ati_hpet_bugs(int num, int slot, int func) | ||
204 | { | ||
205 | #ifdef CONFIG_HPET_TIMER | ||
206 | hpet_readback_cmp = 1; | ||
207 | #endif | ||
208 | } | ||
209 | |||
194 | #define QFLAG_APPLY_ONCE 0x1 | 210 | #define QFLAG_APPLY_ONCE 0x1 |
195 | #define QFLAG_APPLIED 0x2 | 211 | #define QFLAG_APPLIED 0x2 |
196 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) | 212 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) |
@@ -220,6 +236,8 @@ static struct chipset early_qrk[] __initdata = { | |||
220 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 236 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
221 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 237 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
222 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | 238 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, |
239 | { PCI_VENDOR_ID_ATI, PCI_ANY_ID, | ||
240 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_hpet_bugs }, | ||
223 | {} | 241 | {} |
224 | }; | 242 | }; |
225 | 243 | ||
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 0697ff139837..4db7c4d12ffa 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -571,8 +571,8 @@ auditsys: | |||
571 | * masked off. | 571 | * masked off. |
572 | */ | 572 | */ |
573 | sysret_audit: | 573 | sysret_audit: |
574 | movq %rax,%rsi /* second arg, syscall return value */ | 574 | movq RAX-ARGOFFSET(%rsp),%rsi /* second arg, syscall return value */ |
575 | cmpq $0,%rax /* is it < 0? */ | 575 | cmpq $0,%rsi /* is it < 0? */ |
576 | setl %al /* 1 if so, 0 if not */ | 576 | setl %al /* 1 if so, 0 if not */ |
577 | movzbl %al,%edi /* zero-extend that into %edi */ | 577 | movzbl %al,%edi /* zero-extend that into %edi */ |
578 | inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */ | 578 | inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */ |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index a198b7c87a12..ba390d731175 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -964,7 +964,7 @@ fs_initcall(hpet_late_init); | |||
964 | 964 | ||
965 | void hpet_disable(void) | 965 | void hpet_disable(void) |
966 | { | 966 | { |
967 | if (is_hpet_capable()) { | 967 | if (is_hpet_capable() && hpet_virt_address) { |
968 | unsigned int cfg = hpet_readl(HPET_CFG); | 968 | unsigned int cfg = hpet_readl(HPET_CFG); |
969 | 969 | ||
970 | if (hpet_legacy_int_enabled) { | 970 | if (hpet_legacy_int_enabled) { |
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index 7c9f02c130f3..cafa7c80ac95 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
@@ -276,16 +276,6 @@ static struct sys_device device_i8259A = { | |||
276 | .cls = &i8259_sysdev_class, | 276 | .cls = &i8259_sysdev_class, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static int __init i8259A_init_sysfs(void) | ||
280 | { | ||
281 | int error = sysdev_class_register(&i8259_sysdev_class); | ||
282 | if (!error) | ||
283 | error = sysdev_register(&device_i8259A); | ||
284 | return error; | ||
285 | } | ||
286 | |||
287 | device_initcall(i8259A_init_sysfs); | ||
288 | |||
289 | static void mask_8259A(void) | 279 | static void mask_8259A(void) |
290 | { | 280 | { |
291 | unsigned long flags; | 281 | unsigned long flags; |
@@ -407,3 +397,18 @@ struct legacy_pic default_legacy_pic = { | |||
407 | }; | 397 | }; |
408 | 398 | ||
409 | struct legacy_pic *legacy_pic = &default_legacy_pic; | 399 | struct legacy_pic *legacy_pic = &default_legacy_pic; |
400 | |||
401 | static int __init i8259A_init_sysfs(void) | ||
402 | { | ||
403 | int error; | ||
404 | |||
405 | if (legacy_pic != &default_legacy_pic) | ||
406 | return 0; | ||
407 | |||
408 | error = sysdev_class_register(&i8259_sysdev_class); | ||
409 | if (!error) | ||
410 | error = sysdev_register(&device_i8259A); | ||
411 | return error; | ||
412 | } | ||
413 | |||
414 | device_initcall(i8259A_init_sysfs); | ||
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 4f4af75b9482..01ab17ae2ae7 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -572,7 +572,6 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd) | |||
572 | return NOTIFY_STOP; | 572 | return NOTIFY_STOP; |
573 | } | 573 | } |
574 | 574 | ||
575 | #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP | ||
576 | int kgdb_ll_trap(int cmd, const char *str, | 575 | int kgdb_ll_trap(int cmd, const char *str, |
577 | struct pt_regs *regs, long err, int trap, int sig) | 576 | struct pt_regs *regs, long err, int trap, int sig) |
578 | { | 577 | { |
@@ -590,7 +589,6 @@ int kgdb_ll_trap(int cmd, const char *str, | |||
590 | 589 | ||
591 | return __kgdb_notify(&args, cmd); | 590 | return __kgdb_notify(&args, cmd); |
592 | } | 591 | } |
593 | #endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */ | ||
594 | 592 | ||
595 | static int | 593 | static int |
596 | kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) | 594 | kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) |
@@ -625,6 +623,12 @@ int kgdb_arch_init(void) | |||
625 | return register_die_notifier(&kgdb_notifier); | 623 | return register_die_notifier(&kgdb_notifier); |
626 | } | 624 | } |
627 | 625 | ||
626 | static void kgdb_hw_overflow_handler(struct perf_event *event, int nmi, | ||
627 | struct perf_sample_data *data, struct pt_regs *regs) | ||
628 | { | ||
629 | kgdb_ll_trap(DIE_DEBUG, "debug", regs, 0, 0, SIGTRAP); | ||
630 | } | ||
631 | |||
628 | void kgdb_arch_late(void) | 632 | void kgdb_arch_late(void) |
629 | { | 633 | { |
630 | int i, cpu; | 634 | int i, cpu; |
@@ -655,6 +659,7 @@ void kgdb_arch_late(void) | |||
655 | for_each_online_cpu(cpu) { | 659 | for_each_online_cpu(cpu) { |
656 | pevent = per_cpu_ptr(breakinfo[i].pev, cpu); | 660 | pevent = per_cpu_ptr(breakinfo[i].pev, cpu); |
657 | pevent[0]->hw.sample_period = 1; | 661 | pevent[0]->hw.sample_period = 1; |
662 | pevent[0]->overflow_handler = kgdb_hw_overflow_handler; | ||
658 | if (pevent[0]->destroy != NULL) { | 663 | if (pevent[0]->destroy != NULL) { |
659 | pevent[0]->destroy = NULL; | 664 | pevent[0]->destroy = NULL; |
660 | release_bp_slot(*pevent); | 665 | release_bp_slot(*pevent); |
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 345a4b1fe144..675879b65ce6 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -640,8 +640,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
640 | /* Skip cs, ip, orig_ax and gs. */ \ | 640 | /* Skip cs, ip, orig_ax and gs. */ \ |
641 | " subl $16, %esp\n" \ | 641 | " subl $16, %esp\n" \ |
642 | " pushl %fs\n" \ | 642 | " pushl %fs\n" \ |
643 | " pushl %ds\n" \ | ||
644 | " pushl %es\n" \ | 643 | " pushl %es\n" \ |
644 | " pushl %ds\n" \ | ||
645 | " pushl %eax\n" \ | 645 | " pushl %eax\n" \ |
646 | " pushl %ebp\n" \ | 646 | " pushl %ebp\n" \ |
647 | " pushl %edi\n" \ | 647 | " pushl %edi\n" \ |
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index e72d3fc6547d..939b9e98245f 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -498,15 +498,10 @@ void force_hpet_resume(void) | |||
498 | * See erratum #27 (Misinterpreted MSI Requests May Result in | 498 | * See erratum #27 (Misinterpreted MSI Requests May Result in |
499 | * Corrupted LPC DMA Data) in AMD Publication #46837, | 499 | * Corrupted LPC DMA Data) in AMD Publication #46837, |
500 | * "SB700 Family Product Errata", Rev. 1.0, March 2010. | 500 | * "SB700 Family Product Errata", Rev. 1.0, March 2010. |
501 | * | ||
502 | * Also force the read back of the CMP register in hpet_next_event() | ||
503 | * to work around the problem that the CMP register write seems to be | ||
504 | * delayed. See hpet_next_event() for details. | ||
505 | */ | 501 | */ |
506 | static void force_disable_hpet_msi(struct pci_dev *unused) | 502 | static void force_disable_hpet_msi(struct pci_dev *unused) |
507 | { | 503 | { |
508 | hpet_msi_disable = 1; | 504 | hpet_msi_disable = 1; |
509 | hpet_readback_cmp = 1; | ||
510 | } | 505 | } |
511 | 506 | ||
512 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 507 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index de3b63ae3da2..a60df9ae6454 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -238,6 +238,15 @@ void __init setup_per_cpu_areas(void) | |||
238 | #ifdef CONFIG_NUMA | 238 | #ifdef CONFIG_NUMA |
239 | per_cpu(x86_cpu_to_node_map, cpu) = | 239 | per_cpu(x86_cpu_to_node_map, cpu) = |
240 | early_per_cpu_map(x86_cpu_to_node_map, cpu); | 240 | early_per_cpu_map(x86_cpu_to_node_map, cpu); |
241 | /* | ||
242 | * Ensure that the boot cpu numa_node is correct when the boot | ||
243 | * cpu is on a node that doesn't have memory installed. | ||
244 | * Also cpu_up() will call cpu_to_node() for APs when | ||
245 | * MEMORY_HOTPLUG is defined, before per_cpu(numa_node) is set | ||
246 | * up later with c_init aka intel_init/amd_init. | ||
247 | * So set them all (boot cpu and all APs). | ||
248 | */ | ||
249 | set_cpu_numa_node(cpu, early_cpu_to_node(cpu)); | ||
241 | #endif | 250 | #endif |
242 | #endif | 251 | #endif |
243 | /* | 252 | /* |
@@ -257,14 +266,6 @@ void __init setup_per_cpu_areas(void) | |||
257 | early_per_cpu_ptr(x86_cpu_to_node_map) = NULL; | 266 | early_per_cpu_ptr(x86_cpu_to_node_map) = NULL; |
258 | #endif | 267 | #endif |
259 | 268 | ||
260 | #if defined(CONFIG_X86_64) && defined(CONFIG_NUMA) | ||
261 | /* | ||
262 | * make sure boot cpu numa_node is right, when boot cpu is on the | ||
263 | * node that doesn't have mem installed | ||
264 | */ | ||
265 | set_cpu_numa_node(boot_cpu_id, early_cpu_to_node(boot_cpu_id)); | ||
266 | #endif | ||
267 | |||
268 | /* Setup node to cpumask map */ | 269 | /* Setup node to cpumask map */ |
269 | setup_node_to_cpumask_map(); | 270 | setup_node_to_cpumask_map(); |
270 | 271 | ||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3699613e8830..b1ed0a1a5913 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2926,7 +2926,7 @@ static int kvm_mmu_remove_some_alloc_mmu_pages(struct kvm *kvm) | |||
2926 | return kvm_mmu_zap_page(kvm, page) + 1; | 2926 | return kvm_mmu_zap_page(kvm, page) + 1; |
2927 | } | 2927 | } |
2928 | 2928 | ||
2929 | static int mmu_shrink(int nr_to_scan, gfp_t gfp_mask) | 2929 | static int mmu_shrink(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask) |
2930 | { | 2930 | { |
2931 | struct kvm *kvm; | 2931 | struct kvm *kvm; |
2932 | struct kvm *kvm_freed = NULL; | 2932 | struct kvm *kvm_freed = NULL; |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 89d66ca4d87c..2331bdc2b549 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -342,6 +342,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, | |||
342 | /* advance table_gfn when emulating 1gb pages with 4k */ | 342 | /* advance table_gfn when emulating 1gb pages with 4k */ |
343 | if (delta == 0) | 343 | if (delta == 0) |
344 | table_gfn += PT_INDEX(addr, level); | 344 | table_gfn += PT_INDEX(addr, level); |
345 | access &= gw->pte_access; | ||
345 | } else { | 346 | } else { |
346 | direct = 0; | 347 | direct = 0; |
347 | table_gfn = gw->table_gfn[level - 2]; | 348 | table_gfn = gw->table_gfn[level - 2]; |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 05d571f6f196..7fa89c39c64f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1562,7 +1562,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, | |||
1562 | 1562 | ||
1563 | r = -ENOMEM; | 1563 | r = -ENOMEM; |
1564 | size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; | 1564 | size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; |
1565 | entries = vmalloc(size); | 1565 | entries = kmalloc(size, GFP_KERNEL); |
1566 | if (!entries) | 1566 | if (!entries) |
1567 | goto out; | 1567 | goto out; |
1568 | 1568 | ||
@@ -1581,7 +1581,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, | |||
1581 | r = n; | 1581 | r = n; |
1582 | 1582 | ||
1583 | out_free: | 1583 | out_free: |
1584 | vfree(entries); | 1584 | kfree(entries); |
1585 | out: | 1585 | out: |
1586 | return r; | 1586 | return r; |
1587 | } | 1587 | } |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 6fdb3ec30c31..55253095be84 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -184,6 +184,7 @@ static void __init pcibios_allocate_resources(int pass) | |||
184 | idx, r, disabled, pass); | 184 | idx, r, disabled, pass); |
185 | if (pci_claim_resource(dev, idx) < 0) { | 185 | if (pci_claim_resource(dev, idx) < 0) { |
186 | /* We'll assign a new address later */ | 186 | /* We'll assign a new address later */ |
187 | dev->fw_addr[idx] = r->start; | ||
187 | r->end -= r->start; | 188 | r->end -= r->start; |
188 | r->start = 0; | 189 | r->start = 0; |
189 | } | 190 | } |
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c index 7ef3a2735df3..cb29191cee58 100644 --- a/arch/x86/pci/mrst.c +++ b/arch/x86/pci/mrst.c | |||
@@ -66,8 +66,9 @@ static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) | |||
66 | devfn, pos, 4, &pcie_cap)) | 66 | devfn, pos, 4, &pcie_cap)) |
67 | return 0; | 67 | return 0; |
68 | 68 | ||
69 | if (pcie_cap == 0xffffffff) | 69 | if (PCI_EXT_CAP_ID(pcie_cap) == 0x0000 || |
70 | return 0; | 70 | PCI_EXT_CAP_ID(pcie_cap) == 0xffff) |
71 | break; | ||
71 | 72 | ||
72 | if (PCI_EXT_CAP_ID(pcie_cap) == PCI_EXT_CAP_ID_VNDR) { | 73 | if (PCI_EXT_CAP_ID(pcie_cap) == PCI_EXT_CAP_ID_VNDR) { |
73 | raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, | 74 | raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, |
@@ -76,7 +77,7 @@ static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) | |||
76 | return pos; | 77 | return pos; |
77 | } | 78 | } |
78 | 79 | ||
79 | pos = pcie_cap >> 20; | 80 | pos = PCI_EXT_CAP_NEXT(pcie_cap); |
80 | } | 81 | } |
81 | 82 | ||
82 | return 0; | 83 | return 0; |