diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:21:22 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:21:22 -0800 |
| commit | 0a528ace2ea013fe60efaf633084b154962bfdbb (patch) | |
| tree | 4e038736f3e5ff9eece35f5c2a8efcbb4487a477 /include/asm-cris/system.h | |
| parent | 8b29e8edf0ed8f63ecb35b16946f222854d74ad0 (diff) | |
v2.4.10.5 -> v2.4.10.6
- various: fix some module exports uncovered by stricter error checking
- Urban Widmark: make smbfs use same error define names as samba and win32
- Greg KH: USB update
- Tom Rini: MPC8xx ppc update
- Matthew Wilcox: rd.c page cache flushing fix
- Richard Gooch: devfs race fix: rwsem for symlinks
- Björn Wesen: Cris arch update
- Nikita Danilov: reiserfs cleanup
- Tim Waugh: parport update
- Peter Rival: update alpha SMP bootup to match wait_init_idle fixes
- Trond Myklebust: lockd/grace period fix
Diffstat (limited to 'include/asm-cris/system.h')
| -rw-r--r-- | include/asm-cris/system.h | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index 8c5b38977603..95c6c4198da5 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h @@ -1,5 +1,3 @@ -/* $Id: system.h,v 1.4 2001/03/20 19:46:00 bjornw Exp $ */ - #ifndef __ASM_CRIS_SYSTEM_H #define __ASM_CRIS_SYSTEM_H @@ -16,22 +14,30 @@ extern struct task_struct *resume(struct task_struct *prev, struct task_struct * #define switch_to(prev,next,last) last = resume(prev,next, \ (int)&((struct task_struct *)0)->thread) +/* read the CPU version register */ + +static inline unsigned long rdvr(void) { + unsigned long vr; + __asm__ volatile ("move $vr,%0" : "=rm" (vr)); + return vr; +} + /* read/write the user-mode stackpointer */ -extern inline unsigned long rdusp(void) { +static inline unsigned long rdusp(void) { unsigned long usp; - __asm__ __volatile__("move usp,%0" : "=rm" (usp)); + __asm__ __volatile__("move $usp,%0" : "=rm" (usp)); return usp; } #define wrusp(usp) \ - __asm__ __volatile__("move %0,usp" : /* no outputs */ : "rm" (usp)) + __asm__ __volatile__("move %0,$usp" : /* no outputs */ : "rm" (usp)) /* read the current stackpointer */ -extern inline unsigned long rdsp(void) { +static inline unsigned long rdsp(void) { unsigned long sp; - __asm__ __volatile__("move.d sp,%0" : "=rm" (sp)); + __asm__ __volatile__("move.d $sp,%0" : "=rm" (sp)); return sp; } @@ -51,18 +57,18 @@ struct __xchg_dummy { unsigned long a[100]; }; #if 0 /* use these and an oscilloscope to see the fraction of time we're running with IRQ's disabled */ /* it assumes the LED's are on port 0x90000000 of course. */ -#define sti() __asm__ __volatile__ ( "ei\n\tpush r0\n\tmoveq 0,r0\n\tmove.d r0,[0x90000000]\n\tpop r0" ); -#define cli() __asm__ __volatile__ ( "di\n\tpush r0\n\tmove.d 0x40000,r0\n\tmove.d r0,[0x90000000]\n\tpop r0"); -#define save_flags(x) __asm__ __volatile__ ("move ccr,%0" : "=rm" (x) : : "memory"); -#define restore_flags(x) __asm__ __volatile__ ("move %0,ccr\n\tbtstq 5,%0\n\tbpl 1f\n\tnop\n\tpush r0\n\tmoveq 0,r0\n\tmove.d r0,[0x90000000]\n\tpop r0\n1:\n" : : "r" (x) : "memory"); +#define sti() __asm__ __volatile__ ( "ei\n\tpush $r0\n\tmoveq 0,$r0\n\tmove.d $r0,[0x90000000]\n\tpop $r0" ); +#define cli() __asm__ __volatile__ ( "di\n\tpush $r0\n\tmove.d 0x40000,$r0\n\tmove.d $r0,[0x90000000]\n\tpop $r0"); +#define save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); +#define restore_flags(x) __asm__ __volatile__ ("move %0,$ccr\n\tbtstq 5,%0\n\tbpl 1f\n\tnop\n\tpush $r0\n\tmoveq 0,$r0\n\tmove.d $r0,[0x90000000]\n\tpop $r0\n1:\n" : : "r" (x) : "memory"); #else #define __cli() __asm__ __volatile__ ( "di"); #define __sti() __asm__ __volatile__ ( "ei" ); -#define __save_flags(x) __asm__ __volatile__ ("move ccr,%0" : "=rm" (x) : : "memory"); -#define __restore_flags(x) __asm__ __volatile__ ("move %0,ccr" : : "rm" (x) : "memory"); +#define __save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); +#define __restore_flags(x) __asm__ __volatile__ ("move %0,$ccr" : : "rm" (x) : "memory"); /* For spinlocks etc */ -#define local_irq_save(x) __asm__ __volatile__ ("move ccr,%0\n\tdi" : "=rm" (x) : : "memory"); +#define local_irq_save(x) __asm__ __volatile__ ("move $ccr,%0\n\tdi" : "=rm" (x) : : "memory"); #define local_irq_restore(x) restore_flags(x) #define local_irq_disable() cli() |
