diff options
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r-- | arch/powerpc/kernel/paca.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 999bdd816769..5d1b708086bd 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -25,6 +25,28 @@ | |||
25 | * field correctly */ | 25 | * field correctly */ |
26 | extern unsigned long __toc_start; | 26 | extern unsigned long __toc_start; |
27 | 27 | ||
28 | /* | ||
29 | * iSeries structure which the hypervisor knows about - this structure | ||
30 | * should not cross a page boundary. The vpa_init/register_vpa call | ||
31 | * is now known to fail if the lppaca structure crosses a page | ||
32 | * boundary. The lppaca is also used on POWER5 pSeries boxes. The | ||
33 | * lppaca is 640 bytes long, and cannot readily change since the | ||
34 | * hypervisor knows its layout, so a 1kB alignment will suffice to | ||
35 | * ensure that it doesn't cross a page boundary. | ||
36 | */ | ||
37 | struct lppaca lppaca[] = { | ||
38 | [0 ... (NR_CPUS-1)] = { | ||
39 | .desc = 0xd397d781, /* "LpPa" */ | ||
40 | .size = sizeof(struct lppaca), | ||
41 | .dyn_proc_status = 2, | ||
42 | .decr_val = 0x00ff0000, | ||
43 | .fpregs_in_use = 1, | ||
44 | .end_of_quantum = 0xfffffffffffffffful, | ||
45 | .slb_count = 64, | ||
46 | .vmxregs_in_use = 0, | ||
47 | }, | ||
48 | }; | ||
49 | |||
28 | /* The Paca is an array with one entry per processor. Each contains an | 50 | /* The Paca is an array with one entry per processor. Each contains an |
29 | * lppaca, which contains the information shared between the | 51 | * lppaca, which contains the information shared between the |
30 | * hypervisor and Linux. | 52 | * hypervisor and Linux. |
@@ -35,27 +57,17 @@ extern unsigned long __toc_start; | |||
35 | * processor (not thread). | 57 | * processor (not thread). |
36 | */ | 58 | */ |
37 | #define PACA_INIT_COMMON(number, start, asrr, asrv) \ | 59 | #define PACA_INIT_COMMON(number, start, asrr, asrv) \ |
60 | .lppaca_ptr = &lppaca[number], \ | ||
38 | .lock_token = 0x8000, \ | 61 | .lock_token = 0x8000, \ |
39 | .paca_index = (number), /* Paca Index */ \ | 62 | .paca_index = (number), /* Paca Index */ \ |
40 | .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ | 63 | .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ |
41 | .stab_real = (asrr), /* Real pointer to segment table */ \ | 64 | .stab_real = (asrr), /* Real pointer to segment table */ \ |
42 | .stab_addr = (asrv), /* Virt pointer to segment table */ \ | 65 | .stab_addr = (asrv), /* Virt pointer to segment table */ \ |
43 | .cpu_start = (start), /* Processor start */ \ | 66 | .cpu_start = (start), /* Processor start */ \ |
44 | .hw_cpu_id = 0xffff, \ | 67 | .hw_cpu_id = 0xffff, |
45 | .lppaca = { \ | ||
46 | .desc = 0xd397d781, /* "LpPa" */ \ | ||
47 | .size = sizeof(struct lppaca), \ | ||
48 | .dyn_proc_status = 2, \ | ||
49 | .decr_val = 0x00ff0000, \ | ||
50 | .fpregs_in_use = 1, \ | ||
51 | .end_of_quantum = 0xfffffffffffffffful, \ | ||
52 | .slb_count = 64, \ | ||
53 | .vmxregs_in_use = 0, \ | ||
54 | }, \ | ||
55 | 68 | ||
56 | #ifdef CONFIG_PPC_ISERIES | 69 | #ifdef CONFIG_PPC_ISERIES |
57 | #define PACA_INIT_ISERIES(number) \ | 70 | #define PACA_INIT_ISERIES(number) \ |
58 | .lppaca_ptr = &paca[number].lppaca, \ | ||
59 | .reg_save_ptr = &iseries_reg_save[number], | 71 | .reg_save_ptr = &iseries_reg_save[number], |
60 | 72 | ||
61 | #define PACA_INIT(number) \ | 73 | #define PACA_INIT(number) \ |