
From: Olof Johansson <olof@austin.ibm.com>

To be able to use the cur_cpu_spec->firmware_features values in early
setup, the function initializing them has to be moved up to before the
early init calls.

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ppc64/kernel/chrp_setup.c |   20 ++++++++++++--------
 25-akpm/arch/ppc64/kernel/setup.c      |    3 +++
 2 files changed, 15 insertions(+), 8 deletions(-)

diff -puN arch/ppc64/kernel/chrp_setup.c~ppc64-setup-fw_features-before-init_early-calls-on-pseries arch/ppc64/kernel/chrp_setup.c
--- 25/arch/ppc64/kernel/chrp_setup.c~ppc64-setup-fw_features-before-init_early-calls-on-pseries	2004-09-01 21:50:57.750755568 -0700
+++ 25-akpm/arch/ppc64/kernel/chrp_setup.c	2004-09-01 21:50:57.755754808 -0700
@@ -229,10 +229,6 @@ void __init
 chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
 	  unsigned long r6, unsigned long r7)
 {
-	struct device_node * dn;
-	char * hypertas;
-	unsigned int len;
-
 	ppc_md.setup_arch     = chrp_setup_arch;
 	ppc_md.get_cpuinfo    = chrp_get_cpuinfo;
 	if (naca->interrupt_controller == IC_OPEN_PIC) {
@@ -261,10 +257,18 @@ chrp_init(unsigned long r3, unsigned lon
 
 	ppc_md.progress       = chrp_progress;
 
-        /* Build up the firmware_features bitmask field
-         * using contents of device-tree/ibm,hypertas-functions.
-         * Ultimately this functionality may be moved into prom.c prom_init().
-         */
+}
+
+/* Build up the firmware_features bitmask field
+ * using contents of device-tree/ibm,hypertas-functions.
+ * Ultimately this functionality may be moved into prom.c prom_init().
+ */
+void __init fw_feature_init(void)
+{
+	struct device_node * dn;
+	char * hypertas;
+	unsigned int len;
+
 	cur_cpu_spec->firmware_features = 0;
 	dn = of_find_node_by_path("/rtas");
 	if (dn == NULL) {
diff -puN arch/ppc64/kernel/setup.c~ppc64-setup-fw_features-before-init_early-calls-on-pseries arch/ppc64/kernel/setup.c
--- 25/arch/ppc64/kernel/setup.c~ppc64-setup-fw_features-before-init_early-calls-on-pseries	2004-09-01 21:50:57.751755416 -0700
+++ 25-akpm/arch/ppc64/kernel/setup.c	2004-09-01 21:50:57.756754656 -0700
@@ -67,6 +67,7 @@ extern void  pmac_init(unsigned long r3,
 		       unsigned long r6,
 		       unsigned long r7);
 
+extern void fw_feature_init(void);
 extern void iSeries_init( void );
 extern void iSeries_init_early( void );
 extern void pSeries_init_early( void );
@@ -279,11 +280,13 @@ void setup_system(unsigned long r3, unsi
 
 #ifdef CONFIG_PPC_PSERIES
 	case PLATFORM_PSERIES:
+		fw_feature_init();
 		pSeries_init_early();
 		parse_bootinfo();
 		break;
 
 	case PLATFORM_PSERIES_LPAR:
+		fw_feature_init();
 		pSeriesLP_init_early();
 		parse_bootinfo();
 		break;
_
