From c6cb3b5f368bae67c0b258cfebc0b9dbd8e1d929 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Sun, 12 Mar 2006 10:55:01 +1100 Subject: [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 Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/powermac/feature.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'arch/powerpc/platforms/powermac/feature.c') 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: pmac_mb.model_id = PMAC_TYPE_COMET; iounmap(mach_id_ptr); } -#endif /* CONFIG_POWER4 */ -#ifdef CONFIG_6xx /* Set default value of powersave_nap on machines that support it. * It appears that uninorth rev 3 has a problem with it, we don't * enable it on those. In theory, the flush-on-lock property is @@ -2522,10 +2520,11 @@ found: * NAP mode */ powersave_lowspeed = 1; -#endif /* CONFIG_6xx */ -#ifdef CONFIG_POWER4 + +#else /* CONFIG_POWER4 */ powersave_nap = 1; -#endif +#endif /* CONFIG_POWER4 */ + /* Check for "mobile" machine */ if (model && (strncmp(model, "PowerBook", 9) == 0 || strncmp(model, "iBook", 5) == 0)) -- cgit