Skip to content

Commit

Permalink
[S390] Remove diag 0x260 call from memory detection.
Browse files Browse the repository at this point in the history
The result of the diag 0x260 call is not always what one would expect.
So just remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Aug 1, 2008
1 parent 3b8e300 commit d918fe2
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions arch/s390/kernel/mem_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return -EOPNOTSUPP;
asm volatile(
" diag %1,%2,0x260\n"
"0: lhi %0,0\n"
"1:\n"
EX_TABLE(0b,1b)
: "+d" (rc), "+d" (val0), "+d" (val1) : : "cc");

if (rc || val0 != val1)
return -EOPNOTSUPP;
chunk->size = val0 + 1;
return 0;
}

static inline int tprot(unsigned long addr)
{
int rc = -EFAULT;
Expand Down Expand Up @@ -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)
return;
/* 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.
Expand Down

0 comments on commit d918fe2

Please sign in to comment.