Re: [PATCH v2 1/5] m68k: common PCI support definitions and code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

On 28/6/21 11:29 pm, Geert Uytterhoeven wrote:
Hi Greg,

On Mon, Jun 28, 2021 at 3:23 PM Greg Ungerer <gerg@xxxxxxxxxxxxxx> wrote:
On 28/6/21 5:44 pm, Geert Uytterhoeven wrote:
On Mon, Jul 16, 2012 at 2:25 PM <gerg@xxxxxxxxxxxx> wrote:
From: Greg Ungerer <gerg@xxxxxxxxxxx>

Basic set of definitions and support code required to turn on CONFIG_PCI
for the m68k architecture. Nothing specific to any PCI implementation in
any m68k class CPU hardware yet.

Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxx>

--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -340,4 +340,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
    */
   #define xlate_dev_kmem_ptr(p)  p

+#define ioport_map(port, nr)   ((void __iomem *)(port))

So should we dop:

      config NO_IOPORT_MAP
              def_bool y

Triggered by seeing CONFIG_GPIO_TQMX86 being removed from allmodconfig
builds due to commit c6414e1a2bd26b00 ("gpio: AMD8111 and TQMX86
require HAS_IOPORT_MAP").

I guess we could.
But we would have to remove the iomap/iounmap definitions in kmap.h too right?

Why? Do I need more coffee?

If you do this:

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 372e4e69c43a..a6d4b2b1fe5a 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -59,9 +59,6 @@ config TIME_LOW_RES
        bool
        default y
-config NO_IOPORT_MAP
-       def_bool y
-
 config ZONE_DMA
        bool
        default y


And the compile for an M5475 target for example you get this:

  CC      lib/strncpy_from_user.o
In file included from ./arch/m68k/include/asm/io_no.h:134,
                 from ./arch/m68k/include/asm/io.h:6,
                 from ./include/linux/io.h:13,
                 from ./include/linux/irq.h:20,
                 from ./include/asm-generic/hardirq.h:17,
                 from ./arch/m68k/include/generated/asm/hardirq.h:1,
                 from ./include/linux/hardirq.h:11,
                 from ./include/linux/interrupt.h:11,
                 from ./include/linux/pci.h:38,
                 from lib/iomap.c:7:
./arch/m68k/include/asm/kmap.h:61:20: error: redefinition of ‘ioport_map’
 #define ioport_map ioport_map
                    ^~~~~~~~~~
lib/iomap.c:362:15: note: in expansion of macro ‘ioport_map’
 void __iomem *ioport_map(unsigned long port, unsigned int nr)
               ^~~~~~~~~~
./arch/m68k/include/asm/kmap.h:61:20: note: previous definition of ‘ioport_map’ was here
 #define ioport_map ioport_map
                    ^~~~~~~~~~
./arch/m68k/include/asm/kmap.h:62:29: note: in expansion of macro ‘ioport_map’
 static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
                             ^~~~~~~~~~
./arch/m68k/include/asm/kmap.h:67:22: error: redefinition of ‘ioport_unmap’
 #define ioport_unmap ioport_unmap
                      ^~~~~~~~~~~~
lib/iomap.c:369:6: note: in expansion of macro ‘ioport_unmap’
 void ioport_unmap(void __iomem *addr)
      ^~~~~~~~~~~~
./arch/m68k/include/asm/kmap.h:67:22: note: previous definition of ‘ioport_unmap’ was here
 #define ioport_unmap ioport_unmap
                      ^~~~~~~~~~~~
./arch/m68k/include/asm/kmap.h:68:20: note: in expansion of macro ‘ioport_unmap’
 static inline void ioport_unmap(void __iomem *p)
                    ^~~~~~~~~~~~

Regards
Greg



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux