]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/s390/include/asm/processor.h
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / arch / s390 / include / asm / processor.h
index 18cdede1aedab9bfb841471a51dd241751421110..09529202ea77aa97b54187ab39f1c508cfe0813b 100644 (file)
@@ -77,7 +77,10 @@ static inline void get_cpu_id(struct cpuid *ptr)
        asm volatile("stidp %0" : "=Q" (*ptr));
 }
 
-extern void s390_adjust_jiffies(void);
+void s390_adjust_jiffies(void);
+void s390_update_cpu_mhz(void);
+void cpu_detect_mhz_feature(void);
+
 extern const struct seq_operations cpuinfo_op;
 extern int sysctl_ieee_emulation_warnings;
 extern void execve_tail(void);
@@ -105,7 +108,6 @@ typedef struct {
  * Thread structure
  */
 struct thread_struct {
-       struct fpu fpu;                 /* FP and VX register save area */
        unsigned int  acrs[NUM_ACRS];
         unsigned long ksp;              /* kernel stack pointer             */
        mm_segment_t mm_segment;
@@ -120,6 +122,11 @@ struct thread_struct {
        /* cpu runtime instrumentation */
        struct runtime_instr_cb *ri_cb;
        unsigned char trap_tdb[256];    /* Transaction abort diagnose block */
+       /*
+        * Warning: 'fpu' is dynamically-sized. It *MUST* be at
+        * the end.
+        */
+       struct fpu fpu;                 /* FP and VX register save area */
 };
 
 /* Flag to disable transactions. */
@@ -155,10 +162,9 @@ struct stack_frame {
 
 #define ARCH_MIN_TASKALIGN     8
 
-extern __vector128 init_task_fpu_regs[__NUM_VXRS];
 #define INIT_THREAD {                                                  \
        .ksp = sizeof(init_stack) + (unsigned long) &init_stack,        \
-       .fpu.regs = (void *)&init_task_fpu_regs,                        \
+       .fpu.regs = (void *) init_task.thread.fpu.fprs,                 \
 }
 
 /*
@@ -230,6 +236,18 @@ void cpu_relax(void);
 
 #define cpu_relax_lowlatency()  barrier()
 
+#define ECAG_CACHE_ATTRIBUTE   0
+#define ECAG_CPU_ATTRIBUTE     1
+
+static inline unsigned long __ecag(unsigned int asi, unsigned char parm)
+{
+       unsigned long val;
+
+       asm volatile(".insn     rsy,0xeb000000004c,%0,0,0(%1)" /* ecag */
+                    : "=d" (val) : "a" (asi << 8 | parm));
+       return val;
+}
+
 static inline void psw_set_key(unsigned int key)
 {
        asm volatile("spka 0(%0)" : : "d" (key));