acrn-kernel/drivers/base
Huang Shijie 4431284f4a arm64: irq: set the correct node for VMAP stack
[ Upstream commit 75b5e0bf90bffaca4b1f19114065dc59f5cc161f ]

In current code, init_irq_stacks() will call cpu_to_node().
The cpu_to_node() depends on percpu "numa_node" which is initialized in:
     arch_call_rest_init() --> rest_init() -- kernel_init()
	--> kernel_init_freeable() --> smp_prepare_cpus()

But init_irq_stacks() is called in init_IRQ() which is before
arch_call_rest_init().

So in init_irq_stacks(), the cpu_to_node() does not work, it
always return 0. In NUMA, it makes the node 1 cpu accesses the IRQ stack which
is in the node 0.

This patch fixes it by:
  1.) export the early_cpu_to_node(), and use it in the init_irq_stacks().
  2.) change init_irq_stacks() to __init function.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20231124031513.81548-1-shijie@os.amperecomputing.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:12:46 +00:00
..
firmware_loader
power PM: sleep: Fix possible deadlocks in core system-wide PM code 2024-01-31 16:17:09 -08:00
regmap
test
Kconfig
Makefile
arch_numa.c arm64: irq: set the correct node for VMAP stack 2024-02-05 20:12:46 +00:00
arch_topology.c
attribute_container.c
auxiliary.c
base.h
bus.c
cacheinfo.c
class.c
component.c
container.c
core.c
cpu.c
dd.c
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
map.c
memory.c mm/memory_hotplug: add missing mem_hotplug_lock 2024-01-10 17:10:33 +01:00
module.c
node.c base/node.c: initialize the accessor list before registering 2024-01-25 15:27:46 -08:00
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c
platform.c
property.c device property: Allow const parameter to dev_fwnode() 2024-01-05 15:18:40 +01:00
soc.c
swnode.c software node: Let args be NULL in software_node_get_reference_args 2024-01-25 15:27:46 -08:00
syscore.c
topology.c
trace.c
trace.h
transport_class.c