aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-04 09:40:38 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 09:40:38 -0500
commit36a2bd425d9b3ba2a40b0653e08d17702c78558e (patch)
treed42bd1409d7ffdb05995ad00a9722b88c4c4cbca
parentbaf2aeb3d9e286add823bcaea5442ad4ee34f6e4 (diff)
[S390] Cleanup memory_chunk array usage.
Need this at yet another file and don't want to add yet another extern... Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/head31.S2
-rw-r--r--arch/s390/kernel/setup.c7
-rw-r--r--arch/s390/mm/extmem.c11
-rw-r--r--include/asm-s390/setup.h15
4 files changed, 19 insertions, 16 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index adb082aeada6..9817c327aab1 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -157,7 +157,7 @@ startup_continue:
157 slr %r4,%r4 # set start of chunk to zero 157 slr %r4,%r4 # set start of chunk to zero
158 slr %r5,%r5 # set end of chunk to zero 158 slr %r5,%r5 # set end of chunk to zero
159 slr %r6,%r6 # set access code to zero 159 slr %r6,%r6 # set access code to zero
160 la %r10, MEMORY_CHUNKS # number of chunks 160 la %r10,MEMORY_CHUNKS # number of chunks
161.Lloop: 161.Lloop:
162 tprot 0(%r5),0 # test protection of first byte 162 tprot 0(%r5),0 # test protection of first byte
163 ipm %r7 163 ipm %r7
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 9bbef0c65584..b1a8ad967f9c 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -64,11 +64,8 @@ unsigned int console_devno = -1;
64unsigned int console_irq = -1; 64unsigned int console_irq = -1;
65unsigned long memory_size = 0; 65unsigned long memory_size = 0;
66unsigned long machine_flags = 0; 66unsigned long machine_flags = 0;
67struct { 67
68 unsigned long addr, size, type; 68struct mem_chunk memory_chunk[MEMORY_CHUNKS];
69} memory_chunk[MEMORY_CHUNKS] = { { 0 } };
70#define CHUNK_READ_WRITE 0
71#define CHUNK_READ_ONLY 1
72volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ 69volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
73unsigned long __initdata zholes_size[MAX_NR_ZONES]; 70unsigned long __initdata zholes_size[MAX_NR_ZONES];
74static unsigned long __initdata memory_end; 71static unsigned long __initdata memory_end;
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 077af5404948..375c2c4f6b77 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -14,12 +14,13 @@
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/bootmem.h> 16#include <linux/bootmem.h>
17#include <linux/ctype.h>
17#include <asm/page.h> 18#include <asm/page.h>
18#include <asm/ebcdic.h> 19#include <asm/ebcdic.h>
19#include <asm/errno.h> 20#include <asm/errno.h>
20#include <asm/extmem.h> 21#include <asm/extmem.h>
21#include <asm/cpcmd.h> 22#include <asm/cpcmd.h>
22#include <linux/ctype.h> 23#include <asm/setup.h>
23 24
24#define DCSS_DEBUG /* Debug messages on/off */ 25#define DCSS_DEBUG /* Debug messages on/off */
25 26
@@ -82,10 +83,6 @@ static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list);
82static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC", 83static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
83 "EW/EN-MIXED" }; 84 "EW/EN-MIXED" };
84 85
85extern struct {
86 unsigned long addr, size, type;
87} memory_chunk[MEMORY_CHUNKS];
88
89/* 86/*
90 * Create the 8 bytes, ebcdic VM segment name from 87 * Create the 8 bytes, ebcdic VM segment name from
91 * an ascii name. 88 * an ascii name.
@@ -249,8 +246,8 @@ segment_overlaps_storage(struct dcss_segment *seg)
249{ 246{
250 int i; 247 int i;
251 248
252 for (i=0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { 249 for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) {
253 if (memory_chunk[i].type != 0) 250 if (memory_chunk[i].type != CHUNK_READ_WRITE)
254 continue; 251 continue;
255 if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) 252 if ((memory_chunk[i].addr >> 20) > (seg->end >> 20))
256 continue; 253 continue;
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index 5d72eda8a11b..7664bacdd832 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -2,7 +2,7 @@
2 * include/asm-s390/setup.h 2 * include/asm-s390/setup.h
3 * 3 *
4 * S390 version 4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 * Copyright IBM Corp. 1999,2006
6 */ 6 */
7 7
8#ifndef _ASM_S390_SETUP_H 8#ifndef _ASM_S390_SETUP_H
@@ -30,6 +30,17 @@
30#endif /* __s390x__ */ 30#endif /* __s390x__ */
31#define COMMAND_LINE ((char *) (0x10480)) 31#define COMMAND_LINE ((char *) (0x10480))
32 32
33#define CHUNK_READ_WRITE 0
34#define CHUNK_READ_ONLY 1
35
36struct mem_chunk {
37 unsigned long addr;
38 unsigned long size;
39 unsigned long type;
40};
41
42extern struct mem_chunk memory_chunk[];
43
33/* 44/*
34 * Machine features detected in head.S 45 * Machine features detected in head.S
35 */ 46 */
@@ -53,7 +64,6 @@ extern unsigned long machine_flags;
53#define MACHINE_HAS_MVCOS (machine_flags & 512) 64#define MACHINE_HAS_MVCOS (machine_flags & 512)
54#endif /* __s390x__ */ 65#endif /* __s390x__ */
55 66
56
57#define MACHINE_HAS_SCLP (!MACHINE_IS_P390) 67#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
58 68
59/* 69/*
@@ -71,7 +81,6 @@ extern unsigned int console_irq;
71#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 81#define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
72#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 82#define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
73 83
74
75struct ipl_list_hdr { 84struct ipl_list_hdr {
76 u32 len; 85 u32 len;
77 u8 reserved1[3]; 86 u8 reserved1[3];