aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-02-11 13:15:29 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:18:07 -0500
commit23db764d3db5a4bb1e104ad9310e5dc18e4ffa1b (patch)
treed8a944f4e0ac27adda477295886cfbe08f0f73cb /include/asm-s390
parent5ea8176994003483a18c8fed580901e2125f8a83 (diff)
[PATCH] Switch s390 to NO_IOMEM
Martin Schwidefsky wrote: "s390 does not even need (in|out)b(_p|). I wondered what else from io.h do we not need. The answer is: almost nothing. With the devres patch from Al and the dma-mapping patch from Heiko we can get rid of iomem and all associated definitions." So we'll just need to replace NO_IOPORT with NO_IOMEM in Kconfig and kill arch/s390/mm/ioremap.c. BTW, there's an annoying bit of junk in there - IO_SPACE_LIMIT. We only need it for /proc/ioports, which AFAICS shouldn't even be there on s390 (or uml). OTOH, removing that thing would mean a user-visible change - we go from "empty file in /proc" to "no such file in /proc"... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/io.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h
index a4c2d550dad4..dca6a6cc103f 100644
--- a/include/asm-s390/io.h
+++ b/include/asm-s390/io.h
@@ -13,7 +13,6 @@
13 13
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15 15
16#include <linux/vmalloc.h>
17#include <asm/page.h> 16#include <asm/page.h>
18 17
19#define IO_SPACE_LIMIT 0xffffffff 18#define IO_SPACE_LIMIT 0xffffffff
@@ -41,70 +40,6 @@ static inline void * phys_to_virt(unsigned long address)
41 return __io_virt(address); 40 return __io_virt(address);
42} 41}
43 42
44extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
45
46static inline void * ioremap (unsigned long offset, unsigned long size)
47{
48 return __ioremap(offset, size, 0);
49}
50
51/*
52 * This one maps high address device memory and turns off caching for that area.
53 * it's useful if some control registers are in such an area and write combining
54 * or read caching is not desirable:
55 */
56static inline void * ioremap_nocache (unsigned long offset, unsigned long size)
57{
58 return __ioremap(offset, size, 0);
59}
60
61extern void iounmap(void *addr);
62
63/*
64 * IO bus memory addresses are also 1:1 with the physical address
65 */
66#define virt_to_bus virt_to_phys
67#define bus_to_virt phys_to_virt
68
69/*
70 * readX/writeX() are used to access memory mapped devices. On some
71 * architectures the memory mapped IO stuff needs to be accessed
72 * differently.
73 */
74
75#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
76#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
77#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
78#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr))
79
80#define readb_relaxed(addr) readb(addr)
81#define readw_relaxed(addr) readw(addr)
82#define readl_relaxed(addr) readl(addr)
83#define readq_relaxed(addr) readq(addr)
84#define __raw_readb readb
85#define __raw_readw readw
86#define __raw_readl readl
87#define __raw_readq readq
88
89#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
90#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
91#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
92#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b))
93#define __raw_writeb writeb
94#define __raw_writew writew
95#define __raw_writel writel
96#define __raw_writeq writeq
97
98#define memset_io(a,b,c) memset(__io_virt(a),(b),(c))
99#define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c))
100#define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c))
101
102#define inb_p(addr) readb(addr)
103#define inb(addr) readb(addr)
104
105#define outb(x,addr) ((void) writeb(x,addr))
106#define outb_p(x,addr) outb(x,addr)
107
108#define mmiowb() do { } while (0) 43#define mmiowb() do { } while (0)
109 44
110/* 45/*