diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
| commit | 616ad8c44281c0c6711a72b560e01ec335ff27e0 (patch) | |
| tree | 0a20453ffedb09db6fb41a0c2208ccc2c7751d3a /arch/ia64/kernel | |
| parent | 99809963c99e1ed868d9ebeb4a5e7ee1cbe0309f (diff) | |
| parent | b380b0d4f7dffcc235c0facefa537d4655619101 (diff) | |
Merge branch 'linus' into x86/defconfig
Diffstat (limited to 'arch/ia64/kernel')
| -rw-r--r-- | arch/ia64/kernel/head.S | 26 | ||||
| -rw-r--r-- | arch/ia64/kernel/setup.c | 18 | ||||
| -rw-r--r-- | arch/ia64/kernel/smp.c | 8 | ||||
| -rw-r--r-- | arch/ia64/kernel/smpboot.c | 3 | ||||
| -rw-r--r-- | arch/ia64/kernel/vmlinux.lds.S | 3 |
5 files changed, 45 insertions, 13 deletions
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 41c712917ff7..8bdea8eb62e3 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
| @@ -359,7 +359,31 @@ start_ap: | |||
| 359 | mov ar.rsc=0 // place RSE in enforced lazy mode | 359 | mov ar.rsc=0 // place RSE in enforced lazy mode |
| 360 | ;; | 360 | ;; |
| 361 | loadrs // clear the dirty partition | 361 | loadrs // clear the dirty partition |
| 362 | mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base | 362 | movl r19=__phys_per_cpu_start |
| 363 | mov r18=PERCPU_PAGE_SIZE | ||
| 364 | ;; | ||
| 365 | #ifndef CONFIG_SMP | ||
| 366 | add r19=r19,r18 | ||
| 367 | ;; | ||
| 368 | #else | ||
| 369 | (isAP) br.few 2f | ||
| 370 | mov r20=r19 | ||
| 371 | sub r19=r19,r18 | ||
| 372 | ;; | ||
| 373 | shr.u r18=r18,3 | ||
| 374 | 1: | ||
| 375 | ld8 r21=[r20],8;; | ||
| 376 | st8[r19]=r21,8 | ||
| 377 | adds r18=-1,r18;; | ||
| 378 | cmp4.lt p7,p6=0,r18 | ||
| 379 | (p7) br.cond.dptk.few 1b | ||
| 380 | 2: | ||
| 381 | #endif | ||
| 382 | tpa r19=r19 | ||
| 383 | ;; | ||
| 384 | .pred.rel.mutex isBP,isAP | ||
| 385 | (isBP) mov IA64_KR(PER_CPU_DATA)=r19 // per-CPU base for cpu0 | ||
| 386 | (isAP) mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base | ||
| 363 | ;; | 387 | ;; |
| 364 | mov ar.bspstore=r2 // establish the new RSE stack | 388 | mov ar.bspstore=r2 // establish the new RSE stack |
| 365 | ;; | 389 | ;; |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 593279f33e96..c27d5b2c182b 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
| @@ -927,17 +927,19 @@ cpu_init (void) | |||
| 927 | if (smp_processor_id() == 0) { | 927 | if (smp_processor_id() == 0) { |
| 928 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 928 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
| 929 | cpu_set(0, cpu_core_map[0]); | 929 | cpu_set(0, cpu_core_map[0]); |
| 930 | } else { | ||
| 931 | /* | ||
| 932 | * Set ar.k3 so that assembly code in MCA handler can compute | ||
| 933 | * physical addresses of per cpu variables with a simple: | ||
| 934 | * phys = ar.k3 + &per_cpu_var | ||
| 935 | * and the alt-dtlb-miss handler can set per-cpu mapping into | ||
| 936 | * the TLB when needed. head.S already did this for cpu0. | ||
| 937 | */ | ||
| 938 | ia64_set_kr(IA64_KR_PER_CPU_DATA, | ||
| 939 | ia64_tpa(cpu_data) - (long) __per_cpu_start); | ||
| 930 | } | 940 | } |
| 931 | #endif | 941 | #endif |
| 932 | 942 | ||
| 933 | /* | ||
| 934 | * We set ar.k3 so that assembly code in MCA handler can compute | ||
| 935 | * physical addresses of per cpu variables with a simple: | ||
| 936 | * phys = ar.k3 + &per_cpu_var | ||
| 937 | */ | ||
| 938 | ia64_set_kr(IA64_KR_PER_CPU_DATA, | ||
| 939 | ia64_tpa(cpu_data) - (long) __per_cpu_start); | ||
| 940 | |||
| 941 | get_max_cacheline_size(); | 943 | get_max_cacheline_size(); |
| 942 | 944 | ||
| 943 | /* | 945 | /* |
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index 3676468612b6..da8f020d82c1 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
| @@ -58,7 +58,7 @@ static struct local_tlb_flush_counts { | |||
| 58 | unsigned int count; | 58 | unsigned int count; |
| 59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; | 59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; |
| 60 | 60 | ||
| 61 | static DEFINE_PER_CPU(unsigned int, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; | 61 | static DEFINE_PER_CPU(unsigned short, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; |
| 62 | 62 | ||
| 63 | #define IPI_CALL_FUNC 0 | 63 | #define IPI_CALL_FUNC 0 |
| 64 | #define IPI_CPU_STOP 1 | 64 | #define IPI_CPU_STOP 1 |
| @@ -254,7 +254,7 @@ smp_local_flush_tlb(void) | |||
| 254 | void | 254 | void |
| 255 | smp_flush_tlb_cpumask(cpumask_t xcpumask) | 255 | smp_flush_tlb_cpumask(cpumask_t xcpumask) |
| 256 | { | 256 | { |
| 257 | unsigned int *counts = __ia64_per_cpu_var(shadow_flush_counts); | 257 | unsigned short *counts = __ia64_per_cpu_var(shadow_flush_counts); |
| 258 | cpumask_t cpumask = xcpumask; | 258 | cpumask_t cpumask = xcpumask; |
| 259 | int mycpu, cpu, flush_mycpu = 0; | 259 | int mycpu, cpu, flush_mycpu = 0; |
| 260 | 260 | ||
| @@ -262,7 +262,7 @@ smp_flush_tlb_cpumask(cpumask_t xcpumask) | |||
| 262 | mycpu = smp_processor_id(); | 262 | mycpu = smp_processor_id(); |
| 263 | 263 | ||
| 264 | for_each_cpu_mask(cpu, cpumask) | 264 | for_each_cpu_mask(cpu, cpumask) |
| 265 | counts[cpu] = local_tlb_flush_counts[cpu].count; | 265 | counts[cpu] = local_tlb_flush_counts[cpu].count & 0xffff; |
| 266 | 266 | ||
| 267 | mb(); | 267 | mb(); |
| 268 | for_each_cpu_mask(cpu, cpumask) { | 268 | for_each_cpu_mask(cpu, cpumask) { |
| @@ -276,7 +276,7 @@ smp_flush_tlb_cpumask(cpumask_t xcpumask) | |||
| 276 | smp_local_flush_tlb(); | 276 | smp_local_flush_tlb(); |
| 277 | 277 | ||
| 278 | for_each_cpu_mask(cpu, cpumask) | 278 | for_each_cpu_mask(cpu, cpumask) |
| 279 | while(counts[cpu] == local_tlb_flush_counts[cpu].count) | 279 | while(counts[cpu] == (local_tlb_flush_counts[cpu].count & 0xffff)) |
| 280 | udelay(FLUSH_DELAY); | 280 | udelay(FLUSH_DELAY); |
| 281 | 281 | ||
| 282 | preempt_enable(); | 282 | preempt_enable(); |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 03f1a9908afc..bcea81e432fd 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -138,6 +138,7 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE; | |||
| 138 | EXPORT_SYMBOL(cpu_possible_map); | 138 | EXPORT_SYMBOL(cpu_possible_map); |
| 139 | 139 | ||
| 140 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; | 140 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; |
| 141 | EXPORT_SYMBOL(cpu_core_map); | ||
| 141 | DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); | 142 | DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); |
| 142 | EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); | 143 | EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); |
| 143 | 144 | ||
| @@ -467,7 +468,9 @@ start_secondary (void *unused) | |||
| 467 | { | 468 | { |
| 468 | /* Early console may use I/O ports */ | 469 | /* Early console may use I/O ports */ |
| 469 | ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase)); | 470 | ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase)); |
| 471 | #ifndef CONFIG_PRINTK_TIME | ||
| 470 | Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); | 472 | Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); |
| 473 | #endif | ||
| 471 | efi_map_pal_code(); | 474 | efi_map_pal_code(); |
| 472 | cpu_init(); | 475 | cpu_init(); |
| 473 | preempt_disable(); | 476 | preempt_disable(); |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 5a77206c2492..de71da811cd6 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
| @@ -215,6 +215,9 @@ SECTIONS | |||
| 215 | /* Per-cpu data: */ | 215 | /* Per-cpu data: */ |
| 216 | percpu : { } :percpu | 216 | percpu : { } :percpu |
| 217 | . = ALIGN(PERCPU_PAGE_SIZE); | 217 | . = ALIGN(PERCPU_PAGE_SIZE); |
| 218 | #ifdef CONFIG_SMP | ||
| 219 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ | ||
| 220 | #endif | ||
| 218 | __phys_per_cpu_start = .; | 221 | __phys_per_cpu_start = .; |
| 219 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) | 222 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) |
| 220 | { | 223 | { |
