[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFAt38F-YQUVNXEnLut0tMivYUy_OTK7G4wAHfddcmncsEpREQ@mail.gmail.com>
Date: Tue, 24 Dec 2019 09:35:16 +0800
From: Yingjie Bai <byj.tea@...il.com>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: yingjie_bai@....com, Scott Wood <oss@...error.net>,
Kumar Gala <galak@...nel.crashing.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/mpc85xx: also write addr_h to spin table for
64bit boot entry
Hi Michael,
Thanks for pointing out the issue. My mistake...
This patch should indeed make sense only when
CONFIG_PHYS_64BIT=y
I could not find corenet32_smp_defconfig, but I guess in your config,
CONFIG_PHYS_64BIT=n ?
I will update the patch later today
On Sun, Dec 22, 2019 at 5:38 PM Michael Ellerman <mpe@...erman.id.au> wrote:
>
> yingjie_bai@....com writes:
> > From: Bai Yingjie <byj.tea@...il.com>
> >
> > CPU like P4080 has 36bit physical address, its DDR physical
> > start address can be configured above 4G by LAW registers.
> >
> > For such systems in which their physical memory start address was
> > configured higher than 4G, we need also to write addr_h into the spin
> > table of the target secondary CPU, so that addr_h and addr_l together
> > represent a 64bit physical address.
> > Otherwise the secondary core can not get correct entry to start from.
> >
> > This should do no harm for normal case where addr_h is all 0.
> >
> > Signed-off-by: Bai Yingjie <byj.tea@...il.com>
> > ---
> > arch/powerpc/platforms/85xx/smp.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
> > index 8c7ea2486bc0..f12cdd1e80ff 100644
> > --- a/arch/powerpc/platforms/85xx/smp.c
> > +++ b/arch/powerpc/platforms/85xx/smp.c
> > @@ -252,6 +252,14 @@ static int smp_85xx_start_cpu(int cpu)
> > out_be64((u64 *)(&spin_table->addr_h),
> > __pa(ppc_function_entry(generic_secondary_smp_init)));
> > #else
> > + /*
> > + * We need also to write addr_h to spin table for systems
> > + * in which their physical memory start address was configured
> > + * to above 4G, otherwise the secondary core can not get
> > + * correct entry to start from.
> > + * This does no harm for normal case where addr_h is all 0.
> > + */
> > + out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
> > out_be32(&spin_table->addr_l, __pa(__early_start));
>
> This breaks the corenet32_smp_defconfig build:
>
> /linux/arch/powerpc/platforms/85xx/smp.c: In function 'smp_85xx_start_cpu':
> /linux/arch/powerpc/platforms/85xx/smp.c:262:52: error: right shift count >= width of type [-Werror=shift-count-overflow]
> 262 | out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
> | ^~
> cc1: all warnings being treated as errors
>
> cheers
Powered by blists - more mailing lists