From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3ACBD317141 for ; Mon, 13 Apr 2026 16:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099166; cv=none; b=MkAXnQzBND1N2xiKSzCdvW/QDdnRmwcHR5vZEP3bJFzL3yjIx/iliSEPke6hzRsZQb5PbTtKXpdrjbzy+1yuXtVHxx06HlKAEksVZdX4sLgZxVg97tcXLsMKNriyE95f1gd0bJTWIG/xjFZUVBimGDf7WETybpFV8mFpPAiJG7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099166; c=relaxed/simple; bh=euVo7nnFAzz1AdYnT65yR2VKwBKEniSBlvYEPttVFY8=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=PDksYmseN1dHyIV7dVeoHycy9Bli3bqNs62UqeYUMJpXVWnJxqHvIbfNXSsQua2WTYXJUrXv1d/H2tFb6h2fbRdQJ9zdVXl6J/kpmdXMmi/FaAIPPifQ7Im7BC73tldFD3OAklmmEtCDKdKFtsFlQdUH4FzOnAMiY63UDBmrz9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AwU9OkXE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AwU9OkXE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7703C2BCB7 for ; Mon, 13 Apr 2026 16:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776099166; bh=euVo7nnFAzz1AdYnT65yR2VKwBKEniSBlvYEPttVFY8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=AwU9OkXEl1KG1okaBfaCvaLzE/aqn5N7zqBg2PPVWYnM7kfolslDoY5nL5DW4+W/i JWfwxchx3U7vNy7KUcDvi2Gvk60YUx4DZpVzaugJP+uzs1uQi8ASx7Xyomno12nPZ0 AwKod9A907DnsEgmqvXFtbivxB/XhYw6B2LzhJ3gjNuOFcLNrJq0WeG03+fodcF2km pLS7P9yM7vVNfcV2BnIK9eS1JbXbvQUGQFsI4slJ0LG7VmiRyCPctjeRcLp6NQ9Lwk FbPzx1TObRKzFmsdOumPS0G968QaC3C4u0plkw1jvVX1AuVxN2KIih3O/mHC3v2Dht F1rLCs1MEWqqQ== Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfauth.phl.internal (Postfix) with ESMTP id DA590F4006A; Mon, 13 Apr 2026 12:52:44 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Mon, 13 Apr 2026 12:52:44 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefkeejiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthejredtredttdenucfhrhhomhepfdetrhhnugcu uegvrhhgmhgrnhhnfdcuoegrrhhnugeskhgvrhhnvghlrdhorhhgqeenucggtffrrghtth gvrhhnpeejteeguefhffevgfehueetudevieeuueffhedvvefhjedthfdutdethefgfeek leenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghrnhguodhmvghsmhhtphgruhhthhhpvghr shhonhgrlhhithihqdduvdekhedujedtvdegqddvkeejtddtvdeigedqrghrnhgupeepkh gvrhhnvghlrdhorhhgsegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepuggrnhhivghlsedtgidtfhdrtghomhdprhgtph htthhopegthhhrihhsthhophhhrdhplhgrthhtnhgvrhesghhmgidrrghtpdhrtghpthht ohepghgvvghrtheslhhinhhugidqmheikehkrdhorhhgpdhrtghpthhtohepghgvrhhgse hlihhnuhigqdhmieekkhdrohhrghdprhgtphhtthhopehlihhnuhigqdhmieekkheslhhi shhtshdrlhhinhhugidqmheikehkrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrh hnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id B85C2700065; Mon, 13 Apr 2026 12:52:44 -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: AbTBWCF3eo87 Date: Mon, 13 Apr 2026 18:52:23 +0200 From: "Arnd Bergmann" To: "Daniel Palmer" , "Greg Ungerer" Cc: "Geert Uytterhoeven" , christoph.plattner@gmx.at, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-Id: <2ee820a1-4169-4345-97cf-d481fa3679bd@app.fastmail.com> In-Reply-To: <20260404024658.2496519-1-daniel@0x0f.com> References: <20260404024658.2496519-1-daniel@0x0f.com> Subject: Re: [RFC PATCH] m68k: nommu: Fix behaviour of io macros on non-CF Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sat, Apr 4, 2026, at 04:46, Daniel Palmer wrote: > Currently for 68000 readl() and friends are broken in that they > return the value from the bus as-is but should be reading a little > endian value and swapping it to big endian. > > This was found using virtio-mmio on a 68000 virt machine. virtio-mmio > is little endian even if the emulated machine is big endian. This works > for MMU m68k because the io macros do what is expected there, but if > the kernel was built for nommu it breaks. > > Potentially this will break some stuff for nommu non-CF m68k users > but since there are probably 2 or 3 of us in the world I think we > can work it out. > > Suggested-by: Arnd Bergmann > Link: > https://lore.kernel.org/lkml/ada73dc9-edf5-458c-8849-9f9db23ff304@app.fastmail.com/ > Signed-off-by: Daniel Palmer Reviewed-by: Arnd Bergmann It looks like the non-swapping readl() on nommu-m68k predates the git history, but apparently the coldfire version was fixed in 4d5303787627 ("m68k: fix read/write multi-byte IO for PCI on ColdFire") to behave like everything else, and dragonball appears does not support ISA or PCI buses, so it never used them. Arnd