aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/paca.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-15 12:32:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-15 12:32:52 -0400
commit0fa213310cd8fa7a51071cdcf130e26fa56e9549 (patch)
tree2a7e5cc33c8938ec82604a99c3797a3132fd91ec /arch/powerpc/kernel/paca.c
parentd3bf80bff13597004b5724ee4549cd68eb0badf0 (diff)
parentbc47ab0241c7c86da4f5e5f82fbca7d45387c18d (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (103 commits) powerpc: Fix bug in move of altivec code to vector.S powerpc: Add support for swiotlb on 32-bit powerpc/spufs: Remove unused error path powerpc: Fix warning when printing a resource_size_t powerpc/xmon: Remove unused variable in xmon.c powerpc/pseries: Fix warnings when printing resource_size_t powerpc: Shield code specific to 64-bit server processors powerpc: Separate PACA fields for server CPUs powerpc: Split exception handling out of head_64.S powerpc: Introduce CONFIG_PPC_BOOK3S powerpc: Move VMX and VSX asm code to vector.S powerpc: Set init_bootmem_done on NUMA platforms as well powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock powerpc/mm: Fix some SMP issues with MMU context handling powerpc: Add PTRACE_SINGLEBLOCK support fbdev: Add PLB support and cleanup DCR in xilinxfb driver. powerpc/virtex: Add ml510 reference design device tree powerpc/virtex: Add Xilinx ML510 reference design support powerpc/virtex: refactor intc driver and add support for i8259 cascading powerpc/virtex: Add support for Xilinx PCI host bridge ...
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r--arch/powerpc/kernel/paca.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index c744b327bcab..e9962c7f8a09 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -18,6 +18,8 @@
18 * field correctly */ 18 * field correctly */
19extern unsigned long __toc_start; 19extern unsigned long __toc_start;
20 20
21#ifdef CONFIG_PPC_BOOK3S
22
21/* 23/*
22 * The structure which the hypervisor knows about - this structure 24 * The structure which the hypervisor knows about - this structure
23 * should not cross a page boundary. The vpa_init/register_vpa call 25 * should not cross a page boundary. The vpa_init/register_vpa call
@@ -41,6 +43,10 @@ struct lppaca lppaca[] = {
41 }, 43 },
42}; 44};
43 45
46#endif /* CONFIG_PPC_BOOK3S */
47
48#ifdef CONFIG_PPC_STD_MMU_64
49
44/* 50/*
45 * 3 persistent SLBs are registered here. The buffer will be zero 51 * 3 persistent SLBs are registered here. The buffer will be zero
46 * initially, hence will all be invaild until we actually write them. 52 * initially, hence will all be invaild until we actually write them.
@@ -52,6 +58,8 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = {
52 }, 58 },
53}; 59};
54 60
61#endif /* CONFIG_PPC_STD_MMU_64 */
62
55/* The Paca is an array with one entry per processor. Each contains an 63/* The Paca is an array with one entry per processor. Each contains an
56 * lppaca, which contains the information shared between the 64 * lppaca, which contains the information shared between the
57 * hypervisor and Linux. 65 * hypervisor and Linux.
@@ -77,15 +85,19 @@ void __init initialise_pacas(void)
77 for (cpu = 0; cpu < NR_CPUS; cpu++) { 85 for (cpu = 0; cpu < NR_CPUS; cpu++) {
78 struct paca_struct *new_paca = &paca[cpu]; 86 struct paca_struct *new_paca = &paca[cpu];
79 87
88#ifdef CONFIG_PPC_BOOK3S
80 new_paca->lppaca_ptr = &lppaca[cpu]; 89 new_paca->lppaca_ptr = &lppaca[cpu];
90#endif
81 new_paca->lock_token = 0x8000; 91 new_paca->lock_token = 0x8000;
82 new_paca->paca_index = cpu; 92 new_paca->paca_index = cpu;
83 new_paca->kernel_toc = kernel_toc; 93 new_paca->kernel_toc = kernel_toc;
84 new_paca->kernelbase = (unsigned long) _stext; 94 new_paca->kernelbase = (unsigned long) _stext;
85 new_paca->kernel_msr = MSR_KERNEL; 95 new_paca->kernel_msr = MSR_KERNEL;
86 new_paca->hw_cpu_id = 0xffff; 96 new_paca->hw_cpu_id = 0xffff;
87 new_paca->slb_shadow_ptr = &slb_shadow[cpu];
88 new_paca->__current = &init_task; 97 new_paca->__current = &init_task;
98#ifdef CONFIG_PPC_STD_MMU_64
99 new_paca->slb_shadow_ptr = &slb_shadow[cpu];
100#endif /* CONFIG_PPC_STD_MMU_64 */
89 101
90 } 102 }
91} 103}