From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F391032AAC5 for ; Sat, 23 May 2026 08:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779526412; cv=none; b=f4qbOwAENhIoEui0d9B4IWTR4z7DdmyiZSMEGzuk+U9bZDGE5+Da7Meb1zpQ3kEFOw44sU7DZV9ACbMThH9ec+APz+/Bw+YT7cpwIKH0MPXglun8I/a/q/5kGbD05srbLoFeLAtHw/HfG9nf0DRKVeiq7DmcPtqQ2ccaxxOQj00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779526412; c=relaxed/simple; bh=y98ubniamX/ywo1W/p36cBANxH2OkJnXVVJj0zeeDDQ=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=cOcA/7CELFMogu/pipsqVTzj2M62fmfoEzqUd7htHOr9EklhqJrkVQXOwa5vbe7emRcdjTAXzI2KZ/nqIdzmzlqqR1wR+wDbrQt7l71XXdiwQqkaJSplgdahJv/oUgyUP89n53xVHe2Yd/wTDJzRd1iUG7oxcS8rL36RX6W0oQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=f4x+L8Fx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=mmN7s1X0; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="f4x+L8Fx"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mmN7s1X0" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 17BBF140014D; Sat, 23 May 2026 04:53:30 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-04.internal (MEProxy); Sat, 23 May 2026 04:53:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1779526410; x=1779612810; bh=i9N/95A/Qq2bBhi9MEP97bwNmBebXjIW5RFDkklcsZ4=; b= f4x+L8FxJrecIwsAJlX7ieZgMrPLKA3ieSF8Di3Ho4bOeJ9+xY+fGfL0K+yj5yzr 2i/V4BJEdXKmHvwypW3SMj0VuNBYGjtRFkr5NRIIuhv7mm71pAimGdKDZd216C9G sOddyI3VKpZx9MxtH0FPZAbJI8Uenddc9XAOycd+DPgtZaj6mqrJtYIfqhZRD8qb nRd3wN6ehPs8UsJ/thdsuM6xrRA3UOZ4+6y6NIVKRuOu3cndmoNOmpBjttCMtxkP 4ATv+QiFZVjAOYsW/ppLDxAnvhuM8mth71dprPtdBslWD6VhLpNuwnQ2/BnDtTcU YZdf+d3fjaCKP/hp25UNpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1779526410; x= 1779612810; bh=i9N/95A/Qq2bBhi9MEP97bwNmBebXjIW5RFDkklcsZ4=; b=m mN7s1X06zi6LBqiHSZ6ZpNuiPMiC7f5U/wRlYCBHAcWKlDpICWhk5ADgvGnALdtS 7suBSUFsXIkOgRnOHyOwsq+G2U190s8V67sFlbknLeVrhVFuR0qhf9GKM3/vlHoJ ffKJA+zslMbabLBvCq5se7eEdKAcqc03MmbCi3jFIli5x6OBL8BwNo7Kuo46nGDm OYgTVb83RchsD1aLCzxkE/kjnlzFO/JsLVk0cBPs03sZSbQSGFyescSE8/ZS0B9r WhZErOUPN+E+Z1He5riC9/GxWwUQ3ni8wYxQOw+RRtg4D38XLMrtwc36rY/rK41x NzatTmoMAo9PJ+lQRoGww== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduhedviedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepvdefpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopegsphesrghlihgvnhekrdguvgdprhgtphhtthhopegrnhhtohhnrd hivhgrnhhovhestggrmhgsrhhiughgvghgrhgvhihsrdgtohhmpdhrtghpthhtohepghgr rhihsehgrghrhihguhhordhnvghtpdhrtghpthhtohepuggrvhhiugdrlhgrihhghhhtrd hlihhnuhigsehgmhgrihhlrdgtohhmpdhrtghpthhtohephihurhihrdhnohhrohhvsehg mhgrihhlrdgtohhmpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorh hgpdhrtghpthhtoheprghlvgigrghnuggvrhdruhhshihskhhinhesihhnthgvlhdrtgho mhdprhgtphhtthhopegrnhhthhhonhihrdhlrdhnghhuhigvnhesihhnthgvlhdrtghomh dprhgtphhtthhopehprhiivghmhihslhgrfidrkhhithhsiigvlhesihhnthgvlhdrtgho mh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id B0350182007A; Sat, 23 May 2026 04:53:27 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AnN1zSbkQxM3 Date: Sat, 23 May 2026 10:51:41 +0200 From: "Arnd Bergmann" To: "David Laight" , "Arnd Bergmann" Cc: "Ingo Molnar" , "Richard Weinberger" , "Anton Ivanov" , "Johannes Berg" , "Thomas Gleixner" , "Borislav Petkov" , "Dave Hansen" , "H. Peter Anvin" , "Peter Zijlstra" , "Will Deacon" , "Boqun Feng" , "Gary Guo" , "Yury Norov" , "Rasmus Villemoes" , "Boris Ostrovsky" , "Alexander Usyskin" , "Anthony L Nguyen" , "Przemek Kitszel" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-um@lists.infradead.org Message-Id: <9789e44c-cad6-4fb9-b684-ed132347a92d@app.fastmail.com> In-Reply-To: <20260522223349.155dfe20@pumpkin> References: <20260522141959.1071595-1-arnd@kernel.org> <20260522141959.1071595-9-arnd@kernel.org> <20260522223349.155dfe20@pumpkin> Subject: Re: [PATCH 8/8] x86: simplify 32-bit instruction set selection Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, May 22, 2026, at 23:33, David Laight wrote: > On Fri, 22 May 2026 16:19:59 +0200 > Arnd Bergmann wrote: > >> From: Arnd Bergmann > ... >> Change the CPU selection to build everything with either -march=i586 >> or -march=i686 and make the specific options only change the -mtune= >> parameter where this was previously handled by -march=. Note that >> the only -mtune= options that gcc or clang understand for x86-32 >> are i486, pentium, pentiumpro, pentium4, atom, geode, k6 and athlon, >> the other ten are just aliases for one of them. > > Hmmm... That rather implies there is nothing for anything designed > in the last 20 years. > No wonder code generation choices look strange at times. I think this is correct: I can only think of two 32-bit x86 cores designed in the past 20 year: Quark is basically a i486 pipeline and rarely used with Linux these days. RDC Emkore is still used in low-end SoCs like Vortex86EX2 but never gained GCC support. > You don't want to pick p4, so I guess either p-pro or athlon? If you have a p4, why wouldn't you pick that option? Most other 32-bit Intel cores (Pentium II, Pentium III, Pentium-M, Yonah/Core) are indeed iterations of Pentium Pro, picking the more specific Kconfig option has never had any effect on gcc tuning parameters. If you want a kernel that can run more more than one CPU, CONFIG_X86_GENERIC will still do that, but that is likely measurably worse on the more sensitive cores like k6/nx686 or geode/cx5x86. > But neither is really anything like even Sandy bridge. Sandy Bridge was well into the 64-bit era. Even when that was new, you wouldn't have run a 32-bit kernel on it (or cared about CPU optimizations if you did). For x86-64 there is no CPU selection and we just always build with -mtune=generic. Thisi works well with any out-of-order microarchitecture. Arnd