Re: [PATCH v3 09/17] m68k: io: implement dummy relaxed accessor macros for writes

From: Will Deacon
Date: Thu Sep 25 2014 - 06:34:45 EST

On Thu, Sep 25, 2014 at 10:51:10AM +0100, Geert Uytterhoeven wrote:
> On Thu, Sep 25, 2014 at 11:33 AM, Will Deacon <will.deacon@xxxxxxx> wrote:
> >> Putting them here means they won't have any multiple include protection
> >> (there is no "#ifndef _IO_H" around them). Doesn't seem to lead to
> >> any problems in practice. Just flagging it...
> >
> > That's easy enough to fix, and actually, we should have __KERNEL__ checks
> > here too. Fixup below.
> Why do we need __KERNEL__ checks? <asm/io.h> is not exported.
> BTW, it seems there are many __KERNEL__ checks in arch/*/include/asm/
> we don't need.
> Or do I need more coffee?

No, I think you're quite right. I just saw the __KERNEL__ checks in io_no.h
and io_mm.h -- the latter even has some code outside of the guards:

#endif /* __KERNEL__ */


* Convert a physical pointer to a virtual kernel pointer for /dev/mem
* access
#define xlate_dev_mem_ptr(p) __va(p)

* Convert a virtual cached pointer to an uncached pointer
#define xlate_dev_kmem_ptr(p) p

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

#endif /* _IO_H */

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at