From: Niklas Schnelle <schnelle@linux.ibm.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-serial@vger.kernel.org, "Arnd Bergmann" <arnd@kernel.org>,
"Heiko Carstens" <hca@linux.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] tty: serial: handle HAS_IOPORT dependencies
Date: Tue, 01 Oct 2024 13:21:16 +0200 [thread overview]
Message-ID: <ef2912910d006c573324bcf063cb76e843dc8267.camel@linux.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2405230244140.1257@angie.orcam.me.uk>
On Thu, 2024-05-23 at 03:11 +0100, Maciej W. Rozycki wrote:
> On Fri, 5 Apr 2024, Niklas Schnelle wrote:
>
> > diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> > index 0d35c77fad9e..38ac5236d2ea 100644
> > --- a/drivers/tty/serial/8250/8250_pci.c
> > +++ b/drivers/tty/serial/8250/8250_pci.c
> > @@ -928,6 +928,7 @@ static int pci_netmos_init(struct pci_dev *dev)
> > return num_serial;
> > }
> >
> > +#ifdef CONFIG_HAS_IOPORT
> > /*
> > * These chips are available with optionally one parallel port and up to
> > * two serial ports. Unfortunately they all have the same product id.
> [...]
> > diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
> > index 47ff50763c04..54bf98869abf 100644
> > --- a/drivers/tty/serial/8250/Kconfig
> > +++ b/drivers/tty/serial/8250/Kconfig
> > @@ -136,7 +135,7 @@ config SERIAL_8250_PCILIB
> >
> > config SERIAL_8250_PCI
> > tristate "8250/16550 PCI device support"
> > - depends on SERIAL_8250 && PCI
> > + depends on SERIAL_8250 && PCI && HAS_IOPORT
> > select SERIAL_8250_PCILIB
> > default SERIAL_8250
> > help
>
> This is clearly wrong, there is PCIe 8250 serial hardware that does MMIO
> only, so the option has to stay possible to enable. I have such hardware
> as shown in this log:
>
> Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> serial 0001:01:00.0: enabling device (0140 -> 0142)
> serial 0001:01:00.0: detected caps 00000700 should be 00000500
> 0001:01:00.0: ttyS0 at MMIO 0x600c080401000 (irq = 40, base_baud = 15625000) is a 16C950/954
> serial 0001:01:00.0: detected caps 00000700 should be 00000500
> 0001:01:00.0: ttyS1 at MMIO 0x600c080401200 (irq = 40, base_baud = 15625000) is a 16C950/954
>
> which is from a POWER9 system. Which as you may know has no PCI port I/O
> support in hardware, so it is quite relevant here. I'd like to keep this
> PCIe serial option functional with my system.
>
> Also your change itself modifies 8250_pci.c (cited above for reference),
> which would make no sense if SERIAL_8250_PCI was permanently disabled for
> !HAS_IOPORT. Shall I take it than that the Kconfig change I question has
> been made merely by mistake?
>
> Maciej
Hi Maciej,
With 2 more HAS_IOPORT patches having gone into v6.12-rc1 I'm looking
at what's left and we're down to 4 prerequisite patches[0] before being
able to compile-time disable inb()/outb()/…. This one being by far the
largest of these. Looking at your suggestion it seems that to compile
8250_pci.c without HAS_IOPORT I'll have to add #ifdef CONFIG_HAS_IOPORT
around the MOXI section as that uses I/O ports unconditionally. The
rest seems fine and I guess would theoretically work on a system with
!HAS_IOPORT. I'll send a v2 with that included.
Note however that even though your POWER9 system does not have I/O port
support in hardware we still have HAS_IOPORT enabled for arch/powerpc
if PCI is enabed so even with this patch as is your POWER9 system
should not be affected.
Thanks,
Niklas
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git/log/?h=has_ioport
next prev parent reply other threads:[~2024-10-01 11:21 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 15:29 [PATCH 0/1] tty: Handle HAS_IOPORT dependencies Niklas Schnelle
2024-04-05 15:29 ` [PATCH 1/1] tty: serial: handle " Niklas Schnelle
2024-04-08 9:54 ` Ilpo Järvinen
2024-04-08 10:17 ` Arnd Bergmann
2024-04-08 10:25 ` Ilpo Järvinen
2024-10-01 9:04 ` Niklas Schnelle
2024-04-08 15:35 ` Niklas Schnelle
2024-04-08 15:41 ` Ilpo Järvinen
2024-04-08 15:50 ` Arnd Bergmann
2024-05-23 2:11 ` Maciej W. Rozycki
2024-10-01 11:21 ` Niklas Schnelle [this message]
2024-10-01 15:31 ` Arnd Bergmann
2024-10-01 16:41 ` Maciej W. Rozycki
2024-10-02 12:44 ` Niklas Schnelle
2024-10-02 18:12 ` Maciej W. Rozycki
2024-10-02 22:00 ` Arnd Bergmann
2024-10-02 22:59 ` Maciej W. Rozycki
2024-10-04 6:53 ` Arnd Bergmann
2024-10-04 16:24 ` Maciej W. Rozycki
2024-10-04 16:57 ` Arnd Bergmann
2024-10-04 10:09 ` Niklas Schnelle
2024-10-04 12:48 ` Arnd Bergmann
2024-10-04 16:03 ` Niklas Schnelle
2024-10-04 14:44 ` Niklas Schnelle
2024-10-04 16:34 ` Maciej W. Rozycki
2024-11-22 15:18 ` Guenter Roeck
2024-11-22 15:35 ` Niklas Schnelle
2024-11-22 16:31 ` Arnd Bergmann
2024-11-22 17:22 ` Guenter Roeck
2024-11-22 19:24 ` Arnd Bergmann
2024-11-22 20:44 ` Guenter Roeck
2024-11-22 22:51 ` Arnd Bergmann
2024-11-23 2:14 ` Guenter Roeck
2024-11-25 7:55 ` Andy Shevchenko
2024-11-25 9:53 ` Arnd Bergmann
2024-11-25 10:33 ` Andy Shevchenko
2024-11-25 11:06 ` Arnd Bergmann
2024-11-25 11:26 ` Andy Shevchenko
2024-11-25 13:50 ` Arnd Bergmann
2024-11-25 15:42 ` Andy Shevchenko
2024-11-25 16:54 ` Maciej W. Rozycki
2024-11-25 17:54 ` Arnd Bergmann
2024-11-25 18:42 ` Maciej W. Rozycki
2024-12-04 18:51 ` Guenter Roeck
2024-11-25 15:59 ` Arnd Bergmann
2024-12-04 21:09 ` Guenter Roeck
2024-12-04 22:17 ` Arnd Bergmann
2024-12-04 22:44 ` Guenter Roeck
2024-12-05 7:08 ` Arnd Bergmann
2024-12-05 14:31 ` Guenter Roeck
2024-12-06 15:44 ` Andy Shevchenko
2024-12-06 16:02 ` Arnd Bergmann
2025-01-16 12:26 ` Andy Shevchenko
2024-11-22 17:07 ` Guenter Roeck
2024-11-22 23:27 ` Niklas Schnelle
2024-11-22 23:34 ` Niklas Schnelle
2024-11-23 9:21 ` Arnd Bergmann
2024-04-05 22:33 ` [PATCH 0/1] tty: Handle " Andy Shevchenko
2024-04-06 8:06 ` 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=ef2912910d006c573324bcf063cb76e843dc8267.camel@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hca@linux.ibm.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@orcam.me.uk \
/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