All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
@ 2023-05-04 12:07 ` Alexandre Ghiti
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2023-05-04 12:07 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Björn Töpel,
	Alexandre Ghiti, linux-riscv, linux-kernel
  Cc: kernel test robot

kernel/pi gives rise to a lot of new sections that end up orphans: the
first attempt to fix that tried to enumerate them all in the linker
script, but kernel test robot with a random config keeps finding more of
them.

So prefix all those sections with .init.pi instead of only .init in
order to be able to easily catch them all in the linker script.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304301606.Cgp113Ha-lkp@intel.com/
Fixes: 26e7aacb83df ("riscv: Allow to downgrade paging mode from the command line")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
 arch/riscv/kernel/pi/Makefile   | 2 +-
 arch/riscv/kernel/vmlinux.lds.S | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/riscv/kernel/pi/Makefile b/arch/riscv/kernel/pi/Makefile
index 741b7bd3a84c..07915dc9279e 100644
--- a/arch/riscv/kernel/pi/Makefile
+++ b/arch/riscv/kernel/pi/Makefile
@@ -22,7 +22,7 @@ KCOV_INSTRUMENT	:= n
 
 $(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \
 			       --remove-section=.note.gnu.property \
-			       --prefix-alloc-sections=.init
+			       --prefix-alloc-sections=.init.pi
 $(obj)/%.pi.o: $(obj)/%.o FORCE
 	$(call if_changed,objcopy)
 
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 305877d85e96..e66e26640f63 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -84,11 +84,8 @@ SECTIONS
 	__init_data_begin = .;
 	INIT_DATA_SECTION(16)
 
-	/* Those sections result from the compilation of kernel/pi/string.c */
-	.init.pidata : {
-		*(.init.srodata.cst8*)
-		*(.init__bug_table*)
-		*(.init.sdata*)
+	.init.pi : {
+		*(.init.pi*)
 	}
 
 	.init.bss : {
-- 
2.37.2


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

* [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
@ 2023-05-04 12:07 ` Alexandre Ghiti
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2023-05-04 12:07 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Björn Töpel,
	Alexandre Ghiti, linux-riscv, linux-kernel
  Cc: kernel test robot

kernel/pi gives rise to a lot of new sections that end up orphans: the
first attempt to fix that tried to enumerate them all in the linker
script, but kernel test robot with a random config keeps finding more of
them.

So prefix all those sections with .init.pi instead of only .init in
order to be able to easily catch them all in the linker script.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304301606.Cgp113Ha-lkp@intel.com/
Fixes: 26e7aacb83df ("riscv: Allow to downgrade paging mode from the command line")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
 arch/riscv/kernel/pi/Makefile   | 2 +-
 arch/riscv/kernel/vmlinux.lds.S | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/riscv/kernel/pi/Makefile b/arch/riscv/kernel/pi/Makefile
