Felipe Balbi <balbi@xxxxxx> writes: > On Thu, Nov 01, 2012 at 11:06:58AM -0400, David Miller wrote: >> From: Bjørn Mork <bjorn@xxxxxxx> >> Date: Thu, 01 Nov 2012 14:38:29 +0100 >> >> > Felipe Balbi <balbi@xxxxxx> writes: >> > >> >> btw, only alpha and x86 seem to be providing all of those, but if you >> >> look into our documentation, it's said that drivers are supposed to use >> >> write/read{b,w,l,q} for all memory-mapped io. I'd expect all platforms >> >> to provide those even if just to allow compilation of drivers. >> > >> > Only if HAS_IOMEM is true, I believe. >> >> This is correct. > > fair enough, then we can depend on HAS_IOMEM. > > Another question, if HAS_IOMEM is true, is the arch expected to provide > *all* accessor methods ? I'll leave this for those with more clue... But there is a comment in arch/alpha/include/asm/io.h indicating that writeq/readq support is tested separately, so I guess it must be optional: /* * Some mucking forons use if[n]def writeq to check if platform has it. * It's a bloody bad idea and we probably want ARCH_HAS_WRITEQ for them * to play with; for now just use cpp anti-recursion logics and make sure * that damn thing is defined and expands to itself. */ #define writeq writeq #define readq readq > And the last one: if the arch provides > read/write{b,w,l,q}, should it be selecting HAS_IOMEM ?? But that one is easy: HAS_IOMEM is true by default. The arch sets NO_IOMEM to disable it. Similar to HAS_DMA. So you can be pretty sure that HAS_IOMEM is selected unless the arch has reasons not to. From lib/Kconfig: config HAS_IOMEM boolean depends on !NO_IOMEM select GENERIC_IO default y Bjørn -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html