diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2013-05-21 10:08:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-05-22 03:45:57 -0400 |
commit | 576ebd74928fd60ae112b33c42b89602015fadbd (patch) | |
tree | 724fb0a8f8e0d5f39bd9616a89c088046e7198ea /arch | |
parent | abd9a0c36028771a8f397f38bf79bfcf404f957f (diff) |
kernel: Fix s390 absolute memory access for /dev/mem
On s390 the prefix page and absolute zero pages are not correctly
returned when reading /dev/mem. The reason is that the s390 asm/io.h
file includes the asm-generic/io.h file which then defines
xlate_dev_mem_ptr() and therefore overwrites the s390 specific
version that does the correct swap operation for prefix and absolute
zero pages. The problem is a regression that was introduced with git
commit cd248341 (s390/pci: base support).
To fix the problem add "#ifndef xlate_dev_mem_ptr" in asm-generic/io.h
and "#define xlate_dev_mem_ptr" in asm/io.h. This ensures that the
s390 version is used. For completeness also add the "#ifndef"
construct for xlate_dev_kmem_ptr().
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/io.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index 379d96e2105e..fd9be010f9b2 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h | |||
@@ -36,6 +36,7 @@ static inline void * phys_to_virt(unsigned long address) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | void *xlate_dev_mem_ptr(unsigned long phys); | 38 | void *xlate_dev_mem_ptr(unsigned long phys); |
39 | #define xlate_dev_mem_ptr xlate_dev_mem_ptr | ||
39 | void unxlate_dev_mem_ptr(unsigned long phys, void *addr); | 40 | void unxlate_dev_mem_ptr(unsigned long phys, void *addr); |
40 | 41 | ||
41 | /* | 42 | /* |