aboutsummaryrefslogtreecommitdiffstats
path: root/arch/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 /arch/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 'arch/s390')
-rw-r--r--arch/s390/Kconfig2
-rw-r--r--arch/s390/mm/Makefile2
-rw-r--r--arch/s390/mm/ioremap.c58
3 files changed, 2 insertions, 60 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 0c83d26ef09a..eaaac3788110 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -41,7 +41,7 @@ config GENERIC_HWEIGHT
41config GENERIC_TIME 41config GENERIC_TIME
42 def_bool y 42 def_bool y
43 43
44config NO_IOPORT 44config NO_IOMEM
45 def_bool y 45 def_bool y
46 46
47mainmenu "Linux Kernel Configuration" 47mainmenu "Linux Kernel Configuration"
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile
index 8e09db1edbb9..f95449b29fa5 100644
--- a/arch/s390/mm/Makefile
+++ b/arch/s390/mm/Makefile
@@ -2,6 +2,6 @@
2# Makefile for the linux s390-specific parts of the memory manager. 2# Makefile for the linux s390-specific parts of the memory manager.
3# 3#
4 4
5obj-y := init.o fault.o ioremap.o extmem.o mmap.o vmem.o 5obj-y := init.o fault.o extmem.o mmap.o vmem.o
6obj-$(CONFIG_CMM) += cmm.o 6obj-$(CONFIG_CMM) += cmm.o
7 7
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c
deleted file mode 100644
index 3d2100a4e209..000000000000
--- a/arch/s390/mm/ioremap.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * arch/s390/mm/ioremap.c
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Hartmut Penner (hp@de.ibm.com)
7 *
8 * Derived from "arch/i386/mm/extable.c"
9 * (C) Copyright 1995 1996 Linus Torvalds
10 *
11 * Re-map IO memory to kernel address space so that we can access it.
12 * This is needed for high PCI addresses that aren't mapped in the
13 * 640k-1MB IO memory area on PC's
14 */
15
16#include <linux/vmalloc.h>
17#include <linux/mm.h>
18#include <linux/io.h>
19#include <asm/pgalloc.h>
20
21/*
22 * Generic mapping function (not visible outside):
23 */
24
25/*
26 * Remap an arbitrary physical address space into the kernel virtual
27 * address space. Needed when the kernel wants to access high addresses
28 * directly.
29 */
30void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
31{
32 void * addr;
33 struct vm_struct * area;
34
35 if (phys_addr < virt_to_phys(high_memory))
36 return phys_to_virt(phys_addr);
37 if (phys_addr & ~PAGE_MASK)
38 return NULL;
39 size = PAGE_ALIGN(size);
40 if (!size || size > phys_addr + size)
41 return NULL;
42 area = get_vm_area(size, VM_IOREMAP);
43 if (!area)
44 return NULL;
45 addr = area->addr;
46 if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
47 phys_addr, __pgprot(flags))) {
48 vfree(addr);
49 return NULL;
50 }
51 return addr;
52}
53
54void iounmap(void *addr)
55{
56 if (addr > high_memory)
57 vfree(addr);
58}