asm-offsets.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2012 Regents of the University of California
  4. * Copyright (C) 2017 SiFive
  5. */
  6. #define GENERATING_ASM_OFFSETS
  7. #include <linux/kbuild.h>
  8. #include <linux/sched.h>
  9. #include <asm/thread_info.h>
  10. #include <asm/ptrace.h>
  11. void asm_offsets(void)
  12. {
  13. OFFSET(TASK_THREAD_RA, task_struct, thread.ra);
  14. OFFSET(TASK_THREAD_SP, task_struct, thread.sp);
  15. OFFSET(TASK_THREAD_S0, task_struct, thread.s[0]);
  16. OFFSET(TASK_THREAD_S1, task_struct, thread.s[1]);
  17. OFFSET(TASK_THREAD_S2, task_struct, thread.s[2]);
  18. OFFSET(TASK_THREAD_S3, task_struct, thread.s[3]);
  19. OFFSET(TASK_THREAD_S4, task_struct, thread.s[4]);
  20. OFFSET(TASK_THREAD_S5, task_struct, thread.s[5]);
  21. OFFSET(TASK_THREAD_S6, task_struct, thread.s[6]);
  22. OFFSET(TASK_THREAD_S7, task_struct, thread.s[7]);
  23. OFFSET(TASK_THREAD_S8, task_struct, thread.s[8]);
  24. OFFSET(TASK_THREAD_S9, task_struct, thread.s[9]);
  25. OFFSET(TASK_THREAD_S10, task_struct, thread.s[10]);
  26. OFFSET(TASK_THREAD_S11, task_struct, thread.s[11]);
  27. OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
  28. OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
  29. OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
  30. OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
  31. OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
  32. OFFSET(TASK_THREAD_F0, task_struct, thread.fstate.f[0]);
  33. OFFSET(TASK_THREAD_F1, task_struct, thread.fstate.f[1]);
  34. OFFSET(TASK_THREAD_F2, task_struct, thread.fstate.f[2]);
  35. OFFSET(TASK_THREAD_F3, task_struct, thread.fstate.f[3]);
  36. OFFSET(TASK_THREAD_F4, task_struct, thread.fstate.f[4]);
  37. OFFSET(TASK_THREAD_F5, task_struct, thread.fstate.f[5]);
  38. OFFSET(TASK_THREAD_F6, task_struct, thread.fstate.f[6]);
  39. OFFSET(TASK_THREAD_F7, task_struct, thread.fstate.f[7]);
  40. OFFSET(TASK_THREAD_F8, task_struct, thread.fstate.f[8]);
  41. OFFSET(TASK_THREAD_F9, task_struct, thread.fstate.f[9]);
  42. OFFSET(TASK_THREAD_F10, task_struct, thread.fstate.f[10]);
  43. OFFSET(TASK_THREAD_F11, task_struct, thread.fstate.f[11]);
  44. OFFSET(TASK_THREAD_F12, task_struct, thread.fstate.f[12]);
  45. OFFSET(TASK_THREAD_F13, task_struct, thread.fstate.f[13]);
  46. OFFSET(TASK_THREAD_F14, task_struct, thread.fstate.f[14]);
  47. OFFSET(TASK_THREAD_F15, task_struct, thread.fstate.f[15]);
  48. OFFSET(TASK_THREAD_F16, task_struct, thread.fstate.f[16]);
  49. OFFSET(TASK_THREAD_F17, task_struct, thread.fstate.f[17]);
  50. OFFSET(TASK_THREAD_F18, task_struct, thread.fstate.f[18]);
  51. OFFSET(TASK_THREAD_F19, task_struct, thread.fstate.f[19]);
  52. OFFSET(TASK_THREAD_F20, task_struct, thread.fstate.f[20]);
  53. OFFSET(TASK_THREAD_F21, task_struct, thread.fstate.f[21]);
  54. OFFSET(TASK_THREAD_F22, task_struct, thread.fstate.f[22]);
  55. OFFSET(TASK_THREAD_F23, task_struct, thread.fstate.f[23]);
  56. OFFSET(TASK_THREAD_F24, task_struct, thread.fstate.f[24]);
  57. OFFSET(TASK_THREAD_F25, task_struct, thread.fstate.f[25]);
  58. OFFSET(TASK_THREAD_F26, task_struct, thread.fstate.f[26]);
  59. OFFSET(TASK_THREAD_F27, task_struct, thread.fstate.f[27]);
  60. OFFSET(TASK_THREAD_F28, task_struct, thread.fstate.f[28]);
  61. OFFSET(TASK_THREAD_F29, task_struct, thread.fstate.f[29]);
  62. OFFSET(TASK_THREAD_F30, task_struct, thread.fstate.f[30]);
  63. OFFSET(TASK_THREAD_F31, task_struct, thread.fstate.f[31]);
  64. OFFSET(TASK_THREAD_FCSR, task_struct, thread.fstate.fcsr);
  65. OFFSET(TASK_THREAD_V0, task_struct, thread.vstate.v[0]);
  66. OFFSET(TASK_THREAD_V1, task_struct, thread.vstate.v[1]);
  67. OFFSET(TASK_THREAD_V2, task_struct, thread.vstate.v[2]);
  68. OFFSET(TASK_THREAD_V3, task_struct, thread.vstate.v[3]);
  69. OFFSET(TASK_THREAD_V4, task_struct, thread.vstate.v[4]);
  70. OFFSET(TASK_THREAD_V5, task_struct, thread.vstate.v[5]);
  71. OFFSET(TASK_THREAD_V6, task_struct, thread.vstate.v[6]);
  72. OFFSET(TASK_THREAD_V7, task_struct, thread.vstate.v[7]);
  73. OFFSET(TASK_THREAD_V8, task_struct, thread.vstate.v[8]);
  74. OFFSET(TASK_THREAD_V9, task_struct, thread.vstate.v[9]);
  75. OFFSET(TASK_THREAD_V10, task_struct, thread.vstate.v[10]);
  76. OFFSET(TASK_THREAD_V11, task_struct, thread.vstate.v[11]);
  77. OFFSET(TASK_THREAD_V12, task_struct, thread.vstate.v[12]);
  78. OFFSET(TASK_THREAD_V13, task_struct, thread.vstate.v[13]);
  79. OFFSET(TASK_THREAD_V14, task_struct, thread.vstate.v[14]);
  80. OFFSET(TASK_THREAD_V15, task_struct, thread.vstate.v[15]);
  81. OFFSET(TASK_THREAD_V16, task_struct, thread.vstate.v[16]);
  82. OFFSET(TASK_THREAD_V17, task_struct, thread.vstate.v[17]);
  83. OFFSET(TASK_THREAD_V18, task_struct, thread.vstate.v[18]);
  84. OFFSET(TASK_THREAD_V19, task_struct, thread.vstate.v[19]);
  85. OFFSET(TASK_THREAD_V20, task_struct, thread.vstate.v[20]);
  86. OFFSET(TASK_THREAD_V21, task_struct, thread.vstate.v[21]);
  87. OFFSET(TASK_THREAD_V22, task_struct, thread.vstate.v[22]);
  88. OFFSET(TASK_THREAD_V23, task_struct, thread.vstate.v[23]);
  89. OFFSET(TASK_THREAD_V24, task_struct, thread.vstate.v[24]);
  90. OFFSET(TASK_THREAD_V25, task_struct, thread.vstate.v[25]);
  91. OFFSET(TASK_THREAD_V26, task_struct, thread.vstate.v[26]);
  92. OFFSET(TASK_THREAD_V27, task_struct, thread.vstate.v[27]);
  93. OFFSET(TASK_THREAD_V28, task_struct, thread.vstate.v[28]);
  94. OFFSET(TASK_THREAD_V29, task_struct, thread.vstate.v[29]);
  95. OFFSET(TASK_THREAD_V30, task_struct, thread.vstate.v[30]);
  96. OFFSET(TASK_THREAD_V31, task_struct, thread.vstate.v[31]);
  97. OFFSET(TASK_THREAD_VSTART, task_struct, thread.vstate.vstart);
  98. OFFSET(TASK_THREAD_VXSAT, task_struct, thread.vstate.vxsat);
  99. OFFSET(TASK_THREAD_VXRM, task_struct, thread.vstate.vxrm);
  100. OFFSET(TASK_THREAD_VL, task_struct, thread.vstate.vl);
  101. OFFSET(TASK_THREAD_VTYPE, task_struct, thread.vstate.vtype);
  102. #ifdef CONFIG_VLEN_256
  103. DEFINE(RISCV_VECTOR_VLENB, sizeof(struct __riscv_vblen));
  104. #else
  105. DEFINE(RISCV_VECTOR_VLENB, sizeof(__uint128_t));
  106. #endif
  107. DEFINE(PT_SIZE, sizeof(struct pt_regs));
  108. OFFSET(PT_EPC, pt_regs, epc);
  109. OFFSET(PT_RA, pt_regs, ra);
  110. OFFSET(PT_FP, pt_regs, s0);
  111. OFFSET(PT_S0, pt_regs, s0);
  112. OFFSET(PT_S1, pt_regs, s1);
  113. OFFSET(PT_S2, pt_regs, s2);
  114. OFFSET(PT_S3, pt_regs, s3);
  115. OFFSET(PT_S4, pt_regs, s4);
  116. OFFSET(PT_S5, pt_regs, s5);
  117. OFFSET(PT_S6, pt_regs, s6);
  118. OFFSET(PT_S7, pt_regs, s7);
  119. OFFSET(PT_S8, pt_regs, s8);
  120. OFFSET(PT_S9, pt_regs, s9);
  121. OFFSET(PT_S10, pt_regs, s10);
  122. OFFSET(PT_S11, pt_regs, s11);
  123. OFFSET(PT_SP, pt_regs, sp);
  124. OFFSET(PT_TP, pt_regs, tp);
  125. OFFSET(PT_A0, pt_regs, a0);
  126. OFFSET(PT_A1, pt_regs, a1);
  127. OFFSET(PT_A2, pt_regs, a2);
  128. OFFSET(PT_A3, pt_regs, a3);
  129. OFFSET(PT_A4, pt_regs, a4);
  130. OFFSET(PT_A5, pt_regs, a5);
  131. OFFSET(PT_A6, pt_regs, a6);
  132. OFFSET(PT_A7, pt_regs, a7);
  133. OFFSET(PT_T0, pt_regs, t0);
  134. OFFSET(PT_T1, pt_regs, t1);
  135. OFFSET(PT_T2, pt_regs, t2);
  136. OFFSET(PT_T3, pt_regs, t3);
  137. OFFSET(PT_T4, pt_regs, t4);
  138. OFFSET(PT_T5, pt_regs, t5);
  139. OFFSET(PT_T6, pt_regs, t6);
  140. OFFSET(PT_GP, pt_regs, gp);
  141. OFFSET(PT_ORIG_A0, pt_regs, orig_a0);
  142. OFFSET(PT_STATUS, pt_regs, status);
  143. OFFSET(PT_BADADDR, pt_regs, badaddr);
  144. OFFSET(PT_CAUSE, pt_regs, cause);
  145. /*
  146. * THREAD_{F,X}* might be larger than a S-type offset can handle, but
  147. * these are used in performance-sensitive assembly so we can't resort
  148. * to loading the long immediate every time.
  149. */
  150. DEFINE(TASK_THREAD_RA_RA,
  151. offsetof(struct task_struct, thread.ra)
  152. - offsetof(struct task_struct, thread.ra)
  153. );
  154. DEFINE(TASK_THREAD_SP_RA,
  155. offsetof(struct task_struct, thread.sp)
  156. - offsetof(struct task_struct, thread.ra)
  157. );
  158. DEFINE(TASK_THREAD_S0_RA,
  159. offsetof(struct task_struct, thread.s[0])
  160. - offsetof(struct task_struct, thread.ra)
  161. );
  162. DEFINE(TASK_THREAD_S1_RA,
  163. offsetof(struct task_struct, thread.s[1])
  164. - offsetof(struct task_struct, thread.ra)
  165. );
  166. DEFINE(TASK_THREAD_S2_RA,
  167. offsetof(struct task_struct, thread.s[2])
  168. - offsetof(struct task_struct, thread.ra)
  169. );
  170. DEFINE(TASK_THREAD_S3_RA,
  171. offsetof(struct task_struct, thread.s[3])
  172. - offsetof(struct task_struct, thread.ra)
  173. );
  174. DEFINE(TASK_THREAD_S4_RA,
  175. offsetof(struct task_struct, thread.s[4])
  176. - offsetof(struct task_struct, thread.ra)
  177. );
  178. DEFINE(TASK_THREAD_S5_RA,
  179. offsetof(struct task_struct, thread.s[5])
  180. - offsetof(struct task_struct, thread.ra)
  181. );
  182. DEFINE(TASK_THREAD_S6_RA,
  183. offsetof(struct task_struct, thread.s[6])
  184. - offsetof(struct task_struct, thread.ra)
  185. );
  186. DEFINE(TASK_THREAD_S7_RA,
  187. offsetof(struct task_struct, thread.s[7])
  188. - offsetof(struct task_struct, thread.ra)
  189. );
  190. DEFINE(TASK_THREAD_S8_RA,
  191. offsetof(struct task_struct, thread.s[8])
  192. - offsetof(struct task_struct, thread.ra)
  193. );
  194. DEFINE(TASK_THREAD_S9_RA,
  195. offsetof(struct task_struct, thread.s[9])
  196. - offsetof(struct task_struct, thread.ra)
  197. );
  198. DEFINE(TASK_THREAD_S10_RA,
  199. offsetof(struct task_struct, thread.s[10])
  200. - offsetof(struct task_struct, thread.ra)
  201. );
  202. DEFINE(TASK_THREAD_S11_RA,
  203. offsetof(struct task_struct, thread.s[11])
  204. - offsetof(struct task_struct, thread.ra)
  205. );
  206. /* Float Point */
  207. DEFINE(TASK_THREAD_F0_F0,
  208. offsetof(struct task_struct, thread.fstate.f[0])
  209. - offsetof(struct task_struct, thread.fstate.f[0])
  210. );
  211. DEFINE(TASK_THREAD_F1_F0,
  212. offsetof(struct task_struct, thread.fstate.f[1])
  213. - offsetof(struct task_struct, thread.fstate.f[0])
  214. );
  215. DEFINE(TASK_THREAD_F2_F0,
  216. offsetof(struct task_struct, thread.fstate.f[2])
  217. - offsetof(struct task_struct, thread.fstate.f[0])
  218. );
  219. DEFINE(TASK_THREAD_F3_F0,
  220. offsetof(struct task_struct, thread.fstate.f[3])
  221. - offsetof(struct task_struct, thread.fstate.f[0])
  222. );
  223. DEFINE(TASK_THREAD_F4_F0,
  224. offsetof(struct task_struct, thread.fstate.f[4])
  225. - offsetof(struct task_struct, thread.fstate.f[0])
  226. );
  227. DEFINE(TASK_THREAD_F5_F0,
  228. offsetof(struct task_struct, thread.fstate.f[5])
  229. - offsetof(struct task_struct, thread.fstate.f[0])
  230. );
  231. DEFINE(TASK_THREAD_F6_F0,
  232. offsetof(struct task_struct, thread.fstate.f[6])
  233. - offsetof(struct task_struct, thread.fstate.f[0])
  234. );
  235. DEFINE(TASK_THREAD_F7_F0,
  236. offsetof(struct task_struct, thread.fstate.f[7])
  237. - offsetof(struct task_struct, thread.fstate.f[0])
  238. );
  239. DEFINE(TASK_THREAD_F8_F0,
  240. offsetof(struct task_struct, thread.fstate.f[8])
  241. - offsetof(struct task_struct, thread.fstate.f[0])
  242. );
  243. DEFINE(TASK_THREAD_F9_F0,
  244. offsetof(struct task_struct, thread.fstate.f[9])
  245. - offsetof(struct task_struct, thread.fstate.f[0])
  246. );
  247. DEFINE(TASK_THREAD_F10_F0,
  248. offsetof(struct task_struct, thread.fstate.f[10])
  249. - offsetof(struct task_struct, thread.fstate.f[0])
  250. );
  251. DEFINE(TASK_THREAD_F11_F0,
  252. offsetof(struct task_struct, thread.fstate.f[11])
  253. - offsetof(struct task_struct, thread.fstate.f[0])
  254. );
  255. DEFINE(TASK_THREAD_F12_F0,
  256. offsetof(struct task_struct, thread.fstate.f[12])
  257. - offsetof(struct task_struct, thread.fstate.f[0])
  258. );
  259. DEFINE(TASK_THREAD_F13_F0,
  260. offsetof(struct task_struct, thread.fstate.f[13])
  261. - offsetof(struct task_struct, thread.fstate.f[0])
  262. );
  263. DEFINE(TASK_THREAD_F14_F0,
  264. offsetof(struct task_struct, thread.fstate.f[14])
  265. - offsetof(struct task_struct, thread.fstate.f[0])
  266. );
  267. DEFINE(TASK_THREAD_F15_F0,
  268. offsetof(struct task_struct, thread.fstate.f[15])
  269. - offsetof(struct task_struct, thread.fstate.f[0])
  270. );
  271. DEFINE(TASK_THREAD_F16_F0,
  272. offsetof(struct task_struct, thread.fstate.f[16])
  273. - offsetof(struct task_struct, thread.fstate.f[0])
  274. );
  275. DEFINE(TASK_THREAD_F17_F0,
  276. offsetof(struct task_struct, thread.fstate.f[17])
  277. - offsetof(struct task_struct, thread.fstate.f[0])
  278. );
  279. DEFINE(TASK_THREAD_F18_F0,
  280. offsetof(struct task_struct, thread.fstate.f[18])
  281. - offsetof(struct task_struct, thread.fstate.f[0])
  282. );
  283. DEFINE(TASK_THREAD_F19_F0,
  284. offsetof(struct task_struct, thread.fstate.f[19])
  285. - offsetof(struct task_struct, thread.fstate.f[0])
  286. );
  287. DEFINE(TASK_THREAD_F20_F0,
  288. offsetof(struct task_struct, thread.fstate.f[20])
  289. - offsetof(struct task_struct, thread.fstate.f[0])
  290. );
  291. DEFINE(TASK_THREAD_F21_F0,
  292. offsetof(struct task_struct, thread.fstate.f[21])
  293. - offsetof(struct task_struct, thread.fstate.f[0])
  294. );
  295. DEFINE(TASK_THREAD_F22_F0,
  296. offsetof(struct task_struct, thread.fstate.f[22])
  297. - offsetof(struct task_struct, thread.fstate.f[0])
  298. );
  299. DEFINE(TASK_THREAD_F23_F0,
  300. offsetof(struct task_struct, thread.fstate.f[23])
  301. - offsetof(struct task_struct, thread.fstate.f[0])
  302. );
  303. DEFINE(TASK_THREAD_F24_F0,
  304. offsetof(struct task_struct, thread.fstate.f[24])
  305. - offsetof(struct task_struct, thread.fstate.f[0])
  306. );
  307. DEFINE(TASK_THREAD_F25_F0,
  308. offsetof(struct task_struct, thread.fstate.f[25])
  309. - offsetof(struct task_struct, thread.fstate.f[0])
  310. );
  311. DEFINE(TASK_THREAD_F26_F0,
  312. offsetof(struct task_struct, thread.fstate.f[26])
  313. - offsetof(struct task_struct, thread.fstate.f[0])
  314. );
  315. DEFINE(TASK_THREAD_F27_F0,
  316. offsetof(struct task_struct, thread.fstate.f[27])
  317. - offsetof(struct task_struct, thread.fstate.f[0])
  318. );
  319. DEFINE(TASK_THREAD_F28_F0,
  320. offsetof(struct task_struct, thread.fstate.f[28])
  321. - offsetof(struct task_struct, thread.fstate.f[0])
  322. );
  323. DEFINE(TASK_THREAD_F29_F0,
  324. offsetof(struct task_struct, thread.fstate.f[29])
  325. - offsetof(struct task_struct, thread.fstate.f[0])
  326. );
  327. DEFINE(TASK_THREAD_F30_F0,
  328. offsetof(struct task_struct, thread.fstate.f[30])
  329. - offsetof(struct task_struct, thread.fstate.f[0])
  330. );
  331. DEFINE(TASK_THREAD_F31_F0,
  332. offsetof(struct task_struct, thread.fstate.f[31])
  333. - offsetof(struct task_struct, thread.fstate.f[0])
  334. );
  335. DEFINE(TASK_THREAD_FCSR_F0,
  336. offsetof(struct task_struct, thread.fstate.fcsr)
  337. - offsetof(struct task_struct, thread.fstate.f[0])
  338. );
  339. /* Vector */
  340. DEFINE(TASK_THREAD_V0_V0,
  341. offsetof(struct task_struct, thread.vstate.v[0])
  342. - offsetof(struct task_struct, thread.vstate.v[0])
  343. );
  344. DEFINE(TASK_THREAD_V1_V0,
  345. offsetof(struct task_struct, thread.vstate.v[1])
  346. - offsetof(struct task_struct, thread.vstate.v[0])
  347. );
  348. DEFINE(TASK_THREAD_V2_V0,
  349. offsetof(struct task_struct, thread.vstate.v[2])
  350. - offsetof(struct task_struct, thread.vstate.v[0])
  351. );
  352. DEFINE(TASK_THREAD_V3_V0,
  353. offsetof(struct task_struct, thread.vstate.v[3])
  354. - offsetof(struct task_struct, thread.vstate.v[0])
  355. );
  356. DEFINE(TASK_THREAD_V4_V0,
  357. offsetof(struct task_struct, thread.vstate.v[4])
  358. - offsetof(struct task_struct, thread.vstate.v[0])
  359. );
  360. DEFINE(TASK_THREAD_V5_V0,
  361. offsetof(struct task_struct, thread.vstate.v[5])
  362. - offsetof(struct task_struct, thread.vstate.v[0])
  363. );
  364. DEFINE(TASK_THREAD_V6_V0,
  365. offsetof(struct task_struct, thread.vstate.v[6])
  366. - offsetof(struct task_struct, thread.vstate.v[0])
  367. );
  368. DEFINE(TASK_THREAD_V7_V0,
  369. offsetof(struct task_struct, thread.vstate.v[7])
  370. - offsetof(struct task_struct, thread.vstate.v[0])
  371. );
  372. DEFINE(TASK_THREAD_V8_V0,
  373. offsetof(struct task_struct, thread.vstate.v[8])
  374. - offsetof(struct task_struct, thread.vstate.v[0])
  375. );
  376. DEFINE(TASK_THREAD_V9_V0,
  377. offsetof(struct task_struct, thread.vstate.v[9])
  378. - offsetof(struct task_struct, thread.vstate.v[0])
  379. );
  380. DEFINE(TASK_THREAD_V10_V0,
  381. offsetof(struct task_struct, thread.vstate.v[10])
  382. - offsetof(struct task_struct, thread.vstate.v[0])
  383. );
  384. DEFINE(TASK_THREAD_V11_V0,
  385. offsetof(struct task_struct, thread.vstate.v[11])
  386. - offsetof(struct task_struct, thread.vstate.v[0])
  387. );
  388. DEFINE(TASK_THREAD_V12_V0,
  389. offsetof(struct task_struct, thread.vstate.v[12])
  390. - offsetof(struct task_struct, thread.vstate.v[0])
  391. );
  392. DEFINE(TASK_THREAD_V13_V0,
  393. offsetof(struct task_struct, thread.vstate.v[13])
  394. - offsetof(struct task_struct, thread.vstate.v[0])
  395. );
  396. DEFINE(TASK_THREAD_V14_V0,
  397. offsetof(struct task_struct, thread.vstate.v[14])
  398. - offsetof(struct task_struct, thread.vstate.v[0])
  399. );
  400. DEFINE(TASK_THREAD_V15_V0,
  401. offsetof(struct task_struct, thread.vstate.v[15])
  402. - offsetof(struct task_struct, thread.vstate.v[0])
  403. );
  404. DEFINE(TASK_THREAD_V16_V0,
  405. offsetof(struct task_struct, thread.vstate.v[16])
  406. - offsetof(struct task_struct, thread.vstate.v[0])
  407. );
  408. DEFINE(TASK_THREAD_V17_V0,
  409. offsetof(struct task_struct, thread.vstate.v[17])
  410. - offsetof(struct task_struct, thread.vstate.v[0])
  411. );
  412. DEFINE(TASK_THREAD_V18_V0,
  413. offsetof(struct task_struct, thread.vstate.v[18])
  414. - offsetof(struct task_struct, thread.vstate.v[0])
  415. );
  416. DEFINE(TASK_THREAD_V19_V0,
  417. offsetof(struct task_struct, thread.vstate.v[19])
  418. - offsetof(struct task_struct, thread.vstate.v[0])
  419. );
  420. DEFINE(TASK_THREAD_V20_V0,
  421. offsetof(struct task_struct, thread.vstate.v[20])
  422. - offsetof(struct task_struct, thread.vstate.v[0])
  423. );
  424. DEFINE(TASK_THREAD_V21_V0,
  425. offsetof(struct task_struct, thread.vstate.v[21])
  426. - offsetof(struct task_struct, thread.vstate.v[0])
  427. );
  428. DEFINE(TASK_THREAD_V22_V0,
  429. offsetof(struct task_struct, thread.vstate.v[22])
  430. - offsetof(struct task_struct, thread.vstate.v[0])
  431. );
  432. DEFINE(TASK_THREAD_V23_V0,
  433. offsetof(struct task_struct, thread.vstate.v[23])
  434. - offsetof(struct task_struct, thread.vstate.v[0])
  435. );
  436. DEFINE(TASK_THREAD_V24_V0,
  437. offsetof(struct task_struct, thread.vstate.v[24])
  438. - offsetof(struct task_struct, thread.vstate.v[0])
  439. );
  440. DEFINE(TASK_THREAD_V25_V0,
  441. offsetof(struct task_struct, thread.vstate.v[25])
  442. - offsetof(struct task_struct, thread.vstate.v[0])
  443. );
  444. DEFINE(TASK_THREAD_V26_V0,
  445. offsetof(struct task_struct, thread.vstate.v[26])
  446. - offsetof(struct task_struct, thread.vstate.v[0])
  447. );
  448. DEFINE(TASK_THREAD_V27_V0,
  449. offsetof(struct task_struct, thread.vstate.v[27])
  450. - offsetof(struct task_struct, thread.vstate.v[0])
  451. );
  452. DEFINE(TASK_THREAD_V28_V0,
  453. offsetof(struct task_struct, thread.vstate.v[28])
  454. - offsetof(struct task_struct, thread.vstate.v[0])
  455. );
  456. DEFINE(TASK_THREAD_V29_V0,
  457. offsetof(struct task_struct, thread.vstate.v[29])
  458. - offsetof(struct task_struct, thread.vstate.v[0])
  459. );
  460. DEFINE(TASK_THREAD_V30_V0,
  461. offsetof(struct task_struct, thread.vstate.v[30])
  462. - offsetof(struct task_struct, thread.vstate.v[0])
  463. );
  464. DEFINE(TASK_THREAD_V31_V0,
  465. offsetof(struct task_struct, thread.vstate.v[31])
  466. - offsetof(struct task_struct, thread.vstate.v[0])
  467. );
  468. DEFINE(TASK_THREAD_VSTART_V0,
  469. offsetof(struct task_struct, thread.vstate.vstart)
  470. - offsetof(struct task_struct, thread.vstate.v[0])
  471. );
  472. DEFINE(TASK_THREAD_VXSAT_V0,
  473. offsetof(struct task_struct, thread.vstate.vxsat)
  474. - offsetof(struct task_struct, thread.vstate.v[0])
  475. );
  476. DEFINE(TASK_THREAD_VXRM_V0,
  477. offsetof(struct task_struct, thread.vstate.vxrm)
  478. - offsetof(struct task_struct, thread.vstate.v[0])
  479. );
  480. DEFINE(TASK_THREAD_VL_V0,
  481. offsetof(struct task_struct, thread.vstate.vl)
  482. - offsetof(struct task_struct, thread.vstate.v[0])
  483. );
  484. DEFINE(TASK_THREAD_VTYPE_V0,
  485. offsetof(struct task_struct, thread.vstate.vtype)
  486. - offsetof(struct task_struct, thread.vstate.v[0])
  487. );
  488. /*
  489. * We allocate a pt_regs on the stack when entering the kernel. This
  490. * ensures the alignment is sane.
  491. */
  492. DEFINE(PT_SIZE_ON_STACK, ALIGN(sizeof(struct pt_regs), STACK_ALIGN));
  493. }