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)
27 void die(const char *msg, struct pt_regs *regs, int err)
28 __attribute__((noreturn));
30 void die_if_kernel(const char *str, struct pt_regs *regs, int err);
32 #include <asm/proc-fns.h>
35 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
37 #define tas(ptr) (xchg((ptr),1))
39 extern asmlinkage void __backtrace(void);
42 * Include processor dependent parts
44 #include <asm/proc/system.h>
46 #define mb() __asm__ __volatile__ ("" : : : "memory")
49 #define set_mb(var, value) do { var = value; mb(); } while (0)
50 #define set_wmb(var, value) do { var = value; wmb(); } while (0)
51 #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
53 #define prepare_to_switch() do { } while(0)
56 * switch_to(prev, next) should switch from task `prev' to `next'
57 * `prev' will never be the same as `next'.
58 * The `mb' is to tell GCC not to cache `current' across this call.
60 extern struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *next);
62 #define switch_to(prev,next,last) \
64 last = __switch_to(prev,next); \
68 /* For spinlocks etc */
69 #define __save_flags_cli(x) local_irq_save(x)
70 #define __save_flags(x) local_save_flags(x)
71 #define __restore_flags(x) local_irq_restore(x)
72 #define __cli() local_irq_disable()
73 #define __sti() local_irq_enable()
76 #error SMP not supported
79 #define smp_rmb() rmb()
80 #define smp_wmb() wmb()
84 #define smp_mb() barrier()
85 #define smp_rmb() barrier()
86 #define smp_wmb() barrier()
88 #define cli() local_irq_disable()
89 #define sti() local_irq_enable()
92 #define save_flags(x) local_save_flags(x)
93 #define restore_flags(x) local_irq_restore(x)
94 #define save_flags_cli(x) local_irq_save(x)
95 #define save_and_cli(x) local_irq_save(x)
96 #define save_and_sti(x) local_irq_set(x)
98 #endif /* CONFIG_SMP */
100 #endif /* __KERNEL__ */