All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
@ 2018-09-12 12:12 Mark Brown
  2018-11-06 17:51   ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2018-09-12 12:12 UTC (permalink / raw)
  To: linux-sh

Most architectures provide prototypes for the PCI I/O mapping operations
when asm/io.h is included but SH doesn't currently do that, leading to
for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is
used on current -next.  Make SH more consistent with other architectures
by including asm-generic/pci_iomap.h in asm/io.h.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/sh/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 98cb8c802b1a..4f7f235f15f8 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -24,6 +24,7 @@
 #define __IO_PREFIX     generic
 #include <asm/io_generic.h>
 #include <asm/io_trapped.h>
+#include <asm-generic/pci_iomap.h>
 #include <mach/mangle-port.h>
 
 #define __raw_writeb(v,a)	(__chk_io_ptr(a), *(volatile u8  __force *)(a) = (v))
-- 
2.19.0.rc2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
@ 2018-11-06 17:51   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-11-06 17:51 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker
  Cc: arnd, akpm, linux-sh, linux-kernel, Mark Brown

Most architectures provide prototypes for the PCI I/O mapping operations
when asm/io.h is included but SH doesn't currently do that, leading to
for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is
used on current -next.  Make SH more consistent with other architectures
by including asm-generic/pci_iomap.h in asm/io.h.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/sh/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 98cb8c802b1a..4f7f235f15f8 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -24,6 +24,7 @@
 #define __IO_PREFIX     generic
 #include <asm/io_generic.h>
 #include <asm/io_trapped.h>
+#include <asm-generic/pci_iomap.h>
 #include <mach/mangle-port.h>
 
 #define __raw_writeb(v,a)	(__chk_io_ptr(a), *(volatile u8  __force *)(a) = (v))
-- 
2.19.0.rc2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
@ 2018-11-06 17:51   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-11-06 17:51 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker
  Cc: arnd, akpm, linux-sh, linux-kernel, Mark Brown

Most architectures provide prototypes for the PCI I/O mapping operations
when asm/io.h is included but SH doesn't currently do that, leading to
for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is
used on current -next.  Make SH more consistent with other architectures
by including asm-generic/pci_iomap.h in asm/io.h.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/sh/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 98cb8c802b1a..4f7f235f15f8 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -24,6 +24,7 @@
 #define __IO_PREFIX     generic
 #include <asm/io_generic.h>
 #include <asm/io_trapped.h>
+#include <asm-generic/pci_iomap.h>
 #include <mach/mangle-port.h>
 
 #define __raw_writeb(v,a)	(__chk_io_ptr(a), *(volatile u8  __force *)(a) = (v))
