summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/system.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /include/asm-arm/system.h
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r--include/asm-arm/system.h119
1 files changed, 104 insertions, 15 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 91c08d668..2874c4661 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -1,10 +1,26 @@
#ifndef __ASM_ARM_SYSTEM_H
#define __ASM_ARM_SYSTEM_H
+#include <linux/kernel.h>
+
+#ifdef __KERNEL__
+
#include <linux/config.h>
+#define __ebsa285_data __attribute__((__section__(".data.ebsa285")))
+#define __netwinder_data __attribute__((__section__(".data.netwinder")))
+
+#ifdef CONFIG_TEXT_SECTIONS
+#define __ebsa285_text __attribute__((__section__(".text.ebsa285")))
+#define __netwinder_text __attribute__((__section__(".text.netwinder")))
+#else
+#define __ebsa285_text
+#define __netwinder_text
+#endif
+
/* The type of machine we're running on */
-extern unsigned int machine_type;
+extern unsigned int __machine_arch_type;
+
#define MACH_TYPE_EBSA110 0
#define MACH_TYPE_RISCPC 1
#define MACH_TYPE_NEXUSPCI 3
@@ -12,31 +28,101 @@ extern unsigned int machine_type;
#define MACH_TYPE_NETWINDER 5
#define MACH_TYPE_CATS 6
#define MACH_TYPE_TBOX 7
+#define MACH_TYPE_CO285 8
+#define MACH_TYPE_CLPS7110 9
+#define MACH_TYPE_ARCHIMEDES 10
+#define MACH_TYPE_A5K 11
+
+/*
+ * Sort out a definition for machine_arch_type
+ * The rules basically are:
+ * 1. If one architecture is selected, then all machine_is_xxx()
+ * are constant.
+ * 2. If two or more architectures are selected, then the selected
+ * machine_is_xxx() are variable, and the unselected machine_is_xxx()
+ * are constant zero.
+ */
+#ifdef CONFIG_ARCH_EBSA110
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_EBSA110
+# endif
+# define machine_is_ebsa110() (machine_arch_type == MACH_TYPE_EBSA110)
+#else
+# define machine_is_ebsa110() (0)
+#endif
+
+#ifdef CONFIG_ARCH_RPC
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_RISCPC
+# endif
+# define machine_is_riscpc() (machine_arch_type == MACH_TYPE_RISCPC)
+#else
+# define machine_is_riscpc() (0)
+#endif
#ifdef CONFIG_ARCH_EBSA285
-#define machine_is_ebsa285() (1)
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_EBSA285
+# endif
+# define machine_is_ebsa285() (machine_arch_type == MACH_TYPE_EBSA285)
#else
-#define machine_is_ebsa285() (0)
+# define machine_is_ebsa285() (0)
#endif
-#ifdef CONFIG_ARCH_VNC
-#define machine_is_netwinder() (1)
+#ifdef CONFIG_ARCH_NETWINDER
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_NETWINDER
+# endif
+# define machine_is_netwinder() (machine_arch_type == MACH_TYPE_NETWINDER)
#else
-#define machine_is_netwinder() (0)
+# define machine_is_netwinder() (0)
#endif
-#if defined(CONFIG_CATS)
-#define machine_is_cats() (machine_type == MACH_TYPE_CATS)
+#ifdef CONFIG_CATS
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_CATS
+# endif
+# define machine_is_cats() (machine_arch_type == MACH_TYPE_CATS)
#else
-#define machine_is_cats() (0)
+# define machine_is_cats() (0)
#endif
-#if 0
-#define machine_is_ebsa285() (machine_type == MACH_TYPE_EBSA285)
-#define machine_is_netwinder() (machine_type == MACH_TYPE_NETWINDER)
+#ifdef CONFIG_ARCH_CO285
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_CO285
+# endif
+# define machine_is_co285() (machine_arch_type == MACH_TYPE_CO285)
+#else
+# define machine_is_co285() (0)
#endif
-#include <linux/kernel.h>
+#ifndef machine_arch_type
+#define machine_arch_type __machine_arch_type
+#endif
+
+/*
+ * task_struct isn't always declared - forward-declare it here.
+ */
+struct task_struct;
+
#include <asm/proc-fns.h>
extern void arm_malalignedptr(const char *, void *, volatile void *);
@@ -53,7 +139,7 @@ extern void arm_invalidptr(const char *, int);
*
* `next' and `prev' should be struct task_struct, but it isn't always defined
*/
-#define switch_to(prev,next) processor._switch_to(prev,next)
+#define switch_to(prev,next,last) do { last = processor._switch_to(prev,next); } while (0)
/*
* Include processor dependent parts
@@ -62,9 +148,12 @@ extern void arm_invalidptr(const char *, int);
#include <asm/arch/system.h>
#define mb() __asm__ __volatile__ ("" : : : "memory")
-#define nop() __asm__ __volatile__("mov r0,r0\n\t");
+#define rmb() mb()
+#define wmb() mb()
+#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
extern asmlinkage void __backtrace(void);
#endif
+#endif