Re: [PATCH] arch: m68k: include: asm: define 'VM_DATA_DEFAULT_FLAGS'no matter whether has 'NOMMU' or not.

From: Greg Ungerer
Date: Sun Aug 04 2013 - 21:02:25 EST


Hi Geert,

On 29/06/13 18:26, Geert Uytterhoeven wrote:
> On Sat, Jun 29, 2013 at 10:01 AM, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
>>> The same .config file, also report the compiling error below:
>>>
>>> drivers/i2c/busses/i2c-ocores.c:81:2: error: implicit declaration of
>>> function âiowrite8â [-Werror=implicit-function-declaration]
>>> drivers/i2c/busses/i2c-ocores.c:86:2: error: implicit declaration of
>>> function âiowrite16â [-Werror=implicit-function-declaration]
>>> drivers/i2c/busses/i2c-ocores.c:91:2: error: implicit declaration of
>>> function âiowrite32â [-Werror=implicit-function-declaration]
>>> drivers/i2c/busses/i2c-ocores.c:96:2: error: implicit declaration of
>>> function âioread8â [-Werror=implicit-function-declaration]
>>> drivers/i2c/busses/i2c-ocores.c:101:2: error: implicit declaration of
>>> function âioread16â [-Werror=implicit-function-declaration]
>>> drivers/i2c/busses/i2c-ocores.c:106:2: error: implicit declaration of
>>> function âioread32â [-Werror=implicit-function-declaration]
>>>
>>> Excuse me, I am not quite familiar with the related hardware and m68k,
>>> I guess under m68k architecture, we need not this drivers, is it correct ?
>
> Until someone synthesizes the OpenCores i2c core together with the
> OpenCores 68000 core (they seem to have one), and tries to run uClinux
> on it...
>
>> That would be correct, yes. Perhaps add appropriate dependencies in
>> drivers/i2c/Kconfig to allow building I2C drivers
>> only on hardware that supports it?
>
> We still want it for compile-coverage.
>
> Now, the issue is that m68knommu doesn't implement ioread8() and
> friends, so I'm adding the uClinux list.

I think this is relatively strait forward to fix. And we end up
making m68knommu targets consistent with the MMU m68k targets in
the process.

Regards
Greg



[PATCH] m68knommu: user generic iomap to support ioread*/iowrite*

There is no reason we cannot use the generic iomap support to give us
the ioread* and iowrite* family of IO access functions. The m68k arch with
MMU enabled does, so this makes us consistent for all m68k now.

Some potentially valid drivers will fail to compile without these,
for example:

drivers/i2c/busses/i2c-ocores.c:81:2: error: implicit declaration of
function âiowrite8â [-Werror=implicit-function-declaration]
drivers/i2c/busses/i2c-ocores.c:86:2: error: implicit declaration of
function âiowrite16â [-Werror=implicit-function-declaration]
drivers/i2c/busses/i2c-ocores.c:91:2: error: implicit declaration of
function âiowrite32â [-Werror=implicit-function-declaration]
drivers/i2c/busses/i2c-ocores.c:96:2: error: implicit declaration of
function âioread8â [-Werror=implicit-function-declaration]
drivers/i2c/busses/i2c-ocores.c:101:2: error: implicit declaration of
function âioread16â [-Werror=implicit-function-declaration]
drivers/i2c/busses/i2c-ocores.c:106:2: error: implicit declaration of
function âioread32â [-Werror=implicit-function-declaration]

Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxx>
---
arch/m68k/Kconfig | 2 +-
arch/m68k/include/asm/io_no.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 821170e..c3cda41 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -11,6 +11,7 @@ config M68K
select VIRT_TO_BUS
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
select GENERIC_CPU_DEVICES
+ select GENERIC_IOMAP
select GENERIC_STRNCPY_FROM_USER if MMU
select GENERIC_STRNLEN_USER if MMU
select FPU if MMU
@@ -72,7 +73,6 @@ source "kernel/Kconfig.freezer"
config MMU
bool "MMU-based Paged Memory Management Support"
default y
- select GENERIC_IOMAP
help
Select if you want MMU-based virtualised addressing space
support by paged memory management. If unsure, say 'Y'.
diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index 353bf75..e153478 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -4,6 +4,7 @@
#ifdef __KERNEL__

#include <asm/virtconvert.h>
+#include <asm-generic/iomap.h>

/*
* These are for ISA/PCI shared memory _only_ and should never be used

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/