index 741b7bd3a84c..07915dc9279e 100644
--- a/arch/riscv/kernel/pi/Makefile
+++ b/arch/riscv/kernel/pi/Makefile
@@ -22,7 +22,7 @@ KCOV_INSTRUMENT	:= n
 
 $(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \
 			       --remove-section=.note.gnu.property \
-			       --prefix-alloc-sections=.init
+			       --prefix-alloc-sections=.init.pi
 $(obj)/%.pi.o: $(obj)/%.o FORCE
 	$(call if_changed,objcopy)
 
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 305877d85e96..e66e26640f63 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -84,11 +84,8 @@ SECTIONS
 	__init_data_begin = .;
 	INIT_DATA_SECTION(16)
 
-	/* Those sections result from the compilation of kernel/pi/string.c */
-	.init.pidata : {
-		*(.init.srodata.cst8*)
-		*(.init__bug_table*)
-		*(.init.sdata*)
+	.init.pi : {
+		*(.init.pi*)
 	}
 
 	.init.bss : {
-- 
2.37.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
  2023-05-04 12:07 ` Alexandre Ghiti
@ 2023-05-10 18:46   ` Palmer Dabbelt
  -1 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2023-05-10 18:46 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, =C3=B6rn_T=C3=B6pel?=,
	linux-riscv, linux-kernel, Alexandre Ghiti
  Cc: kernel test robot


On Thu, 04 May 2023 14:07:59 +0200, Alexandre Ghiti wrote:
> kernel/pi gives rise to a lot of new sections that end up orphans: the
> first attempt to fix that tried to enumerate them all in the linker
> script, but kernel test robot with a random config keeps finding more of
> them.
> 
> So prefix all those sections with .init.pi instead of only .init in
> order to be able to easily catch them all in the linker script.
> 
> [...]

Applied, thanks!

[1/1] riscv: Fix orphan section warnings caused by kernel/pi
      https://git.kernel.org/palmer/c/3b90b09af5be

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


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

* Re: [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
@ 2023-05-10 18:46   ` Palmer Dabbelt
  0 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2023-05-10 18:46 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, =C3=B6rn_T=C3=B6pel?=,
	linux-riscv, linux-kernel, Alexandre Ghiti
  Cc: kernel test robot


On Thu, 04 May 2023 14:07:59 +0200, Alexandre Ghiti wrote:
> kernel/pi gives rise to a lot of new sections that end up orphans: the
> first attempt to fix that tried to enumerate them all in the linker
> script, but kernel test robot with a random config keeps finding more of
> them.
> 
> So prefix all those sections with .init.pi instead of only .init in
> order to be able to easily catch them all in the linker script.
> 
> [...]

Applied, thanks!

[1/1] riscv: Fix orphan section warnings caused by kernel/pi
      https://git.kernel.org/palmer/c/3b90b09af5be

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
  2023-05-04 12:07 ` Alexandre Ghiti
@ 2023-05-10 18:50   ` patchwork-bot+linux-riscv
  -1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-05-10 18:50 UTC (permalink / raw)
  To: Alexandre Ghiti
  Cc: linux-riscv, paul.walmsley, palmer, aou, bjorn, linux-kernel, lkp

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Thu,  4 May 2023 14:07:59 +0200 you wrote:
> kernel/pi gives rise to a lot of new sections that end up orphans: the
> first attempt to fix that tried to enumerate them all in the linker
> script, but kernel test robot with a random config keeps finding more of
> them.
> 
> So prefix all those sections with .init.pi instead of only .init in
> order to be able to easily catch them all in the linker script.
> 
> [...]

Here is the summary with links:
  - [-fixes] riscv: Fix orphan section warnings caused by kernel/pi
    https://git.kernel.org/riscv/c/3b90b09af5be

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] 6+ messages in thread

* Re: [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi
@ 2023-05-10 18:50   ` patchwork-bot+linux-riscv
  0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-05-10 18:50 UTC (permalink / raw)
  To: Alexandre Ghiti
  Cc: linux-riscv, paul.walmsley, palmer, aou, bjorn, linux-kernel, lkp

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Thu,  4 May 2023 14:07:59 +0200 you wrote:
> kernel/pi gives rise to a lot of new sections that end up orphans: the
> first attempt to fix that tried to enumerate them all in the linker
> script, but kernel test robot with a random config keeps finding more of
> them.
> 
> So prefix all those sections with .init.pi instead of only .init in
> order to be able to easily catch them all in the linker script.
> 
> [...]

Here is the summary with links:
  - [-fixes] riscv: Fix orphan section warnings caused by kernel/pi
    https://git.kernel.org/riscv/c/3b90b09af5be

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



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2023-05-10 18:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 12:07 [PATCH -fixes] riscv: Fix orphan section warnings caused by kernel/pi Alexandre Ghiti
2023-05-04 12:07 ` Alexandre Ghiti
2023-05-10 18:46 ` Palmer Dabbelt
2023-05-10 18:46   ` Palmer Dabbelt
2023-05-10 18:50 ` patchwork-bot+linux-riscv
2023-05-10 18:50   ` patchwork-bot+linux-riscv

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.