patch-2.4.2 linux/include/asm-s390/processor.h
Next file: linux/include/asm-s390/ptrace.h
Previous file: linux/include/asm-s390/pgtable.h
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
Tue Feb 13 14:13:44 2001
- Orig file:
v2.4.1/linux/include/asm-s390/processor.h
- Orig date:
Sat Dec 30 09:35:41 2000
diff -u --recursive --new-file v2.4.1/linux/include/asm-s390/processor.h linux/include/asm-s390/processor.h
@@ -41,7 +41,7 @@
cpuid_t cpu_id;
__u16 cpu_addr;
__u16 cpu_nr;
- unsigned long loops_per_sec;
+ unsigned long loops_per_jiffy;
unsigned long *pgd_quick;
unsigned long *pte_quick;
unsigned long pgtable_cache_sz;
@@ -87,13 +87,15 @@
/* perform syscall argument validation (get/set_fs) */
mm_segment_t fs;
per_struct per_info;/* Must be aligned on an 4 byte boundary*/
+ addr_t ieee_instruction_pointer;
+ /* Used to give failing instruction back to user for ieee exceptions */
};
typedef struct thread_struct thread_struct;
#define INIT_MMAP \
{ &init_mm, 0, 0, NULL, PAGE_SHARED, \
-VM_READ | VM_WRITE | VM_EXEC, 1, NULL, &init_mm.mmap }
+VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
#define INIT_THREAD { (struct pt_regs *) 0, \
{ 0,{{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}, \
@@ -108,12 +110,8 @@
/* need to define ... */
#define start_thread(regs, new_psw, new_stackp) do { \
- unsigned long *u_stack = new_stackp; \
regs->psw.mask = _USER_PSW_MASK; \
- regs->psw.addr = new_psw | 0x80000000 ; \
- get_user(regs->gprs[2],u_stack); \
- get_user(regs->gprs[3],u_stack+1); \
- get_user(regs->gprs[4],u_stack+2); \
+ regs->psw.addr = new_psw | 0x80000000; \
regs->gprs[15] = new_stackp ; \
} while (0)
@@ -172,13 +170,33 @@
static inline void disabled_wait(unsigned long code)
{
char psw_buffer[2*sizeof(psw_t)];
+ char ctl_buf[4];
psw_t *dw_psw = (psw_t *)(((unsigned long) &psw_buffer+sizeof(psw_t)-1)
& -sizeof(psw_t));
dw_psw->mask = 0x000a0000;
dw_psw->addr = code;
- /* load disabled wait psw, the processor is dead afterwards */
- asm volatile ("lpsw 0(%0)" : : "a" (dw_psw));
+ /*
+ * Store status and then load disabled wait psw,
+ * the processor is dead afterwards
+ */
+
+ asm volatile (" stctl 0,0,0(%1)\n"
+ " ni 0(%1),0xef\n" /* switch off protection */
+ " lctl 0,0,0(%1)\n"
+ " stpt 0xd8\n" /* store timer */
+ " stckc 0xe0\n" /* store clock comparator */
+ " stpx 0x108\n" /* store prefix register */
+ " stam 0,15,0x120\n" /* store access registers */
+ " std 0,0x160\n" /* store f0 */
+ " std 2,0x168\n" /* store f2 */
+ " std 4,0x170\n" /* store f4 */
+ " std 6,0x178\n" /* store f6 */
+ " stm 0,15,0x180\n" /* store general registers */
+ " stctl 0,15,0x1c0\n" /* store control registers */
+ " oi 0(%1),0x10\n" /* fake protection bit */
+ " lpsw 0(%0)"
+ : : "a" (dw_psw), "a" (&ctl_buf));
}
#endif /* __ASM_S390_PROCESSOR_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)