#include "mode.h"
#include "os.h"
-u64 jiffies_64;
+u64 jiffies_64 = INITIAL_JIFFIES;
EXPORT_SYMBOL(jiffies_64);
return(IRQ_HANDLED);
}
-long um_time(int * tloc)
+long um_time(int __user *tloc)
{
struct timeval now;
do_gettimeofday(&now);
if (tloc) {
- if (put_user(now.tv_sec,tloc))
+ if (put_user(now.tv_sec, tloc))
now.tv_sec = -EFAULT;
}
return now.tv_sec;
}
-long um_stime(int * tptr)
+long um_stime(int __user *tptr)
{
int value;
struct timespec new;
return 0;
}
-/* XXX Needs to be moved under sys-i386 */
-void __delay(um_udelay_t time)
-{
- /* Stolen from the i386 __loop_delay */
- int d0;
- __asm__ __volatile__(
- "\tjmp 1f\n"
- ".align 16\n"
- "1:\tjmp 2f\n"
- ".align 16\n"
- "2:\tdecl %0\n\tjns 2b"
- :"=&a" (d0)
- :"0" (time));
-}
-
-void __udelay(um_udelay_t usecs)
+void __udelay(unsigned long usecs)
{
int i, n;
for(i=0;i<n;i++) ;
}
-void __const_udelay(um_udelay_t usecs)
+void __const_udelay(unsigned long usecs)
{
int i, n;
void timer_handler(int sig, union uml_pt_regs *regs)
{
-#ifdef CONFIG_SMP
local_irq_disable();
- update_process_times(user_context(UPT_SP(regs)));
+ update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user));
local_irq_enable();
-#endif
if(current_thread->cpu == 0)
timer_irq(regs);
}
-static spinlock_t timer_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timer_spinlock);
unsigned long time_lock(void)
{