]> err.no Git - linux-2.6/blobdiff - include/asm-parisc/processor.h
[PARISC] Add __iomem to __raw_check_addr()
[linux-2.6] / include / asm-parisc / processor.h
index 0b61f51d84670a7c37dfd916950e9c831389a782..aae40e8c3aa85693d807c6fb92069f5efaee4d8b 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef __ASSEMBLY__
 #include <linux/config.h>
 #include <linux/threads.h>
+#include <linux/spinlock_types.h>
 
 #include <asm/hardware.h>
 #include <asm/page.h>
@@ -121,8 +122,27 @@ struct thread_struct {
 }; 
 
 /* Thread struct flags. */
+#define PARISC_UAC_NOPRINT     (1UL << 0)      /* see prctl and unaligned.c */
+#define PARISC_UAC_SIGBUS      (1UL << 1)
 #define PARISC_KERNEL_DEATH    (1UL << 31)     /* see die_if_kernel()... */
 
+#define PARISC_UAC_SHIFT       0
+#define PARISC_UAC_MASK                (PARISC_UAC_NOPRINT|PARISC_UAC_SIGBUS)
+
+#define SET_UNALIGN_CTL(task,value)                                       \
+        ({                                                                \
+        (task)->thread.flags = (((task)->thread.flags & ~PARISC_UAC_MASK) \
+                                | (((value) << PARISC_UAC_SHIFT) &        \
+                                   PARISC_UAC_MASK));                     \
+        0;                                                                \
+        })
+
+#define GET_UNALIGN_CTL(task,addr)                                        \
+        ({                                                                \
+        put_user(((task)->thread.flags & PARISC_UAC_MASK)                 \
+                 >> PARISC_UAC_SHIFT, (int __user *) (addr));             \
+        })
+
 #define INIT_THREAD { \
        regs:   {       gr: { 0, }, \
                        fr: { 0, }, \