Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[pandora-kernel.git] / arch / arm / include / asm / domain.h
index cc7ef40..af18cea 100644 (file)
  */
 #define DOMAIN_NOACCESS        0
 #define DOMAIN_CLIENT  1
+#ifdef CONFIG_CPU_USE_DOMAINS
 #define DOMAIN_MANAGER 3
+#else
+#define DOMAIN_MANAGER 1
+#endif
 
 #define domain_val(dom,type)   ((type) << (2*(dom)))
 
 #ifndef __ASSEMBLY__
 
-#ifdef CONFIG_MMU
+#ifdef CONFIG_CPU_USE_DOMAINS
 #define set_domain(x)                                  \
        do {                                            \
        __asm__ __volatile__(                           \
 #define modify_domain(dom,type)        do { } while (0)
 #endif
 
+/*
+ * Generate the T (user) versions of the LDR/STR and related
+ * instructions (inline assembly)
+ */
+#ifdef CONFIG_CPU_USE_DOMAINS
+#define T(instr)       #instr "t"
+#else
+#define T(instr)       #instr
 #endif
-#endif /* !__ASSEMBLY__ */
+
+#else /* __ASSEMBLY__ */
+
+/*
+ * Generate the T (user) versions of the LDR/STR and related
+ * instructions
+ */
+#ifdef CONFIG_CPU_USE_DOMAINS
+#define T(instr)       instr ## t
+#else
+#define T(instr)       instr
+#endif
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* !__ASM_PROC_DOMAIN_H */