sprayTerminalOperation.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. #ifndef _ASM_IA64_PROCESSOR_H
  2. #define _ASM_IA64_PROCESSOR_H
  3. /*
  4. * Copyright (C) 1998-2004 Hewlett-Packard Co
  5. * David Mosberger-Tang <davidm@hpl.hp.com>
  6. * Stephane Eranian <eranian@hpl.hp.com>
  7. * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>
  8. * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
  9. *
  10. * 11/24/98 S.Eranian added ia64_set_iva()
  11. * 12/03/99 D. Mosberger implement thread_saved_pc() via kernel unwind API
  12. * 06/16/00 A. Mallick added csd/ssd/tssd for ia32 support
  13. */
  14. #include <asm/intrinsics.h>
  15. #include <asm/kregs.h>
  16. #include <asm/ptrace.h>
  17. #include <asm/ustack.h>
  18. #define __ARCH_WANT_UNLOCKED_CTXSW
  19. #define ARCH_HAS_PREFETCH_SWITCH_STACK
  20. #define IA64_NUM_PHYS_STACK_REG 96
  21. #define IA64_NUM_DBG_REGS 8
  22. #define DEFAULT_MAP_BASE __IA64_UL_CONST(0x2000000000000000)
  23. #define DEFAULT_TASK_SIZE __IA64_UL_CONST(0xa000000000000000)
  24. /*
  25. * TASK_SIZE really is a mis-named. It really is the maximum user
  26. * space address (plus one). On IA-64, there are five regions of 2TB
  27. * each (assuming 8KB page size), for a total of 8TB of user virtual
  28. * address space.
  29. */
  30. #define TASK_SIZE DEFAULT_TASK_SIZE
  31. /*
  32. * This decides where the kernel will search for a free chunk of vm
  33. * space during mmap's.
  34. */
  35. #define TASK_UNMAPPED_BASE (current->thread.map_base)
  36. #define IA64_THREAD_FPH_VALID (__IA64_UL(1) << 0) /* floating-point high state valid? */
  37. #define IA64_THREAD_DBG_VALID (__IA64_UL(1) << 1) /* debug registers valid? */
  38. #define IA64_THREAD_PM_VALID (__IA64_UL(1) << 2) /* performance registers valid? */
  39. #define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 3) /* don't log unaligned accesses */
  40. #define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */
  41. #define IA64_THREAD_MIGRATION (__IA64_UL(1) << 5) /* require migration
  42. sync at ctx sw */
  43. #define IA64_THREAD_FPEMU_NOPRINT (__IA64_UL(1) << 6) /* don't log any fpswa faults */
  44. #define IA64_THREAD_FPEMU_SIGFPE (__IA64_UL(1) << 7) /* send a SIGFPE for fpswa faults */
  45. #define IA64_THREAD_UAC_SHIFT 3
  46. #define IA64_THREAD_UAC_MASK (IA64_THREAD_UAC_NOPRINT | IA64_THREAD_UAC_SIGBUS)
  47. #define IA64_THREAD_FPEMU_SHIFT 6
  48. #define IA64_THREAD_FPEMU_MASK (IA64_THREAD_FPEMU_NOPRINT | IA64_THREAD_FPEMU_SIGFPE)
  49. /*
  50. * This shift should be large enough to be able to represent 1000000000/itc_freq with good
  51. * accuracy while being small enough to fit 10*1000000000<<IA64_NSEC_PER_CYC_SHIFT in 64 bits
  52. * (this will give enough slack to represent 10 seconds worth of time as a scaled number).
  53. */
  54. #define IA64_NSEC_PER_CYC_SHIFT 30
  55. #ifndef __ASSEMBLY__
  56. #include <linux/cache.h>
  57. #include <linux/compiler.h>
  58. #include <linux/threads.h>
  59. #include <linux/types.h>
  60. #include <asm/fpu.h>
  61. #include <asm/page.h>
  62. #include <asm/percpu.h>
  63. #include <asm/rse.h>
  64. #include <asm/unwind.h>
  65. #include <linux/atomic.h>
  66. #ifdef CONFIG_NUMA
  67. #include <asm/nodedata.h>
  68. #endif
  69. /* like above but expressed as bitfields for more efficient access: */
  70. struct ia64_psr {
  71. __u64 reserved0 : 1;
  72. __u64 be : 1;
  73. __u64 up : 1;
  74. __u64 ac : 1;
  75. __u64 mfl : 1;
  76. __u64 mfh : 1;
  77. __u64 reserved1 : 7;
  78. __u64 ic : 1;
  79. __u64 i : 1;
  80. __u64 pk : 1;
  81. __u64 reserved2 : 1;
  82. __u64 dt : 1;
  83. __u64 dfl : 1;
  84. __u64 dfh : 1;
  85. __u64 sp : 1;
  86. __u64 pp : 1;
  87. __u64 di : 1;
  88. __u64 si : 1;
  89. __u64 db : 1;
  90. __u64 lp : 1;
  91. __u64 tb : 1;
  92. __u64 rt : 1;
  93. __u64 reserved3 : 4;
  94. __u64 cpl : 2;
  95. __u64 is : 1;
  96. __u64 mc : 1;
  97. __u64 it : 1;
  98. __u64 id : 1;
  99. __u64 da : 1;
  100. __u64 dd : 1;
  101. __u64 ss : 1;
  102. __u64 ri : 2;
  103. __u64 ed : 1;
  104. __u64 bn : 1;
  105. __u64 reserved4 : 19;
  106. };
  107. union ia64_isr {
  108. __u64 val;
  109. struct {
  110. __u64 code : 16;
  111. __u64 vector : 8;
  112. __u64 reserved1 : 8;
  113. __u64 x : 1;
  114. __u64 w : 1;
  115. __u64 r : 1;
  116. __u64 na : 1;
  117. __u64 sp : 1;
  118. __u64 rs : 1;
  119. __u64 ir : 1;
  120. __u64 ni : 1;
  121. __u64 so : 1;
  122. __u64 ei : 2;
  123. __u64 ed : 1;
  124. __u64 reserved2 : 20;
  125. };
  126. };
  127. union ia64_lid {
  128. __u64 val;
  129. struct {
  130. __u64 rv : 16;
  131. __u64 eid : 8;
  132. __u64 id : 8;
  133. __u64 ig : 32;
  134. };
  135. };
  136. union ia64_tpr {
  137. __u64 val;
  138. struct {
  139. __u64 ig0 : 4;
  140. __u64 mic : 4;
  141. __u64 rsv : 8;
  142. __u64 mmi : 1;
  143. __u64 ig1 : 47;
  144. };
  145. };
  146. union ia64_itir {
  147. __u64 val;
  148. struct {
  149. __u64 rv3 : 2; /* 0-1 */
  150. __u64 ps : 6; /* 2-7 */
  151. __u64 key : 24; /* 8-31 */
  152. __u64 rv4 : 32; /* 32-63 */
  153. };
  154. };
  155. union ia64_rr {
  156. __u64 val;
  157. struct {
  158. __u64 ve : 1; /* enable hw walker */
  159. __u64 reserved0: 1; /* reserved */
  160. __u64 ps : 6; /* log page size */
  161. __u64 rid : 24; /* region id */
  162. __u64 reserved1: 32; /* reserved */
  163. };
  164. };
  165. /*
  166. * CPU type, hardware bug flags, and per-CPU state. Frequently used
  167. * state comes earlier:
  168. */
  169. struct cpuinfo_ia64 {
  170. unsigned int softirq_pending;
  171. unsigned long itm_delta; /* # of clock cycles between clock ticks */
  172. unsigned long itm_next; /* interval timer mask value to use for next clock tick */