All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Niklas Schnelle" <schnelle@linux.ibm.com>,
	"Gerd Bayer" <gbayer@linux.ibm.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	driver-core@lists.linux.dev,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	rust-for-linux@vger.kernel.org
Subject: Re: `io{re,un}map()` build error in s390 under `!CONFIG_HAS_IOMEM`
Date: Wed, 12 Aug 2026 13:46:30 +0200	[thread overview]
Message-ID: <3eeb0ece-42e9-49f2-9632-962793db8d4e@app.fastmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2608120349370.48788@angie.orcam.me.uk>

On Wed, Aug 12, 2026, at 13:19, Maciej W. Rozycki wrote:
> On Tue, 4 Aug 2026, Arnd Bergmann wrote:
>
>> arch/um is the only other one that does not always enable HAS_IOMEM,
>> though most m68k targets don't have any support for ISA/PCI style
>> MMIO or PIO and probably should not enable it in theory.
>
>  While HAS_IOPORT is indeed a feature that has propagated from Intel x86 
> (or really 8080, etc.) to non-x86 systems through ISA/PCI what's been so 
> special about ISA/PCI WRT HAS_IOMEM?
>
>  AFAICT HAS_IOMEM is all about just having peripherals located in the 
> CPU's regular memory addressing space.  All the DEC MIPS platforms fall 
> into this category, never seen PCI/ISA, some have no peripheral bus.

To me this is more about the driver model: On most architectures,
you can use portable drivers that use IORESOURCE_MEM resources
with ioremap() and the do readl()/writel() on those to access
little-endian registers.

s390 and um only support this conceptually for PCI devices,
and the HW implementation is different enough that the abstraction
breaks down in some cases (like memremap()). m68k Amiga is
similar to decstation I think, in that it has devices that are
memory mapped, but they are always visible in the kernel address
space and are accessed through their own abstraction instead of
readl()/writel(). m68k q40 does have ISA devices with both
port and memory accesses that can use portable drivers. I think
other m68k platforms use a mix of ioremap()/readl()/writel() 
and their own lower-level accessors based on the driver, but
none of those drivers are shared with another platform.

     Arnd

  reply	other threads:[~2026-08-12 11:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 18:09 `io{re,un}map()` build error in s390 under `!CONFIG_HAS_IOMEM` Miguel Ojeda
2026-08-03 19:56 ` Arnd Bergmann
2026-08-03 20:09   ` Danilo Krummrich
2026-08-04  7:13     ` Heiko Carstens
2026-08-04 10:36       ` Arnd Bergmann
2026-08-04 11:10         ` Danilo Krummrich
2026-08-04 12:02           ` Arnd Bergmann
2026-08-04 12:26             ` Gary Guo
2026-08-05 15:08             ` Danilo Krummrich
2026-08-12 11:19             ` Maciej W. Rozycki
2026-08-12 11:46               ` Arnd Bergmann [this message]
2026-08-04 12:21         ` Niklas Schnelle
2026-08-04 15:52           ` Arnd Bergmann
2026-08-05 15:36             ` Niklas Schnelle
2026-08-05 15:56               ` Arnd Bergmann
2026-08-06 13:25                 ` Niklas Schnelle
2026-08-06 13:44                   ` Arnd Bergmann
2026-08-06 15:21                     ` Geert Uytterhoeven
2026-08-12 11:23                     ` Maciej W. Rozycki

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=3eeb0ece-42e9-49f2-9632-962793db8d4e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=agordeev@linux.ibm.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=gbayer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=schnelle@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.