ia64/xen-unstable

changeset 15079:090ca10cb543

[qemu] Fix ia64 after removal of ia64_intrinsic.h.

From: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Fri May 11 10:06:19 2007 +0100 (2007-05-11)
parents 60240a72e2b2
children 22c5695b7c73
files tools/ioemu/exec-all.h tools/ioemu/target-i386-dm/exec-dm.c
line diff
     1.1 --- a/tools/ioemu/exec-all.h	Thu May 10 23:49:04 2007 +0100
     1.2 +++ b/tools/ioemu/exec-all.h	Fri May 11 10:06:19 2007 +0100
     1.3 @@ -357,7 +357,6 @@ extern CPUWriteMemoryFunc *io_mem_write[
     1.4  extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
     1.5  extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
     1.6  
     1.7 -#ifndef CONFIG_DM
     1.8  #ifdef __powerpc__
     1.9  static inline int testandset (int *p)
    1.10  {
    1.11 @@ -481,7 +480,6 @@ static inline int testandset (int *p)
    1.12      return __sync_lock_test_and_set (p, 1);
    1.13  }
    1.14  #endif
    1.15 -#endif /* !CONFIG_DM */
    1.16  
    1.17  typedef int spinlock_t;
    1.18  
     2.1 --- a/tools/ioemu/target-i386-dm/exec-dm.c	Thu May 10 23:49:04 2007 +0100
     2.2 +++ b/tools/ioemu/target-i386-dm/exec-dm.c	Fri May 11 10:06:19 2007 +0100
     2.3 @@ -360,6 +360,11 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
     2.4  }
     2.5  
     2.6  #ifdef __ia64__
     2.7 +
     2.8 +#define __ia64_fc(addr)	asm volatile ("fc %0" :: "r"(addr) : "memory")
     2.9 +#define ia64_sync_i()	asm volatile (";; sync.i" ::: "memory")
    2.10 +#define ia64_srlz_i()	asm volatile (";; srlz.i ;;" ::: "memory")
    2.11 +
    2.12  /* IA64 has seperate I/D cache, with coherence maintained by DMA controller.
    2.13   * So to emulate right behavior that guest OS is assumed, we need to flush
    2.14   * I/D cache here.