diff options
author | Jimi Xenidis <jimix@pobox.com> | 2011-09-29 06:55:13 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-11-24 22:11:28 -0500 |
commit | fac26ad4f9cb794c9d1032f55f40a31cb55be09a (patch) | |
tree | 6acb31ab3fbc959de6f62aa4dd6ea08c004205f4 /arch/powerpc/kernel/cpu_setup_a2.S | |
parent | 9d670280908013004f173b2b86414d9b6918511b (diff) |
powerpc/book3e: Add ICSWX/ACOP support to Book3e cores like A2
ICSWX is also used by the A2 processor to access coprocessors,
although not all "chips" that contain A2s have coprocessors.
Signed-off-by: Jimi Xenidis <jimix@pobox.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/cpu_setup_a2.S')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_a2.S | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_a2.S b/arch/powerpc/kernel/cpu_setup_a2.S index 7f818feaa7a5..ebc62f42a237 100644 --- a/arch/powerpc/kernel/cpu_setup_a2.S +++ b/arch/powerpc/kernel/cpu_setup_a2.S | |||
@@ -41,11 +41,16 @@ _GLOBAL(__setup_cpu_a2) | |||
41 | * core local but doing it always won't hurt | 41 | * core local but doing it always won't hurt |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #ifdef CONFIG_PPC_WSP_COPRO | 44 | #ifdef CONFIG_PPC_ICSWX |
45 | /* Make sure ACOP starts out as zero */ | 45 | /* Make sure ACOP starts out as zero */ |
46 | li r3,0 | 46 | li r3,0 |
47 | mtspr SPRN_ACOP,r3 | 47 | mtspr SPRN_ACOP,r3 |
48 | 48 | ||
49 | /* Skip the following if we are in Guest mode */ | ||
50 | mfmsr r3 | ||
51 | andis. r0,r3,MSR_GS@h | ||
52 | bne _icswx_skip_guest | ||
53 | |||
49 | /* Enable icswx instruction */ | 54 | /* Enable icswx instruction */ |
50 | mfspr r3,SPRN_A2_CCR2 | 55 | mfspr r3,SPRN_A2_CCR2 |
51 | ori r3,r3,A2_CCR2_ENABLE_ICSWX | 56 | ori r3,r3,A2_CCR2_ENABLE_ICSWX |
@@ -54,7 +59,8 @@ _GLOBAL(__setup_cpu_a2) | |||
54 | /* Unmask all CTs in HACOP */ | 59 | /* Unmask all CTs in HACOP */ |
55 | li r3,-1 | 60 | li r3,-1 |
56 | mtspr SPRN_HACOP,r3 | 61 | mtspr SPRN_HACOP,r3 |
57 | #endif /* CONFIG_PPC_WSP_COPRO */ | 62 | _icswx_skip_guest: |
63 | #endif /* CONFIG_PPC_ICSWX */ | ||
58 | 64 | ||
59 | /* Enable doorbell */ | 65 | /* Enable doorbell */ |
60 | mfspr r3,SPRN_A2_CCR2 | 66 | mfspr r3,SPRN_A2_CCR2 |