linux-um archives
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Ingo Molnar <mingo@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Thomas Gleixner <tglx@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will@kernel.org>, Boqun Feng <boqun@kernel.org>,
	Gary Guo <gary@garyguo.net>, Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Alexander Usyskin <alexander.usyskin@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-um@lists.infradead.org
Subject: [PATCH 6/8] x86: require minimum 64 byte cache lines
Date: Fri, 22 May 2026 16:19:57 +0200	[thread overview]
Message-ID: <20260522141959.1071595-7-arnd@kernel.org> (raw)
In-Reply-To: <20260522141959.1071595-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

Later x86-32 CPUs like Pentium-M, K7 and Atom use 64 byte cache lines
and are incompatible with kernels built for smaller values of
X86_L1_CACHE_SHIFT.

Pentium-4 CPUs have 128 byte cache lines but are compatible with
cache operations that expect the lines to be 64 bytes.

Older CPUs have smaller cache lines of 16 or 32 bytes but work
correctly when X86_L1_CACHE_SHIFT is set to a larger value.

Remove the per-CPU tuning and always build for 64 or 128 byte
cache lines that work correctly in any CPU.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/Kconfig.cpu | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 65d887274dd8..4991b633047e 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -180,8 +180,8 @@ config MVIAC7
 	bool "VIA C7"
 	depends on X86_32
 	help
-	  Select this for a VIA C7.  Selecting this uses the correct cache
-	  shift and tells gcc to treat the CPU as a 686.
+	  Select this for a VIA C7.  Selecting this tells gcc to treat the
+	  CPU as a 686.
 
 config MATOM
 	bool "Intel Atom"
@@ -239,9 +239,7 @@ config X86_INTERNODE_CACHE_SHIFT
 config X86_L1_CACHE_SHIFT
 	int
 	default "7" if MPENTIUM4
-	default "6" if MK7 || MPENTIUMM || MATOM || MVIAC7 || X86_GENERIC || X86_64
-	default "4" if MGEODEGX1
-	default "5" if MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MVIAC3_2 || MGEODE_LX
+	default "6"
 
 config X86_F00F_BUG
 	def_bool y
-- 
2.39.5



  parent reply	other threads:[~2026-05-22 14:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 14:19 [PATCH 0/8] x86-32 CPU configuration cleanups Arnd Bergmann
2026-05-22 14:19 ` [PATCH 1/8] x86: remove ts5500 platforms support Arnd Bergmann
2026-06-01  8:31   ` Geert Uytterhoeven
2026-06-01 12:27     ` Arnd Bergmann
2026-05-22 14:19 ` [PATCH 2/8] x86: remove AMD Élan remnants Arnd Bergmann
2026-05-22 14:19 ` [PATCH 3/8] x86: make TSC usage unconditional Arnd Bergmann
2026-05-22 16:11   ` Brian Gerst
2026-05-22 14:19 ` [PATCH 4/8] x86: make CX8 " Arnd Bergmann
2026-05-22 14:19 ` [PATCH 5/8] x86: remove dependencies on CONFIG_M... CPU options Arnd Bergmann
2026-05-22 15:46   ` Juergen Gross
2026-05-22 18:54     ` Arnd Bergmann
2026-05-22 19:00       ` Jürgen Groß
2026-05-22 21:22         ` David Laight
2026-05-22 14:19 ` Arnd Bergmann [this message]
2026-05-22 14:19 ` [PATCH 7/8] x86: remove dependencies on per-CPU options Arnd Bergmann
2026-05-22 14:19 ` [PATCH 8/8] x86: simplify 32-bit instruction set selection Arnd Bergmann
2026-05-22 21:33   ` David Laight
2026-05-23  8:51     ` Arnd Bergmann
2026-05-23 10:02       ` David Laight

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=20260522141959.1071595-7-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=alexander.usyskin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=boqun@kernel.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gary@garyguo.net \
    --cc=hpa@zytor.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richard@nod.at \
    --cc=tglx@kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yury.norov@gmail.com \
    /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