Thread (74 messages) flat view 74 messages, 13 authors, 2012-02-28
STALE5271d

[PATCH 13/15] ARM: make mach/io.h include optional

From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-02-14 01:06:32

On Monday 13 February 2012, H Hartley Sweeten wrote:
quoted
+#ifdef CONFIG_NEED_MACH_IO_H
 #include <mach/io.h>
+#else
+#define __io(a)              ({ (void)(a); __typesafe_io(0); })
+#define __mem_pci(a) (a)
+#endif
Rob,

I compile and boot tested these patches on EP93xxbut did not check them
with sparse.

Most of the mach/io.h headers you remove in Patch 14/15 have the __io
macro defined like:

#define __io(a)         __typesafe_io(a)

Does your change above still keep the __io macro typesafe?

They don't appear equivalent to me...
It's not equivalent, but the new version is more correct for most
platforms because it turns a random pointer dereference into a NULL
pointer dereference.

If you have none of PCI/ISA/PCMCIA, then inb/outb should never be
used. Ideally we would undefine __io in that case, which results
in the inb/outb stuff also not getting defined, but some drivers
like 8250 serial then fail to build even for systems that only
use the readl/writel path.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help