* sh cpu_data init broken for smp?
@ 2016-03-23 2:52 Rich Felker
0 siblings, 0 replies; only message in thread
From: Rich Felker @ 2016-03-23 2:52 UTC (permalink / raw)
To: linux-sh
The arch/sh/kernel/cpu/*/probe.c cpu_probe functions are run per-cpu
from cpu_init from head_32.S, but they fill boot_cpu_data with cpu &
cache properties rather than current_cpu_data. Most of the consumers
of this data (especially cache properties), however, use
current_cpu_data, which seems to be default-initialized to zero for
all but the boot cpu. I can't confirm this bug on legacy SH hardware
since I don't have any that does SMP, but it's present on my
in-progress J2 SMP work.
Possibly a global s/boot_cpu_data/current_cpu_data/ should be applied
to arch/sh/kernel/cpu/*/probe.c and a few other places, but I wonder
why this data is even kept per-cpu. Can we actually support having
cache structure and cpu properties vary per-cpu in an SMP setup? I
don't think so, and if not, I'd rather switch to having a single copy
of the cpu_data and eliminate cpu_probe except at boot time on the
boot cpu.
A related issue is that I want to replace the 'probe' results that are
actually just hard-coded with data from device tree, which is only
available in flat form this early in the boot.
Rich
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-23 2:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23 2:52 sh cpu_data init broken for smp? Rich Felker
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).