Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=14b3d926a22b89f779229f88ed16a76b6b641b1c
Commit:     14b3d926a22b89f779229f88ed16a76b6b641b1c
Parent:     72fda1148e14d2f06d8653c26f579b7d2dabba57
Author:     Valentine Barshak <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 22 03:24:02 2007 +1100
Committer:  Josh Boyer <[EMAIL PROTECTED]>
CommitDate: Sun Dec 23 13:35:58 2007 -0600

    [POWERPC] 4xx: update 440EP(x)/440GR(x) identical PVR issue workaround
    
    Renaming the CPU nodes with generic names put the CPU model in
    the "model" property and thus broke the PowerPC 440EP(x)/440GR(x)
    identical PVR workaround. The updates it to use the new model property
    for CPU identification.
    
    Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]>
    Signed-off-by: Josh Boyer <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/prom.c |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 6c2d883..8b5efbc 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -614,6 +614,29 @@ static struct feature_property {
 #endif /* CONFIG_PPC64 */
 };
 
+#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
+static inline void identical_pvr_fixup(unsigned long node)
+{
+       unsigned int pvr;
+       char *model = of_get_flat_dt_prop(node, "model", NULL);
+
+       /*
+        * Since 440GR(x)/440EP(x) processors have the same pvr,
+        * we check the node path and set bit 28 in the cur_cpu_spec
+        * pvr for EP(x) processor version. This bit is always 0 in
+        * the "real" pvr. Then we call identify_cpu again with
+        * the new logical pvr to enable FPU support.
+        */
+       if (model && strstr(model, "440EP")) {
+               pvr = cur_cpu_spec->pvr_value | 0x8;
+               identify_cpu(0, pvr);
+               DBG("Using logical pvr %x for %s\n", pvr, model);
+       }
+}
+#else
+#define identical_pvr_fixup(node) do { } while(0)
+#endif
+
 static void __init check_cpu_feature_properties(unsigned long node)
 {
        unsigned long i;
@@ -711,18 +734,8 @@ static int __init early_init_dt_scan_cpus(unsigned long 
node,
                prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
                if (prop && (*prop & 0xff000000) == 0x0f000000)
                        identify_cpu(0, *prop);
-#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
-               /*
-                * Since 440GR(x)/440EP(x) processors have the same pvr,
-                * we check the node path and set bit 28 in the cur_cpu_spec
-                * pvr for EP(x) processor version. This bit is always 0 in
-                * the "real" pvr. Then we call identify_cpu again with
-                * the new logical pvr to enable FPU support.
-                */
-               if (strstr(uname, "440EP")) {
-                       identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
-               }
-#endif
+
+               identical_pvr_fixup(node);
        }
 
        check_cpu_feature_properties(node);
-
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