diff options
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index d135f93cb0f6..1bee4b68fa45 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -142,16 +142,6 @@ early_param("smt-enabled", early_smt_enabled); | |||
142 | #define check_smt_enabled() | 142 | #define check_smt_enabled() |
143 | #endif /* CONFIG_SMP */ | 143 | #endif /* CONFIG_SMP */ |
144 | 144 | ||
145 | /* Put the paca pointer into r13 and SPRG_PACA */ | ||
146 | static void __init setup_paca(struct paca_struct *new_paca) | ||
147 | { | ||
148 | local_paca = new_paca; | ||
149 | mtspr(SPRN_SPRG_PACA, local_paca); | ||
150 | #ifdef CONFIG_PPC_BOOK3E | ||
151 | mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb); | ||
152 | #endif | ||
153 | } | ||
154 | |||
155 | /* | 145 | /* |
156 | * Early initialization entry point. This is called by head.S | 146 | * Early initialization entry point. This is called by head.S |
157 | * with MMU translation disabled. We rely on the "feature" of | 147 | * with MMU translation disabled. We rely on the "feature" of |
@@ -600,6 +590,9 @@ static int pcpu_cpu_distance(unsigned int from, unsigned int to) | |||
600 | return REMOTE_DISTANCE; | 590 | return REMOTE_DISTANCE; |
601 | } | 591 | } |
602 | 592 | ||
593 | unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; | ||
594 | EXPORT_SYMBOL(__per_cpu_offset); | ||
595 | |||
603 | void __init setup_per_cpu_areas(void) | 596 | void __init setup_per_cpu_areas(void) |
604 | { | 597 | { |
605 | const size_t dyn_size = PERCPU_MODULE_RESERVE + PERCPU_DYNAMIC_RESERVE; | 598 | const size_t dyn_size = PERCPU_MODULE_RESERVE + PERCPU_DYNAMIC_RESERVE; |
@@ -624,8 +617,10 @@ void __init setup_per_cpu_areas(void) | |||
624 | panic("cannot initialize percpu area (err=%d)", rc); | 617 | panic("cannot initialize percpu area (err=%d)", rc); |
625 | 618 | ||
626 | delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; | 619 | delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; |
627 | for_each_possible_cpu(cpu) | 620 | for_each_possible_cpu(cpu) { |
628 | paca[cpu].data_offset = delta + pcpu_unit_offsets[cpu]; | 621 | __per_cpu_offset[cpu] = delta + pcpu_unit_offsets[cpu]; |
622 | paca[cpu].data_offset = __per_cpu_offset[cpu]; | ||
623 | } | ||
629 | } | 624 | } |
630 | #endif | 625 | #endif |
631 | 626 | ||