-- 
2.19.0.rc2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
  2018-11-06 17:51   ` Mark Brown
@ 2018-11-06 18:21     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-11-06 18:21 UTC (permalink / raw)
  To: Mark Brown
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Andrew Morton,
	Linux-sh list, Linux Kernel Mailing List

Hi Mark,

On Tue, Nov 6, 2018 at 6:52 PM Mark Brown <broonie@kernel.org> wrote:
> Most architectures provide prototypes for the PCI I/O mapping operations
> when asm/io.h is included but SH doesn't currently do that, leading to
> for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is
> used on current -next.  Make SH more consistent with other architectures

Also on v4.20-rc1, cfr.
http://kisskb.ellerman.id.au/kisskb/buildresult/13576888/

> by including asm-generic/pci_iomap.h in asm/io.h.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>

Thanks for your patch!

> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -24,6 +24,7 @@
>  #define __IO_PREFIX     generic
>  #include <asm/io_generic.h>
>  #include <asm/io_trapped.h>
> +#include <asm-generic/pci_iomap.h>

Is this sufficient?

include/asm-generic/pci_iomap.h provides the dummies if CONFIG_PCI=n and
CONFIG_GENERIC_PCI_IOMAP=y, while arch/sh/Kconfig selects GENERIC_PCI_IOMAP
only if PCI is enabled. Hence it's not set in the failing config
(sh/allyesconfig).

Probably SH should select GENERIC_PCI_IOMAP unconditionally, like most other
architectures do (alpha and powerpc select it conditionally, though)?

>  #include <mach/mangle-port.h>
>
>  #define __raw_writeb(v,a)      (__chk_io_ptr(a), *(volatile u8  __force *)(a) = (v))

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
@ 2018-11-06 18:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-11-06 18:21 UTC (permalink / raw)
  To: Mark Brown
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Andrew Morton,
	Linux-sh list, Linux Kernel Mailing List

Hi Mark,

On Tue, Nov 6, 2018 at 6:52 PM Mark Brown <broonie@kernel.org> wrote:
> Most architectures provide prototypes for the PCI I/O mapping operations
> when asm/io.h is included but SH doesn't currently do that, leading to
> for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is
> used on current -next.  Make SH more consistent with other architectures

Also on v4.20-rc1, cfr.
http://kisskb.ellerman.id.au/kisskb/buildresult/13576888/

> by including asm-generic/pci_iomap.h in asm/io.h.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>

Thanks for your patch!

> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -24,6 +24,7 @@
>  #define __IO_PREFIX     generic
>  #include <asm/io_generic.h>
>  #include <asm/io_trapped.h>
> +#include <asm-generic/pci_iomap.h>

Is this sufficient?

include/asm-generic/pci_iomap.h provides the dummies if CONFIG_PCI=n and
CONFIG_GENERIC_PCI_IOMAP=y, while arch/sh/Kconfig selects GENERIC_PCI_IOMAP
only if PCI is enabled. Hence it's not set in the failing config
(sh/allyesconfig).

Probably SH should select GENERIC_PCI_IOMAP unconditionally, like most other
architectures do (alpha and powerpc select it conditionally, though)?

>  #include <mach/mangle-port.h>
>
>  #define __raw_writeb(v,a)      (__chk_io_ptr(a), *(volatile u8  __force *)(a) = (v))

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
  2018-11-06 18:21     ` Geert Uytterhoeven
@ 2018-11-06 18:26       ` Mark Brown
  -1 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-11-06 18:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Andrew Morton,
	Linux-sh list, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, Nov 06, 2018 at 07:21:41PM +0100, Geert Uytterhoeven wrote:

> > +#include <asm-generic/pci_iomap.h>

> Is this sufficient?

> include/asm-generic/pci_iomap.h provides the dummies if CONFIG_PCI=n and
> CONFIG_GENERIC_PCI_IOMAP=y, while arch/sh/Kconfig selects GENERIC_PCI_IOMAP
> only if PCI is enabled. Hence it's not set in the failing config
> (sh/allyesconfig).

Ah, possibly not - IIRC I minimized the config when testing but I
could've got the GENERIC_PCI_IOMAP=y.

> Probably SH should select GENERIC_PCI_IOMAP unconditionally, like most other
> architectures do (alpha and powerpc select it conditionally, though)?

I'd be surprised if it had a strong reason not to.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h
@ 2018-11-06 18:26       ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-11-06 18:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Andrew Morton,
	Linux-sh list, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, Nov 06, 2018 at 07:21:41PM +0100, Geert Uytterhoeven wrote:

> > +#include <asm-generic/pci_iomap.h>

> Is this sufficient?

> include/asm-generic/pci_iomap.h provides the dummies if CONFIG_PCI=n and
> CONFIG_GENERIC_PCI_IOMAP=y, while arch/sh/Kconfig selects GENERIC_PCI_IOMAP
> only if PCI is enabled. Hence it's not set in the failing config
> (sh/allyesconfig).

Ah, possibly not - IIRC I minimized the config when testing but I
could've got the GENERIC_PCI_IOMAP=y.

> Probably SH should select GENERIC_PCI_IOMAP unconditionally, like most other
> architectures do (alpha and powerpc select it conditionally, though)?

I'd be surprised if it had a strong reason not to.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-06 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 12:12 [PATCH] sh: Provide prototypes for PCI I/O mapping in asm/io.h Mark Brown
2018-11-06 17:51 ` Mark Brown
2018-11-06 17:51   ` Mark Brown
2018-11-06 18:21   ` Geert Uytterhoeven
2018-11-06 18:21     ` Geert Uytterhoeven
2018-11-06 18:26     ` Mark Brown
2018-11-06 18:26       ` Mark Brown

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.