aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-08-01 10:39:18 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-08-01 10:39:34 -0400
commitd918fe2bd72830dfbe8ca2bb30d49930d1356e6d (patch)
tree9f5a0623c50a1505be87be15a42bb22a477d6fd7 /arch/s390
parent3b8e3004aea95c687e8991583e7b150ec1416ff3 (diff)
[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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/mem_detect.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/s390/kernel/mem_detect.c b/arch/s390/kernel/mem_detect.c
index 18ed7abe16c5..9872999c66d1 100644
--- a/arch/s390/kernel/mem_detect.c
+++ b/arch/s390/kernel/mem_detect.c
@@ -9,27 +9,6 @@
9#include <asm/sclp.h> 9#include <asm/sclp.h>
10#include <asm/setup.h> 10#include <asm/setup.h>
11 11
12static int memory_fast_detect(struct mem_chunk *chunk)
13{
14 unsigned long val0 = 0;
15 unsigned long val1 = 0xc;
16 int rc = -EOPNOTSUPP;
17
18 if (ipl_flags & IPL_NSS_VALID)
19 return -EOPNOTSUPP;
20 asm volatile(
21 " diag %1,%2,0x260\n"
22 "0: lhi %0,0\n"
23 "1:\n"
24 EX_TABLE(0b,1b)
25 : "+d" (rc), "+d" (val0), "+d" (val1) : : "cc");
26
27 if (rc || val0 != val1)
28 return -EOPNOTSUPP;
29 chunk->size = val0 + 1;
30 return 0;
31}
32
33static inline int tprot(unsigned long addr) 12static inline int tprot(unsigned long addr)
34{ 13{
35 int rc = -EFAULT; 14 int rc = -EFAULT;
@@ -84,8 +63,6 @@ void detect_memory_layout(struct mem_chunk chunk[])
84 unsigned long flags, cr0; 63 unsigned long flags, cr0;
85 64
86 memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk)); 65 memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk));
87 if (memory_fast_detect(&chunk[0]) == 0)
88 return;
89 /* Disable IRQs, DAT and low address protection so tprot does the 66 /* Disable IRQs, DAT and low address protection so tprot does the
90 * right thing and we don't get scheduled away with low address 67 * right thing and we don't get scheduled away with low address
91 * protection disabled. 68 * protection disabled.