diff options
author | Varun Sethi <Varun.Sethi@freescale.com> | 2012-07-09 09:01:51 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2012-09-12 15:57:09 -0400 |
commit | 0778407f836d632cce90e5d9df490a7c5e6e398a (patch) | |
tree | 1f1a6897abb055cb9230b75c8839eca10250df13 /arch/powerpc | |
parent | 2c71b0cc4a626d8bd02b88b3b92ce18be4d54c6d (diff) |
powerpc/booke: Separate out restore_e5500/setup_e5500 routines.
For the 64 bit case separate out e5500 cpu_setup and cpu_restore functions.
The cpu_setup function (for the primary core) is passed the cpu_spec
pointer, which is not there in case of the cpu_restore function. Also, in
our case we will have to manipulate the CPU_FTR_EMB_HV flag on the primary
core.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_fsl_booke.S | 32 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64e.S | 18 |
2 files changed, 32 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 021822daa8f6..1345e1bc748a 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
@@ -105,17 +105,45 @@ _GLOBAL(__setup_cpu_e5500) | |||
105 | mtlr r5 | 105 | mtlr r5 |
106 | blr | 106 | blr |
107 | #endif | 107 | #endif |
108 | |||
108 | #ifdef CONFIG_PPC_BOOK3E_64 | 109 | #ifdef CONFIG_PPC_BOOK3E_64 |
109 | /* Right now, restore and setup are the same thing */ | ||
110 | _GLOBAL(__restore_cpu_e5500) | 110 | _GLOBAL(__restore_cpu_e5500) |
111 | _GLOBAL(__setup_cpu_e5500) | ||
112 | mflr r4 | 111 | mflr r4 |
113 | bl __e500_icache_setup | 112 | bl __e500_icache_setup |
114 | bl __e500_dcache_setup | 113 | bl __e500_dcache_setup |
115 | bl .__setup_base_ivors | 114 | bl .__setup_base_ivors |
116 | bl .setup_perfmon_ivor | 115 | bl .setup_perfmon_ivor |
117 | bl .setup_doorbell_ivors | 116 | bl .setup_doorbell_ivors |
117 | /* | ||
118 | * We only want to touch IVOR38-41 if we're running on hardware | ||
119 | * that supports category E.HV. The architectural way to determine | ||
120 | * this is MMUCFG[LPIDSIZE]. | ||
121 | */ | ||
122 | mfspr r10,SPRN_MMUCFG | ||
123 | rlwinm. r10,r10,0,MMUCFG_LPIDSIZE | ||
124 | beq 1f | ||
118 | bl .setup_ehv_ivors | 125 | bl .setup_ehv_ivors |
126 | 1: | ||
119 | mtlr r4 | 127 | mtlr r4 |
120 | blr | 128 | blr |
129 | |||
130 | _GLOBAL(__setup_cpu_e5500) | ||
131 | mflr r5 | ||
132 | bl __e500_icache_setup | ||
133 | bl __e500_dcache_setup | ||
134 | bl .__setup_base_ivors | ||
135 | bl .setup_perfmon_ivor | ||
136 | bl .setup_doorbell_ivors | ||
137 | /* | ||
138 | * We only want to touch IVOR38-41 if we're running on hardware | ||
139 | * that supports category E.HV. The architectural way to determine | ||
140 | * this is MMUCFG[LPIDSIZE]. | ||
141 | */ | ||
142 | mfspr r10,SPRN_MMUCFG | ||
143 | rlwinm. r10,r10,0,MMUCFG_LPIDSIZE | ||
144 | beq 1f | ||
145 | bl .setup_ehv_ivors | ||
146 | 1: | ||
147 | mtlr r5 | ||
148 | blr | ||
121 | #endif | 149 | #endif |
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 87a82fbdf05a..4684e33a26c3 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -1356,25 +1356,11 @@ _GLOBAL(setup_perfmon_ivor) | |||
1356 | _GLOBAL(setup_doorbell_ivors) | 1356 | _GLOBAL(setup_doorbell_ivors) |
1357 | SET_IVOR(36, 0x280) /* Processor Doorbell */ | 1357 | SET_IVOR(36, 0x280) /* Processor Doorbell */ |
1358 | SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */ | 1358 | SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */ |
1359 | |||
1360 | /* Check MMUCFG[LPIDSIZE] to determine if we have category E.HV */ | ||
1361 | mfspr r10,SPRN_MMUCFG | ||
1362 | rlwinm. r10,r10,0,MMUCFG_LPIDSIZE | ||
1363 | beqlr | ||
1364 | |||
1365 | SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */ | ||
1366 | SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */ | ||
1367 | blr | 1359 | blr |
1368 | 1360 | ||
1369 | _GLOBAL(setup_ehv_ivors) | 1361 | _GLOBAL(setup_ehv_ivors) |
1370 | /* | ||
1371 | * We may be running as a guest and lack E.HV even on a chip | ||
1372 | * that normally has it. | ||
1373 | */ | ||
1374 | mfspr r10,SPRN_MMUCFG | ||
1375 | rlwinm. r10,r10,0,MMUCFG_LPIDSIZE | ||
1376 | beqlr | ||
1377 | |||
1378 | SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */ | 1362 | SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */ |
1379 | SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ | 1363 | SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ |
1364 | SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */ | ||
1365 | SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */ | ||
1380 | blr | 1366 | blr |