LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: irq: set the correct node for shadow call stack
@ 2023-12-13  1:20 Huang Shijie
  2023-12-13 11:01 ` Catalin Marinas
  2023-12-13 17:25 ` Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Huang Shijie @ 2023-12-13  1:20 UTC (permalink / raw
  To: catalin.marinas
  Cc: patches, will, linux-arm-kernel, linux-kernel, Huang Shijie

The init_irq_stacks() has been changed to use the correct node:
https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=75b5e0bf90bf

The init_irq_scs() has the same issue with init_irq_stacks():
	cpu_to_node() is not initialized yet, it does not work.

This patch uses early_cpu_to_node() to set the init_irq_scs()
with the correct node.

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
---
 arch/arm64/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
index 9f253d8efe90..85087e2df564 100644
--- a/arch/arm64/kernel/irq.c
+++ b/arch/arm64/kernel/irq.c
@@ -48,7 +48,7 @@ static void init_irq_scs(void)
 
 	for_each_possible_cpu(cpu)
 		per_cpu(irq_shadow_call_stack_ptr, cpu) =
-			scs_alloc(cpu_to_node(cpu));
+			scs_alloc(early_cpu_to_node(cpu));
 }
 
 #ifdef CONFIG_VMAP_STACK
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: irq: set the correct node for shadow call stack
  2023-12-13  1:20 [PATCH] arm64: irq: set the correct node for shadow call stack Huang Shijie
@ 2023-12-13 11:01 ` Catalin Marinas
  2023-12-13 17:25 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2023-12-13 11:01 UTC (permalink / raw
  To: Huang Shijie; +Cc: patches, will, linux-arm-kernel, linux-kernel

On Wed, Dec 13, 2023 at 09:20:46AM +0800, Huang Shijie wrote:
> The init_irq_stacks() has been changed to use the correct node:
> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=75b5e0bf90bf
> 
> The init_irq_scs() has the same issue with init_irq_stacks():
> 	cpu_to_node() is not initialized yet, it does not work.
> 
> This patch uses early_cpu_to_node() to set the init_irq_scs()
> with the correct node.
> 
> Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: irq: set the correct node for shadow call stack
  2023-12-13  1:20 [PATCH] arm64: irq: set the correct node for shadow call stack Huang Shijie
  2023-12-13 11:01 ` Catalin Marinas
@ 2023-12-13 17:25 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2023-12-13 17:25 UTC (permalink / raw
  To: Huang Shijie, catalin.marinas
  Cc: kernel-team, Will Deacon, linux-kernel, patches, linux-arm-kernel

On Wed, 13 Dec 2023 09:20:46 +0800, Huang Shijie wrote:
> The init_irq_stacks() has been changed to use the correct node:
> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=75b5e0bf90bf
> 
> The init_irq_scs() has the same issue with init_irq_stacks():
> 	cpu_to_node() is not initialized yet, it does not work.
> 
> This patch uses early_cpu_to_node() to set the init_irq_scs()
> with the correct node.
> 
> [...]

Applied to arm64 (for-next/mm), thanks!

[1/1] arm64: irq: set the correct node for shadow call stack
      https://git.kernel.org/arm64/c/7b1a09e44dc6

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-13 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13  1:20 [PATCH] arm64: irq: set the correct node for shadow call stack Huang Shijie
2023-12-13 11:01 ` Catalin Marinas
2023-12-13 17:25 ` Will Deacon

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 read-only IMAP folder(s) and NNTP newsgroup(s).