[PATCH AUTOSEL 6.12 06/19] ata: pata_cs5536: fix build on 32-bit UML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


(追記) (追記ここまで)



From: Johannes Berg <johannes.berg@xxxxxxxxx>
[ Upstream commit fe5b391fc56f77cf3c22a9dd4f0ce20db0e3533f ]
On 32-bit ARCH=um, CONFIG_X86_32 is still defined, so it
doesn't indicate building on real X86 machines. There's
no MSR on UML though, so add a check for CONFIG_X86.
Reported-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
Link: https://lore.kernel.org/r/20250606090110.15784-2-johannes@xxxxxxxxxxxxxxxx
Signed-off-by: Niklas Cassel <cassel@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
**YES**
This commit should be backported to stable kernel trees for the
following reasons:
1. **It fixes a build failure**: The commit addresses a build breakage
 on 32-bit UML (User Mode Linux) where `CONFIG_X86_32` is defined but
 MSR (Machine Specific Register) support is not available. This
 prevents successful compilation when building for 32-bit UML.
2. **The fix is minimal and contained**: The change is a simple one-line
 modification that adds an additional check for `CONFIG_X86` alongside
 the existing `CONFIG_X86_32` check. The change from:
 ```c
 #ifdef CONFIG_X86_32
 ```
 to:
 ```c
 #if defined(CONFIG_X86) && defined(CONFIG_X86_32)
 ```
 This ensures MSR usage is only enabled on real x86 hardware, not on
 UML.
3. **Similar pattern to other backported fixes**: Looking at the similar
 commits, we see that:
 - Commit #1 (pata_cs5535 + UML) was backported (YES) - it added
 `depends on !UML` to prevent build issues
 - Commit #2 (dmaengine: idxd + UML) was backported (YES) - similar
 UML build fix
 These show a pattern where UML build fixes are considered important
for stable backporting.
4. **No functional changes for normal users**: The fix only affects
 build configurations and doesn't change any runtime behavior for
 users running on actual x86 hardware. This minimizes regression risk.
5. **Prevents allyesconfig/allmodconfig breakage**: As seen in similar
 commits, UML build failures can break comprehensive kernel build
 tests (allyesconfig/allmodconfig), which are important for continuous
 integration and testing.
6. **The issue affects a subsystem driver**: While pata_cs5536 is a
 specific driver for older AMD CS5536 hardware, build failures in any
 driver can impact kernel testing infrastructure and distributions
 that build comprehensive kernel packages.
The commit follows the stable tree rules by being a minimal, focused fix
for an actual bug (build failure) with very low risk of introducing new
issues.
 drivers/ata/pata_cs5536.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index b811efd2cc346..73e81e160c91f 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -27,7 +27,7 @@
 #include <scsi/scsi_host.h>
 #include <linux/dmi.h>
 
-#ifdef CONFIG_X86_32
+#if defined(CONFIG_X86) && defined(CONFIG_X86_32)
 #include <asm/msr.h>
 static int use_msr;
 module_param_named(msr, use_msr, int, 0644);
-- 
2.39.5

[Index of Archives] [Linux Filesystems] [Linux SCSI] [Linux RAID] [Git] [Kernel Newbies] [Linux Newbie] [Security] [Netfilter] [Bugtraq] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Samba] [Device Mapper]

(追記) (追記ここまで)
Powered by Linux

AltStyle によって変換されたページ (->オリジナル) /