diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:00:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:00:45 -0400 |
commit | 59c37bf8924c30fbac7ebb66a1d92dcb9f05f6b1 (patch) | |
tree | 2ffc3f2ce655806424d022f3a4daec7665ab888f /arch | |
parent | ec70cae8698632917f06110fdb70c6364281ecc6 (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge commit 'v2.6.27-rc6' into x86/unify-cpu-detect
Conflicts:
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/common_64.c
arch/x86/kernel/cpu/feature_names.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
49 files changed, 364 insertions, 149 deletions
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index d04a7a2bc2e9..4fbfb22f65a0 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h | |||
@@ -18,15 +18,7 @@ | |||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | 20 | ||
21 | #ifdef __ARMEB__ | 21 | static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) |
22 | # define __BIG_ENDIAN | ||
23 | #else | ||
24 | # define __LITTLE_ENDIAN | ||
25 | #endif | ||
26 | |||
27 | #define __SWAB_64_THRU_32__ | ||
28 | |||
29 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
30 | { | 22 | { |
31 | __u32 t; | 23 | __u32 t; |
32 | 24 | ||
@@ -48,8 +40,19 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
48 | 40 | ||
49 | return x; | 41 | return x; |
50 | } | 42 | } |
51 | #define __arch_swab32 __arch_swab32 | ||
52 | 43 | ||
53 | #include <linux/byteorder.h> | 44 | #define __arch__swab32(x) ___arch__swab32(x) |
45 | |||
46 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
47 | # define __BYTEORDER_HAS_U64__ | ||
48 | # define __SWAB_64_THRU_32__ | ||
49 | #endif | ||
50 | |||
51 | #ifdef __ARMEB__ | ||
52 | #include <linux/byteorder/big_endian.h> | ||
53 | #else | ||
54 | #include <linux/byteorder/little_endian.h> | ||
55 | #endif | ||
54 | 56 | ||
55 | #endif | 57 | #endif |
58 | |||
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 94a95d7fafd6..71934856fc22 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -61,8 +61,9 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | |||
61 | #define MT_DEVICE_NONSHARED 1 | 61 | #define MT_DEVICE_NONSHARED 1 |
62 | #define MT_DEVICE_CACHED 2 | 62 | #define MT_DEVICE_CACHED 2 |
63 | #define MT_DEVICE_IXP2000 3 | 63 | #define MT_DEVICE_IXP2000 3 |
64 | #define MT_DEVICE_WC 4 | ||
64 | /* | 65 | /* |
65 | * types 4 onwards can be found in asm/mach/map.h and are undefined | 66 | * types 5 onwards can be found in asm/mach/map.h and are undefined |
66 | * for ioremap | 67 | * for ioremap |
67 | */ | 68 | */ |
68 | 69 | ||
@@ -215,11 +216,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
215 | #define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) | 216 | #define ioremap(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) |
216 | #define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) | 217 | #define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) |
217 | #define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) | 218 | #define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) |
219 | #define ioremap_wc(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_WC) | ||
218 | #define iounmap(cookie) __iounmap(cookie) | 220 | #define iounmap(cookie) __iounmap(cookie) |
219 | #else | 221 | #else |
220 | #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) | 222 | #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
221 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) | 223 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) |
222 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) | 224 | #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) |
225 | #define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC) | ||
223 | #define iounmap(cookie) __arch_iounmap(cookie) | 226 | #define iounmap(cookie) __arch_iounmap(cookie) |
224 | #endif | 227 | #endif |
225 | 228 | ||
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 06f583b13999..9eb936e49cc3 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -18,13 +18,13 @@ struct map_desc { | |||
18 | unsigned int type; | 18 | unsigned int type; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | /* types 0-3 are defined in asm/io.h */ | 21 | /* types 0-4 are defined in asm/io.h */ |
22 | #define MT_CACHECLEAN 4 | 22 | #define MT_CACHECLEAN 5 |
23 | #define MT_MINICLEAN 5 | 23 | #define MT_MINICLEAN 6 |
24 | #define MT_LOW_VECTORS 6 | 24 | #define MT_LOW_VECTORS 7 |
25 | #define MT_HIGH_VECTORS 7 | 25 | #define MT_HIGH_VECTORS 8 |
26 | #define MT_MEMORY 8 | 26 | #define MT_MEMORY 9 |
27 | #define MT_ROM 9 | 27 | #define MT_ROM 10 |
28 | 28 | ||
29 | #define MT_NONSHARED_DEVICE MT_DEVICE_NONSHARED | 29 | #define MT_NONSHARED_DEVICE MT_DEVICE_NONSHARED |
30 | #define MT_IXP2000_DEVICE MT_DEVICE_IXP2000 | 30 | #define MT_IXP2000_DEVICE MT_DEVICE_IXP2000 |
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index 826010d5d014..2baeaeb0c900 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -159,6 +159,7 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = { | |||
159 | #ifdef CONFIG_ARCH_OMAP730 | 159 | #ifdef CONFIG_ARCH_OMAP730 |
160 | static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = { | 160 | static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = { |
161 | { | 161 | { |
162 | .phys_base = OMAP730_MCBSP1_BASE, | ||
162 | .virt_base = io_p2v(OMAP730_MCBSP1_BASE), | 163 | .virt_base = io_p2v(OMAP730_MCBSP1_BASE), |
163 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, | 164 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, |
164 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, | 165 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, |
@@ -167,6 +168,7 @@ static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = { | |||
167 | .ops = &omap1_mcbsp_ops, | 168 | .ops = &omap1_mcbsp_ops, |
168 | }, | 169 | }, |
169 | { | 170 | { |
171 | .phys_base = OMAP730_MCBSP2_BASE, | ||
170 | .virt_base = io_p2v(OMAP730_MCBSP2_BASE), | 172 | .virt_base = io_p2v(OMAP730_MCBSP2_BASE), |
171 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, | 173 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, |
172 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, | 174 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, |
@@ -184,6 +186,7 @@ static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = { | |||
184 | #ifdef CONFIG_ARCH_OMAP15XX | 186 | #ifdef CONFIG_ARCH_OMAP15XX |
185 | static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | 187 | static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { |
186 | { | 188 | { |
189 | .phys_base = OMAP1510_MCBSP1_BASE, | ||
187 | .virt_base = OMAP1510_MCBSP1_BASE, | 190 | .virt_base = OMAP1510_MCBSP1_BASE, |
188 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, | 191 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, |
189 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, | 192 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, |
@@ -193,6 +196,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | |||
193 | .clk_name = "mcbsp_clk", | 196 | .clk_name = "mcbsp_clk", |
194 | }, | 197 | }, |
195 | { | 198 | { |
199 | .phys_base = OMAP1510_MCBSP2_BASE, | ||
196 | .virt_base = io_p2v(OMAP1510_MCBSP2_BASE), | 200 | .virt_base = io_p2v(OMAP1510_MCBSP2_BASE), |
197 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, | 201 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, |
198 | .dma_tx_sync = OMAP_DMA_MCBSP2_TX, | 202 | .dma_tx_sync = OMAP_DMA_MCBSP2_TX, |
@@ -201,6 +205,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | |||
201 | .ops = &omap1_mcbsp_ops, | 205 | .ops = &omap1_mcbsp_ops, |
202 | }, | 206 | }, |
203 | { | 207 | { |
208 | .phys_base = OMAP1510_MCBSP3_BASE, | ||
204 | .virt_base = OMAP1510_MCBSP3_BASE, | 209 | .virt_base = OMAP1510_MCBSP3_BASE, |
205 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, | 210 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, |
206 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, | 211 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, |
@@ -219,6 +224,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | |||
219 | #ifdef CONFIG_ARCH_OMAP16XX | 224 | #ifdef CONFIG_ARCH_OMAP16XX |
220 | static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | 225 | static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { |
221 | { | 226 | { |
227 | .phys_base = OMAP1610_MCBSP1_BASE, | ||
222 | .virt_base = OMAP1610_MCBSP1_BASE, | 228 | .virt_base = OMAP1610_MCBSP1_BASE, |
223 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, | 229 | .dma_rx_sync = OMAP_DMA_MCBSP1_RX, |
224 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, | 230 | .dma_tx_sync = OMAP_DMA_MCBSP1_TX, |
@@ -228,6 +234,7 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
228 | .clk_name = "mcbsp_clk", | 234 | .clk_name = "mcbsp_clk", |
229 | }, | 235 | }, |
230 | { | 236 | { |
237 | .phys_base = OMAP1610_MCBSP2_BASE, | ||
231 | .virt_base = io_p2v(OMAP1610_MCBSP2_BASE), | 238 | .virt_base = io_p2v(OMAP1610_MCBSP2_BASE), |
232 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, | 239 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, |
233 | .dma_tx_sync = OMAP_DMA_MCBSP2_TX, | 240 | .dma_tx_sync = OMAP_DMA_MCBSP2_TX, |
@@ -236,6 +243,7 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
236 | .ops = &omap1_mcbsp_ops, | 243 | .ops = &omap1_mcbsp_ops, |
237 | }, | 244 | }, |
238 | { | 245 | { |
246 | .phys_base = OMAP1610_MCBSP3_BASE, | ||
239 | .virt_base = OMAP1610_MCBSP3_BASE, | 247 | .virt_base = OMAP1610_MCBSP3_BASE, |
240 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, | 248 | .dma_rx_sync = OMAP_DMA_MCBSP3_RX, |
241 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, | 249 | .dma_tx_sync = OMAP_DMA_MCBSP3_TX, |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 27eb6e3ca926..b261f1f80b5e 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -134,6 +134,7 @@ static struct omap_mcbsp_ops omap2_mcbsp_ops = { | |||
134 | #ifdef CONFIG_ARCH_OMAP24XX | 134 | #ifdef CONFIG_ARCH_OMAP24XX |
135 | static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { | 135 | static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { |
136 | { | 136 | { |
137 | .phys_base = OMAP24XX_MCBSP1_BASE, | ||
137 | .virt_base = IO_ADDRESS(OMAP24XX_MCBSP1_BASE), | 138 | .virt_base = IO_ADDRESS(OMAP24XX_MCBSP1_BASE), |
138 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | 139 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, |
139 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 140 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, |
@@ -143,6 +144,7 @@ static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { | |||
143 | .clk_name = "mcbsp_clk", | 144 | .clk_name = "mcbsp_clk", |
144 | }, | 145 | }, |
145 | { | 146 | { |
147 | .phys_base = OMAP24XX_MCBSP2_BASE, | ||
146 | .virt_base = IO_ADDRESS(OMAP24XX_MCBSP2_BASE), | 148 | .virt_base = IO_ADDRESS(OMAP24XX_MCBSP2_BASE), |
147 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | 149 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, |
148 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | 150 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, |
@@ -161,6 +163,7 @@ static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { | |||
161 | #ifdef CONFIG_ARCH_OMAP34XX | 163 | #ifdef CONFIG_ARCH_OMAP34XX |
162 | static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | 164 | static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { |
163 | { | 165 | { |
166 | .phys_base = OMAP34XX_MCBSP1_BASE, | ||
164 | .virt_base = IO_ADDRESS(OMAP34XX_MCBSP1_BASE), | 167 | .virt_base = IO_ADDRESS(OMAP34XX_MCBSP1_BASE), |
165 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | 168 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, |
166 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 169 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, |
@@ -170,6 +173,7 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
170 | .clk_name = "mcbsp_clk", | 173 | .clk_name = "mcbsp_clk", |
171 | }, | 174 | }, |
172 | { | 175 | { |
176 | .phys_base = OMAP34XX_MCBSP2_BASE, | ||
173 | .virt_base = IO_ADDRESS(OMAP34XX_MCBSP2_BASE), | 177 | .virt_base = IO_ADDRESS(OMAP34XX_MCBSP2_BASE), |
174 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | 178 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, |
175 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | 179 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 25d9a11eb617..a713e40e1f1a 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -211,6 +211,12 @@ static struct mem_type mem_types[] = { | |||
211 | PMD_SECT_TEX(1), | 211 | PMD_SECT_TEX(1), |
212 | .domain = DOMAIN_IO, | 212 | .domain = DOMAIN_IO, |
213 | }, | 213 | }, |
214 | [MT_DEVICE_WC] = { /* ioremap_wc */ | ||
215 | .prot_pte = PROT_PTE_DEVICE, | ||
216 | .prot_l1 = PMD_TYPE_TABLE, | ||
217 | .prot_sect = PROT_SECT_DEVICE, | ||
218 | .domain = DOMAIN_IO, | ||
219 | }, | ||
214 | [MT_CACHECLEAN] = { | 220 | [MT_CACHECLEAN] = { |
215 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | 221 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, |
216 | .domain = DOMAIN_KERNEL, | 222 | .domain = DOMAIN_KERNEL, |
@@ -273,6 +279,20 @@ static void __init build_mem_type_table(void) | |||
273 | } | 279 | } |
274 | 280 | ||
275 | /* | 281 | /* |
282 | * On non-Xscale3 ARMv5-and-older systems, use CB=01 | ||
283 | * (Uncached/Buffered) for ioremap_wc() mappings. On XScale3 | ||
284 | * and ARMv6+, use TEXCB=00100 mappings (Inner/Outer Uncacheable | ||
285 | * in xsc3 parlance, Uncached Normal in ARMv6 parlance). | ||
286 | */ | ||
287 | if (cpu_is_xsc3() || cpu_arch >= CPU_ARCH_ARMv6) { | ||
288 | mem_types[MT_DEVICE_WC].prot_pte_ext |= PTE_EXT_TEX(1); | ||
289 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1); | ||
290 | } else { | ||
291 | mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_BUFFERABLE; | ||
292 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE; | ||
293 | } | ||
294 | |||
295 | /* | ||
276 | * ARMv5 and lower, bit 4 must be set for page tables. | 296 | * ARMv5 and lower, bit 4 must be set for page tables. |
277 | * (was: cache "update-able on write" bit on ARM610) | 297 | * (was: cache "update-able on write" bit on ARM610) |
278 | * However, Xscale cores require this bit to be cleared. | 298 | * However, Xscale cores require this bit to be cleared. |
diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c index 2f8627218839..0a38f0b396eb 100644 --- a/arch/arm/plat-mxc/clock.c +++ b/arch/arm/plat-mxc/clock.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/semaphore.h> | 38 | #include <linux/semaphore.h> |
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/version.h> | ||
41 | 40 | ||
42 | #include <mach/clock.h> | 41 | #include <mach/clock.h> |
43 | 42 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 3e76ee2bc731..9e1341ebc14e 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -1488,7 +1488,7 @@ static int __init _omap_gpio_init(void) | |||
1488 | bank->chip.set = gpio_set; | 1488 | bank->chip.set = gpio_set; |
1489 | if (bank_is_mpuio(bank)) { | 1489 | if (bank_is_mpuio(bank)) { |
1490 | bank->chip.label = "mpuio"; | 1490 | bank->chip.label = "mpuio"; |
1491 | #ifdef CONFIG_ARCH_OMAP1 | 1491 | #ifdef CONFIG_ARCH_OMAP16XX |
1492 | bank->chip.dev = &omap_mpuio_device.dev; | 1492 | bank->chip.dev = &omap_mpuio_device.dev; |
1493 | #endif | 1493 | #endif |
1494 | bank->chip.base = OMAP_MPUIO(0); | 1494 | bank->chip.base = OMAP_MPUIO(0); |
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index 6eb44a92871d..8fdb95e26fcd 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -315,6 +315,7 @@ struct omap_mcbsp_ops { | |||
315 | }; | 315 | }; |
316 | 316 | ||
317 | struct omap_mcbsp_platform_data { | 317 | struct omap_mcbsp_platform_data { |
318 | unsigned long phys_base; | ||
318 | u32 virt_base; | 319 | u32 virt_base; |
319 | u8 dma_rx_sync, dma_tx_sync; | 320 | u8 dma_rx_sync, dma_tx_sync; |
320 | u16 rx_irq, tx_irq; | 321 | u16 rx_irq, tx_irq; |
@@ -324,6 +325,7 @@ struct omap_mcbsp_platform_data { | |||
324 | 325 | ||
325 | struct omap_mcbsp { | 326 | struct omap_mcbsp { |
326 | struct device *dev; | 327 | struct device *dev; |
328 | unsigned long phys_base; | ||
327 | u32 io_base; | 329 | u32 io_base; |
328 | u8 id; | 330 | u8 id; |
329 | u8 free; | 331 | u8 free; |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index d0844050f2d2..014d26574bb6 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -651,7 +651,7 @@ int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, | |||
651 | omap_set_dma_dest_params(mcbsp[id].dma_tx_lch, | 651 | omap_set_dma_dest_params(mcbsp[id].dma_tx_lch, |
652 | src_port, | 652 | src_port, |
653 | OMAP_DMA_AMODE_CONSTANT, | 653 | OMAP_DMA_AMODE_CONSTANT, |
654 | mcbsp[id].io_base + OMAP_MCBSP_REG_DXR1, | 654 | mcbsp[id].phys_base + OMAP_MCBSP_REG_DXR1, |
655 | 0, 0); | 655 | 0, 0); |
656 | 656 | ||
657 | omap_set_dma_src_params(mcbsp[id].dma_tx_lch, | 657 | omap_set_dma_src_params(mcbsp[id].dma_tx_lch, |
@@ -712,7 +712,7 @@ int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, | |||
712 | omap_set_dma_src_params(mcbsp[id].dma_rx_lch, | 712 | omap_set_dma_src_params(mcbsp[id].dma_rx_lch, |
713 | src_port, | 713 | src_port, |
714 | OMAP_DMA_AMODE_CONSTANT, | 714 | OMAP_DMA_AMODE_CONSTANT, |
715 | mcbsp[id].io_base + OMAP_MCBSP_REG_DRR1, | 715 | mcbsp[id].phys_base + OMAP_MCBSP_REG_DRR1, |
716 | 0, 0); | 716 | 0, 0); |
717 | 717 | ||
718 | omap_set_dma_dest_params(mcbsp[id].dma_rx_lch, | 718 | omap_set_dma_dest_params(mcbsp[id].dma_rx_lch, |
@@ -830,6 +830,7 @@ static int __init omap_mcbsp_probe(struct platform_device *pdev) | |||
830 | mcbsp[id].dma_tx_lch = -1; | 830 | mcbsp[id].dma_tx_lch = -1; |
831 | mcbsp[id].dma_rx_lch = -1; | 831 | mcbsp[id].dma_rx_lch = -1; |
832 | 832 | ||
833 | mcbsp[id].phys_base = pdata->phys_base; | ||
833 | mcbsp[id].io_base = pdata->virt_base; | 834 | mcbsp[id].io_base = pdata->virt_base; |
834 | /* Default I/O is IRQ based */ | 835 | /* Default I/O is IRQ based */ |
835 | mcbsp[id].io_type = OMAP_MCBSP_IRQ_IO; | 836 | mcbsp[id].io_type = OMAP_MCBSP_IRQ_IO; |
diff --git a/arch/avr32/kernel/asm-offsets.c b/arch/avr32/kernel/asm-offsets.c index e4796c67a831..d6a8193a1d2f 100644 --- a/arch/avr32/kernel/asm-offsets.c +++ b/arch/avr32/kernel/asm-offsets.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * to extract and format the required data. | 4 | * to extract and format the required data. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/mm.h> | ||
8 | #include <linux/sched.h> | ||
7 | #include <linux/thread_info.h> | 9 | #include <linux/thread_info.h> |
8 | #include <linux/kbuild.h> | 10 | #include <linux/kbuild.h> |
9 | 11 | ||
@@ -17,4 +19,8 @@ void foo(void) | |||
17 | OFFSET(TI_rar_saved, thread_info, rar_saved); | 19 | OFFSET(TI_rar_saved, thread_info, rar_saved); |
18 | OFFSET(TI_rsr_saved, thread_info, rsr_saved); | 20 | OFFSET(TI_rsr_saved, thread_info, rsr_saved); |
19 | OFFSET(TI_restart_block, thread_info, restart_block); | 21 | OFFSET(TI_restart_block, thread_info, restart_block); |
22 | BLANK(); | ||
23 | OFFSET(TSK_active_mm, task_struct, active_mm); | ||
24 | BLANK(); | ||
25 | OFFSET(MM_pgd, mm_struct, pgd); | ||
20 | } | 26 | } |
diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S index 2b398cae110c..33d49377b8be 100644 --- a/arch/avr32/kernel/entry-avr32b.S +++ b/arch/avr32/kernel/entry-avr32b.S | |||
@@ -334,9 +334,64 @@ save_full_context_ex: | |||
334 | 334 | ||
335 | /* Low-level exception handlers */ | 335 | /* Low-level exception handlers */ |
336 | handle_critical: | 336 | handle_critical: |
337 | /* | ||
338 | * AT32AP700x errata: | ||
339 | * | ||
340 | * After a Java stack overflow or underflow trap, any CPU | ||
341 | * memory access may cause erratic behavior. This will happen | ||
342 | * when the four least significant bits of the JOSP system | ||
343 | * register contains any value between 9 and 15 (inclusive). | ||
344 | * | ||
345 | * Possible workarounds: | ||
346 | * - Don't use the Java Extension Module | ||
347 | * - Ensure that the stack overflow and underflow trap | ||
348 | * handlers do not do any memory access or trigger any | ||
349 | * exceptions before the overflow/underflow condition is | ||
350 | * cleared (by incrementing or decrementing the JOSP) | ||
351 | * - Make sure that JOSP does not contain any problematic | ||
352 | * value before doing any exception or interrupt | ||
353 | * processing. | ||
354 | * - Set up a critical exception handler which writes a | ||
355 | * known-to-be-safe value, e.g. 4, to JOSP before doing | ||
356 | * any further processing. | ||
357 | * | ||
358 | * We'll use the last workaround for now since we cannot | ||
359 | * guarantee that user space processes don't use Java mode. | ||
360 | * Non-well-behaving userland will be terminated with extreme | ||
361 | * prejudice. | ||
362 | */ | ||
363 | #ifdef CONFIG_CPU_AT32AP700X | ||
364 | /* | ||
365 | * There's a chance we can't touch memory, so temporarily | ||
366 | * borrow PTBR to save the stack pointer while we fix things | ||
367 | * up... | ||
368 | */ | ||
369 | mtsr SYSREG_PTBR, sp | ||
370 | mov sp, 4 | ||
371 | mtsr SYSREG_JOSP, sp | ||
372 | mfsr sp, SYSREG_PTBR | ||
373 | sub pc, -2 | ||
374 | |||
375 | /* Push most of pt_regs on stack. We'll do the rest later */ | ||
337 | sub sp, 4 | 376 | sub sp, 4 |
338 | stmts --sp, r0-lr | 377 | pushm r0-r12 |
339 | rcall save_full_context_ex | 378 | |
379 | /* PTBR mirrors current_thread_info()->task->active_mm->pgd */ | ||
380 | get_thread_info r0 | ||
381 | ld.w r1, r0[TI_task] | ||
382 | ld.w r2, r1[TSK_active_mm] | ||
383 | ld.w r3, r2[MM_pgd] | ||
384 | mtsr SYSREG_PTBR, r3 | ||
385 | #else | ||
386 | sub sp, 4 | ||
387 | pushm r0-r12 | ||
388 | #endif | ||
389 | sub r0, sp, -(14 * 4) | ||
390 | mov r1, lr | ||
391 | mfsr r2, SYSREG_RAR_EX | ||
392 | mfsr r3, SYSREG_RSR_EX | ||
393 | pushm r0-r3 | ||
394 | |||
340 | mfsr r12, SYSREG_ECR | 395 | mfsr r12, SYSREG_ECR |
341 | mov r11, sp | 396 | mov r11, sp |
342 | rcall do_critical_exception | 397 | rcall do_critical_exception |
diff --git a/arch/avr32/mach-at32ap/pm-at32ap700x.S b/arch/avr32/mach-at32ap/pm-at32ap700x.S index 5be4de65b209..17503b0ed6c9 100644 --- a/arch/avr32/mach-at32ap/pm-at32ap700x.S +++ b/arch/avr32/mach-at32ap/pm-at32ap700x.S | |||
@@ -134,7 +134,7 @@ pm_standby: | |||
134 | mov r11, SDRAMC_LPR_LPCB_SELF_RFR | 134 | mov r11, SDRAMC_LPR_LPCB_SELF_RFR |
135 | bfins r10, r11, 0, 2 /* LPCB <- self Refresh */ | 135 | bfins r10, r11, 0, 2 /* LPCB <- self Refresh */ |
136 | sync 0 /* flush write buffer */ | 136 | sync 0 /* flush write buffer */ |
137 | st.w r12[SDRAMC_LPR], r11 /* put SDRAM in self-refresh mode */ | 137 | st.w r12[SDRAMC_LPR], r10 /* put SDRAM in self-refresh mode */ |
138 | ld.w r11, r12[SDRAMC_LPR] | 138 | ld.w r11, r12[SDRAMC_LPR] |
139 | unmask_interrupts | 139 | unmask_interrupts |
140 | sleep CPU_SLEEP_FROZEN | 140 | sleep CPU_SLEEP_FROZEN |
diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h index 7286e4a9fe84..a7acad2bc2f0 100644 --- a/arch/ia64/include/asm/sections.h +++ b/arch/ia64/include/asm/sections.h | |||
@@ -21,5 +21,8 @@ extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_b | |||
21 | extern char __start_unwind[], __end_unwind[]; | 21 | extern char __start_unwind[], __end_unwind[]; |
22 | extern char __start_ivt_text[], __end_ivt_text[]; | 22 | extern char __start_ivt_text[], __end_ivt_text[]; |
23 | 23 | ||
24 | #undef dereference_function_descriptor | ||
25 | void *dereference_function_descriptor(void *); | ||
26 | |||
24 | #endif /* _ASM_IA64_SECTIONS_H */ | 27 | #endif /* _ASM_IA64_SECTIONS_H */ |
25 | 28 | ||
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index 29aad349e0c4..545626f66a4c 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c | |||
@@ -31,9 +31,11 @@ | |||
31 | #include <linux/elf.h> | 31 | #include <linux/elf.h> |
32 | #include <linux/moduleloader.h> | 32 | #include <linux/moduleloader.h> |
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/uaccess.h> | ||
34 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
35 | 36 | ||
36 | #include <asm/patch.h> | 37 | #include <asm/patch.h> |
38 | #include <asm/sections.h> | ||
37 | #include <asm/unaligned.h> | 39 | #include <asm/unaligned.h> |
38 | 40 | ||
39 | #define ARCH_MODULE_DEBUG 0 | 41 | #define ARCH_MODULE_DEBUG 0 |
@@ -941,3 +943,13 @@ module_arch_cleanup (struct module *mod) | |||
941 | if (mod->arch.core_unw_table) | 943 | if (mod->arch.core_unw_table) |
942 | unw_remove_unwind_table(mod->arch.core_unw_table); | 944 | unw_remove_unwind_table(mod->arch.core_unw_table); |
943 | } | 945 | } |
946 | |||
947 | void *dereference_function_descriptor(void *ptr) | ||
948 | { | ||
949 | struct fdesc *desc = ptr; | ||
950 | void *p; | ||
951 | |||
952 | if (!probe_kernel_address(&desc->ip, p)) | ||
953 | ptr = p; | ||
954 | return ptr; | ||
955 | } | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 4da736e25333..49896a2a1d72 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1886,6 +1886,15 @@ config STACKTRACE_SUPPORT | |||
1886 | 1886 | ||
1887 | source "init/Kconfig" | 1887 | source "init/Kconfig" |
1888 | 1888 | ||
1889 | config PROBE_INITRD_HEADER | ||
1890 | bool "Probe initrd header created by addinitrd" | ||
1891 | depends on BLK_DEV_INITRD | ||
1892 | help | ||
1893 | Probe initrd header at the last page of kernel image. | ||
1894 | Say Y here if you are using arch/mips/boot/addinitrd.c to | ||
1895 | add initrd or initramfs image to the kernel image. | ||
1896 | Otherwise, say N. | ||
1897 | |||
1889 | menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)" | 1898 | menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)" |
1890 | 1899 | ||
1891 | config HW_HAS_EISA | 1900 | config HW_HAS_EISA |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 2aae76bce293..16f8edfe5cdc 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -160,30 +160,33 @@ early_param("rd_size", rd_size_early); | |||
160 | static unsigned long __init init_initrd(void) | 160 | static unsigned long __init init_initrd(void) |
161 | { | 161 | { |
162 | unsigned long end; | 162 | unsigned long end; |
163 | u32 *initrd_header; | ||
164 | 163 | ||
165 | /* | 164 | /* |
166 | * Board specific code or command line parser should have | 165 | * Board specific code or command line parser should have |
167 | * already set up initrd_start and initrd_end. In these cases | 166 | * already set up initrd_start and initrd_end. In these cases |
168 | * perfom sanity checks and use them if all looks good. | 167 | * perfom sanity checks and use them if all looks good. |
169 | */ | 168 | */ |
170 | if (initrd_start && initrd_end > initrd_start) | 169 | if (!initrd_start || initrd_end <= initrd_start) { |
171 | goto sanitize; | 170 | #ifdef CONFIG_PROBE_INITRD_HEADER |
171 | u32 *initrd_header; | ||
172 | 172 | ||
173 | /* | 173 | /* |
174 | * See if initrd has been added to the kernel image by | 174 | * See if initrd has been added to the kernel image by |
175 | * arch/mips/boot/addinitrd.c. In that case a header is | 175 | * arch/mips/boot/addinitrd.c. In that case a header is |
176 | * prepended to initrd and is made up by 8 bytes. The fisrt | 176 | * prepended to initrd and is made up by 8 bytes. The first |
177 | * word is a magic number and the second one is the size of | 177 | * word is a magic number and the second one is the size of |
178 | * initrd. Initrd start must be page aligned in any cases. | 178 | * initrd. Initrd start must be page aligned in any cases. |
179 | */ | 179 | */ |
180 | initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8; | 180 | initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8; |
181 | if (initrd_header[0] != 0x494E5244) | 181 | if (initrd_header[0] != 0x494E5244) |
182 | goto disable; | ||
183 | initrd_start = (unsigned long)(initrd_header + 2); | ||
184 | initrd_end = initrd_start + initrd_header[1]; | ||
185 | #else | ||
182 | goto disable; | 186 | goto disable; |
183 | initrd_start = (unsigned long)(initrd_header + 2); | 187 | #endif |
184 | initrd_end = initrd_start + initrd_header[1]; | 188 | } |
185 | 189 | ||
186 | sanitize: | ||
187 | if (initrd_start & ~PAGE_MASK) { | 190 | if (initrd_start & ~PAGE_MASK) { |
188 | pr_err("initrd start must be page aligned\n"); | 191 | pr_err("initrd start must be page aligned\n"); |
189 | goto disable; | 192 | goto disable; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 426cced1e9dc..6bee29097a56 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -373,8 +373,8 @@ void __noreturn die(const char * str, const struct pt_regs * regs) | |||
373 | do_exit(SIGSEGV); | 373 | do_exit(SIGSEGV); |
374 | } | 374 | } |
375 | 375 | ||
376 | extern const struct exception_table_entry __start___dbe_table[]; | 376 | extern struct exception_table_entry __start___dbe_table[]; |
377 | extern const struct exception_table_entry __stop___dbe_table[]; | 377 | extern struct exception_table_entry __stop___dbe_table[]; |
378 | 378 | ||
379 | __asm__( | 379 | __asm__( |
380 | " .section __dbe_table, \"a\"\n" | 380 | " .section __dbe_table, \"a\"\n" |
@@ -1200,7 +1200,7 @@ void *set_except_vector(int n, void *addr) | |||
1200 | if (n == 0 && cpu_has_divec) { | 1200 | if (n == 0 && cpu_has_divec) { |
1201 | *(u32 *)(ebase + 0x200) = 0x08000000 | | 1201 | *(u32 *)(ebase + 0x200) = 0x08000000 | |
1202 | (0x03ffffff & (handler >> 2)); | 1202 | (0x03ffffff & (handler >> 2)); |
1203 | flush_icache_range(ebase + 0x200, ebase + 0x204); | 1203 | local_flush_icache_range(ebase + 0x200, ebase + 0x204); |
1204 | } | 1204 | } |
1205 | return (void *)old_handler; | 1205 | return (void *)old_handler; |
1206 | } | 1206 | } |
@@ -1283,7 +1283,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) | |||
1283 | *w = (*w & 0xffff0000) | (((u32)handler >> 16) & 0xffff); | 1283 | *w = (*w & 0xffff0000) | (((u32)handler >> 16) & 0xffff); |
1284 | w = (u32 *)(b + ori_offset); | 1284 | w = (u32 *)(b + ori_offset); |
1285 | *w = (*w & 0xffff0000) | ((u32)handler & 0xffff); | 1285 | *w = (*w & 0xffff0000) | ((u32)handler & 0xffff); |
1286 | flush_icache_range((unsigned long)b, (unsigned long)(b+handler_len)); | 1286 | local_flush_icache_range((unsigned long)b, |
1287 | (unsigned long)(b+handler_len)); | ||
1287 | } | 1288 | } |
1288 | else { | 1289 | else { |
1289 | /* | 1290 | /* |
@@ -1295,7 +1296,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) | |||
1295 | w = (u32 *)b; | 1296 | w = (u32 *)b; |
1296 | *w++ = 0x08000000 | (((u32)handler >> 2) & 0x03fffff); /* j handler */ | 1297 | *w++ = 0x08000000 | (((u32)handler >> 2) & 0x03fffff); /* j handler */ |
1297 | *w = 0; | 1298 | *w = 0; |
1298 | flush_icache_range((unsigned long)b, (unsigned long)(b+8)); | 1299 | local_flush_icache_range((unsigned long)b, |
1300 | (unsigned long)(b+8)); | ||
1299 | } | 1301 | } |
1300 | 1302 | ||
1301 | return (void *)old_handler; | 1303 | return (void *)old_handler; |
@@ -1515,7 +1517,7 @@ void __cpuinit per_cpu_trap_init(void) | |||
1515 | void __init set_handler(unsigned long offset, void *addr, unsigned long size) | 1517 | void __init set_handler(unsigned long offset, void *addr, unsigned long size) |
1516 | { | 1518 | { |
1517 | memcpy((void *)(ebase + offset), addr, size); | 1519 | memcpy((void *)(ebase + offset), addr, size); |
1518 | flush_icache_range(ebase + offset, ebase + offset + size); | 1520 | local_flush_icache_range(ebase + offset, ebase + offset + size); |
1519 | } | 1521 | } |
1520 | 1522 | ||
1521 | static char panic_null_cerr[] __cpuinitdata = | 1523 | static char panic_null_cerr[] __cpuinitdata = |
@@ -1680,6 +1682,8 @@ void __init trap_init(void) | |||
1680 | signal32_init(); | 1682 | signal32_init(); |
1681 | #endif | 1683 | #endif |
1682 | 1684 | ||
1683 | flush_icache_range(ebase, ebase + 0x400); | 1685 | local_flush_icache_range(ebase, ebase + 0x400); |
1684 | flush_tlb_handlers(); | 1686 | flush_tlb_handlers(); |
1687 | |||
1688 | sort_extable(__start___dbe_table, __stop___dbe_table); | ||
1685 | } | 1689 | } |
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c index 27a5b466c85c..5500c20c79ae 100644 --- a/arch/mips/mm/c-r3k.c +++ b/arch/mips/mm/c-r3k.c | |||
@@ -320,6 +320,7 @@ void __cpuinit r3k_cache_init(void) | |||
320 | flush_cache_range = r3k_flush_cache_range; | 320 | flush_cache_range = r3k_flush_cache_range; |
321 | flush_cache_page = r3k_flush_cache_page; | 321 | flush_cache_page = r3k_flush_cache_page; |
322 | flush_icache_range = r3k_flush_icache_range; | 322 | flush_icache_range = r3k_flush_icache_range; |
323 | local_flush_icache_range = r3k_flush_icache_range; | ||
323 | 324 | ||
324 | flush_cache_sigtramp = r3k_flush_cache_sigtramp; | 325 | flush_cache_sigtramp = r3k_flush_cache_sigtramp; |
325 | local_flush_data_cache_page = local_r3k_flush_data_cache_page; | 326 | local_flush_data_cache_page = local_r3k_flush_data_cache_page; |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 71df3390c07b..6e99665ae860 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -543,12 +543,8 @@ struct flush_icache_range_args { | |||
543 | unsigned long end; | 543 | unsigned long end; |
544 | }; | 544 | }; |
545 | 545 | ||
546 | static inline void local_r4k_flush_icache_range(void *args) | 546 | static inline void local_r4k_flush_icache_range(unsigned long start, unsigned long end) |
547 | { | 547 | { |
548 | struct flush_icache_range_args *fir_args = args; | ||
549 | unsigned long start = fir_args->start; | ||
550 | unsigned long end = fir_args->end; | ||
551 | |||
552 | if (!cpu_has_ic_fills_f_dc) { | 548 | if (!cpu_has_ic_fills_f_dc) { |
553 | if (end - start >= dcache_size) { | 549 | if (end - start >= dcache_size) { |
554 | r4k_blast_dcache(); | 550 | r4k_blast_dcache(); |
@@ -564,6 +560,15 @@ static inline void local_r4k_flush_icache_range(void *args) | |||
564 | protected_blast_icache_range(start, end); | 560 | protected_blast_icache_range(start, end); |
565 | } | 561 | } |
566 | 562 | ||
563 | static inline void local_r4k_flush_icache_range_ipi(void *args) | ||
564 | { | ||
565 | struct flush_icache_range_args *fir_args = args; | ||
566 | unsigned long start = fir_args->start; | ||
567 | unsigned long end = fir_args->end; | ||
568 | |||
569 | local_r4k_flush_icache_range(start, end); | ||
570 | } | ||
571 | |||
567 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) | 572 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) |
568 | { | 573 | { |
569 | struct flush_icache_range_args args; | 574 | struct flush_icache_range_args args; |
@@ -571,7 +576,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end) | |||
571 | args.start = start; | 576 | args.start = start; |
572 | args.end = end; | 577 | args.end = end; |
573 | 578 | ||
574 | r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1); | 579 | r4k_on_each_cpu(local_r4k_flush_icache_range_ipi, &args, 1); |
575 | instruction_hazard(); | 580 | instruction_hazard(); |
576 | } | 581 | } |
577 | 582 | ||
@@ -1375,6 +1380,7 @@ void __cpuinit r4k_cache_init(void) | |||
1375 | local_flush_data_cache_page = local_r4k_flush_data_cache_page; | 1380 | local_flush_data_cache_page = local_r4k_flush_data_cache_page; |
1376 | flush_data_cache_page = r4k_flush_data_cache_page; | 1381 | flush_data_cache_page = r4k_flush_data_cache_page; |
1377 | flush_icache_range = r4k_flush_icache_range; | 1382 | flush_icache_range = r4k_flush_icache_range; |
1383 | local_flush_icache_range = local_r4k_flush_icache_range; | ||
1378 | 1384 | ||
1379 | #if defined(CONFIG_DMA_NONCOHERENT) | 1385 | #if defined(CONFIG_DMA_NONCOHERENT) |
1380 | if (coherentio) { | 1386 | if (coherentio) { |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index a9f7f1f5e9b4..f7c8f9ce39c1 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -362,6 +362,7 @@ void __cpuinit tx39_cache_init(void) | |||
362 | flush_cache_range = (void *) tx39h_flush_icache_all; | 362 | flush_cache_range = (void *) tx39h_flush_icache_all; |
363 | flush_cache_page = (void *) tx39h_flush_icache_all; | 363 | flush_cache_page = (void *) tx39h_flush_icache_all; |
364 | flush_icache_range = (void *) tx39h_flush_icache_all; | 364 | flush_icache_range = (void *) tx39h_flush_icache_all; |
365 | local_flush_icache_range = (void *) tx39h_flush_icache_all; | ||
365 | 366 | ||
366 | flush_cache_sigtramp = (void *) tx39h_flush_icache_all; | 367 | flush_cache_sigtramp = (void *) tx39h_flush_icache_all; |
367 | local_flush_data_cache_page = (void *) tx39h_flush_icache_all; | 368 | local_flush_data_cache_page = (void *) tx39h_flush_icache_all; |
@@ -390,6 +391,7 @@ void __cpuinit tx39_cache_init(void) | |||
390 | flush_cache_range = tx39_flush_cache_range; | 391 | flush_cache_range = tx39_flush_cache_range; |
391 | flush_cache_page = tx39_flush_cache_page; | 392 | flush_cache_page = tx39_flush_cache_page; |
392 | flush_icache_range = tx39_flush_icache_range; | 393 | flush_icache_range = tx39_flush_icache_range; |
394 | local_flush_icache_range = tx39_flush_icache_range; | ||
393 | 395 | ||
394 | flush_cache_sigtramp = tx39_flush_cache_sigtramp; | 396 | flush_cache_sigtramp = tx39_flush_cache_sigtramp; |
395 | local_flush_data_cache_page = local_tx39_flush_data_cache_page; | 397 | local_flush_data_cache_page = local_tx39_flush_data_cache_page; |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 034e8506f6ea..1eb7c71e3d6a 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -29,6 +29,7 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, | |||
29 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, | 29 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, |
30 | unsigned long pfn); | 30 | unsigned long pfn); |
31 | void (*flush_icache_range)(unsigned long start, unsigned long end); | 31 | void (*flush_icache_range)(unsigned long start, unsigned long end); |
32 | void (*local_flush_icache_range)(unsigned long start, unsigned long end); | ||
32 | 33 | ||
33 | void (*__flush_cache_vmap)(void); | 34 | void (*__flush_cache_vmap)(void); |
34 | void (*__flush_cache_vunmap)(void); | 35 | void (*__flush_cache_vunmap)(void); |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 76da73a5ab3c..979cf9197282 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -1273,10 +1273,10 @@ void __cpuinit build_tlb_refill_handler(void) | |||
1273 | 1273 | ||
1274 | void __cpuinit flush_tlb_handlers(void) | 1274 | void __cpuinit flush_tlb_handlers(void) |
1275 | { | 1275 | { |
1276 | flush_icache_range((unsigned long)handle_tlbl, | 1276 | local_flush_icache_range((unsigned long)handle_tlbl, |
1277 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); | 1277 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); |
1278 | flush_icache_range((unsigned long)handle_tlbs, | 1278 | local_flush_icache_range((unsigned long)handle_tlbs, |
1279 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); | 1279 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); |
1280 | flush_icache_range((unsigned long)handle_tlbm, | 1280 | local_flush_icache_range((unsigned long)handle_tlbm, |
1281 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); | 1281 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); |
1282 | } | 1282 | } |
diff --git a/arch/mips/sgi-ip22/ip22-platform.c b/arch/mips/sgi-ip22/ip22-platform.c index 60141235ec40..52486c4d2b01 100644 --- a/arch/mips/sgi-ip22/ip22-platform.c +++ b/arch/mips/sgi-ip22/ip22-platform.c | |||
@@ -150,7 +150,7 @@ static int __init sgiseeq_devinit(void) | |||
150 | return res; | 150 | return res; |
151 | 151 | ||
152 | /* Second HPC is missing? */ | 152 | /* Second HPC is missing? */ |
153 | if (!ip22_is_fullhouse() || | 153 | if (ip22_is_fullhouse() || |
154 | get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1])) | 154 | get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1])) |
155 | return 0; | 155 | return 0; |
156 | 156 | ||
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 0afe94c48fb6..fe6bee09cece 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -53,6 +53,7 @@ txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size) | |||
53 | txx9_ce_res[i].name = txx9_ce_res_name[i]; | 53 | txx9_ce_res[i].name = txx9_ce_res_name[i]; |
54 | } | 54 | } |
55 | 55 | ||
56 | txx9_pcode = pcode; | ||
56 | sprintf(txx9_pcode_str, "TX%x", pcode); | 57 | sprintf(txx9_pcode_str, "TX%x", pcode); |
57 | if (base) { | 58 | if (base) { |
58 | txx9_reg_res.start = base & 0xfffffffffULL; | 59 | txx9_reg_res.start = base & 0xfffffffffULL; |
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index fdacdd4341c9..44138c3e6ea7 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -47,7 +47,9 @@ | |||
47 | #include <linux/string.h> | 47 | #include <linux/string.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/bug.h> | 49 | #include <linux/bug.h> |
50 | #include <linux/uaccess.h> | ||
50 | 51 | ||
52 | #include <asm/sections.h> | ||
51 | #include <asm/unwind.h> | 53 | #include <asm/unwind.h> |
52 | 54 | ||
53 | #if 0 | 55 | #if 0 |
@@ -860,3 +862,15 @@ void module_arch_cleanup(struct module *mod) | |||
860 | deregister_unwind_table(mod); | 862 | deregister_unwind_table(mod); |
861 | module_bug_cleanup(mod); | 863 | module_bug_cleanup(mod); |
862 | } | 864 | } |
865 | |||
866 | #ifdef CONFIG_64BIT | ||
867 | void *dereference_function_descriptor(void *ptr) | ||
868 | { | ||
869 | Elf64_Fdesc *desc = ptr; | ||
870 | void *p; | ||
871 | |||
872 | if (!probe_kernel_address(&desc->addr, p)) | ||
873 | ptr = p; | ||
874 | return ptr; | ||
875 | } | ||
876 | #endif | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 14174aa24074..717a3bc1352e 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -49,7 +49,7 @@ zlib := inffast.c inflate.c inftrees.c | |||
49 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h | 49 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h |
50 | zliblinuxheader := zlib.h zconf.h zutil.h | 50 | zliblinuxheader := zlib.h zconf.h zutil.h |
51 | 51 | ||
52 | $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ | 52 | $(addprefix $(obj)/,$(zlib) cuboot-c2k.o gunzip_util.o main.o prpmc2800.o): \ |
53 | $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) | 53 | $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) |
54 | 54 | ||
55 | src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c | 55 | src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c |
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 916018e425c4..7710e9e6660f 100644 --- a/arch/powerpc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h | |||
@@ -16,6 +16,9 @@ static inline int in_kernel_text(unsigned long addr) | |||
16 | return 0; | 16 | return 0; |
17 | } | 17 | } |
18 | 18 | ||
19 | #undef dereference_function_descriptor | ||
20 | void *dereference_function_descriptor(void *); | ||
21 | |||
19 | #endif | 22 | #endif |
20 | 23 | ||
21 | #endif /* __KERNEL__ */ | 24 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index ee6a2982d567..ad79de272ff3 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -21,8 +21,9 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/bug.h> | 23 | #include <linux/bug.h> |
24 | #include <linux/uaccess.h> | ||
24 | #include <asm/module.h> | 25 | #include <asm/module.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/sections.h> |
26 | #include <asm/firmware.h> | 27 | #include <asm/firmware.h> |
27 | #include <asm/code-patching.h> | 28 | #include <asm/code-patching.h> |
28 | #include <linux/sort.h> | 29 | #include <linux/sort.h> |
@@ -451,3 +452,13 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
451 | 452 | ||
452 | return 0; | 453 | return 0; |
453 | } | 454 | } |
455 | |||
456 | void *dereference_function_descriptor(void *ptr) | ||
457 | { | ||
458 | struct ppc64_opd_entry *desc = ptr; | ||
459 | void *p; | ||
460 | |||
461 | if (!probe_kernel_address(&desc->funcaddr, p)) | ||
462 | ptr = p; | ||
463 | return ptr; | ||
464 | } | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 1c1b627ee843..67595bc380dc 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -643,9 +643,10 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
643 | !(tmp->flags & SPU_CREATE_NOSCHED) && | 643 | !(tmp->flags & SPU_CREATE_NOSCHED) && |
644 | (!victim || tmp->prio > victim->prio)) { | 644 | (!victim || tmp->prio > victim->prio)) { |
645 | victim = spu->ctx; | 645 | victim = spu->ctx; |
646 | get_spu_context(victim); | ||
647 | } | 646 | } |
648 | } | 647 | } |
648 | if (victim) | ||
649 | get_spu_context(victim); | ||
649 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 650 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
650 | 651 | ||
651 | if (victim) { | 652 | if (victim) { |
@@ -727,17 +728,33 @@ static void spu_schedule(struct spu *spu, struct spu_context *ctx) | |||
727 | /* not a candidate for interruptible because it's called either | 728 | /* not a candidate for interruptible because it's called either |
728 | from the scheduler thread or from spu_deactivate */ | 729 | from the scheduler thread or from spu_deactivate */ |
729 | mutex_lock(&ctx->state_mutex); | 730 | mutex_lock(&ctx->state_mutex); |
730 | __spu_schedule(spu, ctx); | 731 | if (ctx->state == SPU_STATE_SAVED) |
732 | __spu_schedule(spu, ctx); | ||
731 | spu_release(ctx); | 733 | spu_release(ctx); |
732 | } | 734 | } |
733 | 735 | ||
734 | static void spu_unschedule(struct spu *spu, struct spu_context *ctx) | 736 | /** |
737 | * spu_unschedule - remove a context from a spu, and possibly release it. | ||
738 | * @spu: The SPU to unschedule from | ||
739 | * @ctx: The context currently scheduled on the SPU | ||
740 | * @free_spu Whether to free the SPU for other contexts | ||
741 | * | ||
742 | * Unbinds the context @ctx from the SPU @spu. If @free_spu is non-zero, the | ||
743 | * SPU is made available for other contexts (ie, may be returned by | ||
744 | * spu_get_idle). If this is zero, the caller is expected to schedule another | ||
745 | * context to this spu. | ||
746 | * | ||
747 | * Should be called with ctx->state_mutex held. | ||
748 | */ | ||
749 | static void spu_unschedule(struct spu *spu, struct spu_context *ctx, | ||
750 | int free_spu) | ||
735 | { | 751 | { |
736 | int node = spu->node; | 752 | int node = spu->node; |
737 | 753 | ||
738 | mutex_lock(&cbe_spu_info[node].list_mutex); | 754 | mutex_lock(&cbe_spu_info[node].list_mutex); |
739 | cbe_spu_info[node].nr_active--; | 755 | cbe_spu_info[node].nr_active--; |
740 | spu->alloc_state = SPU_FREE; | 756 | if (free_spu) |
757 | spu->alloc_state = SPU_FREE; | ||
741 | spu_unbind_context(spu, ctx); | 758 | spu_unbind_context(spu, ctx); |
742 | ctx->stats.invol_ctx_switch++; | 759 | ctx->stats.invol_ctx_switch++; |
743 | spu->stats.invol_ctx_switch++; | 760 | spu->stats.invol_ctx_switch++; |
@@ -837,7 +854,7 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio) | |||
837 | if (spu) { | 854 | if (spu) { |
838 | new = grab_runnable_context(max_prio, spu->node); | 855 | new = grab_runnable_context(max_prio, spu->node); |
839 | if (new || force) { | 856 | if (new || force) { |
840 | spu_unschedule(spu, ctx); | 857 | spu_unschedule(spu, ctx, new == NULL); |
841 | if (new) { | 858 | if (new) { |
842 | if (new->flags & SPU_CREATE_NOSCHED) | 859 | if (new->flags & SPU_CREATE_NOSCHED) |
843 | wake_up(&new->stop_wq); | 860 | wake_up(&new->stop_wq); |
@@ -910,7 +927,7 @@ static noinline void spusched_tick(struct spu_context *ctx) | |||
910 | 927 | ||
911 | new = grab_runnable_context(ctx->prio + 1, spu->node); | 928 | new = grab_runnable_context(ctx->prio + 1, spu->node); |
912 | if (new) { | 929 | if (new) { |
913 | spu_unschedule(spu, ctx); | 930 | spu_unschedule(spu, ctx, 0); |
914 | if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) | 931 | if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) |
915 | spu_add_to_rq(ctx); | 932 | spu_add_to_rq(ctx); |
916 | } else { | 933 | } else { |
diff --git a/arch/s390/kernel/compat_ptrace.h b/arch/s390/kernel/compat_ptrace.h index cde81fa64f89..a2be3a978d5c 100644 --- a/arch/s390/kernel/compat_ptrace.h +++ b/arch/s390/kernel/compat_ptrace.h | |||
@@ -42,6 +42,7 @@ struct user_regs_struct32 | |||
42 | u32 gprs[NUM_GPRS]; | 42 | u32 gprs[NUM_GPRS]; |
43 | u32 acrs[NUM_ACRS]; | 43 | u32 acrs[NUM_ACRS]; |
44 | u32 orig_gpr2; | 44 | u32 orig_gpr2; |
45 | /* nb: there's a 4-byte hole here */ | ||
45 | s390_fp_regs fp_regs; | 46 | s390_fp_regs fp_regs; |
46 | /* | 47 | /* |
47 | * These per registers are in here so that gdb can modify them | 48 | * These per registers are in here so that gdb can modify them |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 2815bfe348a6..c8b08289eb87 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -170,6 +170,13 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr) | |||
170 | */ | 170 | */ |
171 | tmp = (addr_t) task_pt_regs(child)->orig_gpr2; | 171 | tmp = (addr_t) task_pt_regs(child)->orig_gpr2; |
172 | 172 | ||
173 | } else if (addr < (addr_t) &dummy->regs.fp_regs) { | ||
174 | /* | ||
175 | * prevent reads of padding hole between | ||
176 | * orig_gpr2 and fp_regs on s390. | ||
177 | */ | ||
178 | tmp = 0; | ||
179 | |||
173 | } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { | 180 | } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { |
174 | /* | 181 | /* |
175 | * floating point regs. are stored in the thread structure | 182 | * floating point regs. are stored in the thread structure |
@@ -270,6 +277,13 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
270 | */ | 277 | */ |
271 | task_pt_regs(child)->orig_gpr2 = data; | 278 | task_pt_regs(child)->orig_gpr2 = data; |
272 | 279 | ||
280 | } else if (addr < (addr_t) &dummy->regs.fp_regs) { | ||
281 | /* | ||
282 | * prevent writes of padding hole between | ||
283 | * orig_gpr2 and fp_regs on s390. | ||
284 | */ | ||
285 | return 0; | ||
286 | |||
273 | } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { | 287 | } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { |
274 | /* | 288 | /* |
275 | * floating point regs. are stored in the thread structure | 289 | * floating point regs. are stored in the thread structure |
@@ -428,6 +442,13 @@ static u32 __peek_user_compat(struct task_struct *child, addr_t addr) | |||
428 | */ | 442 | */ |
429 | tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4); | 443 | tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4); |
430 | 444 | ||
445 | } else if (addr < (addr_t) &dummy32->regs.fp_regs) { | ||
446 | /* | ||
447 | * prevent reads of padding hole between | ||
448 | * orig_gpr2 and fp_regs on s390. | ||
449 | */ | ||
450 | tmp = 0; | ||
451 | |||
431 | } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { | 452 | } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { |
432 | /* | 453 | /* |
433 | * floating point regs. are stored in the thread structure | 454 | * floating point regs. are stored in the thread structure |
@@ -514,6 +535,13 @@ static int __poke_user_compat(struct task_struct *child, | |||
514 | */ | 535 | */ |
515 | *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp; | 536 | *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp; |
516 | 537 | ||
538 | } else if (addr < (addr_t) &dummy32->regs.fp_regs) { | ||
539 | /* | ||
540 | * prevent writess of padding hole between | ||
541 | * orig_gpr2 and fp_regs on s390. | ||
542 | */ | ||
543 | return 0; | ||
544 | |||
517 | } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { | 545 | } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { |
518 | /* | 546 | /* |
519 | * floating point regs. are stored in the thread structure | 547 | * floating point regs. are stored in the thread structure |
diff --git a/arch/sh/configs/ap325rxa_defconfig b/arch/sh/configs/ap325rxa_defconfig index 29926a9b9ce2..851c870adf3b 100644 --- a/arch/sh/configs/ap325rxa_defconfig +++ b/arch/sh/configs/ap325rxa_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.26 | 3 | # Linux kernel version: 2.6.27-rc4 |
4 | # Wed Jul 30 01:18:59 2008 | 4 | # Tue Aug 26 14:21:17 2008 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -11,6 +11,7 @@ CONFIG_GENERIC_BUG=y | |||
11 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 11 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
12 | CONFIG_GENERIC_HWEIGHT=y | 12 | CONFIG_GENERIC_HWEIGHT=y |
13 | CONFIG_GENERIC_HARDIRQS=y | 13 | CONFIG_GENERIC_HARDIRQS=y |
14 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
14 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
16 | CONFIG_GENERIC_TIME=y | 17 | CONFIG_GENERIC_TIME=y |
@@ -20,7 +21,6 @@ CONFIG_LOCKDEP_SUPPORT=y | |||
20 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
22 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 23 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
23 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | 25 | ||
26 | # | 26 | # |
@@ -58,7 +58,6 @@ CONFIG_SYSCTL=y | |||
58 | CONFIG_EMBEDDED=y | 58 | CONFIG_EMBEDDED=y |
59 | CONFIG_UID16=y | 59 | CONFIG_UID16=y |
60 | CONFIG_SYSCTL_SYSCALL=y | 60 | CONFIG_SYSCTL_SYSCALL=y |
61 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
62 | # CONFIG_KALLSYMS is not set | 61 | # CONFIG_KALLSYMS is not set |
63 | CONFIG_HOTPLUG=y | 62 | CONFIG_HOTPLUG=y |
64 | CONFIG_PRINTK=y | 63 | CONFIG_PRINTK=y |
@@ -89,6 +88,7 @@ CONFIG_HAVE_OPROFILE=y | |||
89 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | 88 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set |
90 | CONFIG_HAVE_CLK=y | 89 | CONFIG_HAVE_CLK=y |
91 | CONFIG_PROC_PAGE_MONITOR=y | 90 | CONFIG_PROC_PAGE_MONITOR=y |
91 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
92 | CONFIG_SLABINFO=y | 92 | CONFIG_SLABINFO=y |
93 | CONFIG_RT_MUTEXES=y | 93 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 94 | # CONFIG_TINY_SHMEM is not set |
@@ -261,9 +261,10 @@ CONFIG_HZ_250=y | |||
261 | # CONFIG_HZ_300 is not set | 261 | # CONFIG_HZ_300 is not set |
262 | # CONFIG_HZ_1000 is not set | 262 | # CONFIG_HZ_1000 is not set |
263 | CONFIG_HZ=250 | 263 | CONFIG_HZ=250 |
264 | # CONFIG_SCHED_HRTICK is not set | 264 | CONFIG_SCHED_HRTICK=y |
265 | # CONFIG_KEXEC is not set | 265 | # CONFIG_KEXEC is not set |
266 | # CONFIG_CRASH_DUMP is not set | 266 | # CONFIG_CRASH_DUMP is not set |
267 | CONFIG_SECCOMP=y | ||
267 | # CONFIG_PREEMPT_NONE is not set | 268 | # CONFIG_PREEMPT_NONE is not set |
268 | # CONFIG_PREEMPT_VOLUNTARY is not set | 269 | # CONFIG_PREEMPT_VOLUNTARY is not set |
269 | CONFIG_PREEMPT=y | 270 | CONFIG_PREEMPT=y |
@@ -289,10 +290,6 @@ CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp" | |||
289 | # | 290 | # |
290 | CONFIG_BINFMT_ELF=y | 291 | CONFIG_BINFMT_ELF=y |
291 | # CONFIG_BINFMT_MISC is not set | 292 | # CONFIG_BINFMT_MISC is not set |
292 | |||
293 | # | ||
294 | # Networking | ||
295 | # | ||
296 | CONFIG_NET=y | 293 | CONFIG_NET=y |
297 | 294 | ||
298 | # | 295 | # |
@@ -647,6 +644,7 @@ CONFIG_SSB_POSSIBLE=y | |||
647 | # CONFIG_MFD_CORE is not set | 644 | # CONFIG_MFD_CORE is not set |
648 | # CONFIG_MFD_SM501 is not set | 645 | # CONFIG_MFD_SM501 is not set |
649 | # CONFIG_HTC_PASIC3 is not set | 646 | # CONFIG_HTC_PASIC3 is not set |
647 | # CONFIG_MFD_TMIO is not set | ||
650 | 648 | ||
651 | # | 649 | # |
652 | # Multimedia devices | 650 | # Multimedia devices |
@@ -690,7 +688,10 @@ CONFIG_DUMMY_CONSOLE=y | |||
690 | # CONFIG_ACCESSIBILITY is not set | 688 | # CONFIG_ACCESSIBILITY is not set |
691 | # CONFIG_RTC_CLASS is not set | 689 | # CONFIG_RTC_CLASS is not set |
692 | # CONFIG_DMADEVICES is not set | 690 | # CONFIG_DMADEVICES is not set |
693 | # CONFIG_UIO is not set | 691 | CONFIG_UIO=y |
692 | # CONFIG_UIO_PDRV is not set | ||
693 | CONFIG_UIO_PDRV_GENIRQ=y | ||
694 | # CONFIG_UIO_SMX is not set | ||
694 | 695 | ||
695 | # | 696 | # |
696 | # File systems | 697 | # File systems |
@@ -854,6 +855,7 @@ CONFIG_FRAME_WARN=1024 | |||
854 | # CONFIG_DEBUG_KERNEL is not set | 855 | # CONFIG_DEBUG_KERNEL is not set |
855 | # CONFIG_DEBUG_BUGVERBOSE is not set | 856 | # CONFIG_DEBUG_BUGVERBOSE is not set |
856 | # CONFIG_DEBUG_MEMORY_INIT is not set | 857 | # CONFIG_DEBUG_MEMORY_INIT is not set |
858 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
857 | # CONFIG_SAMPLES is not set | 859 | # CONFIG_SAMPLES is not set |
858 | # CONFIG_SH_STANDARD_BIOS is not set | 860 | # CONFIG_SH_STANDARD_BIOS is not set |
859 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 861 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig index c4b3e1d8950d..4f8b1974f2c7 100644 --- a/arch/sh/configs/migor_defconfig +++ b/arch/sh/configs/migor_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.26 | 3 | # Linux kernel version: 2.6.27-rc4 |
4 | # Wed Jul 30 01:44:41 2008 | 4 | # Tue Aug 26 14:18:17 2008 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -11,6 +11,7 @@ CONFIG_GENERIC_BUG=y | |||
11 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 11 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
12 | CONFIG_GENERIC_HWEIGHT=y | 12 | CONFIG_GENERIC_HWEIGHT=y |
13 | CONFIG_GENERIC_HARDIRQS=y | 13 | CONFIG_GENERIC_HARDIRQS=y |
14 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
14 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
16 | CONFIG_GENERIC_TIME=y | 17 | CONFIG_GENERIC_TIME=y |
@@ -21,7 +22,6 @@ CONFIG_LOCKDEP_SUPPORT=y | |||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 22 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 23 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
23 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 24 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
24 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
25 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 25 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
26 | 26 | ||
27 | # | 27 | # |
@@ -87,6 +87,7 @@ CONFIG_HAVE_OPROFILE=y | |||
87 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | 87 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set |
88 | CONFIG_HAVE_CLK=y | 88 | CONFIG_HAVE_CLK=y |
89 | CONFIG_PROC_PAGE_MONITOR=y | 89 | CONFIG_PROC_PAGE_MONITOR=y |
90 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
90 | CONFIG_SLABINFO=y | 91 | CONFIG_SLABINFO=y |
91 | CONFIG_RT_MUTEXES=y | 92 | CONFIG_RT_MUTEXES=y |
92 | # CONFIG_TINY_SHMEM is not set | 93 | # CONFIG_TINY_SHMEM is not set |
@@ -270,6 +271,7 @@ CONFIG_HZ=250 | |||
270 | # CONFIG_SCHED_HRTICK is not set | 271 | # CONFIG_SCHED_HRTICK is not set |
271 | # CONFIG_KEXEC is not set | 272 | # CONFIG_KEXEC is not set |
272 | # CONFIG_CRASH_DUMP is not set | 273 | # CONFIG_CRASH_DUMP is not set |
274 | CONFIG_SECCOMP=y | ||
273 | CONFIG_PREEMPT_NONE=y | 275 | CONFIG_PREEMPT_NONE=y |
274 | # CONFIG_PREEMPT_VOLUNTARY is not set | 276 | # CONFIG_PREEMPT_VOLUNTARY is not set |
275 | # CONFIG_PREEMPT is not set | 277 | # CONFIG_PREEMPT is not set |
@@ -294,10 +296,6 @@ CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ip=on" | |||
294 | # | 296 | # |
295 | CONFIG_BINFMT_ELF=y | 297 | CONFIG_BINFMT_ELF=y |
296 | # CONFIG_BINFMT_MISC is not set | 298 | # CONFIG_BINFMT_MISC is not set |
297 | |||
298 | # | ||
299 | # Networking | ||
300 | # | ||
301 | CONFIG_NET=y | 299 | CONFIG_NET=y |
302 | 300 | ||
303 | # | 301 | # |
@@ -649,6 +647,7 @@ CONFIG_HW_RANDOM=y | |||
649 | CONFIG_I2C=y | 647 | CONFIG_I2C=y |
650 | CONFIG_I2C_BOARDINFO=y | 648 | CONFIG_I2C_BOARDINFO=y |
651 | # CONFIG_I2C_CHARDEV is not set | 649 | # CONFIG_I2C_CHARDEV is not set |
650 | CONFIG_I2C_HELPER_AUTO=y | ||
652 | 651 | ||
653 | # | 652 | # |
654 | # I2C Hardware Bus support | 653 | # I2C Hardware Bus support |
@@ -709,6 +708,7 @@ CONFIG_SSB_POSSIBLE=y | |||
709 | # CONFIG_MFD_CORE is not set | 708 | # CONFIG_MFD_CORE is not set |
710 | # CONFIG_MFD_SM501 is not set | 709 | # CONFIG_MFD_SM501 is not set |
711 | # CONFIG_HTC_PASIC3 is not set | 710 | # CONFIG_HTC_PASIC3 is not set |
711 | # CONFIG_MFD_TMIO is not set | ||
712 | 712 | ||
713 | # | 713 | # |
714 | # Multimedia devices | 714 | # Multimedia devices |
@@ -755,6 +755,8 @@ CONFIG_USB_ARCH_HAS_HCD=y | |||
755 | # CONFIG_USB is not set | 755 | # CONFIG_USB is not set |
756 | # CONFIG_USB_OTG_WHITELIST is not set | 756 | # CONFIG_USB_OTG_WHITELIST is not set |
757 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | 757 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set |
758 | # CONFIG_USB_MUSB_HDRC is not set | ||
759 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
758 | 760 | ||
759 | # | 761 | # |
760 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 762 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -842,7 +844,10 @@ CONFIG_RTC_DRV_RS5C372=y | |||
842 | # | 844 | # |
843 | CONFIG_RTC_DRV_SH=y | 845 | CONFIG_RTC_DRV_SH=y |
844 | # CONFIG_DMADEVICES is not set | 846 | # CONFIG_DMADEVICES is not set |
845 | # CONFIG_UIO is not set | 847 | CONFIG_UIO=y |
848 | # CONFIG_UIO_PDRV is not set | ||
849 | CONFIG_UIO_PDRV_GENIRQ=y | ||
850 | # CONFIG_UIO_SMX is not set | ||
846 | 851 | ||
847 | # | 852 | # |
848 | # File systems | 853 | # File systems |
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h index 81b3d515fcb3..5580fd471003 100644 --- a/arch/sh/include/asm/uaccess_64.h +++ b/arch/sh/include/asm/uaccess_64.h | |||
@@ -76,4 +76,6 @@ extern long __put_user_asm_l(void *, long); | |||
76 | extern long __put_user_asm_q(void *, long); | 76 | extern long __put_user_asm_q(void *, long); |
77 | extern void __put_user_unknown(void); | 77 | extern void __put_user_unknown(void); |
78 | 78 | ||
79 | extern long __strnlen_user(const char *__s, long __n); | ||
80 | |||
79 | #endif /* __ASM_SH_UACCESS_64_H */ | 81 | #endif /* __ASM_SH_UACCESS_64_H */ |
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index 04c7da968146..e640c63d5811 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S | |||
@@ -2,7 +2,7 @@ | |||
2 | * arch/sh/kernel/cpu/sh5/entry.S | 2 | * arch/sh/kernel/cpu/sh5/entry.S |
3 | * | 3 | * |
4 | * Copyright (C) 2000, 2001 Paolo Alberelli | 4 | * Copyright (C) 2000, 2001 Paolo Alberelli |
5 | * Copyright (C) 2004 - 2007 Paul Mundt | 5 | * Copyright (C) 2004 - 2008 Paul Mundt |
6 | * Copyright (C) 2003, 2004 Richard Curnow | 6 | * Copyright (C) 2003, 2004 Richard Curnow |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 8 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -923,6 +923,8 @@ ret_from_exception: | |||
923 | blink tr0, ZERO | 923 | blink tr0, ZERO |
924 | 924 | ||
925 | resume_kernel: | 925 | resume_kernel: |
926 | CLI() | ||
927 | |||
926 | pta restore_all, tr0 | 928 | pta restore_all, tr0 |
927 | 929 | ||
928 | getcon KCR0, r6 | 930 | getcon KCR0, r6 |
@@ -939,19 +941,11 @@ need_resched: | |||
939 | andi r7, 0xf0, r7 | 941 | andi r7, 0xf0, r7 |
940 | bne r7, ZERO, tr0 | 942 | bne r7, ZERO, tr0 |
941 | 943 | ||
942 | movi ((PREEMPT_ACTIVE >> 16) & 65535), r8 | 944 | movi preempt_schedule_irq, r7 |
943 | shori (PREEMPT_ACTIVE & 65535), r8 | ||
944 | st.l r6, TI_PRE_COUNT, r8 | ||
945 | |||
946 | STI() | ||
947 | movi schedule, r7 | ||
948 | ori r7, 1, r7 | 945 | ori r7, 1, r7 |
949 | ptabs r7, tr1 | 946 | ptabs r7, tr1 |
950 | blink tr1, LINK | 947 | blink tr1, LINK |
951 | 948 | ||
952 | st.l r6, TI_PRE_COUNT, ZERO | ||
953 | CLI() | ||
954 | |||
955 | pta need_resched, tr1 | 949 | pta need_resched, tr1 |
956 | blink tr1, ZERO | 950 | blink tr1, ZERO |
957 | #endif | 951 | #endif |
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 0bc17def55a7..efbb4268875e 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S | |||
@@ -92,6 +92,7 @@ ENTRY(ret_from_irq) | |||
92 | bra resume_userspace | 92 | bra resume_userspace |
93 | nop | 93 | nop |
94 | ENTRY(resume_kernel) | 94 | ENTRY(resume_kernel) |
95 | cli | ||
95 | mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count | 96 | mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count |
96 | tst r0, r0 | 97 | tst r0, r0 |
97 | bf noresched | 98 | bf noresched |
@@ -105,28 +106,9 @@ need_resched: | |||
105 | and #0xf0, r0 ! interrupts off (exception path)? | 106 | and #0xf0, r0 ! interrupts off (exception path)? |
106 | cmp/eq #0xf0, r0 | 107 | cmp/eq #0xf0, r0 |
107 | bt noresched | 108 | bt noresched |
108 | |||
109 | mov.l 1f, r0 | ||
110 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
111 | |||
112 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
113 | mov.l 3f, r0 | 109 | mov.l 3f, r0 |
114 | jsr @r0 | 110 | jsr @r0 ! call preempt_schedule_irq |
115 | nop | ||
116 | #endif | ||
117 | sti | ||
118 | mov.l 2f, r0 | ||
119 | jsr @r0 | ||
120 | nop | ||
121 | mov #0, r0 | ||
122 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
123 | cli | ||
124 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
125 | mov.l 4f, r0 | ||
126 | jsr @r0 | ||
127 | nop | 111 | nop |
128 | #endif | ||
129 | |||
130 | bra need_resched | 112 | bra need_resched |
131 | nop | 113 | nop |
132 | 114 | ||
@@ -137,10 +119,7 @@ noresched: | |||
137 | .align 2 | 119 | .align 2 |
138 | 1: .long PREEMPT_ACTIVE | 120 | 1: .long PREEMPT_ACTIVE |
139 | 2: .long schedule | 121 | 2: .long schedule |
140 | #ifdef CONFIG_TRACE_IRQFLAGS | 122 | 3: .long preempt_schedule_irq |
141 | 3: .long trace_hardirqs_on | ||
142 | 4: .long trace_hardirqs_off | ||
143 | #endif | ||
144 | #endif | 123 | #endif |
145 | 124 | ||
146 | ENTRY(resume_userspace) | 125 | ENTRY(resume_userspace) |
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index 4703dff174d5..94df56b0d1f6 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c | |||
@@ -102,7 +102,7 @@ void machine_kexec(struct kimage *image) | |||
102 | 102 | ||
103 | /* now call it */ | 103 | /* now call it */ |
104 | rnk = (relocate_new_kernel_t) reboot_code_buffer; | 104 | rnk = (relocate_new_kernel_t) reboot_code_buffer; |
105 | (*rnk)(page_list, reboot_code_buffer, image->start, vbr_reg); | 105 | (*rnk)(page_list, reboot_code_buffer, P2SEGADDR(image->start), vbr_reg); |
106 | } | 106 | } |
107 | 107 | ||
108 | void arch_crash_save_vmcoreinfo(void) | 108 | void arch_crash_save_vmcoreinfo(void) |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 5922edd416db..9c6424892bd3 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -131,6 +131,8 @@ void user_enable_single_step(struct task_struct *child) | |||
131 | 131 | ||
132 | void user_disable_single_step(struct task_struct *child) | 132 | void user_disable_single_step(struct task_struct *child) |
133 | { | 133 | { |
134 | struct pt_regs *regs = child->thread.uregs; | ||
135 | |||
134 | regs->sr &= ~SR_SSTEP; | 136 | regs->sr &= ~SR_SSTEP; |
135 | } | 137 | } |
136 | 138 | ||
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index a35207655e7b..de832056bf1b 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -171,6 +171,7 @@ static void __init reserve_crashkernel(void) | |||
171 | (unsigned long)(free_mem >> 20)); | 171 | (unsigned long)(free_mem >> 20)); |
172 | crashk_res.start = crash_base; | 172 | crashk_res.start = crash_base; |
173 | crashk_res.end = crash_base + crash_size - 1; | 173 | crashk_res.end = crash_base + crash_size - 1; |
174 | insert_resource(&iomem_resource, &crashk_res); | ||
174 | } | 175 | } |
175 | } | 176 | } |
176 | #else | 177 | #else |
@@ -204,11 +205,6 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn, | |||
204 | request_resource(res, &data_resource); | 205 | request_resource(res, &data_resource); |
205 | request_resource(res, &bss_resource); | 206 | request_resource(res, &bss_resource); |
206 | 207 | ||
207 | #ifdef CONFIG_KEXEC | ||
208 | if (crashk_res.start != crashk_res.end) | ||
209 | request_resource(res, &crashk_res); | ||
210 | #endif | ||
211 | |||
212 | add_active_range(nid, start_pfn, end_pfn); | 208 | add_active_range(nid, start_pfn, end_pfn); |
213 | } | 209 | } |
214 | 210 | ||
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 59cd2859ce9b..9061b86d73fa 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -170,7 +170,7 @@ asmlinkage int sys_ipc(uint call, int first, int second, | |||
170 | version = call >> 16; /* hack for backward compatibility */ | 170 | version = call >> 16; /* hack for backward compatibility */ |
171 | call &= 0xffff; | 171 | call &= 0xffff; |
172 | 172 | ||
173 | if (call <= SEMCTL) | 173 | if (call <= SEMTIMEDOP) |
174 | switch (call) { | 174 | switch (call) { |
175 | case SEMOP: | 175 | case SEMOP: |
176 | return sys_semtimedop(first, | 176 | return sys_semtimedop(first, |
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 895bb3f335c7..64b8f7f96f9a 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -101,7 +101,7 @@ static int __init memchunk_setup(char *str) | |||
101 | } | 101 | } |
102 | __setup("memchunk.", memchunk_setup); | 102 | __setup("memchunk.", memchunk_setup); |
103 | 103 | ||
104 | static void memchunk_cmdline_override(char *name, unsigned long *sizep) | 104 | static void __init memchunk_cmdline_override(char *name, unsigned long *sizep) |
105 | { | 105 | { |
106 | char *p = boot_command_line; | 106 | char *p = boot_command_line; |
107 | int k = strlen(name); | 107 | int k = strlen(name); |
@@ -118,8 +118,8 @@ static void memchunk_cmdline_override(char *name, unsigned long *sizep) | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | int platform_resource_setup_memory(struct platform_device *pdev, | 121 | int __init platform_resource_setup_memory(struct platform_device *pdev, |
122 | char *name, unsigned long memsize) | 122 | char *name, unsigned long memsize) |
123 | { | 123 | { |
124 | struct resource *r; | 124 | struct resource *r; |
125 | dma_addr_t dma_handle; | 125 | dma_addr_t dma_handle; |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 9b6689d9d570..23963882bc18 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -792,6 +792,8 @@ void fixup_irqs(void) | |||
792 | } | 792 | } |
793 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 793 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); |
794 | } | 794 | } |
795 | |||
796 | tick_ops->disable_irq(); | ||
795 | } | 797 | } |
796 | #endif | 798 | #endif |
797 | 799 | ||
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 743ccad61c60..2be166c544ca 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m) | |||
80 | i, cpu_data(i).clock_tick); | 80 | i, cpu_data(i).clock_tick); |
81 | } | 81 | } |
82 | 82 | ||
83 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock); | ||
84 | |||
85 | extern void setup_sparc64_timer(void); | 83 | extern void setup_sparc64_timer(void); |
86 | 84 | ||
87 | static volatile unsigned long callin_flag = 0; | 85 | static volatile unsigned long callin_flag = 0; |
@@ -120,9 +118,9 @@ void __cpuinit smp_callin(void) | |||
120 | while (!cpu_isset(cpuid, smp_commenced_mask)) | 118 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
121 | rmb(); | 119 | rmb(); |
122 | 120 | ||
123 | spin_lock(&call_lock); | 121 | ipi_call_lock(); |
124 | cpu_set(cpuid, cpu_online_map); | 122 | cpu_set(cpuid, cpu_online_map); |
125 | spin_unlock(&call_lock); | 123 | ipi_call_unlock(); |
126 | 124 | ||
127 | /* idle thread is expected to have preempt disabled */ | 125 | /* idle thread is expected to have preempt disabled */ |
128 | preempt_disable(); | 126 | preempt_disable(); |
@@ -1305,10 +1303,6 @@ int __cpu_disable(void) | |||
1305 | c->core_id = 0; | 1303 | c->core_id = 0; |
1306 | c->proc_id = -1; | 1304 | c->proc_id = -1; |
1307 | 1305 | ||
1308 | spin_lock(&call_lock); | ||
1309 | cpu_clear(cpu, cpu_online_map); | ||
1310 | spin_unlock(&call_lock); | ||
1311 | |||
1312 | smp_wmb(); | 1306 | smp_wmb(); |
1313 | 1307 | ||
1314 | /* Make sure no interrupts point to this cpu. */ | 1308 | /* Make sure no interrupts point to this cpu. */ |
@@ -1318,6 +1312,10 @@ int __cpu_disable(void) | |||
1318 | mdelay(1); | 1312 | mdelay(1); |
1319 | local_irq_disable(); | 1313 | local_irq_disable(); |
1320 | 1314 | ||
1315 | ipi_call_lock(); | ||
1316 | cpu_clear(cpu, cpu_online_map); | ||
1317 | ipi_call_unlock(); | ||
1318 | |||
1321 | return 0; | 1319 | return 0; |
1322 | } | 1320 | } |
1323 | 1321 | ||
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 6761848329fa..f8843c3ae77d 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -382,14 +382,17 @@ config X86_OOSTORE | |||
382 | # P6_NOPs are a relatively minor optimization that require a family >= | 382 | # P6_NOPs are a relatively minor optimization that require a family >= |
383 | # 6 processor, except that it is broken on certain VIA chips. | 383 | # 6 processor, except that it is broken on certain VIA chips. |
384 | # Furthermore, AMD chips prefer a totally different sequence of NOPs | 384 | # Furthermore, AMD chips prefer a totally different sequence of NOPs |
385 | # (which work on all CPUs). As a result, disallow these if we're | 385 | # (which work on all CPUs). In addition, it looks like Virtual PC |
386 | # compiling X86_GENERIC but not X86_64 (these NOPs do work on all | 386 | # does not understand them. |
387 | # x86-64 capable chips); the list of processors in the right-hand clause | 387 | # |
388 | # are the cores that benefit from this optimization. | 388 | # As a result, disallow these if we're not compiling for X86_64 (these |
389 | # NOPs do work on all x86-64 capable chips); the list of processors in | ||
390 | # the right-hand clause are the cores that benefit from this optimization. | ||
389 | # | 391 | # |
390 | config X86_P6_NOP | 392 | config X86_P6_NOP |
391 | def_bool y | 393 | def_bool y |
392 | depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC) | 394 | depends on X86_64 |
395 | depends on (MCORE2 || MPENTIUM4 || MPSC) | ||
393 | 396 | ||
394 | config X86_TSC | 397 | config X86_TSC |
395 | def_bool y | 398 | def_bool y |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index e24d1bc47b46..78e642feac30 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1206,7 +1206,7 @@ static int __init parse_memmap_opt(char *p) | |||
1206 | if (!p) | 1206 | if (!p) |
1207 | return -EINVAL; | 1207 | return -EINVAL; |
1208 | 1208 | ||
1209 | if (!strcmp(p, "exactmap")) { | 1209 | if (!strncmp(p, "exactmap", 8)) { |
1210 | #ifdef CONFIG_CRASH_DUMP | 1210 | #ifdef CONFIG_CRASH_DUMP |
1211 | /* | 1211 | /* |
1212 | * If we are doing a crash dump, we still need to know | 1212 | * If we are doing a crash dump, we still need to know |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 59fd3b6b1303..73deaffadd03 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -210,8 +210,8 @@ static void hpet_legacy_clockevent_register(void) | |||
210 | /* Calculate the min / max delta */ | 210 | /* Calculate the min / max delta */ |
211 | hpet_clockevent.max_delta_ns = clockevent_delta2ns(0x7FFFFFFF, | 211 | hpet_clockevent.max_delta_ns = clockevent_delta2ns(0x7FFFFFFF, |
212 | &hpet_clockevent); | 212 | &hpet_clockevent); |
213 | hpet_clockevent.min_delta_ns = clockevent_delta2ns(0x30, | 213 | /* 5 usec minimum reprogramming delta. */ |
214 | &hpet_clockevent); | 214 | hpet_clockevent.min_delta_ns = 5000; |
215 | 215 | ||
216 | /* | 216 | /* |
217 | * Start hpet with the boot cpu mask and make it | 217 | * Start hpet with the boot cpu mask and make it |
@@ -270,15 +270,22 @@ static void hpet_legacy_set_mode(enum clock_event_mode mode, | |||
270 | } | 270 | } |
271 | 271 | ||
272 | static int hpet_legacy_next_event(unsigned long delta, | 272 | static int hpet_legacy_next_event(unsigned long delta, |
273 | struct clock_event_device *evt) | 273 | struct clock_event_device *evt) |
274 | { | 274 | { |
275 | unsigned long cnt; | 275 | u32 cnt; |
276 | 276 | ||
277 | cnt = hpet_readl(HPET_COUNTER); | 277 | cnt = hpet_readl(HPET_COUNTER); |
278 | cnt += delta; | 278 | cnt += (u32) delta; |
279 | hpet_writel(cnt, HPET_T0_CMP); | 279 | hpet_writel(cnt, HPET_T0_CMP); |
280 | 280 | ||
281 | return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0; | 281 | /* |
282 | * We need to read back the CMP register to make sure that | ||
283 | * what we wrote hit the chip before we compare it to the | ||
284 | * counter. | ||
285 | */ | ||
286 | WARN_ON((u32)hpet_readl(HPET_T0_CMP) != cnt); | ||
287 | |||
288 | return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; | ||
282 | } | 289 | } |
283 | 290 | ||
284 | /* | 291 | /* |
diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c index 1c3a66a67f83..720d2607aacb 100644 --- a/arch/x86/kernel/io_delay.c +++ b/arch/x86/kernel/io_delay.c | |||
@@ -92,6 +92,14 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = { | |||
92 | DMI_MATCH(DMI_BOARD_NAME, "30BF") | 92 | DMI_MATCH(DMI_BOARD_NAME, "30BF") |
93 | } | 93 | } |
94 | }, | 94 | }, |
95 | { | ||
96 | .callback = dmi_io_delay_0xed_port, | ||
97 | .ident = "Presario F700", | ||
98 | .matches = { | ||
99 | DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), | ||
100 | DMI_MATCH(DMI_BOARD_NAME, "30D3") | ||
101 | } | ||
102 | }, | ||
95 | { } | 103 | { } |
96 | }; | 104 | }; |
97 | 105 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 8d28925ebed9..7b3508952b9c 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1354,7 +1354,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1354 | .ptep_modify_prot_commit = __ptep_modify_prot_commit, | 1354 | .ptep_modify_prot_commit = __ptep_modify_prot_commit, |
1355 | 1355 | ||
1356 | .pte_val = xen_pte_val, | 1356 | .pte_val = xen_pte_val, |
1357 | .pte_flags = native_pte_val, | 1357 | .pte_flags = native_pte_flags, |
1358 | .pgd_val = xen_pgd_val, | 1358 | .pgd_val = xen_pgd_val, |
1359 | 1359 | ||
1360 | .make_pte = xen_make_pte, | 1360 | .make_pte = xen_make_pte, |