Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jmorris/selin...
[cascardo/linux.git] / include / asm-parisc / processor.h
index c72b8fa..fd7866d 100644 (file)
@@ -278,7 +278,7 @@ on downward growing arches, it looks like this:
  */
 
 #ifdef __LP64__
-#define USER_WIDE_MODE (personality(current->personality) == PER_LINUX)
+#define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT))
 #else
 #define USER_WIDE_MODE 0
 #endif
@@ -332,6 +332,19 @@ extern unsigned long get_wchan(struct task_struct *p);
 
 #define cpu_relax()    barrier()
 
+/* Used as a macro to identify the combined VIPT/PIPT cached
+ * CPUs which require a guarantee of coherency (no inequivalent
+ * aliases with different data, whether clean or not) to operate */
+static inline int parisc_requires_coherency(void)
+{
+#ifdef CONFIG_PA8X00
+       /* FIXME: also pa8900 - when we see one */
+       return boot_cpu_data.cpu_type == mako;
+#else
+       return 0;
+#endif
+}
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ASM_PARISC_PROCESSOR_H */