Skip to content

Commit 3b47bd8

Browse files
committed
Merge branch 'for-next/mm' into for-next/core
* for-next/mm: arm64: irq: set the correct node for shadow call stack arm64: irq: set the correct node for VMAP stack
2 parents 6518064 + 7b1a09e commit 3b47bd8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

arch/arm64/kernel/irq.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/vmalloc.h>
2323
#include <asm/daifflags.h>
2424
#include <asm/exception.h>
25+
#include <asm/numa.h>
2526
#include <asm/softirq_stack.h>
2627
#include <asm/stacktrace.h>
2728
#include <asm/vmap_stack.h>
@@ -47,17 +48,17 @@ static void init_irq_scs(void)
4748

4849
for_each_possible_cpu(cpu)
4950
per_cpu(irq_shadow_call_stack_ptr, cpu) =
50-
scs_alloc(cpu_to_node(cpu));
51+
scs_alloc(early_cpu_to_node(cpu));
5152
}
5253

5354
#ifdef CONFIG_VMAP_STACK
54-
static void init_irq_stacks(void)
55+
static void __init init_irq_stacks(void)
5556
{
5657
int cpu;
5758
unsigned long *p;
5859

5960
for_each_possible_cpu(cpu) {
60-
p = arch_alloc_vmap_stack(IRQ_STACK_SIZE, cpu_to_node(cpu));
61+
p = arch_alloc_vmap_stack(IRQ_STACK_SIZE, early_cpu_to_node(cpu));
6162
per_cpu(irq_stack_ptr, cpu) = p;
6263
}
6364
}

drivers/base/arch_numa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void __init early_map_cpu_to_node(unsigned int cpu, int nid)
144144
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
145145
EXPORT_SYMBOL(__per_cpu_offset);
146146

147-
static int __init early_cpu_to_node(int cpu)
147+
int __init early_cpu_to_node(int cpu)
148148
{
149149
return cpu_to_node_map[cpu];
150150
}

include/asm-generic/numa.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ int __init numa_add_memblk(int nodeid, u64 start, u64 end);
3535
void __init numa_set_distance(int from, int to, int distance);
3636
void __init numa_free_distance(void);
3737
void __init early_map_cpu_to_node(unsigned int cpu, int nid);
38+
int __init early_cpu_to_node(int cpu);
3839
void numa_store_cpu_info(unsigned int cpu);
3940
void numa_add_cpu(unsigned int cpu);
4041
void numa_remove_cpu(unsigned int cpu);
@@ -46,6 +47,7 @@ static inline void numa_add_cpu(unsigned int cpu) { }
4647
static inline void numa_remove_cpu(unsigned int cpu) { }
4748
static inline void arch_numa_init(void) { }
4849
static inline void early_map_cpu_to_node(unsigned int cpu, int nid) { }
50+
static inline int early_cpu_to_node(int cpu) { return 0; }
4951

5052
#endif /* CONFIG_NUMA */
5153

0 commit comments

Comments
 (0)