Fixed the warnings in the sparc compilation...
authorROS Developer <ros-dev@core0.(none)>
Mon, 28 Sep 2009 08:34:07 +0000 (10:34 +0200)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 1 Oct 2009 20:09:51 +0000 (22:09 +0200)
kern/arch/sparc/smp.c
kern/arch/sparc/trap.c
user/parlib/src/sparc/newlib_backend.c

index b9082f0..95c6183 100644 (file)
@@ -43,7 +43,7 @@ smp_init(void)
 }
 
 handler_wrapper_t
-wrapper_pool[MAX_NUM_CPUS*8] = {{0},0};
+wrapper_pool[MAX_NUM_CPUS*8] = {{{0},0}};
 
 handler_wrapper_t*
 smp_make_wrapper()
@@ -95,14 +95,12 @@ int smp_call_function_all(isr_t handler, void* data,
                        continue;
 
                while(send_active_message(i,(amr_t)smp_call_wrapper,
-                                         (uint32_t)handler,(uint32_t)wrapper,
-                                         (uint32_t)data) != 0);
+                                         handler, wrapper, data) != 0);
        }
 
        // send to me
        while(send_active_message(core_id(),(amr_t)smp_call_wrapper,
-                                 (uint32_t)handler,(uint32_t)wrapper,
-                                 (uint32_t)data) != 0);
+                                 handler,wrapper,data) != 0);
 
        cpu_relax(); // wait to get the interrupt
 
@@ -127,8 +125,7 @@ int smp_call_function_single(uint32_t dest, isr_t handler, void* data,
        enable_irqsave(&state);
 
        while(send_active_message(dest,(amr_t)smp_call_wrapper,
-                                 (uint32_t)handler,(uint32_t)wrapper,
-                                 (uint32_t)data) != 0);
+                                 handler,wrapper,data) != 0);
 
        cpu_relax(); // wait to get the interrupt, if it's to this core
 
index d8595b8..c9bcbfd 100644 (file)
@@ -125,8 +125,10 @@ trap(trapframe_t* state, active_message_t* msg,
 void
 handle_active_message(trapframe_t* state, active_message_t* message)
 {
-       uint32_t src = message->srcid, a0 = message->arg0, a1 = message->arg1;
-       uint32_t a2 = message->arg2;
+       uint32_t src = message->srcid;
+       TV(a0t) a0 = message->arg0;
+       TV(a1t) a1 = message->arg1;
+       TV(a2t) a2 = message->arg2;
        (message->pc)(state,src,a0,a1,a2);
        env_pop_tf(state);
 }
@@ -170,14 +172,14 @@ stack_fucked(trapframe_t* state)
 void
 stack_misaligned(trapframe_t* state)
 {
-       state->tbr = state->tbr & ~0xFFF | 0x070;
+       state->tbr = (state->tbr & ~0xFFF) | 0x070;
        stack_fucked(state);
 }
 
 void
 stack_pagefault(trapframe_t* state)
 {
-       state->tbr = state->tbr & ~0xFFF | 0x090;
+       state->tbr = (state->tbr & ~0xFFF) | 0x090;
        stack_fucked(state);
 }
 
index 3427ab1..1eed4b4 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <arch/frontend.h>
 #include <parlib.h>
+#include <sys/stat.h>
 #include <sys/unistd.h>
 #include <sys/times.h>
 #include <sys/time.h>