Commit b6eba17c authored by Paul Mackerras's avatar Paul Mackerras

PPC32: two warning fixes from Rusty Russell, plus fix the PPC603

tlb miss handlers to expect a physical address in the pmds.
parent 94399c3a
/* /*
* BK Id: SCCS/s.start.c 1.8 07/25/01 18:13:07 trini * BK Id: %F% %I% %G% %U% %#%
*/ */
/* /*
* Copyright (C) Paul Mackerras 1997. * Copyright (C) Paul Mackerras 1997.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
*/ */
#include <stdarg.h> #include <stdarg.h>
int (*prom)(); int (*prom)(void *args);
void *chosen_handle; void *chosen_handle;
void *stdin; void *stdin;
...@@ -30,7 +30,7 @@ extern int strlen(const char *s); ...@@ -30,7 +30,7 @@ extern int strlen(const char *s);
void void
start(int a1, int a2, void *promptr) start(int a1, int a2, void *promptr)
{ {
prom = (int (*)()) promptr; prom = promptr;
chosen_handle = finddevice("/chosen"); chosen_handle = finddevice("/chosen");
if (chosen_handle == (void *) -1) if (chosen_handle == (void *) -1)
exit(); exit();
...@@ -65,7 +65,7 @@ write(void *handle, void *ptr, int nb) ...@@ -65,7 +65,7 @@ write(void *handle, void *ptr, int nb)
args.addr = ptr; args.addr = ptr;
args.len = nb; args.len = nb;
args.actual = -1; args.actual = -1;
(*prom)(&args); prom(&args);
return args.actual; return args.actual;
} }
...@@ -211,7 +211,7 @@ fputs(char *str, void *f) ...@@ -211,7 +211,7 @@ fputs(char *str, void *f)
} }
int int
readchar() readchar(void)
{ {
char ch; char ch;
......
...@@ -507,7 +507,6 @@ InstructionTLBMiss: ...@@ -507,7 +507,6 @@ InstructionTLBMiss:
lwz r2,0(r2) /* get pmd entry */ lwz r2,0(r2) /* get pmd entry */
rlwinm. r2,r2,0,0,19 /* extract address of pte page */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */
beq- InstructionAddressInvalid /* return if no mapping */ beq- InstructionAddressInvalid /* return if no mapping */
tophys(r2,r2)
rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
lwz r3,0(r2) /* get linux-style pte */ lwz r3,0(r2) /* get linux-style pte */
andc. r1,r1,r3 /* check access & ~permission */ andc. r1,r1,r3 /* check access & ~permission */
...@@ -582,7 +581,6 @@ DataLoadTLBMiss: ...@@ -582,7 +581,6 @@ DataLoadTLBMiss:
lwz r2,0(r2) /* get pmd entry */ lwz r2,0(r2) /* get pmd entry */
rlwinm. r2,r2,0,0,19 /* extract address of pte page */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */
beq- DataAddressInvalid /* return if no mapping */ beq- DataAddressInvalid /* return if no mapping */
tophys(r2,r2)
rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
lwz r3,0(r2) /* get linux-style pte */ lwz r3,0(r2) /* get linux-style pte */
andc. r1,r1,r3 /* check access & ~permission */ andc. r1,r1,r3 /* check access & ~permission */
...@@ -655,7 +653,6 @@ DataStoreTLBMiss: ...@@ -655,7 +653,6 @@ DataStoreTLBMiss:
lwz r2,0(r2) /* get pmd entry */ lwz r2,0(r2) /* get pmd entry */
rlwinm. r2,r2,0,0,19 /* extract address of pte page */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */
beq- DataAddressInvalid /* return if no mapping */ beq- DataAddressInvalid /* return if no mapping */
tophys(r2,r2)
rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */ rlwimi r2,r3,22,20,29 /* insert next 10 bits of address */
lwz r3,0(r2) /* get linux-style pte */ lwz r3,0(r2) /* get linux-style pte */
andc. r1,r1,r3 /* check access & ~permission */ andc. r1,r1,r3 /* check access & ~permission */
......
...@@ -65,7 +65,7 @@ static inline void _raw_spin_unlock(spinlock_t *lock) ...@@ -65,7 +65,7 @@ static inline void _raw_spin_unlock(spinlock_t *lock)
lock->lock = 0; lock->lock = 0;
} }
#define _raw_spin_trylock(lock) (!test_and_set_bit(0,(lock))) #define _raw_spin_trylock(l) (!test_and_set_bit(0,&(l)->lock))
#else #else
......
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