Skip to contentSkip to conversation

riscv: Fixup compile error with !MMU

PATCH Applied [email protected] 4 participants 5 messages Dec 7, 2022 – Dec 13, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Fixup compile error with !MMU

From: Guo Ren <[email protected]>

Current nommu_virt_defconfig can't compile:

In file included from arch/riscv/kernel/crash_core.c:3:
arch/riscv/kernel/crash_core.c:
In function 'arch_crash_save_vmcoreinfo':
arch/riscv/kernel/crash_core.c:8:27:
error: 'VA_BITS' undeclared (first use in this function)

    8 |         VMCOREINFO_NUMBER(VA_BITS);
      |                           ^~~~~~~

Add MMU dependency for KEXEC_FILE.

Fixes 6261586e0c91 ("RISC-V: Add kexec_file support")
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
index ef8d66de5f38..91319044fd13 100644
@@ -496,7 +496,7 @@ config KEXEC_FILE
 	select KEXEC_CORE
 	select KEXEC_ELF
 	select HAVE_IMA_KEXEC if IMA
-	depends on 64BIT
+	depends on 64BIT && MMU
 	help
 	  This is new version of kexec system call. This system call is
 	  file based and takes file descriptors as system call argument
Signature · 7 lines
2.36.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Wed, Dec 07, 2022 at 04:11:12AM -0500, [email protected] wrote:

From: Guo Ren <[email protected]>

Current nommu_virt_defconfig can't compile:

In file included from arch/riscv/kernel/crash_core.c:3:
arch/riscv/kernel/crash_core.c:
In function 'arch_crash_save_vmcoreinfo':
arch/riscv/kernel/crash_core.c:8:27:
error: 'VA_BITS' undeclared (first use in this function)

Quoted 7 lines
    8 |         VMCOREINFO_NUMBER(VA_BITS);
      |                           ^~~~~~~

Add MMU dependency for KEXEC_FILE.

Fixes 6261586e0c91 ("RISC-V: Add kexec_file support")

FWIW (but certainly don't resend for this)
s/[email protected]/[email protected]

Thanks for the quick fix, there's other issues w/ that config for me, but this fixed the kexec bits :)

Quoted 23 lines
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
index ef8d66de5f38..91319044fd13 100644
@@ -496,7 +496,7 @@ config KEXEC_FILE
 	select KEXEC_CORE
 	select KEXEC_ELF
 	select HAVE_IMA_KEXEC if IMA
-	depends on 64BIT
+	depends on 64BIT && MMU
 	help
 	  This is new version of kexec system call. This system call is
 	  file based and takes file descriptors as system call argument
Signature · 1 line
2.36.1
author
#2 lore raw
Quoted 20 lines · Conor Dooley
Quoted 10 lines · On Wed, Dec 07, 2022 at 04:11:12AM -0500, [email protected] wrote:

From: Guo Ren <[email protected]>

Current nommu_virt_defconfig can't compile:

In file included from arch/riscv/kernel/crash_core.c:3:
arch/riscv/kernel/crash_core.c:
In function 'arch_crash_save_vmcoreinfo':
arch/riscv/kernel/crash_core.c:8:27:
error: 'VA_BITS' undeclared (first use in this function)

Quoted 7 lines
    8 |         VMCOREINFO_NUMBER(VA_BITS);
      |                           ^~~~~~~

Add MMU dependency for KEXEC_FILE.

Fixes 6261586e0c91 ("RISC-V: Add kexec_file support")
Quoted 6 lines

FWIW (but certainly don't resend for this)
s/[email protected]/[email protected]

Thanks for the quick fix, there's other issues w/ that config for me, but this fixed the kexec bits :)

Thx for the report and test.

Quoted 24 lines
Quoted 24 lines
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -2
index ef8d66de5f38..91319044fd13 100644
@@ -496,7 +496,7 @@ config KEXEC_FILE
      select KEXEC_CORE
      select KEXEC_ELF
      select HAVE_IMA_KEXEC if IMA
-     depends on 64BIT
+     depends on 64BIT && MMU
      help
        This is new version of kexec system call. This system call is
        file based and takes file descriptors as system call argument
--

2.36.1

Signature · 7 lines
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#3 lore raw
In reply to [email protected]
Quoted 10 lines · On Wed, 7 Dec 2022 04:11:12 -0500, [email protected] wrote:

From: Guo Ren <[email protected]>

Current nommu_virt_defconfig can't compile:

In file included from arch/riscv/kernel/crash_core.c:3:
arch/riscv/kernel/crash_core.c:
In function 'arch_crash_save_vmcoreinfo':
arch/riscv/kernel/crash_core.c:8:27:
error: 'VA_BITS' undeclared (first use in this function)

Quoted 4 lines
    8 |         VMCOREINFO_NUMBER(VA_BITS);
      |                           ^~~~~~~

[...]

Applied, thanks!

[1/1] riscv: Fixup compile error with !MMU

      https://git.kernel.org/palmer/c/c528ef0888b7

Best regards,

Signature · 1 line
Palmer Dabbelt <[email protected]>
#4 lore raw
In reply to [email protected]
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 10 lines · On Wed, 7 Dec 2022 04:11:12 -0500 you wrote:

From: Guo Ren <[email protected]>

Current nommu_virt_defconfig can't compile:

In file included from arch/riscv/kernel/crash_core.c:3:
arch/riscv/kernel/crash_core.c:
In function 'arch_crash_save_vmcoreinfo':
arch/riscv/kernel/crash_core.c:8:27:
error: 'VA_BITS' undeclared (first use in this function)

Quoted 4 lines
    8 |         VMCOREINFO_NUMBER(VA_BITS);
      |                           ^~~~~~~

[...]

Here is the summary with links:
- riscv: Fixup compile error with !MMU

    https://git.kernel.org/riscv/c/c528ef0888b7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html