[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56598C59.4070307@dev.rtsoft.ru>
Date: Sat, 28 Nov 2015 14:13:29 +0300
From: Nikita Yushchenko <nyushchenko@....rtsoft.ru>
To: Russell King - ARM Linux <linux@....linux.org.uk>
CC: kuznetsovg@....rtsoft.ru,
Vladimir Murzin <vladimir.murzin@....com>,
Ian Campbell <ian.campbell@...rix.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Mason <slash.tmp@...e.fr>, Will Deacon <will.deacon@....com>,
Paul Kocialkowski <contact@...lk.fr>,
linux-kernel@...r.kernel.org,
Masahiro Yamada <yamada.m@...panasonic.com>,
Pavel Machek <pavel@....cz>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC/PATCH] arm: do not skip SMP init calls on SMP_ON_UP case
>> Not sure I understand logic behind this. With the current code,
>> resulting cpu_possible_mask depends on CONFIG_SMP_ON_UP:
>> - if it is set, cpu_possible_mask contains (0 1), as initialized in
>> arm_dt_init_cpu_maps()
>> - if it is not set, cpu_possible_mask contains (0), since
>> imx_smp_init_cpus() removes 1 from there.
>
> Right, adding debug to arch/arm/kernel/setup.c, just before the
> "if (is_smp())" shows:
>
> is_smp() 0 possible 3 present 1 online 1
>
> which is totally wrong: if is_smp() is false, we should not be setting
> up any possible CPUs. See a patch below to fix that.
>
> However, this doesn't matter much, because the code in setup.c won't
> initialise the SMP operations struct ...
But cpu start code is not the only place in the kernel that uses cpu_present_mask.
Are you sure that running with invalid cpu_present_mask has no side effects?
> Here's the patch to fix the DT code, which should not be setting
> present CPUs when is_smp() is false.
I see that this fixes the issue as well.
But I still don't understand rationale behind all these is_smp() checks.
This makes init sequence different with and without CONFIG_SMP_ON_UP.
Isn't kernel intended to run ok without CONFIG_SMP_ON_UP?
And if yes - then why not run the same init sequence in both cases?
--
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