]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
s390/mem_detect: fix memory type of first block
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 27 Dec 2016 14:36:34 +0000 (15:36 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Jan 2017 06:27:54 +0000 (07:27 +0100)
commit00de54c803d5526a791112e653614656365c5578
tree44a28936630b093bf582abf04f976b1062b35627
parenta2ce2a956814b52c062d17422ebbf87ce4f0158d
s390/mem_detect: fix memory type of first block

Fix a long-standing but currently irrelevant bug: the memory detection
code performs a tprot instruction on address zero to figure out if the
first memory chunk is readable or writable. Due to low address
protection the result is "read-only". If the memory detection code
would actually care, it would have to ignore the first memory
increment, but it adds the memory increment to writable memory anyway.

If memblock debugging is enabled this leads to an extra rather
surprising call which registers memory. To avoid this get rid of the
first misleading tprot call and simply assume that the first memory
increment is writable. Otherwise we wouldn't have reached the memory
detection code anyway.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/mem_detect.c