diff options
author | Matt Evans <matt@ozlabs.org> | 2011-04-06 15:48:50 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:52 -0400 |
commit | 44ae3ab3358e962039c36ad4ae461ae9fb29596c (patch) | |
tree | 08c0628a5226c0535b7fe236be64b48e5eb0fbd6 /arch/powerpc/kernel/prom.c | |
parent | eca590f402332ab873d13f2d8d00fa0b91cfff36 (diff) |
powerpc: Free up some CPU feature bits by moving out MMU-related features
Some of the 64bit PPC CPU features are MMU-related, so this patch moves
them to MMU_FTR_ bits. All cpu_has_feature()-style tests are moved to
mmu_has_feature(), and seven feature bits are freed as a result.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index c391dc4c8bad..5f5e6aed2b70 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -123,18 +123,19 @@ static void __init move_device_tree(void) | |||
123 | */ | 123 | */ |
124 | static struct ibm_pa_feature { | 124 | static struct ibm_pa_feature { |
125 | unsigned long cpu_features; /* CPU_FTR_xxx bit */ | 125 | unsigned long cpu_features; /* CPU_FTR_xxx bit */ |
126 | unsigned long mmu_features; /* MMU_FTR_xxx bit */ | ||
126 | unsigned int cpu_user_ftrs; /* PPC_FEATURE_xxx bit */ | 127 | unsigned int cpu_user_ftrs; /* PPC_FEATURE_xxx bit */ |
127 | unsigned char pabyte; /* byte number in ibm,pa-features */ | 128 | unsigned char pabyte; /* byte number in ibm,pa-features */ |
128 | unsigned char pabit; /* bit number (big-endian) */ | 129 | unsigned char pabit; /* bit number (big-endian) */ |
129 | unsigned char invert; /* if 1, pa bit set => clear feature */ | 130 | unsigned char invert; /* if 1, pa bit set => clear feature */ |
130 | } ibm_pa_features[] __initdata = { | 131 | } ibm_pa_features[] __initdata = { |
131 | {0, PPC_FEATURE_HAS_MMU, 0, 0, 0}, | 132 | {0, 0, PPC_FEATURE_HAS_MMU, 0, 0, 0}, |
132 | {0, PPC_FEATURE_HAS_FPU, 0, 1, 0}, | 133 | {0, 0, PPC_FEATURE_HAS_FPU, 0, 1, 0}, |
133 | {CPU_FTR_SLB, 0, 0, 2, 0}, | 134 | {0, MMU_FTR_SLB, 0, 0, 2, 0}, |
134 | {CPU_FTR_CTRL, 0, 0, 3, 0}, | 135 | {CPU_FTR_CTRL, 0, 0, 0, 3, 0}, |
135 | {CPU_FTR_NOEXECUTE, 0, 0, 6, 0}, | 136 | {CPU_FTR_NOEXECUTE, 0, 0, 0, 6, 0}, |
136 | {CPU_FTR_NODSISRALIGN, 0, 1, 1, 1}, | 137 | {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, |
137 | {CPU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, | 138 | {0, MMU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, |
138 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, | 139 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, |
139 | }; | 140 | }; |
140 | 141 | ||
@@ -166,9 +167,11 @@ static void __init scan_features(unsigned long node, unsigned char *ftrs, | |||
166 | if (bit ^ fp->invert) { | 167 | if (bit ^ fp->invert) { |
167 | cur_cpu_spec->cpu_features |= fp->cpu_features; | 168 | cur_cpu_spec->cpu_features |= fp->cpu_features; |
168 | cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs; | 169 | cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs; |
170 | cur_cpu_spec->mmu_features |= fp->mmu_features; | ||
169 | } else { | 171 | } else { |
170 | cur_cpu_spec->cpu_features &= ~fp->cpu_features; | 172 | cur_cpu_spec->cpu_features &= ~fp->cpu_features; |
171 | cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs; | 173 | cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs; |
174 | cur_cpu_spec->mmu_features &= ~fp->mmu_features; | ||
172 | } | 175 | } |
173 | } | 176 | } |
174 | } | 177 | } |