From: Grant Likely <grant.likely@secretlab.ca>
To: Piotr Ziecik <kosmo@semihalf.com>
Cc: LinuxPPC Mailing List <linuxppc-dev@ozlabs.org>,
Kumar Gala <kumar.gala@freescale.com>
Subject: Re: [PATCH] powerpc: Enable CPU_FTR_NEED_COHERENT for MPC52xx
Date: Mon, 16 Mar 2009 22:43:58 -0600 [thread overview]
Message-ID: <fa686aa40903162143j5f641d7dob53b96b681737e07@mail.gmail.com> (raw)
In-Reply-To: <fa686aa40903162054v2d28fc2er53aa4f71837110a2@mail.gmail.com>
On Mon, Mar 16, 2009 at 9:54 PM, Grant Likely <grant.likely@secretlab.ca> w=
rote:
> On Mon, Mar 16, 2009 at 4:05 AM, Piotr Ziecik <kosmo@semihalf.com> wrote:
>> BestComm, a DMA engine in MPC52xx SoC, requires snooping when
>> CPU caches are enabled to work properly.
>>
>> Adding CPU_FTR_NEED_COHERENT fixes NFS problems on MPC52xx machines
>> introduced by 'powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup c=
ode'.
>>[...]
>> =A0#if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \
>> - =A0 =A0 =A0 || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260)
>> + =A0 =A0 =A0 || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260) \
>> + =A0 =A0 =A0 || defined(CONFIG_PPC_MPC52xx)
>> =A0#define CPU_FTR_COMMON =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0CPU_FTR_NEE=
D_COHERENT
>> =A0#else
>> =A0#define CPU_FTR_COMMON =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00
>
> Aside from the fact that MPC10X_BRIDGE, PPC83xx and 8260 are already
> doing it, adding the feature bit this way isn't multiplatform
> friendly. =A0Essentially it means that all selected platforms will have
> CPU_FTR_NEED_COHERENT enabled if CONFIG_PPC_MPC52xx is enabled.
Here's my counter-patch. It contains the change to just G2_LE cores
when MPC52xx is selected. However, this change will also affect some
of the MPC82xx parts. However CPU_FTR_NEED_COHERENT shouldn't
actually hurt anything, so maybe it would be better to just enable it
unconditionally for the G2_LE core.
Kumar/Ben, thoughts?
g.
---
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm=
/cput
index 4911104..48d7f5f 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -348,8 +348,15 @@ extern const char *powerpc_base_platform;
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)
+
+#if defined(CONFIG_PPC_MPC52xx)
+#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
+ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NEED_COHERENT)
+#else
#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP)
+#endif
+
#define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \
CPU_FTR_COMMON)
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2009-03-17 4:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 15:08 NFS problems on a MPC5200-based board Bartłomiej Sięka
2009-03-11 21:39 ` Benjamin Herrenschmidt
2009-03-11 22:26 ` Gerhard Pircher
2009-03-16 10:05 ` [PATCH] powerpc: Enable CPU_FTR_NEED_COHERENT for MPC52xx Piotr Ziecik
2009-03-17 3:54 ` Grant Likely
2009-03-17 4:43 ` Grant Likely [this message]
2009-03-17 12:10 ` Kumar Gala
2009-03-17 13:45 ` Grant Likely
2009-03-17 13:49 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa686aa40903162143j5f641d7dob53b96b681737e07@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=kosmo@semihalf.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).