* [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64
@ 2026-09-19 15:14 Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler Maciej W. Rozycki
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
Hi Thomas,
I chose to rework this patchset on behalf of WangYuli after all; I'm not
sure if his address cc'd works. I've reordered the changes to put fixes
ahead of improvements and reworded the piece of inline documentation for
the KBUILD_SYM32 option since, frankly, the one we have now is hard to
comprehend.
I have verified this patchset with my 5000/150. Please apply.
Previous iteration (v2) at
<https://lore.kernel.org/r/24EC7D2CA58B25F5+20250422101855.136675-1-wangyuli@uniontech.com/>.
The original cover letter follows.
Maciej
[ Part 1 ]: MIPS: dec: Only check -msym32 when need compiler
During 'make modules_install', the need-compiler variable becomes
null, so Makefile.compiler isn't included.
This results in call cc-option-yn returning nothing.
For more technical details on why need-compiler is null during
'make modules_install' and why no compiler invocation is actually
needed at this point, please refer to commit 4fe4a6374c4d ("MIPS:
Only fiddle with CHECKFLAGS if need-compiler") and commit
805b2e1d427a ("kbuild: include Makefile.compiler only when compiler
is needed").
Commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS
`modules_install' regression") tried to fix the same issue but it
caused a compile error on clang compiler because it doesn't support
'-msym32'. Then, commit 18ca63a2e23c ("MIPS: Probe toolchain support
of -msym32") fixed it but reintroduced the CONFIG_CPU_DADDI_WORKAROUNDS
`modules_install' regression.
Wrapping this entire code block with #ifdef need-compiler to avoid
all issues is the best solution for now.
To get rid of spurious "CONFIG_CPU_DADDI_WORKAROUNDS unsupported
without -msym32" error.
Moreover, I also identified an unnecessary check for KBUILD_SYM32
in this Makefile section. Eliminate it for code simplification.
NOTE:
It is particularly important to note that this code fix does not
imply that we have resolved the problem entirely.
In fact, the entire application of cc-option and its auxiliary
commands within the kernel codebase currently carries significant
risk.
When we execute make modules_install, the Makefile for the
corresponding architecture under arch/subarches/Makefile is
invariably included. Within these files, there are numerous
usages of cc-option and its auxiliary commands, all of which will
return empty strings. The reason other architectures can
successfully complete compilation under these circumstances is
purely because they do not, unlike MIPS, check the return values
of cc-option and its auxiliary commands within their Makefiles
and halt the compilation process when the expected results are
not received.
A feasible approach to remediation might be to encapsulate all
usages of cc-option and its auxiliary commands within conditional
statements across all architecture Makefiles, preventing their
execution entirely during make modules_install.
However, this would lead to a massive number of inelegant
modifications, and these broader implications may require
deliberation by Masahiro Yamada.
Regardless, this does not preclude us from addressing the
issue on MIPS first.
Link: https://lore.kernel.org/all/41107E6D3A125047+20250211135616.1807966-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/F49F5EE9975F29EA+20250214094758.172055-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/8ABBF323414AEF93+20250217142541.48149-1-wangyuli@uniontech.com/
[ Part 2 ]: MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors
Patch ("MIPS: dec: Only check -msym32 when need compiler") allows
us to compile kernel image packages with decstation_64_defconfig.
However, compilation warnings remain during the build.
Address these warnings and enable CONFIG_WERROR for decstation_64_defconfig.
Link: https://lore.kernel.org/all/487CE8AA937621E2+20250218125101.663980-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/EA0AFB15DDCF65C1+20250227141949.1129536-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/303EFD6BFBDAC7C8+20250305033436.31214-1-wangyuli@uniontech.com/
[ Changelog: ]
*v1->v2: Add Philippe Mathieu-Daudé's "Reviewed-by" tag in patch3.
Link: https://lore.kernel.org/all/11740B01E659CAFF+20250407073158.493183-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/8dcb5c6d-be4f-4891-a999-137d53edfc05@linaro.org/
WangYuli (6):
MIPS: dec: Only check -msym32 when need compiler
MIPS: Eliminate Redundant KBUILD_SYM32 Checks
MIPS: dec: Create reset.h
MIPS: dec: Remove dec_irq_dispatch()
MIPS: decstation_64_defconfig: Update configs dependencies
MIPS: decstation_64_defconfig: Compile the kernel with warnings as
errors
arch/mips/Makefile | 6 ++--
arch/mips/configs/decstation_64_defconfig | 43 +++++++++--------------
arch/mips/dec/int-handler.S | 2 +-
arch/mips/dec/prom/init.c | 3 +-
arch/mips/dec/reset.c | 2 ++
arch/mips/dec/setup.c | 15 ++------
arch/mips/include/asm/dec/reset.h | 20 +++++++++++
7 files changed, 47 insertions(+), 44 deletions(-)
create mode 100644 arch/mips/include/asm/dec/reset.h
--
2.49.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-21 14:54 ` Chen Linxuan
2026-09-19 15:14 ` [PATCH v3 2/7] MIPS: dec: Add missing <linux/interrupt.h> inclusion to reset.h Maciej W. Rozycki
` (7 subsequent siblings)
8 siblings, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
During 'make modules_install', the need-compiler variable is null, so
Makefile.compiler isn't included. This results in call cc-option-yn
returning nothing and consequently an error is issued:
*** CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32. Stop.
and the invocation terminated for configurations that set the Kconfig
option named.
Previously commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS
`modules_install' regression") addressed the same issue for GCC versions
now supported for Linux compilation, but caused a build error with Clang
because it doesn't support '-msym32'. Then commit 18ca63a2e23c ("MIPS:
Probe toolchain support of -msym32") fixed the issue with Clang, but
reintroduced the 'make modules_install' error listed above.
Wrap the handling of the '-msym32' option then with ifdef need-compiler,
fixing said error for 'make modules_install'.
For more technical details on why need-compiler is null during 'make
modules_install' and why no compiler invocation is actually needed at
this point, please refer to commit 4fe4a6374c4d ("MIPS: Only fiddle with
CHECKFLAGS if need-compiler") and commit 805b2e1d427a ("kbuild: include
Makefile.compiler only when compiler is needed").
NB leading 8 spaces rather than tabs required due to `make' syntax.
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2502120612000.65342@angie.orcam.me.uk/
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2307180025120.62448@angie.orcam.me.uk/
Fixes: a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression")
Reported-by: Maciej W. Rozycki <macro@orcam.me.uk>
Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/
Co-developed-by: Chen Linxuan <chenlinxuan@uniontech.com>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (1/6),
<https://lore.kernel.org/r/C7DB555D3895DE54+20250422102253.137944-1-wangyuli@uniontech.com/>:
- Fix indentation/nesting of Makefile conditionals.
- Drop "dec: " from the commit heading; the feature is generic even if
only used by DEC platforms right now.
- Rewrite commit description for clarity.
---
arch/mips/Makefile | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
linux-wangyuli-mips-msym32-need-compiler.diff
Index: linux-macro/arch/mips/Makefile
===================================================================
--- linux-macro.orig/arch/mips/Makefile
+++ linux-macro/arch/mips/Makefile
@@ -290,18 +290,20 @@ drivers-$(CONFIG_PCI) += arch/mips/pci/
# We can always force a build with a 64-bits symbol format by
# passing 'KBUILD_SYM32=no' option to the make's command line.
#
-ifdef CONFIG_64BIT
- ifndef KBUILD_SYM32
- ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
- KBUILD_SYM32 = $(call cc-option-yn, -msym32)
+ifdef need-compiler
+ ifdef CONFIG_64BIT
+ ifndef KBUILD_SYM32
+ ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
+ KBUILD_SYM32 = $(call cc-option-yn, -msym32)
+ endif
endif
- endif
- ifeq ($(KBUILD_SYM32), y)
- cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
- else
- ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
- $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+ ifeq ($(KBUILD_SYM32), y)
+ cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
+ else
+ ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
+ $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+ endif
endif
endif
endif
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/7] MIPS: dec: Add missing <linux/interrupt.h> inclusion to reset.h
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 3/7] MIPS: decstation_64_defconfig: Regenerate for 7.x Maciej W. Rozycki
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
Pull the header directly that is required for `irqreturn_t' type.
Fixes: 0eb77376912e ("MIPS: DEC: Fix prototypes for halt/reset handlers")
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (3/6),
<https://lore.kernel.org/r/3AD7E5DDE3F05C6D+20250422102253.137944-3-wangyuli@uniontech.com/>:
- Split off the part still required.
---
arch/mips/include/asm/dec/reset.h | 1 +
1 file changed, 1 insertion(+)
linux-wangyuli-mips-dec-reset-interrupt.diff
Index: linux-macro/arch/mips/include/asm/dec/reset.h
===================================================================
--- linux-macro.orig/arch/mips/include/asm/dec/reset.h
+++ linux-macro/arch/mips/include/asm/dec/reset.h
@@ -10,6 +10,7 @@
#define __ASM_DEC_RESET_H
#include <linux/compiler_attributes.h>
+#include <linux/interrupt.h>
void __noreturn dec_machine_restart(char *command);
void __noreturn dec_machine_halt(void);
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 3/7] MIPS: decstation_64_defconfig: Regenerate for 7.x
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 2/7] MIPS: dec: Add missing <linux/interrupt.h> inclusion to reset.h Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 4/7] MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors Maciej W. Rozycki
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
Due to long-term changes in kernel build configurations, run 'make
savedefconfig' to update the build configuration dependencies.
This commit does not affect the actual .config file content, in
preparation for future modifications to decstation_64_defconfig.
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (5/6),
<https://lore.kernel.org/r/566F2D64350C960C+20250422102253.137944-5-wangyuli@uniontech.com/>:
- Regenerate for 7.2.0.
---
arch/mips/configs/decstation_64_defconfig | 39 ++++++++++--------------------
1 file changed, 14 insertions(+), 25 deletions(-)
linux-wangyuli-mips-dec-config64.diff
Index: linux-macro/arch/mips/configs/decstation_64_defconfig
===================================================================
--- linux-macro.orig/arch/mips/configs/decstation_64_defconfig
+++ linux-macro/arch/mips/configs/decstation_64_defconfig
@@ -1,27 +1,26 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BPF_SYSCALL=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_EXPERT=y
# CONFIG_SGETMASK_SYSCALL is not set
-# CONFIG_SYSFS_SYSCALL is not set
-CONFIG_BPF_SYSCALL=y
-# CONFIG_COMPAT_BRK is not set
CONFIG_MACH_DECSTATION=y
CONFIG_64BIT=y
-CONFIG_PAGE_SIZE_16KB=y
CONFIG_TC=y
CONFIG_MIPS32_O32=y
CONFIG_MIPS32_N32=y
# CONFIG_SUSPEND is not set
+CONFIG_PAGE_SIZE_16KB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_OSF_PARTITION=y
# CONFIG_EFI_PARTITION is not set
+# CONFIG_COMPAT_BRK is not set
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_NET=y
CONFIG_PACKET=y
@@ -49,7 +48,6 @@ CONFIG_NETWORK_SECMARK=y
CONFIG_IP_SCTP=m
CONFIG_VLAN_8021Q=m
# CONFIG_WIRELESS is not set
-# CONFIG_UEVENT_HELPER is not set
# CONFIG_FW_LOADER is not set
# CONFIG_ALLOW_DEV_COREDUMP is not set
CONFIG_MTD=m
@@ -83,9 +81,9 @@ CONFIG_DECLANCE=y
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set
+# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NETRONOME is not set
-# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
@@ -114,13 +112,11 @@ CONFIG_FB_TGA=y
CONFIG_FB_PMAG_AA=y
CONFIG_FB_PMAG_BA=y
CONFIG_FB_PMAGB_B=y
-# CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE_COLUMNS=160
CONFIG_DUMMY_CONSOLE_ROWS=64
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
@@ -168,31 +164,24 @@ CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_UTF8=m
CONFIG_CRYPTO_RSA=m
-CONFIG_CRYPTO_CCM=m
-CONFIG_CRYPTO_GCM=m
-CONFIG_CRYPTO_CHACHA20POLY1305=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_LRW=m
-CONFIG_CRYPTO_OFB=m
CONFIG_CRYPTO_XTS=m
+CONFIG_CRYPTO_CHACHA20POLY1305=m
+CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_CMAC=m
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_CRC32=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_CAMELLIA=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_SEED=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_CRC32=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_842=m
CONFIG_CRYPTO_LZ4=m
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 4/7] MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (2 preceding siblings ...)
2026-09-19 15:14 ` [PATCH v3 3/7] MIPS: decstation_64_defconfig: Regenerate for 7.x Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 5/7] MIPS: Eliminate redundant KBUILD_SYM32 check Maciej W. Rozycki
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
All compilation issues with decstation_64_defconfig have been resolved,
and it is safe to enable CONFIG_WERROR now.
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (6/6),
<https://lore.kernel.org/r/2AEFB36427BDF18E+20250422102253.137944-6-wangyuli@uniontech.com/>:
- Slightly reword the commit description.
---
arch/mips/configs/decstation_64_defconfig | 1 +
1 file changed, 1 insertion(+)
linux-wangyuli-mips-dec-config64-werror.diff
diff --git a/arch/mips/configs/decstation_64_defconfig b/arch/mips/configs/decstation_64_defconfig
index bf579866cf4b..12415c5dd28c 100644
--- a/arch/mips/configs/decstation_64_defconfig
+++ b/arch/mips/configs/decstation_64_defconfig
@@ -1,3 +1,4 @@
+CONFIG_WERROR=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_HIGH_RES_TIMERS=y
--
2.49.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 5/7] MIPS: Eliminate redundant KBUILD_SYM32 check
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (3 preceding siblings ...)
2026-09-19 15:14 ` [PATCH v3 4/7] MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 6/7] MIPS: Reword KBUILD_SYM32 documentation for clarity Maciej W. Rozycki
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
Given that KBUILD_SYM32=y is a prerequisite for this statement to be
executed, it's logically redundant to verify KBUILD_SYM32 is y again.
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (2/6),
<https://lore.kernel.org/r/5D20D311FB1FCDF1+20250422102253.137944-2-wangyuli@uniontech.com/>:
- Fix the style with the commit heading.
---
arch/mips/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
linux-wangyuli-mips-dec-kbuild-sym32-y.diff
Index: linux-macro/arch/mips/Makefile
===================================================================
--- linux-macro.orig/arch/mips/Makefile
+++ linux-macro/arch/mips/Makefile
@@ -299,7 +299,7 @@ ifdef need-compiler
endif
ifeq ($(KBUILD_SYM32), y)
- cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
+ cflags-y += -msym32 -DKBUILD_64BIT_SYM32
else
ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
$(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 6/7] MIPS: Reword KBUILD_SYM32 documentation for clarity
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (4 preceding siblings ...)
2026-09-19 15:14 ` [PATCH v3 5/7] MIPS: Eliminate redundant KBUILD_SYM32 check Maciej W. Rozycki
@ 2026-09-19 15:14 ` Maciej W. Rozycki
2026-09-19 15:15 ` [PATCH v3 7/7] MIPS: dec: Reorder header inclusions in setup.c Maciej W. Rozycki
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:14 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
It is currently hard to figure out what the inline documentation for the
KBUILD_SYM32 option means as it speaks in generic build/ELF format terms
which can mean just about anything, while the whole point of the option
is whether kernel symbols can or cannot fit in the 32-bit value range.
Adjust the description accordingly and also quote the more correct 'n'
rather than 'no' setting (even though all that matters is whether it's
'y' or not).
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
New change in v3.
---
arch/mips/Makefile | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
linux-mips-msym32-doc.diff
Index: linux-macro/arch/mips/Makefile
===================================================================
--- linux-macro.orig/arch/mips/Makefile
+++ linux-macro/arch/mips/Makefile
@@ -285,10 +285,12 @@ cflags-y += -I$(srctree)/arch/mips/inc
drivers-$(CONFIG_PCI) += arch/mips/pci/
#
-# Automatically detect the build format. By default we choose
-# the elf format according to the load address.
-# We can always force a build with a 64-bits symbol format by
-# passing 'KBUILD_SYM32=no' option to the make's command line.
+# Automatically detect whether to build a 64-bit kernel using symbols
+# limited to 32-bit values, which produces more compact code. This
+# relies on the kernel image being linked at a 32-bit load address,
+# which we use to infer whether to use this arrangement for symbols.
+# Use 'make KBUILD_SYM32=n' to override this default choice and force
+# 64-bit symbols to be used instead.
#
ifdef need-compiler
ifdef CONFIG_64BIT
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 7/7] MIPS: dec: Reorder header inclusions in setup.c
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (5 preceding siblings ...)
2026-09-19 15:14 ` [PATCH v3 6/7] MIPS: Reword KBUILD_SYM32 documentation for clarity Maciej W. Rozycki
@ 2026-09-19 15:15 ` Maciej W. Rozycki
2026-09-21 14:40 ` [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Chen Linxuan
2026-09-26 9:40 ` Thomas Bogendoerfer
8 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2026-09-19 15:15 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
From: WangYuli <wangyuli@uniontech.com>
Make the order alphabetic of headers included in setup.c.
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
Changes from v2 (3/6),
<https://lore.kernel.org/r/3AD7E5DDE3F05C6D+20250422102253.137944-3-wangyuli@uniontech.com/>:
- Split off the part still required.
- Also fix <asm/*.h> ordering.
---
arch/mips/dec/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
linux-wangyuli-mips-dec-setup-headers.diff
Index: linux-macro/arch/mips/dec/setup.c
===================================================================
--- linux-macro.orig/arch/mips/dec/setup.c
+++ linux-macro/arch/mips/dec/setup.c
@@ -18,16 +18,16 @@
#include <linux/memblock.h>
#include <linux/param.h>
#include <linux/percpu-defs.h>
+#include <linux/pm.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/types.h>
-#include <linux/pm.h>
#include <asm/addrspace.h>
#include <asm/bootinfo.h>
-#include <asm/cpu.h>
#include <asm/cpu-features.h>
#include <asm/cpu-type.h>
+#include <asm/cpu.h>
#include <asm/irq.h>
#include <asm/irq_cpu.h>
#include <asm/mipsregs.h>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (6 preceding siblings ...)
2026-09-19 15:15 ` [PATCH v3 7/7] MIPS: dec: Reorder header inclusions in setup.c Maciej W. Rozycki
@ 2026-09-21 14:40 ` Chen Linxuan
2026-09-26 9:40 ` Thomas Bogendoerfer
8 siblings, 0 replies; 11+ messages in thread
From: Chen Linxuan @ 2026-09-21 14:40 UTC (permalink / raw)
To: Maciej W. Rozycki, Thomas Bogendoerfer
Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
On Sat Sep 19, 2026 at 11:14 PM CST, Maciej W. Rozycki wrote:
> Hi Thomas,
>
> I chose to rework this patchset on behalf of WangYuli after all; I'm not
> sure if his address cc'd works. I've reordered the changes to put fixes
Thanks for taking this over. Just as a quick update, I checked with WangYuli
offline. He did receive your email. But he's been quite busy recently.
Chen Linxuan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler
2026-09-19 15:14 ` [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler Maciej W. Rozycki
@ 2026-09-21 14:54 ` Chen Linxuan
0 siblings, 0 replies; 11+ messages in thread
From: Chen Linxuan @ 2026-09-21 14:54 UTC (permalink / raw)
To: Maciej W. Rozycki, Thomas Bogendoerfer
Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
Reviewed-by: Chen Linxuan <me@black-desk.cn>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
` (7 preceding siblings ...)
2026-09-21 14:40 ` [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Chen Linxuan
@ 2026-09-26 9:40 ` Thomas Bogendoerfer
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Bogendoerfer @ 2026-09-26 9:40 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: WangYuli, Chen Linxuan, linux-mips, linux-kernel
On Sat, Sep 19, 2026 at 04:14:06PM +0100, Maciej W. Rozycki wrote:
> Hi Thomas,
>
> I chose to rework this patchset on behalf of WangYuli after all; I'm not
> sure if his address cc'd works. I've reordered the changes to put fixes
> ahead of improvements and reworded the piece of inline documentation for
> the KBUILD_SYM32 option since, frankly, the one we have now is hard to
> comprehend.
>
> I have verified this patchset with my 5000/150. Please apply.
>
> Previous iteration (v2) at
> <https://lore.kernel.org/r/24EC7D2CA58B25F5+20250422101855.136675-1-wangyuli@uniontech.com/>.
>
> The original cover letter follows.
>
> Maciej
>
> [ Part 1 ]: MIPS: dec: Only check -msym32 when need compiler
>
> During 'make modules_install', the need-compiler variable becomes
> null, so Makefile.compiler isn't included.
>
> This results in call cc-option-yn returning nothing.
>
> For more technical details on why need-compiler is null during
> 'make modules_install' and why no compiler invocation is actually
> needed at this point, please refer to commit 4fe4a6374c4d ("MIPS:
> Only fiddle with CHECKFLAGS if need-compiler") and commit
> 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler
> is needed").
>
> Commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS
> `modules_install' regression") tried to fix the same issue but it
> caused a compile error on clang compiler because it doesn't support
> '-msym32'. Then, commit 18ca63a2e23c ("MIPS: Probe toolchain support
> of -msym32") fixed it but reintroduced the CONFIG_CPU_DADDI_WORKAROUNDS
> `modules_install' regression.
>
> Wrapping this entire code block with #ifdef need-compiler to avoid
> all issues is the best solution for now.
>
> To get rid of spurious "CONFIG_CPU_DADDI_WORKAROUNDS unsupported
> without -msym32" error.
>
> Moreover, I also identified an unnecessary check for KBUILD_SYM32
> in this Makefile section. Eliminate it for code simplification.
>
> NOTE:
>
> It is particularly important to note that this code fix does not
> imply that we have resolved the problem entirely.
>
> In fact, the entire application of cc-option and its auxiliary
> commands within the kernel codebase currently carries significant
> risk.
>
> When we execute make modules_install, the Makefile for the
> corresponding architecture under arch/subarches/Makefile is
> invariably included. Within these files, there are numerous
> usages of cc-option and its auxiliary commands, all of which will
> return empty strings. The reason other architectures can
> successfully complete compilation under these circumstances is
> purely because they do not, unlike MIPS, check the return values
> of cc-option and its auxiliary commands within their Makefiles
> and halt the compilation process when the expected results are
> not received.
>
> A feasible approach to remediation might be to encapsulate all
> usages of cc-option and its auxiliary commands within conditional
> statements across all architecture Makefiles, preventing their
> execution entirely during make modules_install.
>
> However, this would lead to a massive number of inelegant
> modifications, and these broader implications may require
> deliberation by Masahiro Yamada.
>
> Regardless, this does not preclude us from addressing the
> issue on MIPS first.
>
> Link: https://lore.kernel.org/all/41107E6D3A125047+20250211135616.1807966-1-wangyuli@uniontech.com/
> Link: https://lore.kernel.org/all/F49F5EE9975F29EA+20250214094758.172055-1-wangyuli@uniontech.com/
> Link: https://lore.kernel.org/all/8ABBF323414AEF93+20250217142541.48149-1-wangyuli@uniontech.com/
>
>
> [ Part 2 ]: MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors
>
> Patch ("MIPS: dec: Only check -msym32 when need compiler") allows
> us to compile kernel image packages with decstation_64_defconfig.
>
> However, compilation warnings remain during the build.
>
> Address these warnings and enable CONFIG_WERROR for decstation_64_defconfig.
>
> Link: https://lore.kernel.org/all/487CE8AA937621E2+20250218125101.663980-1-wangyuli@uniontech.com/
> Link: https://lore.kernel.org/all/EA0AFB15DDCF65C1+20250227141949.1129536-1-wangyuli@uniontech.com/
> Link: https://lore.kernel.org/all/303EFD6BFBDAC7C8+20250305033436.31214-1-wangyuli@uniontech.com/
>
>
> [ Changelog: ]
>
> *v1->v2: Add Philippe Mathieu-Daudé's "Reviewed-by" tag in patch3.
> Link: https://lore.kernel.org/all/11740B01E659CAFF+20250407073158.493183-1-wangyuli@uniontech.com/
> Link: https://lore.kernel.org/all/8dcb5c6d-be4f-4891-a999-137d53edfc05@linaro.org/
>
> WangYuli (6):
> MIPS: dec: Only check -msym32 when need compiler
> MIPS: Eliminate Redundant KBUILD_SYM32 Checks
> MIPS: dec: Create reset.h
> MIPS: dec: Remove dec_irq_dispatch()
> MIPS: decstation_64_defconfig: Update configs dependencies
> MIPS: decstation_64_defconfig: Compile the kernel with warnings as
> errors
>
> arch/mips/Makefile | 6 ++--
> arch/mips/configs/decstation_64_defconfig | 43 +++++++++--------------
> arch/mips/dec/int-handler.S | 2 +-
> arch/mips/dec/prom/init.c | 3 +-
> arch/mips/dec/reset.c | 2 ++
> arch/mips/dec/setup.c | 15 ++------
> arch/mips/include/asm/dec/reset.h | 20 +++++++++++
> 7 files changed, 47 insertions(+), 44 deletions(-)
> create mode 100644 arch/mips/include/asm/dec/reset.h
series applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-09-26 10:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 15:14 [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 1/7] MIPS: Only check -msym32 when need-compiler Maciej W. Rozycki
2026-09-21 14:54 ` Chen Linxuan
2026-09-19 15:14 ` [PATCH v3 2/7] MIPS: dec: Add missing <linux/interrupt.h> inclusion to reset.h Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 3/7] MIPS: decstation_64_defconfig: Regenerate for 7.x Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 4/7] MIPS: decstation_64_defconfig: Compile the kernel with warnings as errors Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 5/7] MIPS: Eliminate redundant KBUILD_SYM32 check Maciej W. Rozycki
2026-09-19 15:14 ` [PATCH v3 6/7] MIPS: Reword KBUILD_SYM32 documentation for clarity Maciej W. Rozycki
2026-09-19 15:15 ` [PATCH v3 7/7] MIPS: dec: Reorder header inclusions in setup.c Maciej W. Rozycki
2026-09-21 14:40 ` [PATCH v3 0/7] MIPS: Resolve build problems on decstation_64 Chen Linxuan
2026-09-26 9:40 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®