diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-09-13 02:44:20 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-09-14 09:53:30 -0400 |
commit | 5e14d21e3f28a4181dacff0336040e30942f4921 (patch) | |
tree | ebaa8217d5af80e15116960641a0bf87a8b5d717 /arch/powerpc/kernel/cputable.c | |
parent | d8f1324a5063c833862328ceafabc53ac3cc4f71 (diff) |
[POWERPC] Add cpu feature for SPE handling
Make it so that SPE support can be determined at runtime. This is similiar
to how we handle AltiVec. This allows us to have SPE support built in and
work on processors with and without SPE.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/cputable.c')
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 5873073c9045..8eb8087383eb 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -68,15 +68,6 @@ extern void __restore_cpu_ppc970(void); | |||
68 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ | 68 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
69 | PPC_FEATURE_BOOKE) | 69 | PPC_FEATURE_BOOKE) |
70 | 70 | ||
71 | /* We only set the spe features if the kernel was compiled with | ||
72 | * spe support | ||
73 | */ | ||
74 | #ifdef CONFIG_SPE | ||
75 | #define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE | ||
76 | #else | ||
77 | #define PPC_FEATURE_SPE_COMP 0 | ||
78 | #endif | ||
79 | |||
80 | static struct cpu_spec cpu_specs[] = { | 71 | static struct cpu_spec cpu_specs[] = { |
81 | #ifdef CONFIG_PPC64 | 72 | #ifdef CONFIG_PPC64 |
82 | { /* Power3 */ | 73 | { /* Power3 */ |
@@ -1261,8 +1252,8 @@ static struct cpu_spec cpu_specs[] = { | |||
1261 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1252 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1262 | .cpu_features = CPU_FTRS_E200, | 1253 | .cpu_features = CPU_FTRS_E200, |
1263 | .cpu_user_features = COMMON_USER_BOOKE | | 1254 | .cpu_user_features = COMMON_USER_BOOKE | |
1264 | PPC_FEATURE_SPE_COMP | | 1255 | PPC_FEATURE_HAS_SPE_COMP | |
1265 | PPC_FEATURE_HAS_EFP_SINGLE | | 1256 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
1266 | PPC_FEATURE_UNIFIED_CACHE, | 1257 | PPC_FEATURE_UNIFIED_CACHE, |
1267 | .dcache_bsize = 32, | 1258 | .dcache_bsize = 32, |
1268 | .platform = "ppc5554", | 1259 | .platform = "ppc5554", |
@@ -1274,8 +1265,8 @@ static struct cpu_spec cpu_specs[] = { | |||
1274 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1265 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1275 | .cpu_features = CPU_FTRS_E500, | 1266 | .cpu_features = CPU_FTRS_E500, |
1276 | .cpu_user_features = COMMON_USER_BOOKE | | 1267 | .cpu_user_features = COMMON_USER_BOOKE | |
1277 | PPC_FEATURE_SPE_COMP | | 1268 | PPC_FEATURE_HAS_SPE_COMP | |
1278 | PPC_FEATURE_HAS_EFP_SINGLE, | 1269 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, |
1279 | .icache_bsize = 32, | 1270 | .icache_bsize = 32, |
1280 | .dcache_bsize = 32, | 1271 | .dcache_bsize = 32, |
1281 | .num_pmcs = 4, | 1272 | .num_pmcs = 4, |
@@ -1290,9 +1281,9 @@ static struct cpu_spec cpu_specs[] = { | |||
1290 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1281 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1291 | .cpu_features = CPU_FTRS_E500_2, | 1282 | .cpu_features = CPU_FTRS_E500_2, |
1292 | .cpu_user_features = COMMON_USER_BOOKE | | 1283 | .cpu_user_features = COMMON_USER_BOOKE | |
1293 | PPC_FEATURE_SPE_COMP | | 1284 | PPC_FEATURE_HAS_SPE_COMP | |
1294 | PPC_FEATURE_HAS_EFP_SINGLE | | 1285 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
1295 | PPC_FEATURE_HAS_EFP_DOUBLE, | 1286 | PPC_FEATURE_HAS_EFP_DOUBLE_COMP, |
1296 | .icache_bsize = 32, | 1287 | .icache_bsize = 32, |
1297 | .dcache_bsize = 32, | 1288 | .dcache_bsize = 32, |
1298 | .num_pmcs = 4, | 1289 | .num_pmcs = 4, |