processor-x86_64.h 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. *
  4. * Licensed under the GPL
  5. */
  6. #ifndef __UM_PROCESSOR_X86_64_H
  7. #define __UM_PROCESSOR_X86_64_H
  8. #include "asm/arch/user.h"
  9. struct arch_thread {
  10. };
  11. /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
  12. extern inline void rep_nop(void)
  13. {
  14. __asm__ __volatile__("rep;nop": : :"memory");
  15. }
  16. #define cpu_relax() rep_nop()
  17. #define INIT_ARCH_THREAD { }
  18. #define current_text_addr() \
  19. ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
  20. #define ARCH_IS_STACKGROW(address) \
  21. (address + 128 >= UPT_SP(&current->thread.regs.regs))
  22. #include "asm/processor-generic.h"
  23. #endif
  24. /*
  25. * Overrides for Emacs so that we follow Linus's tabbing style.
  26. * Emacs will notice this stuff at the end of the file and automatically
  27. * adjust the settings for this buffer only. This must remain at the end
  28. * of the file.
  29. * ---------------------------------------------------------------------------
  30. * Local variables:
  31. * c-file-style: "linux"
  32. * End:
  33. */