ia64/xen-unstable

changeset 5050:6cc3680e98d1

bitkeeper revision 1.1490 (428e17e3-aTEgwH1KsJrUT4WjK5zWQ)

Fix ioemu build.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 20 17:01:23 2005 +0000 (2005-05-20)
parents 04626a6c01f1
children 95c16a18cc65
files tools/Makefile tools/ioemu/target-i386-dm/helper2.c
line diff
     1.1 --- a/tools/Makefile	Fri May 20 16:52:32 2005 +0000
     1.2 +++ b/tools/Makefile	Fri May 20 17:01:23 2005 +0000
     1.3 @@ -38,6 +38,10 @@ check:
     1.4  check_clean:
     1.5  	$(MAKE) -C check clean
     1.6  
     1.7 +ifneq ($(XEN_TARGET_ARCH),x86_32)
     1.8 +XEN_NO_IOEMU=1
     1.9 +endif
    1.10 +
    1.11  ifndef XEN_NO_IOEMU
    1.12  ioemu ioemuinstall ioemuclean:
    1.13  	[ -f ioemu/config-host.h ] || \
     2.1 --- a/tools/ioemu/target-i386-dm/helper2.c	Fri May 20 16:52:32 2005 +0000
     2.2 +++ b/tools/ioemu/target-i386-dm/helper2.c	Fri May 20 17:01:23 2005 +0000
     2.3 @@ -52,32 +52,6 @@
     2.4  #include "cpu.h"
     2.5  #include "exec-all.h"
     2.6  
     2.7 -//#define DEBUG_MMU
     2.8 -
     2.9 -#ifdef USE_CODE_COPY
    2.10 -#include <asm/ldt.h>
    2.11 -#include <linux/unistd.h>
    2.12 -#include <linux/version.h>
    2.13 -
    2.14 -#include <sys/ioctl.h>
    2.15 -/* According to POSIX 1003.1-2001 */
    2.16 -#include <sys/select.h>
    2.17 -
    2.18 -/* According to earlier standards */
    2.19 -#include <sys/time.h>
    2.20 -#include <sys/types.h>
    2.21 -#include <sys/stat.h>
    2.22 -#include <fcntl.h>
    2.23 -#include <unistd.h>
    2.24 -#include <values.h>
    2.25 -
    2.26 -_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
    2.27 -
    2.28 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
    2.29 -#define modify_ldt_ldt_s user_desc
    2.30 -#endif
    2.31 -#endif /* USE_CODE_COPY */
    2.32 -
    2.33  void *shared_page;
    2.34  
    2.35  CPUX86State *cpu_86_init(void)
    2.36 @@ -321,7 +295,13 @@ cpu_timer_handler(CPUState *env)
    2.37  
    2.38  int xc_handle;
    2.39  
    2.40 -#include <asm/bitops.h>
    2.41 +static __inline__ void atomic_set_bit(long nr, volatile void *addr)
    2.42 +{
    2.43 +        __asm__ __volatile__(
    2.44 +                "lock ; bts %1,%0"
    2.45 +                :"=m" (*(volatile long *)addr)
    2.46 +                :"dIr" (nr));
    2.47 +}
    2.48  
    2.49  void
    2.50  do_interrupt(CPUState *env, int vector)
    2.51 @@ -332,7 +312,7 @@ do_interrupt(CPUState *env, int vector)
    2.52  	// page.
    2.53  
    2.54  	intr = &(((vcpu_iodata_t *) shared_page)->vp_intr[0]);
    2.55 -	set_bit(vector, intr);
    2.56 +	atomic_set_bit(vector, intr);
    2.57          fprintf(logfile, "injecting vector: %x\n", vector);
    2.58  	env->send_event = 1;
    2.59  }