* [RFC] powerpc/8xxx: Clean up setting of CPU_FTR_NEED_COHERENT
@ 2009-03-17 4:59 Grant Likely
2009-03-18 0:42 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Grant Likely @ 2009-03-17 4:59 UTC (permalink / raw)
To: galak, benh, linuxppc-dev
From: Grant Likely <grant.likely@secretlab.ca>
Method used to set CPU_FTR_NEED_COHERENT was unfriendly for multiplatform
kernels. This patch cleans it up.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
I haven't even compile tested this. But I want to see if there are any
objections before I do the legwork.
g.
arch/powerpc/include/asm/cputable.h | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 48d7f5f..a36494e 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -242,8 +242,7 @@ extern const char *powerpc_base_platform;
* 74[45]x and an MPC107 host bridge. Also 83xx and PowerQUICC II
* require it for PCI "streaming/prefetch" to work properly.
*/
-#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \
- || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260)
+#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE)
#define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT
#else
#define CPU_FTR_COMMON 0
@@ -347,7 +346,7 @@ extern const char *powerpc_base_platform;
CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \
CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
#define CPU_FTRS_82XX (CPU_FTR_COMMON | \
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB)
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_NEED_COHERENT)
#if defined(CONFIG_PPC_MPC52xx)
#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
@@ -359,10 +358,10 @@ extern const char *powerpc_base_platform;
#define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \
- CPU_FTR_COMMON)
+ CPU_FTR_COMMON | CPU_FTR_NEED_COHERENT)
#define CPU_FTRS_E300C2 (CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \
- CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE)
+ CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE | CPU_FTR_NEED_COHERENT)
#define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_USE_TB)
#define CPU_FTRS_8XX (CPU_FTR_USE_TB)
#define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC] powerpc/8xxx: Clean up setting of CPU_FTR_NEED_COHERENT
2009-03-17 4:59 [RFC] powerpc/8xxx: Clean up setting of CPU_FTR_NEED_COHERENT Grant Likely
@ 2009-03-18 0:42 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2009-03-18 0:42 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
> diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
> index 48d7f5f..a36494e 100644
> --- a/arch/powerpc/include/asm/cputable.h
> +++ b/arch/powerpc/include/asm/cputable.h
> @@ -242,8 +242,7 @@ extern const char *powerpc_base_platform;
> * 74[45]x and an MPC107 host bridge. Also 83xx and PowerQUICC II
> * require it for PCI "streaming/prefetch" to work properly.
> */
> -#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \
> - || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260)
> +#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE)
> #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT
> #else
> #define CPU_FTR_COMMON 0
Even the above sucks but at this stage, it's hard to do better. We
really need to fix ppc32 so that the feature fixup is done -after- the
platform probe, so that the platform gets a chance to stick in the bit
when needed.
Ben.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-18 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-17 4:59 [RFC] powerpc/8xxx: Clean up setting of CPU_FTR_NEED_COHERENT Grant Likely
2009-03-18 0:42 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).