Michael Holzheu b2a68c2356 s390: allow absolute memory access for /dev/mem
Currently dev/mem for s390 provides only real memory access. This means
that the CPU prefix pages are swapped. The prefix swap for real memory
works as follows:

Each CPU owns a prefix register that points to a page aligned memory
location "P". If this CPU accesses the address range [0,0x1fff], it is
translated by the hardware to [P,P+0x1fff]. Accordingly if this CPU
accesses the address range [P,P+0x1fff], it is translated by the hardware
to [0,0x1fff].  Therefore, if [P,P+0x1fff] or [0,0x1fff] is read from
the current /dev/mem device, the incorrectly swapped memory content is
returned.

With this patch the /dev/mem architecture code is modified to provide
absolute memory access. This is done via the arch specific functions
xlate_dev_mem_ptr() and unxlate_dev_mem_ptr(). For swapped pages on
s390 the function xlate_dev_mem_ptr() now returns a new buffer with a
copy of the requested absolute memory. In case the buffer was allocated,
the unxlate_dev_mem_ptr() function frees it after /dev/mem code has
called copy_to_user().

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-05-16 14:42:38 +02:00
..
2012-03-28 18:30:02 +01:00
2008-12-25 13:38:55 +01:00
2012-03-28 18:30:02 +01:00
2011-03-31 11:26:23 -03:00
2012-02-27 07:54:27 -08:00
2012-03-11 11:59:28 -04:00
2010-02-26 22:37:29 +01:00
2012-03-28 18:30:02 +01:00
2012-03-11 11:59:29 -04:00
2011-05-26 09:48:25 +02:00
2012-03-28 18:30:02 +01:00
2012-03-28 18:30:02 +01:00
2008-12-25 13:39:06 +01:00
2012-03-11 11:59:29 -04:00
2008-12-25 13:38:57 +01:00
2010-10-24 10:51:30 +02:00
2011-12-27 11:27:12 +01:00
2010-06-09 11:12:36 +02:00
2012-02-14 12:01:29 -08:00
2012-03-28 18:30:02 +01:00
2011-10-30 15:16:42 +01:00
2009-06-12 10:27:31 +02:00
2012-03-28 18:30:02 +01:00
2012-03-28 18:30:02 +01:00
2010-08-09 16:48:44 -04:00
2012-04-11 14:28:26 +02:00
2012-03-28 18:30:02 +01:00
2011-12-27 11:27:12 +01:00
2012-03-11 11:59:28 -04:00
2012-01-03 22:55:17 -05:00
2012-03-28 18:30:02 +01:00
2012-03-11 11:59:28 -04:00
2009-03-26 15:24:05 +01:00