1 #ifndef __ASM_ARM_SYSTEM_H
2 #define __ASM_ARM_SYSTEM_H
6 #include <linux/config.h>
7 #include <linux/kernel.h>
9 /* information about the system we're running on */
10 extern unsigned int system_rev;
11 extern unsigned int system_serial_low;
12 extern unsigned int system_serial_high;
13 extern unsigned int mem_fclk_21285;
16 * This tells us if we have an ISA bridge
17 * present in a PCI system.
20 extern int have_isa_bridge;
22 #define have_isa_bridge (0)
25 #include <asm/proc-fns.h>
28 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
30 #define tas(ptr) (xchg((ptr),1))
32 extern asmlinkage void __backtrace(void);
35 * Include processor dependent parts
37 #include <asm/proc/system.h>
39 #define mb() __asm__ __volatile__ ("" : : : "memory")
42 #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
44 #define prepare_to_switch() do { } while(0)
47 * switch_to(prev, next) should switch from task `prev' to `next'
48 * `prev' will never be the same as `next'.
49 * The `mb' is to tell GCC not to cache `current' across this call.
51 extern struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *next);
53 #define switch_to(prev,next,last) \
55 last = __switch_to(prev,next); \
59 /* For spinlocks etc */
60 #define local_irq_save(x) __save_flags_cli(x)
61 #define local_irq_set(x) __save_and_sti(x)
62 #define local_irq_restore(x) __restore_flags(x)
63 #define local_irq_disable() __cli()
64 #define local_irq_enable() __sti()
67 #error SMP not supported
70 #define smp_rmb() rmb()
71 #define smp_wmb() wmb()
75 #define smp_mb() barrier()
76 #define smp_rmb() barrier()
77 #define smp_wmb() barrier()
83 #define save_flags(x) __save_flags(x)
84 #define restore_flags(x) __restore_flags(x)
85 #define save_flags_cli(x) __save_flags_cli(x)
86 #define save_and_cli(x) __save_flags_cli(x)
87 #define save_and_sti(x) __save_flags_sti(x)
89 #endif /* CONFIG_SMP */
91 #endif /* __KERNEL__ */