]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-s390/processor.h
tty: s390 support for termios2.
[linux-2.6-omap-h63xx.git] / include / asm-s390 / processor.h
index 4c1b739403519839aa8a0b50d37191e66e07816f..dfec2d011c0d9aaf6971cf73fa194a933a4712cc 100644 (file)
@@ -36,6 +36,11 @@ typedef struct
         unsigned int unused  : 16;
 } __attribute__ ((packed)) cpuid_t;
 
+static inline void get_cpu_id(cpuid_t *ptr)
+{
+       asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr));
+}
+
 struct cpuinfo_S390
 {
         cpuid_t  cpu_id;
@@ -52,9 +57,7 @@ struct cpuinfo_S390
 
 extern void s390_adjust_jiffies(void);
 extern void print_cpu_info(struct cpuinfo_S390 *);
-
-/* Lazy FPU handling on uni-processor */
-extern struct task_struct *last_task_used_math;
+extern int get_cpu_capability(unsigned int *);
 
 /*
  * User space process size: 2GB for 31 bit, 4TB for 64 bit.
@@ -67,8 +70,9 @@ extern struct task_struct *last_task_used_math;
 
 #else /* __s390x__ */
 
-# define TASK_SIZE             (test_thread_flag(TIF_31BIT) ? \
+# define TASK_SIZE_OF(tsk)     (test_tsk_thread_flag(tsk, TIF_31BIT) ? \
                                        (0x80000000UL) : (0x40000000000UL))
+# define TASK_SIZE             TASK_SIZE_OF(current)
 # define TASK_UNMAPPED_BASE    (TASK_SIZE / 2)
 # define DEFAULT_TASK_SIZE     (0x40000000000UL)
 
@@ -87,10 +91,8 @@ struct thread_struct {
        s390_fp_regs fp_regs;
        unsigned int  acrs[NUM_ACRS];
         unsigned long ksp;              /* kernel stack pointer             */
-        unsigned long user_seg;         /* HSTD                             */
        mm_segment_t mm_segment;
         unsigned long prot_addr;        /* address of protection-excep.     */
-        unsigned int error_code;        /* error-code of last prog-excep.   */
         unsigned int trap_no;
         per_struct per_info;
        /* Used to give failing instruction back to user for ieee exceptions */
@@ -122,22 +124,9 @@ struct stack_frame {
 
 #define ARCH_MIN_TASKALIGN     8
 
-#ifndef __s390x__
-# define __SWAPPER_PG_DIR __pa(&swapper_pg_dir[0]) + _SEGMENT_TABLE
-#else /* __s390x__ */
-# define __SWAPPER_PG_DIR __pa(&swapper_pg_dir[0]) + _REGION_TABLE
-#endif /* __s390x__ */
-
-#define INIT_THREAD {{0,{{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},             \
-                           {0},{0},{0},{0},{0},{0}}},                         \
-                    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},         \
-                    sizeof(init_stack) + (unsigned long) &init_stack,         \
-                    __SWAPPER_PG_DIR,                                         \
-                    {0},                                                      \
-                    0,0,0,                                                    \
-                    (per_struct) {{{{0,}}},0,0,0,0,{{0,}}},                   \
-                    0, 0                                                      \
-} 
+#define INIT_THREAD {                                                  \
+       .ksp = sizeof(init_stack) + (unsigned long) &init_stack,        \
+}
 
 /*
  * Do necessary setup to start up a new thread.
@@ -172,6 +161,7 @@ struct stack_frame {
 /* Forward declaration, a strange C thing */
 struct task_struct;
 struct mm_struct;
+struct seq_file;
 
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
@@ -188,9 +178,10 @@ extern unsigned long thread_saved_pc(struct task_struct *t);
 /*
  * Print register of task into buffer. Used in fs/proc/array.c.
  */
-extern char *task_show_regs(struct task_struct *task, char *buffer);
+extern void task_show_regs(struct seq_file *m, struct task_struct *task);
 
 extern void show_registers(struct pt_regs *regs);
+extern void show_code(struct pt_regs *regs);
 extern void show_trace(struct task_struct *task, unsigned long *sp);
 
 unsigned long get_wchan(struct task_struct *p);
@@ -209,6 +200,11 @@ static inline void cpu_relax(void)
        barrier();
 }
 
+static inline void psw_set_key(unsigned int key)
+{
+       asm volatile("spka 0(%0)" : : "d" (key));
+}
+
 /*
  * Set PSW to specified value.
  */
@@ -345,8 +341,8 @@ extern void (*s390_base_ext_handler_fn)(void);
 /*
  * CPU idle notifier chain.
  */
-#define CPU_IDLE       0
-#define CPU_NOT_IDLE   1
+#define S390_CPU_IDLE          0
+#define S390_CPU_NOT_IDLE      1
 
 struct notifier_block;
 int register_idle_notifier(struct notifier_block *nb);