summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2001-03-26 00:38:20 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2001-03-26 00:38:20 +0000
commit95e509f61d8560e71031a496f5448212089e1f78 (patch)
tree557844b10279d44321f6cac2def2974f5057ee2e /arch
parent86379fd2f83d9c135ede0058ab6c4adf60625610 (diff)
Get Indy64 booting a little farther. This also fixes a generic 64-bitness
bug in some of the r4k cache routines.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips64/arc/arc_con.c3
-rw-r--r--arch/mips64/arc/tree.c2
-rw-r--r--arch/mips64/mm/r4xx0.c32
3 files changed, 17 insertions, 20 deletions
diff --git a/arch/mips64/arc/arc_con.c b/arch/mips64/arc/arc_con.c
index 3569c37de..fc139b28e 100644
--- a/arch/mips64/arc/arc_con.c
+++ b/arch/mips64/arc/arc_con.c
@@ -14,7 +14,6 @@
#include <asm/sgialib.h>
-extern char prom_getchar (void);
extern void prom_printf (char *, ...);
void prom_putchar(char c)
@@ -42,7 +41,7 @@ static void prom_console_write(struct console *co, const char *s,
static int prom_console_wait_key(struct console *co)
{
- return prom_getchar();
+ return 0;
}
static int __init prom_console_setup(struct console *co, char *options)
diff --git a/arch/mips64/arc/tree.c b/arch/mips64/arc/tree.c
index 68c6787df..9d608d8c8 100644
--- a/arch/mips64/arc/tree.c
+++ b/arch/mips64/arc/tree.c
@@ -123,8 +123,6 @@ prom_testtree(void)
dump_component(p);
p = ArcGetPeer(p);
}
- prom_printf("press a key\n");
- prom_getchar();
}
#endif /* DEBUG_PROM_TREE */
diff --git a/arch/mips64/mm/r4xx0.c b/arch/mips64/mm/r4xx0.c
index 24e3d19c8..7d3202605 100644
--- a/arch/mips64/mm/r4xx0.c
+++ b/arch/mips64/mm/r4xx0.c
@@ -1747,15 +1747,15 @@ r4k_dma_cache_wback_inv_pc(unsigned long addr, unsigned long size)
unsigned long end, a;
unsigned int flags;
- if (size >= dcache_size) {
+ if (size >= (unsigned long)dcache_size) {
flush_cache_l1();
} else {
/* Workaround for R4600 bug. See comment above. */
__save_and_cli(flags);
*(volatile unsigned long *)KSEG1;
- a = addr & ~(dc_lsize - 1);
- end = (addr + size) & ~(dc_lsize - 1);
+ a = addr & ~((unsigned long)dc_lsize - 1);
+ end = (addr + size) & ~((unsigned long)dc_lsize - 1);
while (1) {
flush_dcache_line(a); /* Hit_Writeback_Inv_D */
if (a == end) break;
@@ -1771,13 +1771,13 @@ r4k_dma_cache_wback_inv_sc(unsigned long addr, unsigned long size)
{
unsigned long end, a;
- if (size >= scache_size) {
+ if (size >= (unsigned long)scache_size) {
flush_cache_l1();
return;
}
- a = addr & ~(sc_lsize - 1);
- end = (addr + size) & ~(sc_lsize - 1);
+ a = addr & ~((unsigned long)sc_lsize - 1);
+ end = (addr + size) & ~((unsigned long)sc_lsize - 1);
while (1) {
flush_scache_line(a); /* Hit_Writeback_Inv_SD */
if (a == end) break;
@@ -1791,15 +1791,15 @@ r4k_dma_cache_inv_pc(unsigned long addr, unsigned long size)
unsigned long end, a;
unsigned int flags;
- if (size >= dcache_size) {
+ if (size >= (unsigned long)dcache_size) {
flush_cache_l1();
} else {
/* Workaround for R4600 bug. See comment above. */
__save_and_cli(flags);
*(volatile unsigned long *)KSEG1;
- a = addr & ~(dc_lsize - 1);
- end = (addr + size) & ~(dc_lsize - 1);
+ a = addr & ~((unsigned long)dc_lsize - 1);
+ end = (addr + size) & ~((unsigned long)dc_lsize - 1);
while (1) {
flush_dcache_line(a); /* Hit_Writeback_Inv_D */
if (a == end) break;
@@ -1816,13 +1816,13 @@ r4k_dma_cache_inv_sc(unsigned long addr, unsigned long size)
{
unsigned long end, a;
- if (size >= scache_size) {
+ if (size >= (unsigned long)scache_size) {
flush_cache_l1();
return;
}
- a = addr & ~(sc_lsize - 1);
- end = (addr + size) & ~(sc_lsize - 1);
+ a = addr & ~((unsigned long)sc_lsize - 1);
+ end = (addr + size) & ~((unsigned long)sc_lsize - 1);
while (1) {
flush_scache_line(a); /* Hit_Writeback_Inv_SD */
if (a == end) break;
@@ -1845,11 +1845,11 @@ static void r4k_flush_cache_sigtramp(unsigned long addr)
{
unsigned long daddr, iaddr;
- daddr = addr & ~(dc_lsize - 1);
+ daddr = addr & ~((unsigned long)dc_lsize - 1);
__asm__ __volatile__("nop;nop;nop;nop"); /* R4600 V1.7 */
protected_writeback_dcache_line(daddr);
protected_writeback_dcache_line(daddr + dc_lsize);
- iaddr = addr & ~(ic_lsize - 1);
+ iaddr = addr & ~((unsigned long)ic_lsize - 1);
protected_flush_icache_line(iaddr);
protected_flush_icache_line(iaddr + ic_lsize);
}
@@ -1859,7 +1859,7 @@ static void r4600v20k_flush_cache_sigtramp(unsigned long addr)
unsigned long daddr, iaddr;
unsigned int flags;
- daddr = addr & ~(dc_lsize - 1);
+ daddr = addr & ~((unsigned long)dc_lsize - 1);
__save_and_cli(flags);
/* Clear internal cache refill buffer */
@@ -1867,7 +1867,7 @@ static void r4600v20k_flush_cache_sigtramp(unsigned long addr)
protected_writeback_dcache_line(daddr);
protected_writeback_dcache_line(daddr + dc_lsize);
- iaddr = addr & ~(ic_lsize - 1);
+ iaddr = addr & ~((unsigned long)ic_lsize - 1);
protected_flush_icache_line(iaddr);
protected_flush_icache_line(iaddr + ic_lsize);
__restore_flags(flags);