aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
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 /include/asm-powerpc
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 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/cputable.h7
-rw-r--r--include/asm-powerpc/firmware.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 12707ab9dc98..4d22218739e0 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -89,8 +89,11 @@ struct cpu_spec {
89 89
90extern struct cpu_spec *cur_cpu_spec; 90extern struct cpu_spec *cur_cpu_spec;
91 91
92extern void identify_cpu(unsigned long offset, unsigned long cpu); 92extern unsigned int __start___ftr_fixup, __stop___ftr_fixup;
93extern void do_cpu_ftr_fixups(unsigned long offset); 93
94extern struct cpu_spec *identify_cpu(unsigned long offset);
95extern void do_feature_fixups(unsigned long offset, unsigned long value,
96 void *fixup_start, void *fixup_end);
94 97
95#endif /* __ASSEMBLY__ */ 98#endif /* __ASSEMBLY__ */
96 99
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h
index 1022737f4f34..c16e0a6b9dab 100644
--- a/include/asm-powerpc/firmware.h
+++ b/include/asm-powerpc/firmware.h
@@ -96,6 +96,8 @@ extern void machine_check_fwnmi(void);
96/* This is true if we are using the firmware NMI handler (typically LPAR) */ 96/* This is true if we are using the firmware NMI handler (typically LPAR) */
97extern int fwnmi_active; 97extern int fwnmi_active;
98 98
99extern unsigned int __start___fw_ftr_fixup, __stop___fw_ftr_fixup;
100
99#else /* __ASSEMBLY__ */ 101#else /* __ASSEMBLY__ */
100 102
101#define BEGIN_FW_FTR_SECTION 96: 103#define BEGIN_FW_FTR_SECTION 96: