Revert "Fix very high interrupt rate for IRQ8 (rtc) unless pnpacpi=off"
[pv_ops_mirror.git] / arch / um / os-Linux / sys-x86_64 / registers.c
blob9bfa789992dec6ce7c23f532aa9de69bbfc143f3
1 /*
2 * Copyright (C) 2006-2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #include <errno.h>
7 #include <sys/ptrace.h>
8 #define __FRAME_OFFSETS
9 #include <asm/ptrace.h>
10 #include "longjmp.h"
11 #include "user.h"
13 int save_fp_registers(int pid, unsigned long *fp_regs)
15 if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
16 return -errno;
17 return 0;
20 int restore_fp_registers(int pid, unsigned long *fp_regs)
22 if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
23 return -errno;
24 return 0;
27 unsigned long get_thread_reg(int reg, jmp_buf *buf)
29 switch(reg){
30 case RIP: return buf[0]->__rip;
31 case RSP: return buf[0]->__rsp;
32 case RBP: return buf[0]->__rbp;
33 default:
34 printk("get_thread_regs - unknown register %d\n", reg);
35 return 0;