Discussion:
[PATCH] m68k: Add missing ioport_unmap()
Geert Uytterhoeven
2014-09-14 09:45:25 UTC
Permalink
drivers/net/ethernet/cirrus/cs89x0.c: In function =E2=80=98cs89x0_iopor=
t_probe=E2=80=99:
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration =
of function =E2=80=98ioport_unmap=E2=80=99

Add the missing ioport_unmap() implementation, and convert ioport_map()
from a macro to a static inline function while we're at it (both copied
from asm-generic).

Signed-off-by: Geert Uytterhoeven <***@linux-m68k.org>
---
arch/m68k/include/asm/io_mm.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_m=
m.h
index ffdf54f44bc6..8955b40a5dc4 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -510,6 +510,13 @@ static inline void memcpy_toio(volatile void __iom=
em *dst, const void *src, int
*/
#define xlate_dev_kmem_ptr(p) p
=20
-#define ioport_map(port, nr) ((void __iomem *)(port))
+static inline void __iomem *ioport_map(unsigned long port, unsigned in=
t nr)
+{
+ return (void __iomem *) port;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
=20
#endif /* _IO_H */
--=20
1.9.1
Greg Ungerer
2014-09-15 01:07:18 UTC
Permalink
Hi Geert,
drivers/net/ethernet/cirrus/cs89x0.c: In function =E2=80=98cs89x0_iop=
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaratio=
n of function =E2=80=98ioport_unmap=E2=80=99
=20
Add the missing ioport_unmap() implementation, and convert ioport_map=
()
from a macro to a static inline function while we're at it (both copi=
ed
from asm-generic).
The non-mmu version of this, io_no.h, doesn't implement these either.
Should it?

Regards
Greg
---
arch/m68k/include/asm/io_mm.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
=20
diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io=
_mm.h
index ffdf54f44bc6..8955b40a5dc4 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -510,6 +510,13 @@ static inline void memcpy_toio(volatile void __i=
omem *dst, const void *src, int
*/
#define xlate_dev_kmem_ptr(p) p
=20
-#define ioport_map(port, nr) ((void __iomem *)(port))
+static inline void __iomem *ioport_map(unsigned long port, unsigned =
int nr)
+{
+ return (void __iomem *) port;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
=20
#endif /* _IO_H */
=20
Geert Uytterhoeven
2014-09-15 07:36:54 UTC
Permalink
Hi Greg,
Post by Greg Ungerer
drivers/net/ethernet/cirrus/cs89x0.c: In function =E2=80=98cs89x0_io=
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declarati=
on of function =E2=80=98ioport_unmap=E2=80=99
Post by Greg Ungerer
Add the missing ioport_unmap() implementation, and convert ioport_ma=
p()
Post by Greg Ungerer
from a macro to a static inline function while we're at it (both cop=
ied
Post by Greg Ungerer
from asm-generic).
The non-mmu version of this, io_no.h, doesn't implement these either.
Should it?
I think it should. However, you probably can't get there without PCI or=
ISA
enabled.

(doing some experiments with M548x/allmodconfig builds)

Currently PCI on M54xx is limited to MMU=3Dy?
As soon as PCI can be enabled with MMU=3Dn, you can get to:

lib/pci_iomap.c: In function =E2=80=98pci_iomap=E2=80=99:
lib/pci_iomap.c:37: error: implicit declaration of function =E2=80=98io=
port_map=E2=80=99
lib/pci_iomap.c:37: warning: return makes pointer from integer without =
a cast

drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_init=E2=80=99=
:
drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
function =E2=80=98ioport_map=E2=80=99
drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
from integer without a cast
drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_exit=E2=80=99=
:
drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
function =E2=80=98ioport_unmap=E2=80=99

Gr{oetje,eeting}s,

Geert

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

In personal conversations with technical people, I call myself a hacker=
=2E But
when I'm talking to journalists I just say "programmer" or something li=
ke that.
-- Linus Torvalds
Greg Ungerer
2014-09-16 06:25:27 UTC
Permalink
Hi Geert,
drivers/net/ethernet/cirrus/cs89x0.c: In function =E2=80=98cs89x0_i=
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declarat=
ion of function =E2=80=98ioport_unmap=E2=80=99
Add the missing ioport_unmap() implementation, and convert ioport_m=
ap()
from a macro to a static inline function while we're at it (both co=
pied
from asm-generic).
The non-mmu version of this, io_no.h, doesn't implement these either=
=2E
Should it?
=20
I think it should. However, you probably can't get there without PCI =
or ISA
enabled.
=20
(doing some experiments with M548x/allmodconfig builds)
=20
Currently PCI on M54xx is limited to MMU=3Dy?
Yes, though I am not sure why we have it limited to that case.
=20
lib/pci_iomap.c:37: error: implicit declaration of function =E2=80=98=
ioport_map=E2=80=99
lib/pci_iomap.c:37: warning: return makes pointer from integer withou=
t a cast
=20
drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_init=E2=80=
drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
function =E2=80=98ioport_map=E2=80=99
drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
from integer without a cast
drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_exit=E2=80=
drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
function =E2=80=98ioport_unmap=E2=80=99
Ok, I say yes we need it for non-MMU too. Do you want to come up with
another patch for the non-MMU case, or do you want me to do it?

Regards
Greg
Geert Uytterhoeven
2014-09-16 06:47:43 UTC
Permalink
Hi Greg,
Post by Greg Ungerer
drivers/net/ethernet/cirrus/cs89x0.c: In function =E2=80=98cs89x0_=
drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declara=
tion of function =E2=80=98ioport_unmap=E2=80=99
Post by Greg Ungerer
Add the missing ioport_unmap() implementation, and convert ioport_=
map()
Post by Greg Ungerer
from a macro to a static inline function while we're at it (both c=
opied
Post by Greg Ungerer
from asm-generic).
The non-mmu version of this, io_no.h, doesn't implement these eithe=
r.
Post by Greg Ungerer
Should it?
I think it should. However, you probably can't get there without PCI=
or ISA
Post by Greg Ungerer
enabled.
(doing some experiments with M548x/allmodconfig builds)
Currently PCI on M54xx is limited to MMU=3Dy?
Yes, though I am not sure why we have it limited to that case.
Yeah, I was wondering the same...
Post by Greg Ungerer
lib/pci_iomap.c:37: error: implicit declaration of function =E2=80=98=
ioport_map=E2=80=99
Post by Greg Ungerer
lib/pci_iomap.c:37: warning: return makes pointer from integer witho=
ut a cast
Post by Greg Ungerer
drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_init=E2=80=
drivers/gpio/gpio-amd8111.c:215: error: implicit declaration of
function =E2=80=98ioport_map=E2=80=99
drivers/gpio/gpio-amd8111.c:215: warning: assignment makes pointer
from integer without a cast
drivers/gpio/gpio-amd8111.c: In function =E2=80=98amd_gpio_exit=E2=80=
drivers/gpio/gpio-amd8111.c:236: error: implicit declaration of
function =E2=80=98ioport_unmap=E2=80=99
Ok, I say yes we need it for non-MMU too. Do you want to come up with
another patch for the non-MMU case, or do you want me to do it?
=46eel free to write a patch when you have time...

Groetje,eeting}s,

Geert

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

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

Loading...