From: David Laight <David.Laight@ACULAB.COM>
To: 'Geert Uytterhoeven' <geert@linux-m68k.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>, "H. Peter Anvin" <hpa@zytor.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
"Matt Turner" <mattst88@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
"Michal Simek" <monstr@monstr.eu>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
"Helge Deller" <deller@gmx.de>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Yoshinori Sato" <ysato@users.osdn.me>,
"Rich Felker" <dalias@libc.org>,
"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
"David S . Miller" <davem@davemloft.net>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-m68k@vger.kernel.org" <linux-m68k@vger.kernel.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Arnd Bergmann" <arnd@kernel.org>,
"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>,
"Johannes Berg" <johannes@sipsolutions.net>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: RE: [PATCH v4] Kconfig: introduce HAS_IOPORT option and select it as necessary
Date: Tue, 11 Apr 2023 09:49:53 +0000 [thread overview]
Message-ID: <49ccbda9fc44496ba5688616d25ce901@AcuMS.aculab.com> (raw)
In-Reply-To: <CAMuHMdWe+U3yOOfy+z19apZaT0q7WhrR2beR=t0Jkbd3ODYbyw@mail.gmail.com>
From: Geert Uytterhoeven
> Sent: 11 April 2023 09:50
>
> Hi David,
>
> On Wed, Apr 5, 2023 at 11:37 PM David Laight <David.Laight@aculab.com> wrote:
> > From: Linuxppc-dev Arnd Bergmann
> > > Sent: 05 April 2023 21:32
> > >
> > > On Wed, Apr 5, 2023, at 22:00, H. Peter Anvin wrote:
> > > > On April 5, 2023 8:12:38 AM PDT, Niklas Schnelle <schnelle@linux.ibm.com> wrote:
> > > >>On Thu, 2023-03-23 at 17:33 +0100, Niklas Schnelle wrote:
> > > >>> We introduce a new HAS_IOPORT Kconfig option to indicate support for I/O
> > > >>> Port access. In a future patch HAS_IOPORT=n will disable compilation of
> > > >>> the I/O accessor functions inb()/outb() and friends on architectures
> > > >>> which can not meaningfully support legacy I/O spaces such as s390.
> > > >>> >>
> > > >>Gentle ping. As far as I can tell this hasn't been picked to any tree
> > > >>sp far but also hasn't seen complains so I'm wondering if I should send
> > > >>a new version of the combined series of this patch plus the added
> > > >>HAS_IOPORT dependencies per subsystem or wait until this is picked up.
> > > >
> > > > You need this on a system supporting not just ISA but also PCI.
> > > >
> > > > Typically on non-x86 architectures this is simply mapped into a memory window.
> > >
> > > I'm pretty confident that the list is correct here, as the HAS_IOPORT
> > > symbol is enabled exactly for the architectures that have a way to
> > > map the I/O space. PCIe generally works fine without I/O space, the
> > > only exception are drivers for devices that were around as early PCI.
> >
> > Isn't there a difference between cpu that have inb()/outb() (probably
> > only x86?) and architectures (well computer designs) that can generate
> > PCI 'I/O' cycles by some means.
> > It isn't even just PCI I/O cycles, I've used an ARM cpu (SA1100)
> > that mapped a chuck of physical address space onto PCMCIA I/O cycles.
> >
> > If the hardware can map a PCI 'IO' bar into normal kernel address
> > space then the bar and accesses can be treated exactly like a memory bar.
> > This probably leaves x86 as the outlier where you need (IIRC) io_readl()
> > and friends that can generate in/out instructions for those accesses.
> >
> > There are also all the x86 ISA devices which need in/out instructions.
> > But (with the likely exception of the UART) they are pretty much
> > platform specific.
> >
> > So, to my mind at least, HAS_IOPORT is just the wrong question.
>
> Not all PCI controllers support mapping the I/O bar in MMIO space, so
> in general you cannot say that CONFIG_PCI=y means CONFIG_HAS_IOPORT=y.
But a CONFIG_HAS_PCI_IO=y would imply CONFIG_HAS_IOPORT=y.
It is the former that is more interesting for driver support.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-04-11 9:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 16:33 [PATCH v4] Kconfig: introduce HAS_IOPORT option and select it as necessary Niklas Schnelle
2023-04-05 15:12 ` Niklas Schnelle
2023-04-05 20:00 ` H. Peter Anvin
2023-04-05 20:31 ` Arnd Bergmann
2023-04-05 21:36 ` David Laight
2023-04-11 8:49 ` Geert Uytterhoeven
2023-04-11 9:49 ` David Laight [this message]
2023-04-05 20:24 ` Arnd Bergmann
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=49ccbda9fc44496ba5688616d25ce901@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dalias@libc.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=ink@jurassic.park.msu.ru \
--cc=johannes@sipsolutions.net \
--cc=kernel@xen0n.name \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=mattst88@gmail.com \
--cc=mchehab@kernel.org \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@kernel.org \
--cc=richard.henderson@linaro.org \
--cc=schnelle@linux.ibm.com \
--cc=sparclinux@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=ysato@users.osdn.me \
/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;
as well as URLs for NNTP newsgroup(s).