processor_64.h 748 B

123456789101112131415161718192021222324252627282930313233343536
  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. struct arch_thread {
  9. unsigned long debugregs[8];
  10. int debugregs_seq;
  11. unsigned long fs;
  12. struct faultinfo faultinfo;
  13. };
  14. #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
  15. .debugregs_seq = 0, \
  16. .fs = 0, \
  17. .faultinfo = { 0, 0, 0 } }
  18. static inline void arch_flush_thread(struct arch_thread *thread)
  19. {
  20. }
  21. static inline void arch_copy_thread(struct arch_thread *from,
  22. struct arch_thread *to)
  23. {
  24. to->fs = from->fs;
  25. }
  26. #define current_text_addr() \
  27. ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
  28. #endif