lib/Kconfig.debug: add ARCH dependency for FUNCTION_ALIGN option
Subsystems (2)
PATCH 1/1 lib/Kconfig.debug: add ARCH dependency for FUNCTION_ALIGN option
0Day robots reported there is compiling issue for 'csky' ARCH when CONFIG_DEBUG_FORCE_DATA_SECTION_ALIGNED is enabled [1]:
"
All errors (new ones prefixed by >>):
{standard input}: Assembler messages:
Quoted 1 line
Quoted 1 line
{standard input}:2277: Error: pcrel offset for branch to .LS000B too far (
0x3c)
"
Which has been discussed in [2]. And as there is no solution for csky yet, add some dependency for this config to limit it to several ARCHs which have no compiling issue so far.
[1]. https://lore.kernel.org/lkml/[email protected]/
[2]. https://www.spinics.net/lists/linux-kbuild/msg30298.html
--- lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/Kconfig.debug +2 -2
@@ -401,8 +401,8 @@ config SECTION_MISMATCH_WARN_ONLY If unsure, say Y. config DEBUG_FORCE_FUNCTION_ALIGN_64B - bool "Force all function address 64B aligned" if EXPERT - depends on PPC || ARM || X86 + bool "Force all function address 64B aligned" + depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC) help There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance
Signature · 1 line
2.27.0
Andrew Morton
maintainerlib/Kconfig.debug config SECTION_MISMATCH_WARN_ONLY · line 405
Quoted 13 lines · On Thu, 3 Mar 2022 16:20:48 +0800 Feng Tang <[email protected]> wrote:
0Day robots reported there is compiling issue for 'csky' ARCH when
CONFIG_DEBUG_FORCE_DATA_SECTION_ALIGNEDis enabled [1]:...
lib/Kconfig.debug +0
-2@@ -401,8 +401,8 @@ config SECTION_MISMATCH_WARN_ONLY If unsure, say Y. config DEBUG_FORCE_FUNCTION_ALIGN_64B - bool "Force all function address 64B aligned" if EXPERT - depends on PPC || ARM || X86
I cannot find a kernel which contains the above line?
Quoted 5 lines
lib/Kconfig.debug +2
-0+ bool "Force all function address 64B aligned" + depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC) help There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance
Quoted 12 lines · Andrew Morton
Quoted 10 lines · On Thu, 3 Mar 2022 16:20:48 +0800 Feng Tang <[email protected]> wrote:
0Day robots reported there is compiling issue for 'csky' ARCH when
CONFIG_DEBUG_FORCE_DATA_SECTION_ALIGNEDis enabled [1]:...
lib/Kconfig.debug +0
-0@@ -401,8 +401,8 @@ config SECTION_MISMATCH_WARN_ONLY If unsure, say Y.
Quoted 5 lines
lib/Kconfig.debug config SECTION_MISMATCH_WARN_ONLY · line 405
Quoted 3 lines
lib/Kconfig.debug +0
-2config DEBUG_FORCE_FUNCTION_ALIGN_64B - bool "Force all function address 64B aligned" if EXPERT - depends on PPC || ARM || X86I cannot find a kernel which contains the above line?
Sorry. I generated the patch while forgetting to revert the older version
https://lore.kernel.org/lkml/[email protected]/
Here is the correct versin, thanks!
---
From 817dca1a74778979ba71ed362eac36feab5ac112 Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Fri, 4 Mar 2022 10:03:40 +0800
Subject: [PATCH] lib/Kconfig.debug: add ARCH dependency for FUNCTION_ALIGN
option
0Day robots reported there is compiling issue for 'csky' ARCH when CONFIG_DEBUG_FORCE_DATA_SECTION_ALIGNED is enabled [1]:
"
All errors (new ones prefixed by >>):
{standard input}: Assembler messages:
Quoted 1 line
lib/Kconfig.debug config SECTION_MISMATCH_WARN_ONLY · line 404
Quoted 1 line
lib/Kconfig.debug +0
-0{standard input}:2277: Error: pcrel offset for branch to .LS000B too far (0x3c)
"
Which has been discussed in [2]. And as there is no solution for csky yet, add some dependency for this config to limit it to several ARCHs which have no compiling issue so far.
[1]. https://lore.kernel.org/lkml/[email protected]/
[2]. https://www.spinics.net/lists/linux-kbuild/msg30298.html
--- lib/Kconfig.debug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/Kconfig.debug +2 -1
@@ -416,7 +416,8 @@ config SECTION_MISMATCH_WARN_ONLY If unsure, say Y. config DEBUG_FORCE_FUNCTION_ALIGN_64B - bool "Force all function address 64B aligned" if EXPERT + bool "Force all function address 64B aligned" + depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC) help There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance
Signature · 1 line
2.27.0