diff options
Diffstat (limited to 'include/asm-s390/processor.h')
-rw-r--r-- | include/asm-s390/processor.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index cbbedc63ba2..33b80ced4bc 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -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; @@ -50,6 +55,7 @@ struct cpuinfo_S390 unsigned long pgtable_cache_sz; }; +extern void s390_adjust_jiffies(void); extern void print_cpu_info(struct cpuinfo_S390 *); /* Lazy FPU handling on uni-processor */ @@ -144,7 +150,8 @@ struct stack_frame { #ifndef __s390x__ #define start_thread(regs, new_psw, new_stackp) do { \ - regs->psw.mask = PSW_USER_BITS; \ + set_fs(USER_DS); \ + regs->psw.mask = psw_user_bits; \ regs->psw.addr = new_psw | PSW_ADDR_AMODE; \ regs->gprs[15] = new_stackp ; \ } while (0) @@ -152,13 +159,15 @@ struct stack_frame { #else /* __s390x__ */ #define start_thread(regs, new_psw, new_stackp) do { \ - regs->psw.mask = PSW_USER_BITS; \ + set_fs(USER_DS); \ + regs->psw.mask = psw_user_bits; \ regs->psw.addr = new_psw; \ regs->gprs[15] = new_stackp; \ } while (0) #define start_thread31(regs, new_psw, new_stackp) do { \ - regs->psw.mask = PSW_USER32_BITS; \ + set_fs(USER_DS); \ + regs->psw.mask = psw_user32_bits; \ regs->psw.addr = new_psw; \ regs->gprs[15] = new_stackp; \ } while (0) @@ -201,9 +210,8 @@ unsigned long get_wchan(struct task_struct *p); static inline void cpu_relax(void) { if (MACHINE_HAS_DIAG44) - asm volatile("diag 0,0,68" : : : "memory"); - else - barrier(); + asm volatile("diag 0,0,68"); + barrier(); } /* @@ -328,6 +336,18 @@ static inline void disabled_wait(unsigned long code) } /* + * Basic Machine Check/Program Check Handler. + */ + +extern void s390_base_mcck_handler(void); +extern void s390_base_pgm_handler(void); +extern void s390_base_ext_handler(void); + +extern void (*s390_base_mcck_handler_fn)(void); +extern void (*s390_base_pgm_handler_fn)(void); +extern void (*s390_base_ext_handler_fn)(void); + +/* * CPU idle notifier chain. */ #define CPU_IDLE 0 |