public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o
@ 2023-12-01  6:25 Baoquan He
  2023-12-04  8:34 ` Baoquan He
  2024-01-20 21:09 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: Baoquan He @ 2023-12-01  6:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-riscv, kexec, mick, changbin.du, paul.walmsley, palmer, aou,
	Baoquan He

This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec
support").

It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since
we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set
CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE.
In these cases, the AFLAGS won't take effect with the current ifdeffery
for AFLAGS_kexec_relocate.o.

So fix it now.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 arch/riscv/kernel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index fee22a3d1b53..82940b6a79a2 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -11,7 +11,7 @@ endif
 CFLAGS_syscall_table.o	+= $(call cc-option,-Wno-override-init,)
 CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
 
-ifdef CONFIG_KEXEC
+ifdef CONFIG_KEXEC_CORE
 AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
 endif
 
-- 
2.41.0


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

* Re: [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o
  2023-12-01  6:25 [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Baoquan He
@ 2023-12-04  8:34 ` Baoquan He
  2024-01-20 21:09 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Baoquan He @ 2023-12-04  8:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-riscv, kexec, akpm, mick, changbin.du, paul.walmsley,
	palmer, aou

CC Andrew.

On 12/01/23 at 02:25pm, Baoquan He wrote:
> This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec
> support").
> 
> It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since
> we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set
> CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE.
> In these cases, the AFLAGS won't take effect with the current ifdeffery
> for AFLAGS_kexec_relocate.o.
> 
> So fix it now.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>
> ---
>  arch/riscv/kernel/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi RISC-V people,

I didn't test this, while believe this need be fixed. Please help check
if this is necessary.


Thanks
Baoquan
> 
> diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
> index fee22a3d1b53..82940b6a79a2 100644
> --- a/arch/riscv/kernel/Makefile
> +++ b/arch/riscv/kernel/Makefile
> @@ -11,7 +11,7 @@ endif
>  CFLAGS_syscall_table.o	+= $(call cc-option,-Wno-override-init,)
>  CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,)
>  
> -ifdef CONFIG_KEXEC
> +ifdef CONFIG_KEXEC_CORE
>  AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
>  endif
>  
> -- 
> 2.41.0
> 


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

* Re: [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o
  2023-12-01  6:25 [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Baoquan He
  2023-12-04  8:34 ` Baoquan He
@ 2024-01-20 21:09 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-01-20 21:09 UTC (permalink / raw)
  To: Baoquan He
  Cc: linux-riscv, linux-kernel, kexec, mick, changbin.du,
	paul.walmsley, palmer, aou

Hello:

This patch was applied to riscv/linux.git (fixes)
by Andrew Morton <akpm@linux-foundation.org>:

On Fri,  1 Dec 2023 14:25:38 +0800 you wrote:
> This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec
> support").
> 
> It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since
> we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set
> CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE.
> In these cases, the AFLAGS won't take effect with the current ifdeffery
> for AFLAGS_kexec_relocate.o.
> 
> [...]

Here is the summary with links:
  - riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o
    https://git.kernel.org/riscv/c/d53a154cdc54

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-01-20 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-01  6:25 [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Baoquan He
2023-12-04  8:34 ` Baoquan He
2024-01-20 21:09 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox