]> Pileus Git - ~andy/linux/blobdiff - arch/s390/include/asm/processor.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[~andy/linux] / arch / s390 / include / asm / processor.h
index da6f5baeee5c20925d82a648690fa12c14ea8044..94e749c90230d9f824949429d505625f90f7b4e7 100644 (file)
 #ifndef __ASM_S390_PROCESSOR_H
 #define __ASM_S390_PROCESSOR_H
 
+#ifndef __ASSEMBLY__
+
 #include <linux/linkage.h>
 #include <linux/irqflags.h>
 #include <asm/cpu.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
 #include <asm/setup.h>
+#include <asm/runtime_instr.h>
 
 /*
  * Default implementation of macro that returns current
@@ -76,11 +79,20 @@ struct thread_struct {
        unsigned long gmap_addr;        /* address of last gmap fault. */
        struct per_regs per_user;       /* User specified PER registers */
        struct per_event per_event;     /* Cause of the last PER trap */
+       unsigned long per_flags;        /* Flags to control debug behavior */
         /* pfault_wait is used to block the process on a pfault event */
        unsigned long pfault_wait;
        struct list_head list;
+       /* cpu runtime instrumentation */
+       struct runtime_instr_cb *ri_cb;
+       int ri_signum;
+#ifdef CONFIG_64BIT
+       unsigned char trap_tdb[256];    /* Transaction abort diagnose block */
+#endif
 };
 
+#define PER_FLAG_NO_TE         1UL     /* Flag to disable transactions. */
+
 typedef struct thread_struct thread_struct;
 
 /*
@@ -133,6 +145,12 @@ struct task_struct;
 struct mm_struct;
 struct seq_file;
 
+#ifdef CONFIG_64BIT
+extern void show_cacheinfo(struct seq_file *m);
+#else
+static inline void show_cacheinfo(struct seq_file *m) { }
+#endif
+
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 
@@ -142,6 +160,8 @@ extern void release_thread(struct task_struct *);
 extern unsigned long thread_saved_pc(struct task_struct *t);
 
 extern void show_code(struct pt_regs *regs);
+extern void print_fn_code(unsigned char *code, unsigned long len);
+extern int insn_to_mnemonic(unsigned char *instruction, char buf[8]);
 
 unsigned long get_wchan(struct task_struct *p);
 #define task_pt_regs(tsk) ((struct pt_regs *) \
@@ -333,23 +353,6 @@ extern void (*s390_base_ext_handler_fn)(void);
 
 #define ARCH_LOW_ADDRESS_LIMIT 0x7fffffffUL
 
-/*
- * Helper macro for exception table entries
- */
-#ifndef CONFIG_64BIT
-#define EX_TABLE(_fault,_target)                       \
-       ".section __ex_table,\"a\"\n"                   \
-       "       .align 4\n"                             \
-       "       .long  " #_fault "," #_target "\n"      \
-       ".previous\n"
-#else
-#define EX_TABLE(_fault,_target)                       \
-       ".section __ex_table,\"a\"\n"                   \
-       "       .align 8\n"                             \
-       "       .quad  " #_fault "," #_target "\n"      \
-       ".previous\n"
-#endif
-
 extern int memcpy_real(void *, void *, size_t);
 extern void memcpy_absolute(void *, void *, size_t);
 
@@ -360,4 +363,25 @@ extern void memcpy_absolute(void *, void *, size_t);
        memcpy_absolute(&(dest), &__tmp, sizeof(__tmp));        \
 }
 
-#endif                                 /* __ASM_S390_PROCESSOR_H           */
+/*
+ * Helper macro for exception table entries
+ */
+#define EX_TABLE(_fault, _target)      \
+       ".section __ex_table,\"a\"\n"   \
+       ".align 4\n"                    \
+       ".long  (" #_fault ") - .\n"    \
+       ".long  (" #_target ") - .\n"   \
+       ".previous\n"
+
+#else /* __ASSEMBLY__ */
+
+#define EX_TABLE(_fault, _target)      \
+       .section __ex_table,"a" ;       \
+       .align  4 ;                     \
+       .long   (_fault) - . ;          \
+       .long   (_target) - . ;         \
+       .previous
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_S390_PROCESSOR_H */