Commit d918fe2b authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[S390] Remove diag 0x260 call from memory detection.

The result of the diag 0x260 call is not always what one would expect.
So just remove it.
Signed-off-by: default avatarHeiko Carstens <>
Signed-off-by: default avatarMartin Schwidefsky <>
parent 3b8e3004
......@@ -9,27 +9,6 @@
#include <asm/sclp.h>
#include <asm/setup.h>
static int memory_fast_detect(struct mem_chunk *chunk)
unsigned long val0 = 0;
unsigned long val1 = 0xc;
int rc = -EOPNOTSUPP;
if (ipl_flags & IPL_NSS_VALID)
asm volatile(
" diag %1,%2,0x260\n"
"0: lhi %0,0\n"
: "+d" (rc), "+d" (val0), "+d" (val1) : : "cc");
if (rc || val0 != val1)
chunk->size = val0 + 1;
return 0;
static inline int tprot(unsigned long addr)
int rc = -EFAULT;
......@@ -84,8 +63,6 @@ void detect_memory_layout(struct mem_chunk chunk[])
unsigned long flags, cr0;
memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk));
if (memory_fast_detect(&chunk[0]) == 0)
/* Disable IRQs, DAT and low address protection so tprot does the
* right thing and we don't get scheduled away with low address
* protection disabled.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment