public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	Arnd Bergmann <arnd@arndb.de>, Niklas Cassel <cassel@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	dlemoal@kernel.org, linux-ide@vger.kernel.org
Subject: [PATCH AUTOSEL 6.15 07/20] ata: pata_cs5536: fix build on 32-bit UML
Date: Tue, 24 Jun 2025 00:11:06 -0400	[thread overview]
Message-ID: <20250624041120.83191-7-sashal@kernel.org> (raw)
In-Reply-To: <20250624041120.83191-1-sashal@kernel.org>

From: Johannes Berg <johannes.berg@intel.com>

[ 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@arndb.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20250606090110.15784-2-johannes@sipsolutions.net
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

**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


  parent reply	other threads:[~2025-06-24  4:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  4:11 [PATCH AUTOSEL 6.15 01/20] x86/platform/amd: move final timeout check to after final sleep Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 02/20] drm/msm: Fix a fence leak in submit error path Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 03/20] drm/msm: Fix another leak in the " Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 04/20] ALSA: sb: Don't allow changing the DMA mode during operations Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 05/20] ALSA: sb: Force to disable DMAs once when DMA mode is changed Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 06/20] ata: libata-acpi: Do not assume 40 wire cable if no devices are enabled Sasha Levin
2025-06-24  4:11 ` Sasha Levin [this message]
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 08/20] ASoC: amd: yc: Add quirk for MSI Bravo 17 D7VF internal mic Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 09/20] platform/x86/amd/pmc: Add PCSpecialist Lafite Pro V 14M to 8042 quirks list Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 10/20] genirq/irq_sim: Initialize work context pointers properly Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 11/20] powerpc: Fix struct termio related ioctl macros Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 12/20] ASoC: amd: yc: update quirk data for HP Victus Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 13/20] regulator: fan53555: add enable_time support and soft-start times Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 14/20] scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 15/20] aoe: defer rexmit timer downdev work to workqueue Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 16/20] wifi: mac80211: drop invalid source address OCB frames Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 17/20] wifi: ath6kl: remove WARN on bad firmware input Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 18/20] ACPICA: Refuse to evaluate a method if arguments are missing Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 19/20] mtd: spinand: fix memory leak of ECC engine conf Sasha Levin
2025-06-24  4:11 ` [PATCH AUTOSEL 6.15 20/20] rcu: Return early if callback is not specified Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250624041120.83191-7-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=arnd@arndb.de \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox