diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2005-06-16 16:30:54 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:23 -0400 |
commit | 3bd4c902da14030c9a780cd0c4be2ffe9aee2974 (patch) | |
tree | 3ebf15e8aaa4029119028d32721fd7ccbe59bccf /arch/mips | |
parent | 902d21d5313ba08cccadc9fceee2df3cf34e84eb (diff) |
Deal with the bloody KSEG vs CKSEG horror...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/dec/ecc-berr.c | 3 | ||||
-rw-r--r-- | arch/mips/dec/prom/memory.c | 14 | ||||
-rw-r--r-- | arch/mips/dec/reset.c | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c index c4842096e50d..a36503c95bbb 100644 --- a/arch/mips/dec/ecc-berr.c +++ b/arch/mips/dec/ecc-berr.c | |||
@@ -144,7 +144,8 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker) | |||
144 | } else if (!sngl) { | 144 | } else if (!sngl) { |
145 | status = dbestr; | 145 | status = dbestr; |
146 | } else { | 146 | } else { |
147 | volatile u32 *ptr = (void *)KSEG1ADDR(address); | 147 | volatile u32 *ptr = |
148 | (void *)CKSEG1ADDR(address); | ||
148 | 149 | ||
149 | *ptr = *ptr; /* Rewrite. */ | 150 | *ptr = *ptr; /* Rewrite. */ |
150 | iob(); | 151 | iob(); |
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index e4f6f26425ea..83d4556c3cb5 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c | |||
@@ -35,22 +35,22 @@ static inline void pmax_setup_memory_region(void) | |||
35 | extern char genexcept_early; | 35 | extern char genexcept_early; |
36 | 36 | ||
37 | /* Install exception handler */ | 37 | /* Install exception handler */ |
38 | memcpy(&old_handler, (void *)(KSEG0 + 0x80), 0x80); | 38 | memcpy(&old_handler, (void *)(CKSEG0 + 0x80), 0x80); |
39 | memcpy((void *)(KSEG0 + 0x80), &genexcept_early, 0x80); | 39 | memcpy((void *)(CKSEG0 + 0x80), &genexcept_early, 0x80); |
40 | 40 | ||
41 | /* read unmapped and uncached (KSEG1) | 41 | /* read unmapped and uncached (KSEG1) |
42 | * DECstations have at least 4MB RAM | 42 | * DECstations have at least 4MB RAM |
43 | * Assume less than 480MB of RAM, as this is max for 5000/2xx | 43 | * Assume less than 480MB of RAM, as this is max for 5000/2xx |
44 | * FIXME this should be replaced by the first free page! | 44 | * FIXME this should be replaced by the first free page! |
45 | */ | 45 | */ |
46 | for (memory_page = (unsigned char *) KSEG1 + CHUNK_SIZE; | 46 | for (memory_page = (unsigned char *)CKSEG1 + CHUNK_SIZE; |
47 | (mem_err== 0) && (memory_page < ((unsigned char *) KSEG1+0x1E000000)); | 47 | mem_err == 0 && memory_page < (unsigned char *)CKSEG1 + 0x1e00000; |
48 | memory_page += CHUNK_SIZE) { | 48 | memory_page += CHUNK_SIZE) { |
49 | dummy = *memory_page; | 49 | dummy = *memory_page; |
50 | } | 50 | } |
51 | memcpy((void *)(KSEG0 + 0x80), &old_handler, 0x80); | 51 | memcpy((void *)(CKSEG0 + 0x80), &old_handler, 0x80); |
52 | 52 | ||
53 | add_memory_region(0, (unsigned long)memory_page - KSEG1 - CHUNK_SIZE, | 53 | add_memory_region(0, (unsigned long)memory_page - CKSEG1 - CHUNK_SIZE, |
54 | BOOT_MEM_RAM); | 54 | BOOT_MEM_RAM); |
55 | } | 55 | } |
56 | 56 | ||
@@ -65,7 +65,7 @@ static inline void rex_setup_memory_region(void) | |||
65 | memmap *bm; | 65 | memmap *bm; |
66 | 66 | ||
67 | /* some free 64k */ | 67 | /* some free 64k */ |
68 | bm = (memmap *)KSEG0ADDR(0x28000); | 68 | bm = (memmap *)CKSEG0ADDR(0x28000); |
69 | 69 | ||
70 | bitmap_size = rex_getbitmap(bm); | 70 | bitmap_size = rex_getbitmap(bm); |
71 | 71 | ||
diff --git a/arch/mips/dec/reset.c b/arch/mips/dec/reset.c index 7e4d34d0573d..f78c6da47921 100644 --- a/arch/mips/dec/reset.c +++ b/arch/mips/dec/reset.c | |||
@@ -14,7 +14,7 @@ typedef void ATTRIB_NORET (* noret_func_t)(void); | |||
14 | 14 | ||
15 | static inline void ATTRIB_NORET back_to_prom(void) | 15 | static inline void ATTRIB_NORET back_to_prom(void) |
16 | { | 16 | { |
17 | noret_func_t func = (void *) KSEG1ADDR(0x1fc00000); | 17 | noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000); |
18 | 18 | ||
19 | func(); | 19 | func(); |
20 | } | 20 | } |