simulator.h 687 B

123456789101112131415161718192021222324252627
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved.
  6. */
  7. #ifndef _ASM_IA64_SN_SIMULATOR_H
  8. #define _ASM_IA64_SN_SIMULATOR_H
  9. #include <linux/config.h>
  10. #ifdef CONFIG_IA64_SGI_SN_SIM
  11. #define SNMAGIC 0xaeeeeeee8badbeefL
  12. #define IS_RUNNING_ON_SIMULATOR() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;})
  13. #define SIMULATOR_SLEEP() asm("nop.i 0x8beef")
  14. #else
  15. #define IS_RUNNING_ON_SIMULATOR() (0)
  16. #define SIMULATOR_SLEEP()
  17. #endif
  18. #endif /* _ASM_IA64_SN_SIMULATOR_H */