Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca8ffc974d43033be6e1d4277a45822d2c3656f4
Commit:     ca8ffc974d43033be6e1d4277a45822d2c3656f4
Parent:     4d404edce30f911004850d472e05a31efd751662
Author:     Michael Neuling <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 07:56:32 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 21:30:58 2007 +1000

    [POWERPC] Fix future firmware feature fixups function failure
    
    Move firmware feature initialisation from pSeries_init_early to the
    earlier pSeries_probe_hypertas so they are initialised before firmware
    feature fixups are applied.
    
    Currently firmware feature sections are only used for iSeries which
    initialises the these features much earlier.  This is a bug in waiting
    on pSeries.
    
    Also adds some whitespace fixups.
    
    Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
    Acked-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pseries/firmware.c |   19 +++----------------
 arch/powerpc/platforms/pseries/pseries.h  |    2 +-
 arch/powerpc/platforms/pseries/setup.c    |   17 +++++++++++------
 3 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/firmware.c 
b/arch/powerpc/platforms/pseries/firmware.c
index 29bf83b..8b18a1c 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -66,24 +66,13 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = {
  * device-tree/ibm,hypertas-functions.  Ultimately this functionality may
  * be moved into prom.c prom_init().
  */
-void __init fw_feature_init(void)
+void __init fw_feature_init(const char *hypertas, unsigned long len)
 {
-       struct device_node *dn;
-       const char *hypertas, *s;
-       int len, i;
+       const char *s;
+       int i;
 
        DBG(" -> fw_feature_init()\n");
 
-       dn = of_find_node_by_path("/rtas");
-       if (dn == NULL) {
-               printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
-               goto out;
-       }
-
-       hypertas = of_get_property(dn, "ibm,hypertas-functions", &len);
-       if (hypertas == NULL)
-               goto out;
-
        for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
                for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
                        /* check value against table of strings */
@@ -98,7 +87,5 @@ void __init fw_feature_init(void)
                }
        }
 
-out:
-       of_node_put(dn);
        DBG(" <- fw_feature_init()\n");
 }
diff --git a/arch/powerpc/platforms/pseries/pseries.h 
b/arch/powerpc/platforms/pseries/pseries.h
index 61e19f7..61136d0 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -10,7 +10,7 @@
 #ifndef _PSERIES_PSERIES_H
 #define _PSERIES_PSERIES_H
 
-extern void __init fw_feature_init(void);
+extern void __init fw_feature_init(const char *hypertas, unsigned long len);
 
 struct pt_regs;
 
diff --git a/arch/powerpc/platforms/pseries/setup.c 
b/arch/powerpc/platforms/pseries/setup.c
index 59e69f0..f0b7146 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -320,8 +320,6 @@ static void __init pSeries_init_early(void)
 {
        DBG(" -> pSeries_init_early()\n");
 
-       fw_feature_init();
-
        if (firmware_has_feature(FW_FEATURE_LPAR))
                find_udbg_vterm();
 
@@ -343,14 +341,21 @@ static int __init pSeries_probe_hypertas(unsigned long 
node,
                                         const char *uname, int depth,
                                         void *data)
 {
+       const char *hypertas;
+       unsigned long len;
+
        if (depth != 1 ||
            (strcmp(uname, "rtas") != 0 && strcmp(uname, "[EMAIL PROTECTED]") 
!= 0))
-               return 0;
+               return 0;
+
+       hypertas = of_get_flat_dt_prop(node, "ibm,hypertas-functions", &len);
+       if (!hypertas)
+               return 1;
 
-       if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL)
-               powerpc_firmware_features |= FW_FEATURE_LPAR;
+       powerpc_firmware_features |= FW_FEATURE_LPAR;
+       fw_feature_init(hypertas, len);
 
-       return 1;
+       return 1;
 }
 
 static int __init pSeries_probe(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to