diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-20 17:01:23 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-20 17:01:23 +0000 |
commit | 7abe880614053a9a0ab04ded0e167dc1247998c8 (patch) | |
tree | 9ed61b3492822d0d5358426c010b38429aaeaca8 /tools/ioemu | |
parent | c1e1da05190d7112fa6d6c954bd35cfefa1b983a (diff) | |
download | xen-7abe880614053a9a0ab04ded0e167dc1247998c8.tar.gz xen-7abe880614053a9a0ab04ded0e167dc1247998c8.tar.bz2 xen-7abe880614053a9a0ab04ded0e167dc1247998c8.zip |
bitkeeper revision 1.1490 (428e17e3-aTEgwH1KsJrUT4WjK5zWQ)
Fix ioemu build.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/ioemu')
-rw-r--r-- | tools/ioemu/target-i386-dm/helper2.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c index 3704b08361..ae8b763ea2 100644 --- a/tools/ioemu/target-i386-dm/helper2.c +++ b/tools/ioemu/target-i386-dm/helper2.c @@ -52,32 +52,6 @@ #include "cpu.h" #include "exec-all.h" -//#define DEBUG_MMU - -#ifdef USE_CODE_COPY -#include <asm/ldt.h> -#include <linux/unistd.h> -#include <linux/version.h> - -#include <sys/ioctl.h> -/* According to POSIX 1003.1-2001 */ -#include <sys/select.h> - -/* According to earlier standards */ -#include <sys/time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <values.h> - -_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66) -#define modify_ldt_ldt_s user_desc -#endif -#endif /* USE_CODE_COPY */ - void *shared_page; CPUX86State *cpu_86_init(void) @@ -321,7 +295,13 @@ cpu_timer_handler(CPUState *env) int xc_handle; -#include <asm/bitops.h> +static __inline__ void atomic_set_bit(long nr, volatile void *addr) +{ + __asm__ __volatile__( + "lock ; bts %1,%0" + :"=m" (*(volatile long *)addr) + :"dIr" (nr)); +} void do_interrupt(CPUState *env, int vector) @@ -332,7 +312,7 @@ do_interrupt(CPUState *env, int vector) // page. intr = &(((vcpu_iodata_t *) shared_page)->vp_intr[0]); - set_bit(vector, intr); + atomic_set_bit(vector, intr); fprintf(logfile, "injecting vector: %x\n", vector); env->send_event = 1; } |