imx6q restart is broken

Matt Sealey matt at genesi-usa.com
Fri Aug 10 09:33:06 EDT 2012


On Thu, Aug 9, 2012 at 4:07 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Thu, Aug 09, 2012 at 02:03:13PM -0500, Matt Sealey wrote:
>> I have an irrelevant but possibly related question here; in
>> mm/proc-v7.S there's this snip of code;
>>
>> #ifdef CONFIG_SMP
>>         ALT_SMP(mrc     p15, 0, r0, c1, c0, 1)
>>         ALT_UP(mov      r0, #(1 << 6))          @ fake it for UP
>>         tst     r0, #(1 << 6)                   @ SMP/nAMP mode enabled?
>>         orreq   r0, r0, #(1 << 6)               @ Enable SMP/nAMP mode
>>         orreq   r0, r0, r10                     @ Enable CPU-specific SMP bits
>>         mcreq   p15, 0, r0, c1, c0, 1
>> #endif
>>
>> Which I am reading as, read the SMP bit from cp15 and see if it's
>> enabled, or on UP set the SMP bit and then write it back
>> regardless.
>>
>> On a system where !CONFIG_SMP but it's SMP-capable like i.MX6Q, ALT_UP
>> method will get used and the SMP bit will get
>> set regardless.
>
> I got here and stopped reading any further.  No, it doesn't work like
> that; you don't understand the assembly.
>
> Yes, you're right that the ALT_UP version will be used.  This sets r0
> to 1 << 6.  The very next instruction tests whether bit 6 is set in r0.
> The following three instructions will only be executed _if_ that bit
> was zero.

Right but, as I read it...

if (CONFIG_SMP)
   read cp15
else
   set bit to one to hack it
if (!smp)
  set smp
  write it back

So who unsets the SMP bit? When the core goes down does it clear it,
or are we just
being safe for CPU startup? Does it still have an effect in the chip
logic even if the core
is 'not plugged'?

What happens if you're in CONFIG_SMP and you say maxcpus=1?

> I'm assuming that the rest of your email is therefore irrelevant; I
> have no desire to continue reading such a long message when the premise
> it's (presumably) based upon is false.  If you have any further questions
> please restate them succinctly after taking on board the above.  Thanks.

Please read the rest... I just didn't write first my question properly.

-- 
Matt Sealey <matt at genesi-usa.com>
Product Development Analyst, Genesi USA, Inc.



More information about the linux-arm-kernel mailing list