[PATCH v2 1/8] powerpc/fsl_booke: protect the access to MAS7 with MMU_FTR_BIG_PHYS
Kevin Hao
haokexin at gmail.com
Sun Aug 4 10:30:03 EST 2013
On Fri, Jul 26, 2013 at 06:14:00PM -0500, Scott Wood wrote:
> On 07/04/2013 07:54:07 AM, Kevin Hao wrote:
> >diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
> >b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
> >index a92c79b..2201f84 100644
> >--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
> >+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
> >@@ -88,9 +88,11 @@ skpinv: addi r6,r6,1 /* Increment */
> > 1: mflr r7
> >
> > mfspr r8,SPRN_MAS3
> >-#ifdef CONFIG_PHYS_64BIT
> >+BEGIN_MMU_FTR_SECTION
> > mfspr r23,SPRN_MAS7
> >-#endif
> >+MMU_FTR_SECTION_ELSE
> >+ li r23,0
> >+ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_BIG_PHYS)
> > and r8,r6,r8
> > subfic r9,r6,-4096
> > and r9,r9,r7
> >diff --git a/arch/powerpc/kernel/head_fsl_booke.S
> >b/arch/powerpc/kernel/head_fsl_booke.S
> >index d10a7ca..a04a48d 100644
> >--- a/arch/powerpc/kernel/head_fsl_booke.S
> >+++ b/arch/powerpc/kernel/head_fsl_booke.S
> >@@ -82,7 +82,11 @@ _ENTRY(_start);
> > and r19,r3,r18 /* r19 = page offset */
> > andc r31,r20,r18 /* r31 = page base */
> > or r31,r31,r19 /* r31 = devtree phys addr */
> >+BEGIN_MMU_FTR_SECTION
> > mfspr r30,SPRN_MAS7
> >+MMU_FTR_SECTION_ELSE
> >+ li r30,0
> >+ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_BIG_PHYS)
>
> Code patching hasn't been done yet at this point.
Indeed. I overlooked this. I will change it to #ifdef CONFIG_PHYS_64BIT.
Thanks,
Kevin
>
> -Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130804/c9ed758d/attachment.sig>
More information about the Linuxppc-dev
mailing list