aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-11 18:55:01 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-16 00:55:02 -0500
commitc6cb3b5f368bae67c0b258cfebc0b9dbd8e1d929 (patch)
treee50019d058117bac9530539ada13dc43af99bbcc /arch
parentcd9c99d7e5f75e137c2ea0cf693773d63c8d945c (diff)
[PATCH] powerpc: enable NAP only on cpus who support it to avoid memory corruption
This patch fixes incorrect setting of powersave_nap to 1 on all PowerMacs, potentially causing memory corruption on some models. This bug was introuced by me during the 32/64 bits merge. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/powermac/feature.c9
-rw-r--r--arch/powerpc/platforms/powermac/setup.c4
2 files changed, 4 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 34714d3ea69a..bbe794891a20 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -2491,9 +2491,7 @@ found:
2491 pmac_mb.model_id = PMAC_TYPE_COMET; 2491 pmac_mb.model_id = PMAC_TYPE_COMET;
2492 iounmap(mach_id_ptr); 2492 iounmap(mach_id_ptr);
2493 } 2493 }
2494#endif /* CONFIG_POWER4 */
2495 2494
2496#ifdef CONFIG_6xx
2497 /* Set default value of powersave_nap on machines that support it. 2495 /* Set default value of powersave_nap on machines that support it.
2498 * It appears that uninorth rev 3 has a problem with it, we don't 2496 * It appears that uninorth rev 3 has a problem with it, we don't
2499 * enable it on those. In theory, the flush-on-lock property is 2497 * enable it on those. In theory, the flush-on-lock property is
@@ -2522,10 +2520,11 @@ found:
2522 * NAP mode 2520 * NAP mode
2523 */ 2521 */
2524 powersave_lowspeed = 1; 2522 powersave_lowspeed = 1;
2525#endif /* CONFIG_6xx */ 2523
2526#ifdef CONFIG_POWER4 2524#else /* CONFIG_POWER4 */
2527 powersave_nap = 1; 2525 powersave_nap = 1;
2528#endif 2526#endif /* CONFIG_POWER4 */
2527
2529 /* Check for "mobile" machine */ 2528 /* Check for "mobile" machine */
2530 if (model && (strncmp(model, "PowerBook", 9) == 0 2529 if (model && (strncmp(model, "PowerBook", 9) == 0
2531 || strncmp(model, "iBook", 5) == 0)) 2530 || strncmp(model, "iBook", 5) == 0))
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 1955462f4082..29c2946f1c77 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -621,10 +621,6 @@ static void __init pmac_init_early(void)
621 /* Probe motherboard chipset */ 621 /* Probe motherboard chipset */
622 pmac_feature_init(); 622 pmac_feature_init();
623 623
624 /* We can NAP */
625 powersave_nap = 1;
626 printk(KERN_INFO "Using native/NAP idle loop\n");
627
628 /* Initialize debug stuff */ 624 /* Initialize debug stuff */
629 udbg_scc_init(!!strstr(cmd_line, "sccdbg")); 625 udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
630 udbg_adb_init(!!strstr(cmd_line, "btextdbg")); 626 udbg_adb_init(!!strstr(cmd_line, "btextdbg"));