* [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
[not found] <20230516110038.2413224-1-schnelle@linux.ibm.com>
@ 2023-05-16 11:00 ` Niklas Schnelle
2023-05-19 1:26 ` William Breathitt Gray
2023-05-16 11:00 ` [PATCH v4 12/41] iio: ad7606: Kconfig: " Niklas Schnelle
1 sibling, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-16 11:00 UTC (permalink / raw)
To: Arnd Bergmann, William Breathitt Gray
Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-kernel, linux-arch, linux-pci, Arnd Bergmann, linux-iio
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
per-subsystem patches may be applied independently
drivers/counter/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig
index 4228be917038..e65a2bf178b8 100644
--- a/drivers/counter/Kconfig
+++ b/drivers/counter/Kconfig
@@ -15,6 +15,7 @@ if COUNTER
config 104_QUAD_8
tristate "ACCES 104-QUAD-8 driver"
depends on (PC104 && X86) || COMPILE_TEST
+ depends on HAS_IOPORT_MAP
select ISA_BUS_API
help
Say yes here to build support for the ACCES 104-QUAD-8 quadrature
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v4 12/41] iio: ad7606: Kconfig: add HAS_IOPORT dependencies
[not found] <20230516110038.2413224-1-schnelle@linux.ibm.com>
2023-05-16 11:00 ` [PATCH v4 05/41] counter: add HAS_IOPORT dependencies Niklas Schnelle
@ 2023-05-16 11:00 ` Niklas Schnelle
2023-05-20 15:40 ` Jonathan Cameron
1 sibling, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-16 11:00 UTC (permalink / raw)
To: Arnd Bergmann, Jonathan Cameron, Lars-Peter Clausen
Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-kernel, linux-arch, linux-pci, Jonathan Cameron,
Arnd Bergmann, linux-iio
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
per-subsystem patches may be applied independently
drivers/iio/adc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index eb2b09ef5d5b..53098aca06ea 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -145,7 +145,7 @@ config AD7606
config AD7606_IFACE_PARALLEL
tristate "Analog Devices AD7606 ADC driver with parallel interface support"
- depends on HAS_IOMEM
+ depends on HAS_IOPORT
select AD7606
help
Say yes here to build parallel interface support for Analog Devices:
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-16 11:00 ` [PATCH v4 05/41] counter: add HAS_IOPORT dependencies Niklas Schnelle
@ 2023-05-19 1:26 ` William Breathitt Gray
2023-05-19 13:17 ` Niklas Schnelle
0 siblings, 1 reply; 10+ messages in thread
From: William Breathitt Gray @ 2023-05-19 1:26 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to add HAS_IOPORT as dependency for
> those drivers using them.
>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Hi Niklas,
The change itself is fine, but please update the description to reflect
that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
along with the reason why it's needed (i.e. devm_ioport_map() is used).
Thanks,
William Breathitt Gray
> ---
> Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
> per-subsystem patches may be applied independently
>
> drivers/counter/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig
> index 4228be917038..e65a2bf178b8 100644
> --- a/drivers/counter/Kconfig
> +++ b/drivers/counter/Kconfig
> @@ -15,6 +15,7 @@ if COUNTER
> config 104_QUAD_8
> tristate "ACCES 104-QUAD-8 driver"
> depends on (PC104 && X86) || COMPILE_TEST
> + depends on HAS_IOPORT_MAP
> select ISA_BUS_API
> help
> Say yes here to build support for the ACCES 104-QUAD-8 quadrature
> --
> 2.39.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-19 1:26 ` William Breathitt Gray
@ 2023-05-19 13:17 ` Niklas Schnelle
2023-05-19 13:38 ` Niklas Schnelle
0 siblings, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-19 13:17 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. We thus need to add HAS_IOPORT as dependency for
> > those drivers using them.
> >
> > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
>
> Hi Niklas,
>
> The change itself is fine, but please update the description to reflect
> that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> along with the reason why it's needed (i.e. devm_ioport_map() is used).
>
> Thanks,
>
> William Breathitt Gray
>
>
Right, this clearly needs adjustment. I went with the following commit
message for v5:
"counter: add HAS_IOPORT_MAP dependency
The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
s390 which do not support I/O port mapping. Add the missing
HAS_IOPORT_MAP dependency to fix this."
Thanks,
Niklas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-19 13:17 ` Niklas Schnelle
@ 2023-05-19 13:38 ` Niklas Schnelle
2023-05-19 13:39 ` Niklas Schnelle
0 siblings, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-19 13:38 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote:
> On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > not being declared. We thus need to add HAS_IOPORT as dependency for
> > > those drivers using them.
> > >
> > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> >
> > Hi Niklas,
> >
> > The change itself is fine, but please update the description to reflect
> > that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> > along with the reason why it's needed (i.e. devm_ioport_map() is used).
> >
> > Thanks,
> >
> > William Breathitt Gray
> >
> >
>
> Right, this clearly needs adjustment. I went with the following commit
> message for v5:
>
> "counter: add HAS_IOPORT_MAP dependency
>
> The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
> on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
> s390 which do not support I/O port mapping. Add the missing
> HAS_IOPORT_MAP dependency to fix this."
>
Just noticed this isn't entirely correct. As devm_ioport_map() has an
empty stub for HAS_IOPORT_MAP=n this doesn't lead to a compile error it
just doesn't work. Will reword to "This causes the driver to not be
useable on platforms ..."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-19 13:38 ` Niklas Schnelle
@ 2023-05-19 13:39 ` Niklas Schnelle
2023-05-19 14:21 ` William Breathitt Gray
0 siblings, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-19 13:39 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
On Fri, 2023-05-19 at 15:38 +0200, Niklas Schnelle wrote:
> On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote:
> > On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> > > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > > not being declared. We thus need to add HAS_IOPORT as dependency for
> > > > those drivers using them.
> > > >
> > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > >
> > > Hi Niklas,
> > >
> > > The change itself is fine, but please update the description to reflect
> > > that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> > > along with the reason why it's needed (i.e. devm_ioport_map() is used).
> > >
> > > Thanks,
> > >
> > > William Breathitt Gray
> > >
> > >
> >
> > Right, this clearly needs adjustment. I went with the following commit
> > message for v5:
> >
> > "counter: add HAS_IOPORT_MAP dependency
> >
> > The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
> > on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
> > s390 which do not support I/O port mapping. Add the missing
> > HAS_IOPORT_MAP dependency to fix this."
> >
>
> Just noticed this isn't entirely correct. As devm_ioport_map() has an
> empty stub for HAS_IOPORT_MAP=n this doesn't lead to a compile error it
> just doesn't work. Will reword to "This causes the driver to not be
> useable on platforms ..."
s/useable/usable/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-19 13:39 ` Niklas Schnelle
@ 2023-05-19 14:21 ` William Breathitt Gray
2023-05-22 10:42 ` Niklas Schnelle
0 siblings, 1 reply; 10+ messages in thread
From: William Breathitt Gray @ 2023-05-19 14:21 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]
On Fri, May 19, 2023 at 03:39:57PM +0200, Niklas Schnelle wrote:
> On Fri, 2023-05-19 at 15:38 +0200, Niklas Schnelle wrote:
> > On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote:
> > > On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> > > > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > > > not being declared. We thus need to add HAS_IOPORT as dependency for
> > > > > those drivers using them.
> > > > >
> > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > > > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > > > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > > >
> > > > Hi Niklas,
> > > >
> > > > The change itself is fine, but please update the description to reflect
> > > > that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> > > > along with the reason why it's needed (i.e. devm_ioport_map() is used).
> > > >
> > > > Thanks,
> > > >
> > > > William Breathitt Gray
> > > >
> > > >
> > >
> > > Right, this clearly needs adjustment. I went with the following commit
> > > message for v5:
> > >
> > > "counter: add HAS_IOPORT_MAP dependency
> > >
> > > The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
> > > on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
> > > s390 which do not support I/O port mapping. Add the missing
> > > HAS_IOPORT_MAP dependency to fix this."
> > >
> >
> > Just noticed this isn't entirely correct. As devm_ioport_map() has an
> > empty stub for HAS_IOPORT_MAP=n this doesn't lead to a compile error it
> > just doesn't work. Will reword to "This causes the driver to not be
> > useable on platforms ..."
>
> s/useable/usable/
104_QUAD_8 has an explicit dependency on PC104 and X86, so I don't think
it would ever be used outside of x86 platforms. Does it still make sense
to have the HAS_IOPORT_MAP dependency in this case?
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 12/41] iio: ad7606: Kconfig: add HAS_IOPORT dependencies
2023-05-16 11:00 ` [PATCH v4 12/41] iio: ad7606: Kconfig: " Niklas Schnelle
@ 2023-05-20 15:40 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2023-05-20 15:40 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Lars-Peter Clausen, Greg Kroah-Hartman,
Bjorn Helgaas, Uwe Kleine-König, Mauro Carvalho Chehab,
Alan Stern, Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Jonathan Cameron, Arnd Bergmann, linux-iio
On Tue, 16 May 2023 13:00:08 +0200
Niklas Schnelle <schnelle@linux.ibm.com> wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to add HAS_IOPORT as dependency for
> those drivers using them.
>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Applied to the togreg branch of iio.git and pushed out as testing for
0-day to take a first look at it.
Thanks
Jonathan
> ---
> Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
> per-subsystem patches may be applied independently
>
> drivers/iio/adc/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index eb2b09ef5d5b..53098aca06ea 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -145,7 +145,7 @@ config AD7606
>
> config AD7606_IFACE_PARALLEL
> tristate "Analog Devices AD7606 ADC driver with parallel interface support"
> - depends on HAS_IOMEM
> + depends on HAS_IOPORT
> select AD7606
> help
> Say yes here to build parallel interface support for Analog Devices:
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-19 14:21 ` William Breathitt Gray
@ 2023-05-22 10:42 ` Niklas Schnelle
2023-05-22 11:15 ` William Breathitt Gray
0 siblings, 1 reply; 10+ messages in thread
From: Niklas Schnelle @ 2023-05-22 10:42 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio
On Fri, 2023-05-19 at 10:21 -0400, William Breathitt Gray wrote:
> On Fri, May 19, 2023 at 03:39:57PM +0200, Niklas Schnelle wrote:
> > On Fri, 2023-05-19 at 15:38 +0200, Niklas Schnelle wrote:
> > > On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote:
> > > > On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> > > > > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > > > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > > > > not being declared. We thus need to add HAS_IOPORT as dependency for
> > > > > > those drivers using them.
> > > > > >
> > > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > > > > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > > > > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > > > >
> > > > > Hi Niklas,
> > > > >
> > > > > The change itself is fine, but please update the description to reflect
> > > > > that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> > > > > along with the reason why it's needed (i.e. devm_ioport_map() is used).
> > > > >
> > > > > Thanks,
> > > > >
> > > > > William Breathitt Gray
> > > > >
> > > > >
> > > >
> > > > Right, this clearly needs adjustment. I went with the following commit
> > > > message for v5:
> > > >
> > > > "counter: add HAS_IOPORT_MAP dependency
> > > >
> > > > The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
> > > > on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
> > > > s390 which do not support I/O port mapping. Add the missing
> > > > HAS_IOPORT_MAP dependency to fix this."
> > > >
> > >
> > > Just noticed this isn't entirely correct. As devm_ioport_map() has an
> > > empty stub for HAS_IOPORT_MAP=n this doesn't lead to a compile error it
> > > just doesn't work. Will reword to "This causes the driver to not be
> > > useable on platforms ..."
> >
> > s/useable/usable/
>
> 104_QUAD_8 has an explicit dependency on PC104 and X86, so I don't think
> it would ever be used outside of x86 platforms. Does it still make sense
> to have the HAS_IOPORT_MAP dependency in this case?
>
> William Breathitt Gray
Well, yes and no, you're right that it doesn't really cause compile
issues despite the "|| COMPILE_TEST" albeit the code could never work.
Still, I'd add the dependency. At the very least it serves as
documentation and maybe in the future someone will want to remove those
empty stubs for HAS_IOPORT_MAP=n.
Thanks
Niklas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies
2023-05-22 10:42 ` Niklas Schnelle
@ 2023-05-22 11:15 ` William Breathitt Gray
0 siblings, 0 replies; 10+ messages in thread
From: William Breathitt Gray @ 2023-05-22 11:15 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, Bjorn Helgaas,
Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, linux-iio, Jonathan Cameron
[-- Attachment #1: Type: text/plain, Size: 3356 bytes --]
On Mon, May 22, 2023 at 12:42:15PM +0200, Niklas Schnelle wrote:
> On Fri, 2023-05-19 at 10:21 -0400, William Breathitt Gray wrote:
> > On Fri, May 19, 2023 at 03:39:57PM +0200, Niklas Schnelle wrote:
> > > On Fri, 2023-05-19 at 15:38 +0200, Niklas Schnelle wrote:
> > > > On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote:
> > > > > On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote:
> > > > > > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote:
> > > > > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > > > > > not being declared. We thus need to add HAS_IOPORT as dependency for
> > > > > > > those drivers using them.
> > > > > > >
> > > > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > > > > > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > > > > > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > > > > >
> > > > > > Hi Niklas,
> > > > > >
> > > > > > The change itself is fine, but please update the description to reflect
> > > > > > that this is adding a depends on HAS_IOPORT_MAP rather than HAS_IOPORT,
> > > > > > along with the reason why it's needed (i.e. devm_ioport_map() is used).
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > William Breathitt Gray
> > > > > >
> > > > > >
> > > > >
> > > > > Right, this clearly needs adjustment. I went with the following commit
> > > > > message for v5:
> > > > >
> > > > > "counter: add HAS_IOPORT_MAP dependency
> > > > >
> > > > > The 104_QUAD_8 counter driver uses devm_ioport_map() without depending
> > > > > on HAS_IOPORT_MAP. This causes compilation to fail on platforms such as
> > > > > s390 which do not support I/O port mapping. Add the missing
> > > > > HAS_IOPORT_MAP dependency to fix this."
> > > > >
> > > >
> > > > Just noticed this isn't entirely correct. As devm_ioport_map() has an
> > > > empty stub for HAS_IOPORT_MAP=n this doesn't lead to a compile error it
> > > > just doesn't work. Will reword to "This causes the driver to not be
> > > > useable on platforms ..."
> > >
> > > s/useable/usable/
> >
> > 104_QUAD_8 has an explicit dependency on PC104 and X86, so I don't think
> > it would ever be used outside of x86 platforms. Does it still make sense
> > to have the HAS_IOPORT_MAP dependency in this case?
> >
> > William Breathitt Gray
>
> Well, yes and no, you're right that it doesn't really cause compile
> issues despite the "|| COMPILE_TEST" albeit the code could never work.
> Still, I'd add the dependency. At the very least it serves as
> documentation and maybe in the future someone will want to remove those
> empty stubs for HAS_IOPORT_MAP=n.
>
> Thanks
> Niklas
Sure, that reasoning makes sense to me too, so let's go with the
explicit depends afterall.
By the way, I noticed two other modules that call devm_ioport_map() but
seem to be missing the HAS_IOPORT_MAP depends lines: the
drivers/iio/addac/stx104.c and drivers/iio/dac/cio-dac.c drivers. Do
these need respective patches as well?
As an aside, I haven't been following the previous patchsets closely so
forgive me if this has already been discussed in another thread: why
doesn't X86 automatically select HAS_IOPORT? Are there x86 platforms
that do not support ioport?
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-05-22 11:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230516110038.2413224-1-schnelle@linux.ibm.com>
2023-05-16 11:00 ` [PATCH v4 05/41] counter: add HAS_IOPORT dependencies Niklas Schnelle
2023-05-19 1:26 ` William Breathitt Gray
2023-05-19 13:17 ` Niklas Schnelle
2023-05-19 13:38 ` Niklas Schnelle
2023-05-19 13:39 ` Niklas Schnelle
2023-05-19 14:21 ` William Breathitt Gray
2023-05-22 10:42 ` Niklas Schnelle
2023-05-22 11:15 ` William Breathitt Gray
2023-05-16 11:00 ` [PATCH v4 12/41] iio: ad7606: Kconfig: " Niklas Schnelle
2023-05-20 15:40 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox