lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 2 Jun 2012 09:44:24 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	David Miller <davem@...emloft.net>, tglx@...utronix.de,
	peterz@...radead.org, paulmck@...ux.vnet.ibm.com,
	rusty@...tcorp.com.au, mingo@...nel.org, yong.zhang0@...il.com,
	akpm@...ux-foundation.org, vatsa@...ux.vnet.ibm.com, rjw@...k.pl,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	nikunj@...ux.vnet.ibm.com, vapier@...too.org, konrad@...sler.com,
	tkhai@...dex.ru, sparclinux@...r.kernel.org
Subject: Re: [UPDATED PATCH 21/27] sparc32, smpboot: Use generic SMP
	booting infrastructure

On Sat, Jun 02, 2012 at 08:52:49AM +0200, Sam Ravnborg wrote:
> Hi Srivatsa.
> 
> I cannot see how this would work for sparc32...
> [Did not notice before...]
> 
> > --- a/arch/sparc/kernel/leon_smp.c
> > +++ b/arch/sparc/kernel/leon_smp.c
> 
> > +void __cpuinit __cpu_pre_starting(void *unused)
> > +{
> > +	unsigned int cpuid = hard_smp_processor_id();
> >  
> > diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
> > index ddaea31..cd5367a 100644
> > --- a/arch/sparc/kernel/sun4d_smp.c
> > +++ b/arch/sparc/kernel/sun4d_smp.c
> 
> > +void __cpuinit __cpu_pre_starting(void *unused)
> > +{
> > +	unsigned int cpuid = hard_smp_processor_id();
> >  
> > diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
> > index 128af73..ed05f54 100644
> > --- a/arch/sparc/kernel/sun4m_smp.c
> > +++ b/arch/sparc/kernel/sun4m_smp.c
> 
> > +void __cpuinit __cpu_pre_starting(void *unused)
> > +{
> > +	unsigned int cpuid = hard_smp_processor_id();
> 
> See how you define a function with the same name three times.
> On sparc32 we include all of the above files in the kernel,
> and uses various tricks to determine at run-time
> which variant to use.
> 
> We need to define these general functions in smp_32.c and
> then take relevant action depending on sparc_cpu_model.

I took a short look at this.
And it is a bit complicated :-(

leon is the odd-one here. For reasons I do not understand
we have a call from head_32.S to leon_smp_cpu_startup:
in trampoline_32.S.

But sun4m and sun4d uses the normal path via start_kernel() etc.

This has the side-effect that sparc_cpu_model is not set
when we call leon_smp_cpu_startup.

I will try to dive into this and see if I on the sparc32 side
can make leon behave like the other platforms, and then 
unify some of the smp cpu boot stuff such that we then
can introduce the generalization from your patch.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