Commit 36a2bd42 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[S390] Cleanup memory_chunk array usage.

Need this at yet another file and don't want to add yet another
extern...
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent baf2aeb3
...@@ -157,7 +157,7 @@ startup_continue: ...@@ -157,7 +157,7 @@ startup_continue:
slr %r4,%r4 # set start of chunk to zero slr %r4,%r4 # set start of chunk to zero
slr %r5,%r5 # set end of chunk to zero slr %r5,%r5 # set end of chunk to zero
slr %r6,%r6 # set access code to zero slr %r6,%r6 # set access code to zero
la %r10, MEMORY_CHUNKS # number of chunks la %r10,MEMORY_CHUNKS # number of chunks
.Lloop: .Lloop:
tprot 0(%r5),0 # test protection of first byte tprot 0(%r5),0 # test protection of first byte
ipm %r7 ipm %r7
......
...@@ -64,11 +64,8 @@ unsigned int console_devno = -1; ...@@ -64,11 +64,8 @@ unsigned int console_devno = -1;
unsigned int console_irq = -1; unsigned int console_irq = -1;
unsigned long memory_size = 0; unsigned long memory_size = 0;
unsigned long machine_flags = 0; unsigned long machine_flags = 0;
struct {
unsigned long addr, size, type; struct mem_chunk memory_chunk[MEMORY_CHUNKS];
} memory_chunk[MEMORY_CHUNKS] = { { 0 } };
#define CHUNK_READ_WRITE 0
#define CHUNK_READ_ONLY 1
volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
unsigned long __initdata zholes_size[MAX_NR_ZONES]; unsigned long __initdata zholes_size[MAX_NR_ZONES];
static unsigned long __initdata memory_end; static unsigned long __initdata memory_end;
......
...@@ -14,12 +14,13 @@ ...@@ -14,12 +14,13 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/ctype.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/extmem.h> #include <asm/extmem.h>
#include <asm/cpcmd.h> #include <asm/cpcmd.h>
#include <linux/ctype.h> #include <asm/setup.h>
#define DCSS_DEBUG /* Debug messages on/off */ #define DCSS_DEBUG /* Debug messages on/off */
...@@ -82,10 +83,6 @@ static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list); ...@@ -82,10 +83,6 @@ static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list);
static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC", static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
"EW/EN-MIXED" }; "EW/EN-MIXED" };
extern struct {
unsigned long addr, size, type;
} memory_chunk[MEMORY_CHUNKS];
/* /*
* Create the 8 bytes, ebcdic VM segment name from * Create the 8 bytes, ebcdic VM segment name from
* an ascii name. * an ascii name.
...@@ -249,8 +246,8 @@ segment_overlaps_storage(struct dcss_segment *seg) ...@@ -249,8 +246,8 @@ segment_overlaps_storage(struct dcss_segment *seg)
{ {
int i; int i;
for (i=0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) {
if (memory_chunk[i].type != 0) if (memory_chunk[i].type != CHUNK_READ_WRITE)
continue; continue;
if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) if ((memory_chunk[i].addr >> 20) > (seg->end >> 20))
continue; continue;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* include/asm-s390/setup.h * include/asm-s390/setup.h
* *
* S390 version * S390 version
* Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation * Copyright IBM Corp. 1999,2006
*/ */
#ifndef _ASM_S390_SETUP_H #ifndef _ASM_S390_SETUP_H
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
#endif /* __s390x__ */ #endif /* __s390x__ */
#define COMMAND_LINE ((char *) (0x10480)) #define COMMAND_LINE ((char *) (0x10480))
#define CHUNK_READ_WRITE 0
#define CHUNK_READ_ONLY 1
struct mem_chunk {
unsigned long addr;
unsigned long size;
unsigned long type;
};
extern struct mem_chunk memory_chunk[];
/* /*
* Machine features detected in head.S * Machine features detected in head.S
*/ */
...@@ -53,7 +64,6 @@ extern unsigned long machine_flags; ...@@ -53,7 +64,6 @@ extern unsigned long machine_flags;
#define MACHINE_HAS_MVCOS (machine_flags & 512) #define MACHINE_HAS_MVCOS (machine_flags & 512)
#endif /* __s390x__ */ #endif /* __s390x__ */
#define MACHINE_HAS_SCLP (!MACHINE_IS_P390) #define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
/* /*
...@@ -71,7 +81,6 @@ extern unsigned int console_irq; ...@@ -71,7 +81,6 @@ extern unsigned int console_irq;
#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) #define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) #define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
struct ipl_list_hdr { struct ipl_list_hdr {
u32 len; u32 len;
u8 reserved1[3]; u8 reserved1[3];
......
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