diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-11 03:16:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-11 03:16:20 -0500 |
commit | 45b86a96f17cb2900f291129b0e67287400e45b2 (patch) | |
tree | f7968bf36e3947ee42251f7eebc6ea5f24aca202 /arch | |
parent | 072ba49838b42c873c496d72c91bb237914cf3b6 (diff) | |
parent | 4143c5cb36331155a1823af8b3a8c761a59fed71 (diff) |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
Diffstat (limited to 'arch')
44 files changed, 296 insertions, 196 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index e6ab550bceb3..8977d99987cb 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -21,7 +21,7 @@ config OPROFILE_IBS | |||
21 | Instruction-Based Sampling (IBS) is a new profiling | 21 | Instruction-Based Sampling (IBS) is a new profiling |
22 | technique that provides rich, precise program performance | 22 | technique that provides rich, precise program performance |
23 | information. IBS is introduced by AMD Family10h processors | 23 | information. IBS is introduced by AMD Family10h processors |
24 | (AMD Opteron Quad-Core processor “Barcelona”) to overcome | 24 | (AMD Opteron Quad-Core processor "Barcelona") to overcome |
25 | the limitations of conventional performance counter | 25 | the limitations of conventional performance counter |
26 | sampling. | 26 | sampling. |
27 | 27 | ||
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 809ff9ab853a..77764301844b 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -44,10 +44,10 @@ | |||
44 | * The module space lives between the addresses given by TASK_SIZE | 44 | * The module space lives between the addresses given by TASK_SIZE |
45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | 45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. |
46 | */ | 46 | */ |
47 | #define MODULE_END (PAGE_OFFSET) | 47 | #define MODULES_END (PAGE_OFFSET) |
48 | #define MODULE_START (MODULE_END - 16*1048576) | 48 | #define MODULES_VADDR (MODULES_END - 16*1048576) |
49 | 49 | ||
50 | #if TASK_SIZE > MODULE_START | 50 | #if TASK_SIZE > MODULES_VADDR |
51 | #error Top of user space clashes with start of module space | 51 | #error Top of user space clashes with start of module space |
52 | #endif | 52 | #endif |
53 | 53 | ||
@@ -56,7 +56,7 @@ | |||
56 | * Since we use sections to map it, this macro replaces the physical address | 56 | * Since we use sections to map it, this macro replaces the physical address |
57 | * with its virtual address while keeping offset from the base section. | 57 | * with its virtual address while keeping offset from the base section. |
58 | */ | 58 | */ |
59 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | 59 | #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff)) |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Allow 16MB-aligned ioremap pages | 62 | * Allow 16MB-aligned ioremap pages |
@@ -94,8 +94,8 @@ | |||
94 | /* | 94 | /* |
95 | * The module can be at any place in ram in nommu mode. | 95 | * The module can be at any place in ram in nommu mode. |
96 | */ | 96 | */ |
97 | #define MODULE_END (END_MEM) | 97 | #define MODULES_END (END_MEM) |
98 | #define MODULE_START (PHYS_OFFSET) | 98 | #define MODULES_VADDR (PHYS_OFFSET) |
99 | 99 | ||
100 | #endif /* !CONFIG_MMU */ | 100 | #endif /* !CONFIG_MMU */ |
101 | 101 | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 7aad78420f18..568020b34e3e 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -42,6 +42,10 @@ | |||
42 | #define CR_U (1 << 22) /* Unaligned access operation */ | 42 | #define CR_U (1 << 22) /* Unaligned access operation */ |
43 | #define CR_XP (1 << 23) /* Extended page tables */ | 43 | #define CR_XP (1 << 23) /* Extended page tables */ |
44 | #define CR_VE (1 << 24) /* Vectored interrupts */ | 44 | #define CR_VE (1 << 24) /* Vectored interrupts */ |
45 | #define CR_EE (1 << 25) /* Exception (Big) Endian */ | ||
46 | #define CR_TRE (1 << 28) /* TEX remap enable */ | ||
47 | #define CR_AFE (1 << 29) /* Access flag enable */ | ||
48 | #define CR_TE (1 << 30) /* Thumb exception enable */ | ||
45 | 49 | ||
46 | /* | 50 | /* |
47 | * This is used to ensure the compiler did actually allocate the register we | 51 | * This is used to ensure the compiler did actually allocate the register we |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index 513f332f040d..84849098c8e8 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -21,12 +21,16 @@ int elf_check_arch(const struct elf32_hdr *x) | |||
21 | 21 | ||
22 | eflags = x->e_flags; | 22 | eflags = x->e_flags; |
23 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { | 23 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { |
24 | unsigned int flt_fmt; | ||
25 | |||
24 | /* APCS26 is only allowed if the CPU supports it */ | 26 | /* APCS26 is only allowed if the CPU supports it */ |
25 | if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT)) | 27 | if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT)) |
26 | return 0; | 28 | return 0; |
27 | 29 | ||
30 | flt_fmt = eflags & (EF_ARM_VFP_FLOAT | EF_ARM_SOFT_FLOAT); | ||
31 | |||
28 | /* VFP requires the supporting code */ | 32 | /* VFP requires the supporting code */ |
29 | if ((eflags & EF_ARM_VFP_FLOAT) && !(elf_hwcap & HWCAP_VFP)) | 33 | if (flt_fmt == EF_ARM_VFP_FLOAT && !(elf_hwcap & HWCAP_VFP)) |
30 | return 0; | 34 | return 0; |
31 | } | 35 | } |
32 | return 1; | 36 | return 1; |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 9203ba7d58ee..b8d965dcd6fd 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -26,12 +26,12 @@ | |||
26 | /* | 26 | /* |
27 | * The XIP kernel text is mapped in the module area for modules and | 27 | * The XIP kernel text is mapped in the module area for modules and |
28 | * some other stuff to work without any indirect relocations. | 28 | * some other stuff to work without any indirect relocations. |
29 | * MODULE_START is redefined here and not in asm/memory.h to avoid | 29 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid |
30 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. | 30 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. |
31 | */ | 31 | */ |
32 | extern void _etext; | 32 | extern void _etext; |
33 | #undef MODULE_START | 33 | #undef MODULES_VADDR |
34 | #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) | 34 | #define MODULES_VADDR (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef CONFIG_MMU | 37 | #ifdef CONFIG_MMU |
@@ -43,7 +43,7 @@ void *module_alloc(unsigned long size) | |||
43 | if (!size) | 43 | if (!size) |
44 | return NULL; | 44 | return NULL; |
45 | 45 | ||
46 | area = __get_vm_area(size, VM_ALLOC, MODULE_START, MODULE_END); | 46 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); |
47 | if (!area) | 47 | if (!area) |
48 | return NULL; | 48 | return NULL; |
49 | 49 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 763bdbeaf681..2249049c1d5a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -429,18 +429,16 @@ void __init gpmc_init(void) | |||
429 | gpmc_l3_clk = clk_get(NULL, ck); | 429 | gpmc_l3_clk = clk_get(NULL, ck); |
430 | if (IS_ERR(gpmc_l3_clk)) { | 430 | if (IS_ERR(gpmc_l3_clk)) { |
431 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); | 431 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); |
432 | return -ENODEV; | 432 | BUG(); |
433 | } | 433 | } |
434 | 434 | ||
435 | gpmc_base = ioremap(l, SZ_4K); | 435 | gpmc_base = ioremap(l, SZ_4K); |
436 | if (!gpmc_base) { | 436 | if (!gpmc_base) { |
437 | clk_put(gpmc_l3_clk); | 437 | clk_put(gpmc_l3_clk); |
438 | printk(KERN_ERR "Could not get GPMC register memory\n"); | 438 | printk(KERN_ERR "Could not get GPMC register memory\n"); |
439 | return -ENOMEM; | 439 | BUG(); |
440 | } | 440 | } |
441 | 441 | ||
442 | BUG_ON(IS_ERR(gpmc_l3_clk)); | ||
443 | |||
444 | l = gpmc_read_reg(GPMC_REVISION); | 442 | l = gpmc_read_reg(GPMC_REVISION); |
445 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); | 443 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); |
446 | /* Set smart idle mode and automatic L3 clock gating */ | 444 | /* Set smart idle mode and automatic L3 clock gating */ |
diff --git a/arch/arm/mm/cache-xsc3l2.c b/arch/arm/mm/cache-xsc3l2.c index 10b1bae1a258..464de893a988 100644 --- a/arch/arm/mm/cache-xsc3l2.c +++ b/arch/arm/mm/cache-xsc3l2.c | |||
@@ -98,7 +98,7 @@ static void xsc3_l2_inv_range(unsigned long start, unsigned long end) | |||
98 | /* | 98 | /* |
99 | * Clean and invalidate partial last cache line. | 99 | * Clean and invalidate partial last cache line. |
100 | */ | 100 | */ |
101 | if (end & (CACHE_LINE_SIZE - 1)) { | 101 | if (start < end && (end & (CACHE_LINE_SIZE - 1))) { |
102 | xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1)); | 102 | xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1)); |
103 | xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); | 103 | xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); |
104 | end &= ~(CACHE_LINE_SIZE - 1); | 104 | end &= ~(CACHE_LINE_SIZE - 1); |
@@ -107,7 +107,7 @@ static void xsc3_l2_inv_range(unsigned long start, unsigned long end) | |||
107 | /* | 107 | /* |
108 | * Invalidate all full cache lines between 'start' and 'end'. | 108 | * Invalidate all full cache lines between 'start' and 'end'. |
109 | */ | 109 | */ |
110 | while (start != end) { | 110 | while (start < end) { |
111 | xsc3_l2_inv_pa(start); | 111 | xsc3_l2_inv_pa(start); |
112 | start += CACHE_LINE_SIZE; | 112 | start += CACHE_LINE_SIZE; |
113 | } | 113 | } |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 8ba754064559..e63db11f16a8 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -180,20 +180,20 @@ void adjust_cr(unsigned long mask, unsigned long set) | |||
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | #define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_WRITE | 182 | #define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_WRITE |
183 | #define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_XN|PMD_SECT_AP_WRITE | 183 | #define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE |
184 | 184 | ||
185 | static struct mem_type mem_types[] = { | 185 | static struct mem_type mem_types[] = { |
186 | [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ | 186 | [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ |
187 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED | | 187 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED | |
188 | L_PTE_SHARED, | 188 | L_PTE_SHARED, |
189 | .prot_l1 = PMD_TYPE_TABLE, | 189 | .prot_l1 = PMD_TYPE_TABLE, |
190 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_UNCACHED, | 190 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_S, |
191 | .domain = DOMAIN_IO, | 191 | .domain = DOMAIN_IO, |
192 | }, | 192 | }, |
193 | [MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */ | 193 | [MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */ |
194 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_NONSHARED, | 194 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_NONSHARED, |
195 | .prot_l1 = PMD_TYPE_TABLE, | 195 | .prot_l1 = PMD_TYPE_TABLE, |
196 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_TEX(2), | 196 | .prot_sect = PROT_SECT_DEVICE, |
197 | .domain = DOMAIN_IO, | 197 | .domain = DOMAIN_IO, |
198 | }, | 198 | }, |
199 | [MT_DEVICE_CACHED] = { /* ioremap_cached */ | 199 | [MT_DEVICE_CACHED] = { /* ioremap_cached */ |
@@ -205,7 +205,7 @@ static struct mem_type mem_types[] = { | |||
205 | [MT_DEVICE_WC] = { /* ioremap_wc */ | 205 | [MT_DEVICE_WC] = { /* ioremap_wc */ |
206 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC, | 206 | .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC, |
207 | .prot_l1 = PMD_TYPE_TABLE, | 207 | .prot_l1 = PMD_TYPE_TABLE, |
208 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_BUFFERABLE, | 208 | .prot_sect = PROT_SECT_DEVICE, |
209 | .domain = DOMAIN_IO, | 209 | .domain = DOMAIN_IO, |
210 | }, | 210 | }, |
211 | [MT_CACHECLEAN] = { | 211 | [MT_CACHECLEAN] = { |
@@ -273,22 +273,23 @@ static void __init build_mem_type_table(void) | |||
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | /* | 275 | /* |
276 | * On non-Xscale3 ARMv5-and-older systems, use CB=01 | 276 | * Strip out features not present on earlier architectures. |
277 | * (Uncached/Buffered) for ioremap_wc() mappings. On XScale3 | 277 | * Pre-ARMv5 CPUs don't have TEX bits. Pre-ARMv6 CPUs or those |
278 | * and ARMv6+, use TEXCB=00100 mappings (Inner/Outer Uncacheable | 278 | * without extended page tables don't have the 'Shared' bit. |
279 | * in xsc3 parlance, Uncached Normal in ARMv6 parlance). | ||
280 | */ | 279 | */ |
281 | if (cpu_is_xsc3() || cpu_arch >= CPU_ARCH_ARMv6) { | 280 | if (cpu_arch < CPU_ARCH_ARMv5) |
282 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1); | 281 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) |
283 | mem_types[MT_DEVICE_WC].prot_sect &= ~PMD_SECT_BUFFERABLE; | 282 | mem_types[i].prot_sect &= ~PMD_SECT_TEX(7); |
284 | } | 283 | if ((cpu_arch < CPU_ARCH_ARMv6 || !(cr & CR_XP)) && !cpu_is_xsc3()) |
284 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) | ||
285 | mem_types[i].prot_sect &= ~PMD_SECT_S; | ||
285 | 286 | ||
286 | /* | 287 | /* |
287 | * ARMv5 and lower, bit 4 must be set for page tables. | 288 | * ARMv5 and lower, bit 4 must be set for page tables (was: cache |
288 | * (was: cache "update-able on write" bit on ARM610) | 289 | * "update-able on write" bit on ARM610). However, Xscale and |
289 | * However, Xscale cores require this bit to be cleared. | 290 | * Xscale3 require this bit to be cleared. |
290 | */ | 291 | */ |
291 | if (cpu_is_xscale()) { | 292 | if (cpu_is_xscale() || cpu_is_xsc3()) { |
292 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | 293 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { |
293 | mem_types[i].prot_sect &= ~PMD_BIT4; | 294 | mem_types[i].prot_sect &= ~PMD_BIT4; |
294 | mem_types[i].prot_l1 &= ~PMD_BIT4; | 295 | mem_types[i].prot_l1 &= ~PMD_BIT4; |
@@ -302,6 +303,64 @@ static void __init build_mem_type_table(void) | |||
302 | } | 303 | } |
303 | } | 304 | } |
304 | 305 | ||
306 | /* | ||
307 | * Mark the device areas according to the CPU/architecture. | ||
308 | */ | ||
309 | if (cpu_is_xsc3() || (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP))) { | ||
310 | if (!cpu_is_xsc3()) { | ||
311 | /* | ||
312 | * Mark device regions on ARMv6+ as execute-never | ||
313 | * to prevent speculative instruction fetches. | ||
314 | */ | ||
315 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_XN; | ||
316 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_XN; | ||
317 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_XN; | ||
318 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_XN; | ||
319 | } | ||
320 | if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { | ||
321 | /* | ||
322 | * For ARMv7 with TEX remapping, | ||
323 | * - shared device is SXCB=1100 | ||
324 | * - nonshared device is SXCB=0100 | ||
325 | * - write combine device mem is SXCB=0001 | ||
326 | * (Uncached Normal memory) | ||
327 | */ | ||
328 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_TEX(1); | ||
329 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(1); | ||
330 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE; | ||
331 | } else if (cpu_is_xsc3()) { | ||
332 | /* | ||
333 | * For Xscale3, | ||
334 | * - shared device is TEXCB=00101 | ||
335 | * - nonshared device is TEXCB=01000 | ||
336 | * - write combine device mem is TEXCB=00100 | ||
337 | * (Inner/Outer Uncacheable in xsc3 parlance) | ||
338 | */ | ||
339 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_TEX(1) | PMD_SECT_BUFFERED; | ||
340 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(2); | ||
341 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1); | ||
342 | } else { | ||
343 | /* | ||
344 | * For ARMv6 and ARMv7 without TEX remapping, | ||
345 | * - shared device is TEXCB=00001 | ||
346 | * - nonshared device is TEXCB=01000 | ||
347 | * - write combine device mem is TEXCB=00100 | ||
348 | * (Uncached Normal in ARMv6 parlance). | ||
349 | */ | ||
350 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; | ||
351 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_TEX(2); | ||
352 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1); | ||
353 | } | ||
354 | } else { | ||
355 | /* | ||
356 | * On others, write combining is "Uncached/Buffered" | ||
357 | */ | ||
358 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE; | ||
359 | } | ||
360 | |||
361 | /* | ||
362 | * Now deal with the memory-type mappings | ||
363 | */ | ||
305 | cp = &cache_policies[cachepolicy]; | 364 | cp = &cache_policies[cachepolicy]; |
306 | vecs_pgprot = kern_pgprot = user_pgprot = cp->pte; | 365 | vecs_pgprot = kern_pgprot = user_pgprot = cp->pte; |
307 | 366 | ||
@@ -317,12 +376,8 @@ static void __init build_mem_type_table(void) | |||
317 | * Enable CPU-specific coherency if supported. | 376 | * Enable CPU-specific coherency if supported. |
318 | * (Only available on XSC3 at the moment.) | 377 | * (Only available on XSC3 at the moment.) |
319 | */ | 378 | */ |
320 | if (arch_is_coherent()) { | 379 | if (arch_is_coherent() && cpu_is_xsc3()) |
321 | if (cpu_is_xsc3()) { | 380 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; |
322 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; | ||
323 | mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED; | ||
324 | } | ||
325 | } | ||
326 | 381 | ||
327 | /* | 382 | /* |
328 | * ARMv6 and above have extended page tables. | 383 | * ARMv6 and above have extended page tables. |
@@ -336,11 +391,6 @@ static void __init build_mem_type_table(void) | |||
336 | mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; | 391 | mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; |
337 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; | 392 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; |
338 | 393 | ||
339 | /* | ||
340 | * Mark the device area as "shared device" | ||
341 | */ | ||
342 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; | ||
343 | |||
344 | #ifdef CONFIG_SMP | 394 | #ifdef CONFIG_SMP |
345 | /* | 395 | /* |
346 | * Mark memory with the "shared" attribute for SMP systems | 396 | * Mark memory with the "shared" attribute for SMP systems |
@@ -360,9 +410,6 @@ static void __init build_mem_type_table(void) | |||
360 | mem_types[MT_LOW_VECTORS].prot_pte |= vecs_pgprot; | 410 | mem_types[MT_LOW_VECTORS].prot_pte |= vecs_pgprot; |
361 | mem_types[MT_HIGH_VECTORS].prot_pte |= vecs_pgprot; | 411 | mem_types[MT_HIGH_VECTORS].prot_pte |= vecs_pgprot; |
362 | 412 | ||
363 | if (cpu_arch < CPU_ARCH_ARMv5) | ||
364 | mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); | ||
365 | |||
366 | pgprot_user = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot); | 413 | pgprot_user = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot); |
367 | pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | | 414 | pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | |
368 | L_PTE_DIRTY | L_PTE_WRITE | | 415 | L_PTE_DIRTY | L_PTE_WRITE | |
@@ -654,7 +701,7 @@ static inline void prepare_page_table(struct meminfo *mi) | |||
654 | /* | 701 | /* |
655 | * Clear out all the mappings below the kernel image. | 702 | * Clear out all the mappings below the kernel image. |
656 | */ | 703 | */ |
657 | for (addr = 0; addr < MODULE_START; addr += PGDIR_SIZE) | 704 | for (addr = 0; addr < MODULES_VADDR; addr += PGDIR_SIZE) |
658 | pmd_clear(pmd_off_k(addr)); | 705 | pmd_clear(pmd_off_k(addr)); |
659 | 706 | ||
660 | #ifdef CONFIG_XIP_KERNEL | 707 | #ifdef CONFIG_XIP_KERNEL |
@@ -766,7 +813,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
766 | */ | 813 | */ |
767 | #ifdef CONFIG_XIP_KERNEL | 814 | #ifdef CONFIG_XIP_KERNEL |
768 | map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); | 815 | map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); |
769 | map.virtual = MODULE_START; | 816 | map.virtual = MODULES_VADDR; |
770 | map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; | 817 | map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; |
771 | map.type = MT_ROM; | 818 | map.type = MT_ROM; |
772 | create_mapping(&map); | 819 | create_mapping(&map); |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 07f82db70945..4d3c0a73e7fb 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -115,7 +115,7 @@ ENTRY(cpu_v7_set_pte_ext) | |||
115 | orr r3, r3, r2 | 115 | orr r3, r3, r2 |
116 | orr r3, r3, #PTE_EXT_AP0 | 2 | 116 | orr r3, r3, #PTE_EXT_AP0 | 2 |
117 | 117 | ||
118 | tst r2, #1 << 4 | 118 | tst r1, #1 << 4 |
119 | orrne r3, r3, #PTE_EXT_TEX(1) | 119 | orrne r3, r3, #PTE_EXT_TEX(1) |
120 | 120 | ||
121 | tst r1, #L_PTE_WRITE | 121 | tst r1, #L_PTE_WRITE |
@@ -192,11 +192,11 @@ __v7_setup: | |||
192 | mov pc, lr @ return to head.S:__ret | 192 | mov pc, lr @ return to head.S:__ret |
193 | ENDPROC(__v7_setup) | 193 | ENDPROC(__v7_setup) |
194 | 194 | ||
195 | /* | 195 | /* AT |
196 | * V X F I D LR | 196 | * TFR EV X F I D LR |
197 | * .... ...E PUI. .T.T 4RVI ZFRS BLDP WCAM | 197 | * .EEE ..EE PUI. .T.T 4RVI ZFRS BLDP WCAM |
198 | * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced | 198 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced |
199 | * 0 110 0011 1.00 .111 1101 < we want | 199 | * 1 0 110 0011 1.00 .111 1101 < we want |
200 | */ | 200 | */ |
201 | .type v7_crval, #object | 201 | .type v7_crval, #object |
202 | v7_crval: | 202 | v7_crval: |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index bf6a10c5fc4f..be6aab9c6834 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -428,23 +428,23 @@ static int clk_debugfs_register_one(struct clk *c) | |||
428 | if (c->id != 0) | 428 | if (c->id != 0) |
429 | sprintf(p, ":%d", c->id); | 429 | sprintf(p, ":%d", c->id); |
430 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); | 430 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); |
431 | if (IS_ERR(d)) | 431 | if (!d) |
432 | return PTR_ERR(d); | 432 | return -ENOMEM; |
433 | c->dent = d; | 433 | c->dent = d; |
434 | 434 | ||
435 | d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usecount); | 435 | d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usecount); |
436 | if (IS_ERR(d)) { | 436 | if (!d) { |
437 | err = PTR_ERR(d); | 437 | err = -ENOMEM; |
438 | goto err_out; | 438 | goto err_out; |
439 | } | 439 | } |
440 | d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate); | 440 | d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate); |
441 | if (IS_ERR(d)) { | 441 | if (!d) { |
442 | err = PTR_ERR(d); | 442 | err = -ENOMEM; |
443 | goto err_out; | 443 | goto err_out; |
444 | } | 444 | } |
445 | d = debugfs_create_x32("flags", S_IRUGO, c->dent, (u32 *)&c->flags); | 445 | d = debugfs_create_x32("flags", S_IRUGO, c->dent, (u32 *)&c->flags); |
446 | if (IS_ERR(d)) { | 446 | if (!d) { |
447 | err = PTR_ERR(d); | 447 | err = -ENOMEM; |
448 | goto err_out; | 448 | goto err_out; |
449 | } | 449 | } |
450 | return 0; | 450 | return 0; |
@@ -483,8 +483,8 @@ static int __init clk_debugfs_init(void) | |||
483 | int err; | 483 | int err; |
484 | 484 | ||
485 | d = debugfs_create_dir("clock", NULL); | 485 | d = debugfs_create_dir("clock", NULL); |
486 | if (IS_ERR(d)) | 486 | if (!d) |
487 | return PTR_ERR(d); | 487 | return -ENOMEM; |
488 | clk_debugfs_root = d; | 488 | clk_debugfs_root = d; |
489 | 489 | ||
490 | list_for_each_entry(c, &clocks, node) { | 490 | list_for_each_entry(c, &clocks, node) { |
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S index 030118ee204a..2276f89671d8 100644 --- a/arch/arm/plat-omap/include/mach/entry-macro.S +++ b/arch/arm/plat-omap/include/mach/entry-macro.S | |||
@@ -65,7 +65,8 @@ | |||
65 | #include <mach/omap34xx.h> | 65 | #include <mach/omap34xx.h> |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* Active interrupt number */ | 68 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* Active interrupt offset */ |
69 | #define ACTIVEIRQ_MASK 0x7f /* Active interrupt bits */ | ||
69 | 70 | ||
70 | .macro disable_fiq | 71 | .macro disable_fiq |
71 | .endm | 72 | .endm |
@@ -88,6 +89,7 @@ | |||
88 | cmp \irqnr, #0x0 | 89 | cmp \irqnr, #0x0 |
89 | 2222: | 90 | 2222: |
90 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | 91 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
92 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
91 | 93 | ||
92 | .endm | 94 | .endm |
93 | 95 | ||
diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h index a2929ac8c687..bed5274c910a 100644 --- a/arch/arm/plat-omap/include/mach/irqs.h +++ b/arch/arm/plat-omap/include/mach/irqs.h | |||
@@ -372,7 +372,7 @@ | |||
372 | 372 | ||
373 | /* External TWL4030 gpio interrupts are optional */ | 373 | /* External TWL4030 gpio interrupts are optional */ |
374 | #define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END | 374 | #define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END |
375 | #ifdef CONFIG_TWL4030_GPIO | 375 | #ifdef CONFIG_GPIO_TWL4030 |
376 | #define TWL4030_GPIO_NR_IRQS 18 | 376 | #define TWL4030_GPIO_NR_IRQS 18 |
377 | #else | 377 | #else |
378 | #define TWL4030_GPIO_NR_IRQS 0 | 378 | #define TWL4030_GPIO_NR_IRQS 0 |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 27eec71429b0..6bd91ed7cd03 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -148,6 +148,7 @@ config IA64_GENERIC | |||
148 | select ACPI_NUMA | 148 | select ACPI_NUMA |
149 | select SWIOTLB | 149 | select SWIOTLB |
150 | select PCI_MSI | 150 | select PCI_MSI |
151 | select DMAR | ||
151 | help | 152 | help |
152 | This selects the system type of your hardware. A "generic" kernel | 153 | This selects the system type of your hardware. A "generic" kernel |
153 | will run on any supported IA-64 system. However, if you configure | 154 | will run on any supported IA-64 system. However, if you configure |
@@ -585,7 +586,7 @@ source "fs/Kconfig.binfmt" | |||
585 | 586 | ||
586 | endmenu | 587 | endmenu |
587 | 588 | ||
588 | menu "Power management and ACPI" | 589 | menu "Power management and ACPI options" |
589 | 590 | ||
590 | source "kernel/power/Kconfig" | 591 | source "kernel/power/Kconfig" |
591 | 592 | ||
@@ -641,6 +642,8 @@ source "net/Kconfig" | |||
641 | 642 | ||
642 | source "drivers/Kconfig" | 643 | source "drivers/Kconfig" |
643 | 644 | ||
645 | source "arch/ia64/hp/sim/Kconfig" | ||
646 | |||
644 | config MSPEC | 647 | config MSPEC |
645 | tristate "Memory special operations driver" | 648 | tristate "Memory special operations driver" |
646 | depends on IA64 | 649 | depends on IA64 |
@@ -652,6 +655,12 @@ config MSPEC | |||
652 | 655 | ||
653 | source "fs/Kconfig" | 656 | source "fs/Kconfig" |
654 | 657 | ||
658 | source "arch/ia64/Kconfig.debug" | ||
659 | |||
660 | source "security/Kconfig" | ||
661 | |||
662 | source "crypto/Kconfig" | ||
663 | |||
655 | source "arch/ia64/kvm/Kconfig" | 664 | source "arch/ia64/kvm/Kconfig" |
656 | 665 | ||
657 | source "lib/Kconfig" | 666 | source "lib/Kconfig" |
@@ -678,11 +687,3 @@ config IRQ_PER_CPU | |||
678 | 687 | ||
679 | config IOMMU_HELPER | 688 | config IOMMU_HELPER |
680 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) | 689 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) |
681 | |||
682 | source "arch/ia64/hp/sim/Kconfig" | ||
683 | |||
684 | source "arch/ia64/Kconfig.debug" | ||
685 | |||
686 | source "security/Kconfig" | ||
687 | |||
688 | source "crypto/Kconfig" | ||
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c index 88b6e6f3fd88..2769dbfd03bf 100644 --- a/arch/ia64/hp/common/hwsw_iommu.c +++ b/arch/ia64/hp/common/hwsw_iommu.c | |||
@@ -13,19 +13,12 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/swiotlb.h> | ||
16 | 17 | ||
17 | #include <asm/machvec.h> | 18 | #include <asm/machvec.h> |
18 | 19 | ||
19 | /* swiotlb declarations & definitions: */ | 20 | /* swiotlb declarations & definitions: */ |
20 | extern int swiotlb_late_init_with_default_size (size_t size); | 21 | extern int swiotlb_late_init_with_default_size (size_t size); |
21 | extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent; | ||
22 | extern ia64_mv_dma_free_coherent swiotlb_free_coherent; | ||
23 | extern ia64_mv_dma_map_single_attrs swiotlb_map_single_attrs; | ||
24 | extern ia64_mv_dma_unmap_single_attrs swiotlb_unmap_single_attrs; | ||
25 | extern ia64_mv_dma_map_sg_attrs swiotlb_map_sg_attrs; | ||
26 | extern ia64_mv_dma_unmap_sg_attrs swiotlb_unmap_sg_attrs; | ||
27 | extern ia64_mv_dma_supported swiotlb_dma_supported; | ||
28 | extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error; | ||
29 | 22 | ||
30 | /* hwiommu declarations & definitions: */ | 23 | /* hwiommu declarations & definitions: */ |
31 | 24 | ||
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index 7f257507cd86..0d9d16e2d949 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h | |||
@@ -434,28 +434,4 @@ extern void memset_io(volatile void __iomem *s, int c, long n); | |||
434 | 434 | ||
435 | # endif /* __KERNEL__ */ | 435 | # endif /* __KERNEL__ */ |
436 | 436 | ||
437 | /* | ||
438 | * Enabling BIO_VMERGE_BOUNDARY forces us to turn off I/O MMU bypassing. It is said that | ||
439 | * BIO-level virtual merging can give up to 4% performance boost (not verified for ia64). | ||
440 | * On the other hand, we know that I/O MMU bypassing gives ~8% performance improvement on | ||
441 | * SPECweb-like workloads on zx1-based machines. Thus, for now we favor I/O MMU bypassing | ||
442 | * over BIO-level virtual merging. | ||
443 | */ | ||
444 | extern unsigned long ia64_max_iommu_merge_mask; | ||
445 | #if 1 | ||
446 | #define BIO_VMERGE_BOUNDARY 0 | ||
447 | #else | ||
448 | /* | ||
449 | * It makes no sense at all to have this BIO_VMERGE_BOUNDARY macro here. Should be | ||
450 | * replaced by dma_merge_mask() or something of that sort. Note: the only way | ||
451 | * BIO_VMERGE_BOUNDARY is used is to mask off bits. Effectively, our definition gets | ||
452 | * expanded into: | ||
453 | * | ||
454 | * addr & ((ia64_max_iommu_merge_mask + 1) - 1) == (addr & ia64_max_iommu_vmerge_mask) | ||
455 | * | ||
456 | * which is precisely what we want. | ||
457 | */ | ||
458 | #define BIO_VMERGE_BOUNDARY (ia64_max_iommu_merge_mask + 1) | ||
459 | #endif | ||
460 | |||
461 | #endif /* _ASM_IA64_IO_H */ | 437 | #endif /* _ASM_IA64_IO_H */ |
diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h index 1ea28bcee33b..59c17e446683 100644 --- a/arch/ia64/include/asm/machvec.h +++ b/arch/ia64/include/asm/machvec.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _ASM_IA64_MACHVEC_H | 11 | #define _ASM_IA64_MACHVEC_H |
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/swiotlb.h> | ||
14 | 15 | ||
15 | /* forward declarations: */ | 16 | /* forward declarations: */ |
16 | struct device; | 17 | struct device; |
@@ -298,27 +299,6 @@ extern void machvec_init_from_cmdline(const char *cmdline); | |||
298 | # endif /* CONFIG_IA64_GENERIC */ | 299 | # endif /* CONFIG_IA64_GENERIC */ |
299 | 300 | ||
300 | /* | 301 | /* |
301 | * Declare default routines which aren't declared anywhere else: | ||
302 | */ | ||
303 | extern ia64_mv_dma_init swiotlb_init; | ||
304 | extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent; | ||
305 | extern ia64_mv_dma_free_coherent swiotlb_free_coherent; | ||
306 | extern ia64_mv_dma_map_single swiotlb_map_single; | ||
307 | extern ia64_mv_dma_map_single_attrs swiotlb_map_single_attrs; | ||
308 | extern ia64_mv_dma_unmap_single swiotlb_unmap_single; | ||
309 | extern ia64_mv_dma_unmap_single_attrs swiotlb_unmap_single_attrs; | ||
310 | extern ia64_mv_dma_map_sg swiotlb_map_sg; | ||
311 | extern ia64_mv_dma_map_sg_attrs swiotlb_map_sg_attrs; | ||
312 | extern ia64_mv_dma_unmap_sg swiotlb_unmap_sg; | ||
313 | extern ia64_mv_dma_unmap_sg_attrs swiotlb_unmap_sg_attrs; | ||
314 | extern ia64_mv_dma_sync_single_for_cpu swiotlb_sync_single_for_cpu; | ||
315 | extern ia64_mv_dma_sync_sg_for_cpu swiotlb_sync_sg_for_cpu; | ||
316 | extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device; | ||
317 | extern ia64_mv_dma_sync_sg_for_device swiotlb_sync_sg_for_device; | ||
318 | extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error; | ||
319 | extern ia64_mv_dma_supported swiotlb_dma_supported; | ||
320 | |||
321 | /* | ||
322 | * Define default versions so we can extend machvec for new platforms without having | 302 | * Define default versions so we can extend machvec for new platforms without having |
323 | * to update the machvec files for all existing platforms. | 303 | * to update the machvec files for all existing platforms. |
324 | */ | 304 | */ |
diff --git a/arch/ia64/include/asm/meminit.h b/arch/ia64/include/asm/meminit.h index 6bc96ee54327..c0cea375620a 100644 --- a/arch/ia64/include/asm/meminit.h +++ b/arch/ia64/include/asm/meminit.h | |||
@@ -48,7 +48,6 @@ extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end); | |||
48 | */ | 48 | */ |
49 | #define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1)) | 49 | #define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1)) |
50 | #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) | 50 | #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) |
51 | #define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1)) | ||
52 | 51 | ||
53 | #ifdef CONFIG_NUMA | 52 | #ifdef CONFIG_NUMA |
54 | extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); | 53 | extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); |
diff --git a/arch/ia64/include/asm/sal.h b/arch/ia64/include/asm/sal.h index ea310c0812aa..966797a97c94 100644 --- a/arch/ia64/include/asm/sal.h +++ b/arch/ia64/include/asm/sal.h | |||
@@ -337,11 +337,24 @@ typedef struct sal_log_record_header { | |||
337 | #define sal_log_severity_fatal 1 | 337 | #define sal_log_severity_fatal 1 |
338 | #define sal_log_severity_corrected 2 | 338 | #define sal_log_severity_corrected 2 |
339 | 339 | ||
340 | /* | ||
341 | * Error Recovery Info (ERI) bit decode. From SAL Spec section B.2.2 Table B-3 | ||
342 | * Error Section Error_Recovery_Info Field Definition. | ||
343 | */ | ||
344 | #define ERI_NOT_VALID 0x0 /* Error Recovery Field is not valid */ | ||
345 | #define ERI_NOT_ACCESSIBLE 0x30 /* Resource not accessible */ | ||
346 | #define ERI_CONTAINMENT_WARN 0x22 /* Corrupt data propagated */ | ||
347 | #define ERI_UNCORRECTED_ERROR 0x20 /* Uncorrected error */ | ||
348 | #define ERI_COMPONENT_RESET 0x24 /* Component must be reset */ | ||
349 | #define ERI_CORR_ERROR_LOG 0x21 /* Corrected error, needs logging */ | ||
350 | #define ERI_CORR_ERROR_THRESH 0x29 /* Corrected error threshold exceeded */ | ||
351 | |||
340 | /* Definition of log section header structures */ | 352 | /* Definition of log section header structures */ |
341 | typedef struct sal_log_sec_header { | 353 | typedef struct sal_log_sec_header { |
342 | efi_guid_t guid; /* Unique Section ID */ | 354 | efi_guid_t guid; /* Unique Section ID */ |
343 | sal_log_revision_t revision; /* Major and Minor revision of Section */ | 355 | sal_log_revision_t revision; /* Major and Minor revision of Section */ |
344 | u16 reserved; | 356 | u8 error_recovery_info; /* Platform error recovery status */ |
357 | u8 reserved; | ||
345 | u32 len; /* Section length */ | 358 | u32 len; /* Section length */ |
346 | } sal_log_section_hdr_t; | 359 | } sal_log_section_hdr_t; |
347 | 360 | ||
diff --git a/arch/ia64/include/asm/sn/sn_sal.h b/arch/ia64/include/asm/sn/sn_sal.h index 57e649d388b8..e310fc0135dc 100644 --- a/arch/ia64/include/asm/sn/sn_sal.h +++ b/arch/ia64/include/asm/sn/sn_sal.h | |||
@@ -90,6 +90,8 @@ | |||
90 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | 90 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 |
91 | 91 | ||
92 | #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 | 92 | #define SN_SAL_KERNEL_LAUNCH_EVENT 0x02000069 |
93 | #define SN_SAL_WATCHLIST_ALLOC 0x02000070 | ||
94 | #define SN_SAL_WATCHLIST_FREE 0x02000071 | ||
93 | 95 | ||
94 | /* | 96 | /* |
95 | * Service-specific constants | 97 | * Service-specific constants |
@@ -1185,4 +1187,47 @@ ia64_sn_kernel_launch_event(void) | |||
1185 | SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0); | 1187 | SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0); |
1186 | return rv.status; | 1188 | return rv.status; |
1187 | } | 1189 | } |
1190 | |||
1191 | union sn_watchlist_u { | ||
1192 | u64 val; | ||
1193 | struct { | ||
1194 | u64 blade : 16, | ||
1195 | size : 32, | ||
1196 | filler : 16; | ||
1197 | }; | ||
1198 | }; | ||
1199 | |||
1200 | static inline int | ||
1201 | sn_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size, | ||
1202 | unsigned long *intr_mmr_offset) | ||
1203 | { | ||
1204 | struct ia64_sal_retval rv; | ||
1205 | unsigned long addr; | ||
1206 | union sn_watchlist_u size_blade; | ||
1207 | int watchlist; | ||
1208 | |||
1209 | addr = (unsigned long)mq; | ||
1210 | size_blade.size = mq_size; | ||
1211 | size_blade.blade = blade; | ||
1212 | |||
1213 | /* | ||
1214 | * bios returns watchlist number or negative error number. | ||
1215 | */ | ||
1216 | ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_ALLOC, addr, | ||
1217 | size_blade.val, (u64)intr_mmr_offset, | ||
1218 | (u64)&watchlist, 0, 0, 0); | ||
1219 | if (rv.status < 0) | ||
1220 | return rv.status; | ||
1221 | |||
1222 | return watchlist; | ||
1223 | } | ||
1224 | |||
1225 | static inline int | ||
1226 | sn_mq_watchlist_free(int blade, int watchlist_num) | ||
1227 | { | ||
1228 | struct ia64_sal_retval rv; | ||
1229 | ia64_sal_oemcall_nolock(&rv, SN_SAL_WATCHLIST_FREE, blade, | ||
1230 | watchlist_num, 0, 0, 0, 0, 0); | ||
1231 | return rv.status; | ||
1232 | } | ||
1188 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1233 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 0635015d0aaa..bd7acc71e8a9 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -678,6 +678,30 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) | |||
678 | return 0; | 678 | return 0; |
679 | } | 679 | } |
680 | 680 | ||
681 | int __init early_acpi_boot_init(void) | ||
682 | { | ||
683 | int ret; | ||
684 | |||
685 | /* | ||
686 | * do a partial walk of MADT to determine how many CPUs | ||
687 | * we have including offline CPUs | ||
688 | */ | ||
689 | if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) { | ||
690 | printk(KERN_ERR PREFIX "Can't find MADT\n"); | ||
691 | return 0; | ||
692 | } | ||
693 | |||
694 | ret = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, | ||
695 | acpi_parse_lsapic, NR_CPUS); | ||
696 | if (ret < 1) | ||
697 | printk(KERN_ERR PREFIX | ||
698 | "Error parsing MADT - no LAPIC entries\n"); | ||
699 | |||
700 | return 0; | ||
701 | } | ||
702 | |||
703 | |||
704 | |||
681 | int __init acpi_boot_init(void) | 705 | int __init acpi_boot_init(void) |
682 | { | 706 | { |
683 | 707 | ||
@@ -701,11 +725,6 @@ int __init acpi_boot_init(void) | |||
701 | printk(KERN_ERR PREFIX | 725 | printk(KERN_ERR PREFIX |
702 | "Error parsing LAPIC address override entry\n"); | 726 | "Error parsing LAPIC address override entry\n"); |
703 | 727 | ||
704 | if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, acpi_parse_lsapic, NR_CPUS) | ||
705 | < 1) | ||
706 | printk(KERN_ERR PREFIX | ||
707 | "Error parsing MADT - no LAPIC entries\n"); | ||
708 | |||
709 | if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0) | 728 | if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0) |
710 | < 0) | 729 | < 0) |
711 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 730 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c index 031abbf9c875..dbdb778efa05 100644 --- a/arch/ia64/kernel/pci-dma.c +++ b/arch/ia64/kernel/pci-dma.c | |||
@@ -12,13 +12,11 @@ | |||
12 | #include <asm/machvec.h> | 12 | #include <asm/machvec.h> |
13 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
14 | 14 | ||
15 | #include <asm/machvec.h> | ||
16 | #include <asm/system.h> | 15 | #include <asm/system.h> |
17 | 16 | ||
18 | #ifdef CONFIG_DMAR | 17 | #ifdef CONFIG_DMAR |
19 | 18 | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/string.h> | ||
22 | 20 | ||
23 | #include <asm/page.h> | 21 | #include <asm/page.h> |
24 | #include <asm/iommu.h> | 22 | #include <asm/iommu.h> |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index ae7911702bf8..865af27c7737 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -359,7 +359,7 @@ reserve_memory (void) | |||
359 | } | 359 | } |
360 | #endif | 360 | #endif |
361 | 361 | ||
362 | #ifdef CONFIG_CRASH_KERNEL | 362 | #ifdef CONFIG_CRASH_DUMP |
363 | if (reserve_elfcorehdr(&rsvd_region[n].start, | 363 | if (reserve_elfcorehdr(&rsvd_region[n].start, |
364 | &rsvd_region[n].end) == 0) | 364 | &rsvd_region[n].end) == 0) |
365 | n++; | 365 | n++; |
@@ -561,8 +561,12 @@ setup_arch (char **cmdline_p) | |||
561 | #ifdef CONFIG_ACPI | 561 | #ifdef CONFIG_ACPI |
562 | /* Initialize the ACPI boot-time table parser */ | 562 | /* Initialize the ACPI boot-time table parser */ |
563 | acpi_table_init(); | 563 | acpi_table_init(); |
564 | early_acpi_boot_init(); | ||
564 | # ifdef CONFIG_ACPI_NUMA | 565 | # ifdef CONFIG_ACPI_NUMA |
565 | acpi_numa_init(); | 566 | acpi_numa_init(); |
567 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | ||
568 | prefill_possible_map(); | ||
569 | #endif | ||
566 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? | 570 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? |
567 | 32 : cpus_weight(early_cpu_possible_map)), | 571 | 32 : cpus_weight(early_cpu_possible_map)), |
568 | additional_cpus > 0 ? additional_cpus : 0); | 572 | additional_cpus > 0 ? additional_cpus : 0); |
@@ -853,9 +857,6 @@ void __init | |||
853 | setup_per_cpu_areas (void) | 857 | setup_per_cpu_areas (void) |
854 | { | 858 | { |
855 | /* start_kernel() requires this... */ | 859 | /* start_kernel() requires this... */ |
856 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | ||
857 | prefill_possible_map(); | ||
858 | #endif | ||
859 | } | 860 | } |
860 | 861 | ||
861 | /* | 862 | /* |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index d8c5fcd89e5b..d85ba98d9008 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -635,7 +635,6 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n | |||
635 | (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; | 635 | (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; |
636 | #endif | 636 | #endif |
637 | start = GRANULEROUNDDOWN(start); | 637 | start = GRANULEROUNDDOWN(start); |
638 | start = ORDERROUNDDOWN(start); | ||
639 | end = GRANULEROUNDUP(end); | 638 | end = GRANULEROUNDUP(end); |
640 | mem_data[node].max_pfn = max(mem_data[node].max_pfn, | 639 | mem_data[node].max_pfn = max(mem_data[node].max_pfn, |
641 | end >> PAGE_SHIFT); | 640 | end >> PAGE_SHIFT); |
diff --git a/arch/ia64/uv/kernel/setup.c b/arch/ia64/uv/kernel/setup.c index cf5f28ae96c4..7a5ae633198b 100644 --- a/arch/ia64/uv/kernel/setup.c +++ b/arch/ia64/uv/kernel/setup.c | |||
@@ -19,6 +19,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); | |||
19 | 19 | ||
20 | #ifdef CONFIG_IA64_SGI_UV | 20 | #ifdef CONFIG_IA64_SGI_UV |
21 | int sn_prom_type; | 21 | int sn_prom_type; |
22 | long sn_partition_id; | ||
23 | EXPORT_SYMBOL(sn_partition_id); | ||
24 | long sn_coherency_id; | ||
25 | EXPORT_SYMBOL_GPL(sn_coherency_id); | ||
26 | long sn_region_size; | ||
27 | EXPORT_SYMBOL(sn_region_size); | ||
22 | #endif | 28 | #endif |
23 | 29 | ||
24 | struct redir_addr { | 30 | struct redir_addr { |
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index fdf088f2430e..7b4cefa2199b 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kexec.h> | 16 | #include <linux/kexec.h> |
17 | #include <linux/crash_dump.h> | 17 | #include <linux/crash_dump.h> |
18 | 18 | ||
19 | #include <asm/kexec.h> | ||
19 | #include <asm/reg.h> | 20 | #include <asm/reg.h> |
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 31481dc485de..7190493e9bdc 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -189,7 +189,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
189 | { | 189 | { |
190 | struct pci_controller *phb; | 190 | struct pci_controller *phb; |
191 | int primary; | 191 | int primary; |
192 | struct pci_bus *b; | ||
193 | 192 | ||
194 | primary = list_empty(&hose_list); | 193 | primary = list_empty(&hose_list); |
195 | phb = pcibios_alloc_controller(dn); | 194 | phb = pcibios_alloc_controller(dn); |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e60c59b81bdd..4cf0ab13d187 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1494,7 +1494,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID | |||
1494 | def_bool X86_64 | 1494 | def_bool X86_64 |
1495 | depends on NUMA | 1495 | depends on NUMA |
1496 | 1496 | ||
1497 | menu "Power management options" | 1497 | menu "Power management and ACPI options" |
1498 | depends on !X86_VOYAGER | 1498 | depends on !X86_VOYAGER |
1499 | 1499 | ||
1500 | config ARCH_HIBERNATION_HEADER | 1500 | config ARCH_HIBERNATION_HEADER |
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index d843ed0e9b2e..0005adb0f941 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -101,30 +101,22 @@ | |||
101 | #define LAST_VM86_IRQ 15 | 101 | #define LAST_VM86_IRQ 15 |
102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) | 102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) |
103 | 103 | ||
104 | #ifdef CONFIG_X86_64 | 104 | #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_VOYAGER) |
105 | # if NR_CPUS < MAX_IO_APICS | 105 | # if NR_CPUS < MAX_IO_APICS |
106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | 106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) |
107 | # else | 107 | # else |
108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | 108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) |
109 | # endif | 109 | # endif |
110 | 110 | ||
111 | #elif !defined(CONFIG_X86_VOYAGER) | 111 | #elif defined(CONFIG_X86_VOYAGER) |
112 | 112 | ||
113 | # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) | 113 | # define NR_IRQS 224 |
114 | |||
115 | # define NR_IRQS 224 | ||
116 | |||
117 | # else /* IO_APIC || PARAVIRT */ | ||
118 | |||
119 | # define NR_IRQS 16 | ||
120 | |||
121 | # endif | ||
122 | 114 | ||
123 | #else /* !VISWS && !VOYAGER */ | 115 | #else /* IO_APIC || VOYAGER */ |
124 | 116 | ||
125 | # define NR_IRQS 224 | 117 | # define NR_IRQS 16 |
126 | 118 | ||
127 | #endif /* VISWS */ | 119 | #endif |
128 | 120 | ||
129 | /* Voyager specific defines */ | 121 | /* Voyager specific defines */ |
130 | /* These define the CPIs we use in linux */ | 122 | /* These define the CPIs we use in linux */ |
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 46be2fa7ac26..c2a812ebde89 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -108,9 +108,7 @@ static __always_inline unsigned long long __native_read_tsc(void) | |||
108 | { | 108 | { |
109 | DECLARE_ARGS(val, low, high); | 109 | DECLARE_ARGS(val, low, high); |
110 | 110 | ||
111 | rdtsc_barrier(); | ||
112 | asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); | 111 | asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); |
113 | rdtsc_barrier(); | ||
114 | 112 | ||
115 | return EAX_EDX_VAL(val, low, high); | 113 | return EAX_EDX_VAL(val, low, high); |
116 | } | 114 | } |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 90ac7718469a..4850e4b02b61 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -154,7 +154,7 @@ extern unsigned long node_remap_size[]; | |||
154 | 154 | ||
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ | 157 | /* sched_domains SD_NODE_INIT for NUMA machines */ |
158 | #define SD_NODE_INIT (struct sched_domain) { \ | 158 | #define SD_NODE_INIT (struct sched_domain) { \ |
159 | .min_interval = 8, \ | 159 | .min_interval = 8, \ |
160 | .max_interval = 32, \ | 160 | .max_interval = 32, \ |
@@ -169,8 +169,9 @@ extern unsigned long node_remap_size[]; | |||
169 | .flags = SD_LOAD_BALANCE \ | 169 | .flags = SD_LOAD_BALANCE \ |
170 | | SD_BALANCE_EXEC \ | 170 | | SD_BALANCE_EXEC \ |
171 | | SD_BALANCE_FORK \ | 171 | | SD_BALANCE_FORK \ |
172 | | SD_SERIALIZE \ | 172 | | SD_WAKE_AFFINE \ |
173 | | SD_WAKE_BALANCE, \ | 173 | | SD_WAKE_BALANCE \ |
174 | | SD_SERIALIZE, \ | ||
174 | .last_balance = jiffies, \ | 175 | .last_balance = jiffies, \ |
175 | .balance_interval = 1, \ | 176 | .balance_interval = 1, \ |
176 | } | 177 | } |
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index 38ae163cc91b..9cd83a8e40d5 100644 --- a/arch/x86/include/asm/tsc.h +++ b/arch/x86/include/asm/tsc.h | |||
@@ -34,6 +34,8 @@ static inline cycles_t get_cycles(void) | |||
34 | 34 | ||
35 | static __always_inline cycles_t vget_cycles(void) | 35 | static __always_inline cycles_t vget_cycles(void) |
36 | { | 36 | { |
37 | cycles_t cycles; | ||
38 | |||
37 | /* | 39 | /* |
38 | * We only do VDSOs on TSC capable CPUs, so this shouldnt | 40 | * We only do VDSOs on TSC capable CPUs, so this shouldnt |
39 | * access boot_cpu_data (which is not VDSO-safe): | 41 | * access boot_cpu_data (which is not VDSO-safe): |
@@ -42,7 +44,11 @@ static __always_inline cycles_t vget_cycles(void) | |||
42 | if (!cpu_has_tsc) | 44 | if (!cpu_has_tsc) |
43 | return 0; | 45 | return 0; |
44 | #endif | 46 | #endif |
45 | return (cycles_t)__native_read_tsc(); | 47 | rdtsc_barrier(); |
48 | cycles = (cycles_t)__native_read_tsc(); | ||
49 | rdtsc_barrier(); | ||
50 | |||
51 | return cycles; | ||
46 | } | 52 | } |
47 | 53 | ||
48 | extern void tsc_init(void); | 54 | extern void tsc_init(void); |
diff --git a/arch/x86/include/asm/voyager.h b/arch/x86/include/asm/voyager.h index 9c811d2e6f91..b3e647307625 100644 --- a/arch/x86/include/asm/voyager.h +++ b/arch/x86/include/asm/voyager.h | |||
@@ -520,6 +520,7 @@ extern void voyager_restart(void); | |||
520 | extern void voyager_cat_power_off(void); | 520 | extern void voyager_cat_power_off(void); |
521 | extern void voyager_cat_do_common_interrupt(void); | 521 | extern void voyager_cat_do_common_interrupt(void); |
522 | extern void voyager_handle_nmi(void); | 522 | extern void voyager_handle_nmi(void); |
523 | extern void voyager_smp_intr_init(void); | ||
523 | /* Commands for the following are */ | 524 | /* Commands for the following are */ |
524 | #define VOYAGER_PSI_READ 0 | 525 | #define VOYAGER_PSI_READ 0 |
525 | #define VOYAGER_PSI_WRITE 1 | 526 | #define VOYAGER_PSI_WRITE 1 |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index a8fd9ebdc8e2..331b318304eb 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, | |||
50 | /* returns !0 if the IOMMU is caching non-present entries in its TLB */ | 50 | /* returns !0 if the IOMMU is caching non-present entries in its TLB */ |
51 | static int iommu_has_npcache(struct amd_iommu *iommu) | 51 | static int iommu_has_npcache(struct amd_iommu *iommu) |
52 | { | 52 | { |
53 | return iommu->cap & IOMMU_CAP_NPCACHE; | 53 | return iommu->cap & (1UL << IOMMU_CAP_NPCACHE); |
54 | } | 54 | } |
55 | 55 | ||
56 | /**************************************************************************** | 56 | /**************************************************************************** |
@@ -536,6 +536,9 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, | |||
536 | { | 536 | { |
537 | address >>= PAGE_SHIFT; | 537 | address >>= PAGE_SHIFT; |
538 | iommu_area_free(dom->bitmap, address, pages); | 538 | iommu_area_free(dom->bitmap, address, pages); |
539 | |||
540 | if (address + pages >= dom->next_bit) | ||
541 | dom->need_flush = true; | ||
539 | } | 542 | } |
540 | 543 | ||
541 | /**************************************************************************** | 544 | /**************************************************************************** |
@@ -992,8 +995,10 @@ static void __unmap_single(struct amd_iommu *iommu, | |||
992 | 995 | ||
993 | dma_ops_free_addresses(dma_dom, dma_addr, pages); | 996 | dma_ops_free_addresses(dma_dom, dma_addr, pages); |
994 | 997 | ||
995 | if (amd_iommu_unmap_flush) | 998 | if (amd_iommu_unmap_flush || dma_dom->need_flush) { |
996 | iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size); | 999 | iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size); |
1000 | dma_dom->need_flush = false; | ||
1001 | } | ||
997 | } | 1002 | } |
998 | 1003 | ||
999 | /* | 1004 | /* |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index b764d7429c61..7a3f2028e2eb 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3611,6 +3611,8 @@ int __init probe_nr_irqs(void) | |||
3611 | /* something wrong ? */ | 3611 | /* something wrong ? */ |
3612 | if (nr < nr_min) | 3612 | if (nr < nr_min) |
3613 | nr = nr_min; | 3613 | nr = nr_min; |
3614 | if (WARN_ON(nr > NR_IRQS)) | ||
3615 | nr = NR_IRQS; | ||
3614 | 3616 | ||
3615 | return nr; | 3617 | return nr; |
3616 | } | 3618 | } |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f4c93f1cfc19..724adfc63cb9 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -29,11 +29,7 @@ EXPORT_SYMBOL(pm_power_off); | |||
29 | 29 | ||
30 | static const struct desc_ptr no_idt = {}; | 30 | static const struct desc_ptr no_idt = {}; |
31 | static int reboot_mode; | 31 | static int reboot_mode; |
32 | /* | 32 | enum reboot_type reboot_type = BOOT_KBD; |
33 | * Keyboard reset and triple fault may result in INIT, not RESET, which | ||
34 | * doesn't work when we're in vmx root mode. Try ACPI first. | ||
35 | */ | ||
36 | enum reboot_type reboot_type = BOOT_ACPI; | ||
37 | int reboot_force; | 33 | int reboot_force; |
38 | 34 | ||
39 | #if defined(CONFIG_X86_32) && defined(CONFIG_SMP) | 35 | #if defined(CONFIG_X86_32) && defined(CONFIG_SMP) |
diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c index e00534b33534..f4049f3513b6 100644 --- a/arch/x86/kernel/tlb_32.c +++ b/arch/x86/kernel/tlb_32.c | |||
@@ -154,6 +154,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, | |||
154 | flush_mm = mm; | 154 | flush_mm = mm; |
155 | flush_va = va; | 155 | flush_va = va; |
156 | cpus_or(flush_cpumask, cpumask, flush_cpumask); | 156 | cpus_or(flush_cpumask, cpumask, flush_cpumask); |
157 | |||
158 | /* | ||
159 | * Make the above memory operations globally visible before | ||
160 | * sending the IPI. | ||
161 | */ | ||
162 | smp_mb(); | ||
157 | /* | 163 | /* |
158 | * We have to send the IPI only to | 164 | * We have to send the IPI only to |
159 | * CPUs affected. | 165 | * CPUs affected. |
diff --git a/arch/x86/kernel/tlb_64.c b/arch/x86/kernel/tlb_64.c index dcbf7a1159ea..8f919ca69494 100644 --- a/arch/x86/kernel/tlb_64.c +++ b/arch/x86/kernel/tlb_64.c | |||
@@ -183,6 +183,11 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, | |||
183 | cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask); | 183 | cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask); |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Make the above memory operations globally visible before | ||
187 | * sending the IPI. | ||
188 | */ | ||
189 | smp_mb(); | ||
190 | /* | ||
186 | * We have to send the IPI only to | 191 | * We have to send the IPI only to |
187 | * CPUs affected. | 192 | * CPUs affected. |
188 | */ | 193 | */ |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 62348e4fd8d1..424093b157d3 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -55,7 +55,7 @@ u64 native_sched_clock(void) | |||
55 | rdtscll(this_offset); | 55 | rdtscll(this_offset); |
56 | 56 | ||
57 | /* return the value in ns */ | 57 | /* return the value in ns */ |
58 | return cycles_2_ns(this_offset); | 58 | return __cycles_2_ns(this_offset); |
59 | } | 59 | } |
60 | 60 | ||
61 | /* We need to define a real function for sched_clock, to override the | 61 | /* We need to define a real function for sched_clock, to override the |
@@ -813,10 +813,6 @@ void __init tsc_init(void) | |||
813 | cpu_khz = calibrate_cpu(); | 813 | cpu_khz = calibrate_cpu(); |
814 | #endif | 814 | #endif |
815 | 815 | ||
816 | lpj = ((u64)tsc_khz * 1000); | ||
817 | do_div(lpj, HZ); | ||
818 | lpj_fine = lpj; | ||
819 | |||
820 | printk("Detected %lu.%03lu MHz processor.\n", | 816 | printk("Detected %lu.%03lu MHz processor.\n", |
821 | (unsigned long)cpu_khz / 1000, | 817 | (unsigned long)cpu_khz / 1000, |
822 | (unsigned long)cpu_khz % 1000); | 818 | (unsigned long)cpu_khz % 1000); |
@@ -836,6 +832,10 @@ void __init tsc_init(void) | |||
836 | /* now allow native_sched_clock() to use rdtsc */ | 832 | /* now allow native_sched_clock() to use rdtsc */ |
837 | tsc_disabled = 0; | 833 | tsc_disabled = 0; |
838 | 834 | ||
835 | lpj = ((u64)tsc_khz * 1000); | ||
836 | do_div(lpj, HZ); | ||
837 | lpj_fine = lpj; | ||
838 | |||
839 | use_tsc_delay(); | 839 | use_tsc_delay(); |
840 | /* Check and install the TSC clocksource */ | 840 | /* Check and install the TSC clocksource */ |
841 | dmi_check_system(bad_tsc_dmi_table); | 841 | dmi_check_system(bad_tsc_dmi_table); |
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c index 6bbdd633864c..a580b9562e76 100644 --- a/arch/x86/mach-voyager/setup.c +++ b/arch/x86/mach-voyager/setup.c | |||
@@ -27,7 +27,7 @@ static struct irqaction irq2 = { | |||
27 | void __init intr_init_hook(void) | 27 | void __init intr_init_hook(void) |
28 | { | 28 | { |
29 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
30 | smp_intr_init(); | 30 | voyager_smp_intr_init(); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | setup_irq(2, &irq2); | 33 | setup_irq(2, &irq2); |
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c index 7f4c6af14351..0e331652681e 100644 --- a/arch/x86/mach-voyager/voyager_smp.c +++ b/arch/x86/mach-voyager/voyager_smp.c | |||
@@ -1258,7 +1258,7 @@ static void handle_vic_irq(unsigned int irq, struct irq_desc *desc) | |||
1258 | #define QIC_SET_GATE(cpi, vector) \ | 1258 | #define QIC_SET_GATE(cpi, vector) \ |
1259 | set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) | 1259 | set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) |
1260 | 1260 | ||
1261 | void __init smp_intr_init(void) | 1261 | void __init voyager_smp_intr_init(void) |
1262 | { | 1262 | { |
1263 | int i; | 1263 | int i; |
1264 | 1264 | ||
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index f1dc1b75d166..e89d24815f26 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -67,18 +67,18 @@ static void split_page_count(int level) | |||
67 | 67 | ||
68 | void arch_report_meminfo(struct seq_file *m) | 68 | void arch_report_meminfo(struct seq_file *m) |
69 | { | 69 | { |
70 | seq_printf(m, "DirectMap4k: %8lu kB\n", | 70 | seq_printf(m, "DirectMap4k: %8lu kB\n", |
71 | direct_pages_count[PG_LEVEL_4K] << 2); | 71 | direct_pages_count[PG_LEVEL_4K] << 2); |
72 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | 72 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
73 | seq_printf(m, "DirectMap2M: %8lu kB\n", | 73 | seq_printf(m, "DirectMap2M: %8lu kB\n", |
74 | direct_pages_count[PG_LEVEL_2M] << 11); | 74 | direct_pages_count[PG_LEVEL_2M] << 11); |
75 | #else | 75 | #else |
76 | seq_printf(m, "DirectMap4M: %8lu kB\n", | 76 | seq_printf(m, "DirectMap4M: %8lu kB\n", |
77 | direct_pages_count[PG_LEVEL_2M] << 12); | 77 | direct_pages_count[PG_LEVEL_2M] << 12); |
78 | #endif | 78 | #endif |
79 | #ifdef CONFIG_X86_64 | 79 | #ifdef CONFIG_X86_64 |
80 | if (direct_gbpages) | 80 | if (direct_gbpages) |
81 | seq_printf(m, "DirectMap1G: %8lu kB\n", | 81 | seq_printf(m, "DirectMap1G: %8lu kB\n", |
82 | direct_pages_count[PG_LEVEL_1G] << 20); | 82 | direct_pages_count[PG_LEVEL_1G] << 20); |
83 | #endif | 83 | #endif |
84 | } | 84 | } |
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c index 0620d6d45f7d..3f1b81a83e2e 100644 --- a/arch/x86/oprofile/op_model_ppro.c +++ b/arch/x86/oprofile/op_model_ppro.c | |||
@@ -27,8 +27,7 @@ static int num_counters = 2; | |||
27 | static int counter_width = 32; | 27 | static int counter_width = 32; |
28 | 28 | ||
29 | #define CTR_IS_RESERVED(msrs, c) (msrs->counters[(c)].addr ? 1 : 0) | 29 | #define CTR_IS_RESERVED(msrs, c) (msrs->counters[(c)].addr ? 1 : 0) |
30 | #define CTR_READ(l, h, msrs, c) do {rdmsr(msrs->counters[(c)].addr, (l), (h)); } while (0) | 30 | #define CTR_OVERFLOWED(n) (!((n) & (1ULL<<(counter_width-1)))) |
31 | #define CTR_OVERFLOWED(n) (!((n) & (1U<<(counter_width-1)))) | ||
32 | 31 | ||
33 | #define CTRL_IS_RESERVED(msrs, c) (msrs->controls[(c)].addr ? 1 : 0) | 32 | #define CTRL_IS_RESERVED(msrs, c) (msrs->controls[(c)].addr ? 1 : 0) |
34 | #define CTRL_READ(l, h, msrs, c) do {rdmsr((msrs->controls[(c)].addr), (l), (h)); } while (0) | 33 | #define CTRL_READ(l, h, msrs, c) do {rdmsr((msrs->controls[(c)].addr), (l), (h)); } while (0) |
@@ -124,14 +123,14 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs) | |||
124 | static int ppro_check_ctrs(struct pt_regs * const regs, | 123 | static int ppro_check_ctrs(struct pt_regs * const regs, |
125 | struct op_msrs const * const msrs) | 124 | struct op_msrs const * const msrs) |
126 | { | 125 | { |
127 | unsigned int low, high; | 126 | u64 val; |
128 | int i; | 127 | int i; |
129 | 128 | ||
130 | for (i = 0 ; i < num_counters; ++i) { | 129 | for (i = 0 ; i < num_counters; ++i) { |
131 | if (!reset_value[i]) | 130 | if (!reset_value[i]) |
132 | continue; | 131 | continue; |
133 | CTR_READ(low, high, msrs, i); | 132 | rdmsrl(msrs->counters[i].addr, val); |
134 | if (CTR_OVERFLOWED(low)) { | 133 | if (CTR_OVERFLOWED(val)) { |
135 | oprofile_add_sample(regs, i); | 134 | oprofile_add_sample(regs, i); |
136 | wrmsrl(msrs->counters[i].addr, -reset_value[i]); | 135 | wrmsrl(msrs->counters[i].addr, -reset_value[i]); |
137 | } | 136 | } |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index b61534c7a4c4..5e4686d70f62 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -863,15 +863,16 @@ static void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, unsigned l | |||
863 | if (PagePinned(virt_to_page(mm->pgd))) { | 863 | if (PagePinned(virt_to_page(mm->pgd))) { |
864 | SetPagePinned(page); | 864 | SetPagePinned(page); |
865 | 865 | ||
866 | vm_unmap_aliases(); | ||
866 | if (!PageHighMem(page)) { | 867 | if (!PageHighMem(page)) { |
867 | make_lowmem_page_readonly(__va(PFN_PHYS((unsigned long)pfn))); | 868 | make_lowmem_page_readonly(__va(PFN_PHYS((unsigned long)pfn))); |
868 | if (level == PT_PTE && USE_SPLIT_PTLOCKS) | 869 | if (level == PT_PTE && USE_SPLIT_PTLOCKS) |
869 | pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); | 870 | pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); |
870 | } else | 871 | } else { |
871 | /* make sure there are no stray mappings of | 872 | /* make sure there are no stray mappings of |
872 | this page */ | 873 | this page */ |
873 | kmap_flush_unused(); | 874 | kmap_flush_unused(); |
874 | vm_unmap_aliases(); | 875 | } |
875 | } | 876 | } |
876 | } | 877 | } |
877 | 878 | ||
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index aba77b2b7d18..688936044dc9 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -850,13 +850,16 @@ static int xen_pin_page(struct mm_struct *mm, struct page *page, | |||
850 | read-only, and can be pinned. */ | 850 | read-only, and can be pinned. */ |
851 | static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd) | 851 | static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd) |
852 | { | 852 | { |
853 | vm_unmap_aliases(); | ||
854 | |||
853 | xen_mc_batch(); | 855 | xen_mc_batch(); |
854 | 856 | ||
855 | if (xen_pgd_walk(mm, xen_pin_page, USER_LIMIT)) { | 857 | if (xen_pgd_walk(mm, xen_pin_page, USER_LIMIT)) { |
856 | /* re-enable interrupts for kmap_flush_unused */ | 858 | /* re-enable interrupts for flushing */ |
857 | xen_mc_issue(0); | 859 | xen_mc_issue(0); |
860 | |||
858 | kmap_flush_unused(); | 861 | kmap_flush_unused(); |
859 | vm_unmap_aliases(); | 862 | |
860 | xen_mc_batch(); | 863 | xen_mc_batch(); |
861 | } | 864 | } |
862 | 865 | ||
@@ -874,7 +877,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd) | |||
874 | #else /* CONFIG_X86_32 */ | 877 | #else /* CONFIG_X86_32 */ |
875 | #ifdef CONFIG_X86_PAE | 878 | #ifdef CONFIG_X86_PAE |
876 | /* Need to make sure unshared kernel PMD is pinnable */ | 879 | /* Need to make sure unshared kernel PMD is pinnable */ |
877 | xen_pin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), | 880 | xen_pin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), |
878 | PT_PMD); | 881 | PT_PMD); |
879 | #endif | 882 | #endif |
880 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); | 883 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); |
@@ -991,7 +994,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd) | |||
991 | 994 | ||
992 | #ifdef CONFIG_X86_PAE | 995 | #ifdef CONFIG_X86_PAE |
993 | /* Need to make sure unshared kernel PMD is unpinned */ | 996 | /* Need to make sure unshared kernel PMD is unpinned */ |
994 | xen_unpin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), | 997 | xen_unpin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), |
995 | PT_PMD); | 998 | PT_PMD); |
996 | #endif | 999 | #endif |
997 | 1000 | ||