* [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx
@ 2013-12-15 18:38 Christian Engelmayer
2013-12-16 0:10 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Christian Engelmayer @ 2013-12-15 18:38 UTC (permalink / raw)
To: linuxppc-dev
Moved arch/powerpc/sysdev/mpic.c : smp_mpic_probe() out of the __init section.
It is referenced by arch/powerpc/platforms/85xx/smp.c : smp_85xx_setup_cpu().
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
---
arch/powerpc/sysdev/mpic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 0e166ed..72c1e65 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1924,7 +1924,7 @@ void smp_mpic_message_pass(int cpu, int msg)
msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask);
}
-int __init smp_mpic_probe(void)
+int smp_mpic_probe(void)
{
int nr_cpus;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx
2013-12-15 18:38 [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx Christian Engelmayer
@ 2013-12-16 0:10 ` Benjamin Herrenschmidt
2013-12-19 23:00 ` Christian Engelmayer
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2013-12-16 0:10 UTC (permalink / raw)
To: Christian Engelmayer; +Cc: linuxppc-dev
On Sun, 2013-12-15 at 19:38 +0100, Christian Engelmayer wrote:
> Moved arch/powerpc/sysdev/mpic.c : smp_mpic_probe() out of the __init section.
> It is referenced by arch/powerpc/platforms/85xx/smp.c : smp_85xx_setup_cpu().
I don't like this. The reference is not actually going to call into the
code at all and as such is not an error, it's just a pointer comparison.
If there is no way to silence the warning, then I'd suggest to use a
global flag, something like mpc85xx_pic_type and test that instead
of comparing the pointers.
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> ---
> arch/powerpc/sysdev/mpic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 0e166ed..72c1e65 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -1924,7 +1924,7 @@ void smp_mpic_message_pass(int cpu, int msg)
> msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask);
> }
>
> -int __init smp_mpic_probe(void)
> +int smp_mpic_probe(void)
> {
> int nr_cpus;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx
2013-12-16 0:10 ` Benjamin Herrenschmidt
@ 2013-12-19 23:00 ` Christian Engelmayer
2014-01-28 21:14 ` Christian Engelmayer
0 siblings, 1 reply; 4+ messages in thread
From: Christian Engelmayer @ 2013-12-19 23:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Scott Wood; +Cc: linuxppc-dev, Kevin Hao
On Mon, 16 Dec 2013 11:10:53 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Sun, 2013-12-15 at 19:38 +0100, Christian Engelmayer wrote:
> > Moved arch/powerpc/sysdev/mpic.c : smp_mpic_probe() out of the __init section.
> > It is referenced by arch/powerpc/platforms/85xx/smp.c : smp_85xx_setup_cpu().
>
> I don't like this. The reference is not actually going to call into the
> code at all and as such is not an error, it's just a pointer comparison.
That's correct. I proposed it that way because on first sight I was concerned
that there is an address of an __init function assigned to a function pointer
within a non __initdata struct at all that can be compared against. However,
further usage of smp_ops->probe is currently safe of course and *_ops symbols
within .data are whitelisted to refer to init sections.
> If there is no way to silence the warning, then I'd suggest to use a
> global flag, something like mpc85xx_pic_type and test that instead
> of comparing the pointers.
I've seen that there is currently a patch proposed against
commit dc2c9c52b604f51b1416ed87ff54a1c77a1a8b5b
powerpc/85xx: Set up doorbells even with no mpic
that introduced the section causing the warning:
http://patchwork.ozlabs.org/patch/289214/
powerpc/85xx: don't init the mpic ipi for the SoC which has doorbell support
This patch also removes the affected pointer comparison and if accepted would
thus also silence this warning.
> > Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> > ---
> > arch/powerpc/sysdev/mpic.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > index 0e166ed..72c1e65 100644
> > --- a/arch/powerpc/sysdev/mpic.c
> > +++ b/arch/powerpc/sysdev/mpic.c
> > @@ -1924,7 +1924,7 @@ void smp_mpic_message_pass(int cpu, int msg)
> > msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask);
> > }
> >
> > -int __init smp_mpic_probe(void)
> > +int smp_mpic_probe(void)
> > {
> > int nr_cpus;
> >
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx
2013-12-19 23:00 ` Christian Engelmayer
@ 2014-01-28 21:14 ` Christian Engelmayer
0 siblings, 0 replies; 4+ messages in thread
From: Christian Engelmayer @ 2014-01-28 21:14 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Scott Wood, linuxppc-dev, Kevin Hao
On Fri, 20 Dec 2013 00:00:41 +0100, Christian Engelmayer <cengelma@gmx.at> wrote:
> On Mon, 16 Dec 2013 11:10:53 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > On Sun, 2013-12-15 at 19:38 +0100, Christian Engelmayer wrote:
> > > Moved arch/powerpc/sysdev/mpic.c : smp_mpic_probe() out of the __init section.
> > > It is referenced by arch/powerpc/platforms/85xx/smp.c : smp_85xx_setup_cpu().
> >
> > I don't like this. The reference is not actually going to call into the
> > code at all and as such is not an error, it's just a pointer comparison.
>
> That's correct. I proposed it that way because on first sight I was concerned
> that there is an address of an __init function assigned to a function pointer
> within a non __initdata struct at all that can be compared against. However,
> further usage of smp_ops->probe is currently safe of course and *_ops symbols
> within .data are whitelisted to refer to init sections.
>
> > If there is no way to silence the warning, then I'd suggest to use a
> > global flag, something like mpc85xx_pic_type and test that instead
> > of comparing the pointers.
>
> I've seen that there is currently a patch proposed against
>
> commit dc2c9c52b604f51b1416ed87ff54a1c77a1a8b5b
> powerpc/85xx: Set up doorbells even with no mpic
>
> that introduced the section causing the warning:
>
> http://patchwork.ozlabs.org/patch/289214/
> powerpc/85xx: don't init the mpic ipi for the SoC which has doorbell support
>
> This patch also removes the affected pointer comparison and if accepted would
> thus also silence this warning.
Kevin's change (powerpc/85xx: don't init the mpic ipi for the SoC which has
doorbell support) entered mainline by merge 1b17366d. I verified that the
issue is thereby solved and my patch obsolete.
http://patchwork.ozlabs.org/patch/301402/
Regards,
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-28 21:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-15 18:38 [PATCH] powerpc/sysdev: Fix a mpic section mismatch for MPC85xx Christian Engelmayer
2013-12-16 0:10 ` Benjamin Herrenschmidt
2013-12-19 23:00 ` Christian Engelmayer
2014-01-28 21:14 ` Christian Engelmayer
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).