aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-10-24 02:42:40 -0400
committerPaul Mackerras <paulus@samba.org>2006-10-24 21:42:10 -0400
commit42c4aaadb737e0e672b3fb86b2c41ff59f0fb8bc (patch)
tree368a26a61085e567357b3974e7799e56069032eb /arch/powerpc/kernel/setup_32.c
parentfb20f65a01a97bdf4bb746eecfc24a08561e2648 (diff)
[POWERPC] Consolidate feature fixup code
There are currently two versions of the functions for applying the feature fixups, one for CPU features and one for firmware features. In addition, they are both in assembly and with separate implementations for 32 and 64 bits. identify_cpu() is also implemented in assembly and separately for 32 and 64 bits. This patch replaces them with a pair of C functions. The call sites are slightly moved on ppc64 as well to be called from C instead of from assembly, though it's a very small change, and thus shouldn't cause any problem. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 191d0ab09222..769e511783b0 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -91,6 +91,7 @@ int ucache_bsize;
91unsigned long __init early_init(unsigned long dt_ptr) 91unsigned long __init early_init(unsigned long dt_ptr)
92{ 92{
93 unsigned long offset = reloc_offset(); 93 unsigned long offset = reloc_offset();
94 struct cpu_spec *spec;
94 95
95 /* First zero the BSS -- use memset_io, some platforms don't have 96 /* First zero the BSS -- use memset_io, some platforms don't have
96 * caches on yet */ 97 * caches on yet */
@@ -100,8 +101,11 @@ unsigned long __init early_init(unsigned long dt_ptr)
100 * Identify the CPU type and fix up code sections 101 * Identify the CPU type and fix up code sections
101 * that depend on which cpu we have. 102 * that depend on which cpu we have.
102 */ 103 */
103 identify_cpu(offset, 0); 104 spec = identify_cpu(offset);
104 do_cpu_ftr_fixups(offset); 105
106 do_feature_fixups(offset, spec->cpu_features,
107 PTRRELOC(&__start___ftr_fixup),
108 PTRRELOC(&__stop___ftr_fixup));
105 109
106 return KERNELBASE + offset; 110 return KERNELBASE + offset;
107} 111}