The patch titled

     ppc64: Fixup platforms for new ppc_md.idle

has been added to the -mm tree.  Its filename is

     ppc64-fixup-platforms-for-new-ppc_mdidle.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

ppc64-make-idle_loop-a-ppc_md-function.patch
ppc64-move-iseries_idle-into-iseries_setupc.patch
ppc64-move-pseries-idle-functions-into-pseries_setupc.patch
ppc64-fixup-platforms-for-new-ppc_mdidle.patch
ppc64-remove-obsolete-idle_setup.patch
ppc64-be-consistent-about-printing-which-idle-loop-were-using.patch



From: Michael Ellerman <[EMAIL PROTECTED]>

This patch fixes up iSeries, pSeries, pmac and maple to set the correct idle
function for each platform.

Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 arch/ppc64/kernel/iSeries_setup.c |    1 +
 arch/ppc64/kernel/maple_setup.c   |    3 +++
 arch/ppc64/kernel/pSeries_setup.c |   18 ++++++++++++++++++
 arch/ppc64/kernel/pmac_setup.c    |    5 ++++-
 4 files changed, 26 insertions(+), 1 deletion(-)

diff -puN 
arch/ppc64/kernel/iSeries_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle 
arch/ppc64/kernel/iSeries_setup.c
--- 
25/arch/ppc64/kernel/iSeries_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle   
    Wed Jul  6 14:10:12 2005
+++ 25-akpm/arch/ppc64/kernel/iSeries_setup.c   Wed Jul  6 14:10:12 2005
@@ -940,5 +940,6 @@ void __init iSeries_early_setup(void)
        ppc_md.get_rtc_time = iSeries_get_rtc_time;
        ppc_md.calibrate_decr = iSeries_calibrate_decr;
        ppc_md.progress = iSeries_progress;
+       ppc_md.idle_loop = iSeries_idle;
 }
 
diff -puN 
arch/ppc64/kernel/maple_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle 
arch/ppc64/kernel/maple_setup.c
--- 25/arch/ppc64/kernel/maple_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle 
Wed Jul  6 14:10:12 2005
+++ 25-akpm/arch/ppc64/kernel/maple_setup.c     Wed Jul  6 14:10:12 2005
@@ -177,6 +177,8 @@ void __init maple_setup_arch(void)
 #ifdef CONFIG_DUMMY_CONSOLE
        conswitchp = &dummy_con;
 #endif
+
+       printk(KERN_INFO "Using native/NAP idle loop\n");
 }
 
 /* 
@@ -297,4 +299,5 @@ struct machdep_calls __initdata maple_md
                .get_rtc_time           = maple_get_rtc_time,
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = maple_progress,
+       .idle_loop              = native_idle,
 };
diff -puN 
arch/ppc64/kernel/pmac_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle 
arch/ppc64/kernel/pmac_setup.c
--- 25/arch/ppc64/kernel/pmac_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle  
Wed Jul  6 14:10:12 2005
+++ 25-akpm/arch/ppc64/kernel/pmac_setup.c      Wed Jul  6 14:10:12 2005
@@ -186,6 +186,8 @@ void __init pmac_setup_arch(void)
 #ifdef CONFIG_DUMMY_CONSOLE
        conswitchp = &dummy_con;
 #endif
+
+       printk(KERN_INFO "Using native/NAP idle loop\n");
 }
 
 #ifdef CONFIG_SCSI
@@ -507,5 +509,6 @@ struct machdep_calls __initdata pmac_md 
        .calibrate_decr         = pmac_calibrate_decr,
        .feature_call           = pmac_do_feature_call,
        .progress               = pmac_progress,
-       .check_legacy_ioport    = pmac_check_legacy_ioport
+       .check_legacy_ioport    = pmac_check_legacy_ioport,
+       .idle_loop              = native_idle,
 };
diff -puN 
arch/ppc64/kernel/pSeries_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle 
arch/ppc64/kernel/pSeries_setup.c
--- 
25/arch/ppc64/kernel/pSeries_setup.c~ppc64-fixup-platforms-for-new-ppc_mdidle   
    Wed Jul  6 14:10:12 2005
+++ 25-akpm/arch/ppc64/kernel/pSeries_setup.c   Wed Jul  6 14:10:12 2005
@@ -19,6 +19,7 @@
 #undef DEBUG
 
 #include <linux/config.h>
+#include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -82,6 +83,9 @@ int fwnmi_active;  /* TRUE if an FWNMI h
 extern void pSeries_system_reset_exception(struct pt_regs *regs);
 extern int pSeries_machine_check_exception(struct pt_regs *regs);
 
+static int shared_idle(void);
+static int dedicated_idle(void);
+
 static volatile void __iomem * chrp_int_ack_special;
 struct mpic *pSeries_mpic;
 
@@ -229,6 +233,20 @@ static void __init pSeries_setup_arch(vo
 
        if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR)
                vpa_init(boot_cpuid);
+
+       /* Choose an idle loop */
+       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+               if (get_paca()->lppaca.shared_proc) {
+                       printk(KERN_INFO "Using shared processor idle loop\n");
+                       ppc_md.idle_loop = shared_idle;
+               } else {
+                       printk(KERN_INFO "Using dedicated idle loop\n");
+                       ppc_md.idle_loop = dedicated_idle;
+               }
+       } else {
+               printk(KERN_INFO "Using default idle loop\n");
+               ppc_md.idle_loop = default_idle;
+       }
 }
 
 static int __init pSeries_init_panel(void)
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to