asm-offsets.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Generate definitions needed by assembly language modules.
  4. * This code generates raw asm output which is post-processed to extract
  5. * and format the required data.
  6. *
  7. * Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
  8. * Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
  9. * Copyright (C) 2000 Sam Creasey <[email protected]>
  10. * Copyright (C) 2000 Grant Grundler <grundler with parisc-linux.org>
  11. * Copyright (C) 2001 Paul Bame <bame at parisc-linux.org>
  12. * Copyright (C) 2001 Richard Hirst <rhirst at parisc-linux.org>
  13. * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
  14. * Copyright (C) 2003 James Bottomley <jejb at parisc-linux.org>
  15. */
  16. #include <linux/types.h>
  17. #include <linux/sched.h>
  18. #include <linux/thread_info.h>
  19. #include <linux/ptrace.h>
  20. #include <linux/hardirq.h>
  21. #include <linux/kbuild.h>
  22. #include <linux/pgtable.h>
  23. #include <asm/assembly.h>
  24. #include <asm/ptrace.h>
  25. #include <asm/processor.h>
  26. #include <asm/pdc.h>
  27. #include <uapi/asm/sigcontext.h>
  28. #include <asm/ucontext.h>
  29. #include <asm/rt_sigframe.h>
  30. #include <linux/uaccess.h>
  31. #include "signal32.h"
  32. /* Add FRAME_SIZE to the size x and align it to y. All definitions
  33. * that use align_frame will include space for a frame.
  34. */
  35. #define align_frame(x,y) (((x)+FRAME_SIZE+(y)-1) - (((x)+(y)-1)%(y)))
  36. int main(void)
  37. {
  38. DEFINE(TASK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags));
  39. #ifdef CONFIG_SMP
  40. DEFINE(TASK_TI_CPU, offsetof(struct task_struct, thread_info.cpu));
  41. #endif
  42. DEFINE(TASK_STACK, offsetof(struct task_struct, stack));
  43. DEFINE(TASK_PAGEFAULT_DISABLED, offsetof(struct task_struct, pagefault_disabled));
  44. BLANK();
  45. DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs));
  46. DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0]));
  47. DEFINE(TASK_PT_GR1, offsetof(struct task_struct, thread.regs.gr[ 1]));
  48. DEFINE(TASK_PT_GR2, offsetof(struct task_struct, thread.regs.gr[ 2]));
  49. DEFINE(TASK_PT_GR3, offsetof(struct task_struct, thread.regs.gr[ 3]));
  50. DEFINE(TASK_PT_GR4, offsetof(struct task_struct, thread.regs.gr[ 4]));
  51. DEFINE(TASK_PT_GR5, offsetof(struct task_struct, thread.regs.gr[ 5]));
  52. DEFINE(TASK_PT_GR6, offsetof(struct task_struct, thread.regs.gr[ 6]));
  53. DEFINE(TASK_PT_GR7, offsetof(struct task_struct, thread.regs.gr[ 7]));
  54. DEFINE(TASK_PT_GR8, offsetof(struct task_struct, thread.regs.gr[ 8]));
  55. DEFINE(TASK_PT_GR9, offsetof(struct task_struct, thread.regs.gr[ 9]));
  56. DEFINE(TASK_PT_GR10, offsetof(struct task_struct, thread.regs.gr[10]));
  57. DEFINE(TASK_PT_GR11, offsetof(struct task_struct, thread.regs.gr[11]));
  58. DEFINE(TASK_PT_GR12, offsetof(struct task_struct, thread.regs.gr[12]));
  59. DEFINE(TASK_PT_GR13, offsetof(struct task_struct, thread.regs.gr[13]));
  60. DEFINE(TASK_PT_GR14, offsetof(struct task_struct, thread.regs.gr[14]));
  61. DEFINE(TASK_PT_GR15, offsetof(struct task_struct, thread.regs.gr[15]));
  62. DEFINE(TASK_PT_GR16, offsetof(struct task_struct, thread.regs.gr[16]));
  63. DEFINE(TASK_PT_GR17, offsetof(struct task_struct, thread.regs.gr[17]));
  64. DEFINE(TASK_PT_GR18, offsetof(struct task_struct, thread.regs.gr[18]));
  65. DEFINE(TASK_PT_GR19, offsetof(struct task_struct, thread.regs.gr[19]));
  66. DEFINE(TASK_PT_GR20, offsetof(struct task_struct, thread.regs.gr[20]));
  67. DEFINE(TASK_PT_GR21, offsetof(struct task_struct, thread.regs.gr[21]));
  68. DEFINE(TASK_PT_GR22, offsetof(struct task_struct, thread.regs.gr[22]));
  69. DEFINE(TASK_PT_GR23, offsetof(struct task_struct, thread.regs.gr[23]));
  70. DEFINE(TASK_PT_GR24, offsetof(struct task_struct, thread.regs.gr[24]));
  71. DEFINE(TASK_PT_GR25, offsetof(struct task_struct, thread.regs.gr[25]));
  72. DEFINE(TASK_PT_GR26, offsetof(struct task_struct, thread.regs.gr[26]));
  73. DEFINE(TASK_PT_GR27, offsetof(struct task_struct, thread.regs.gr[27]));
  74. DEFINE(TASK_PT_GR28, offsetof(struct task_struct, thread.regs.gr[28]));
  75. DEFINE(TASK_PT_GR29, offsetof(struct task_struct, thread.regs.gr[29]));
  76. DEFINE(TASK_PT_GR30, offsetof(struct task_struct, thread.regs.gr[30]));
  77. DEFINE(TASK_PT_GR31, offsetof(struct task_struct, thread.regs.gr[31]));
  78. DEFINE(TASK_PT_FR0, offsetof(struct task_struct, thread.regs.fr[ 0]));
  79. DEFINE(TASK_PT_FR1, offsetof(struct task_struct, thread.regs.fr[ 1]));
  80. DEFINE(TASK_PT_FR2, offsetof(struct task_struct, thread.regs.fr[ 2]));
  81. DEFINE(TASK_PT_FR3, offsetof(struct task_struct, thread.regs.fr[ 3]));
  82. DEFINE(TASK_PT_FR4, offsetof(struct task_struct, thread.regs.fr[ 4]));
  83. DEFINE(TASK_PT_FR5, offsetof(struct task_struct, thread.regs.fr[ 5]));
  84. DEFINE(TASK_PT_FR6, offsetof(struct task_struct, thread.regs.fr[ 6]));
  85. DEFINE(TASK_PT_FR7, offsetof(struct task_struct, thread.regs.fr[ 7]));
  86. DEFINE(TASK_PT_FR8, offsetof(struct task_struct, thread.regs.fr[ 8]));
  87. DEFINE(TASK_PT_FR9, offsetof(struct task_struct, thread.regs.fr[ 9]));
  88. DEFINE(TASK_PT_FR10, offsetof(struct task_struct, thread.regs.fr[10]));
  89. DEFINE(TASK_PT_FR11, offsetof(struct task_struct, thread.regs.fr[11]));
  90. DEFINE(TASK_PT_FR12, offsetof(struct task_struct, thread.regs.fr[12]));
  91. DEFINE(TASK_PT_FR13, offsetof(struct task_struct, thread.regs.fr[13]));
  92. DEFINE(TASK_PT_FR14, offsetof(struct task_struct, thread.regs.fr[14]));
  93. DEFINE(TASK_PT_FR15, offsetof(struct task_struct, thread.regs.fr[15]));
  94. DEFINE(TASK_PT_FR16, offsetof(struct task_struct, thread.regs.fr[16]));
  95. DEFINE(TASK_PT_FR17, offsetof(struct task_struct, thread.regs.fr[17]));
  96. DEFINE(TASK_PT_FR18, offsetof(struct task_struct, thread.regs.fr[18]));
  97. DEFINE(TASK_PT_FR19, offsetof(struct task_struct, thread.regs.fr[19]));
  98. DEFINE(TASK_PT_FR20, offsetof(struct task_struct, thread.regs.fr[20]));
  99. DEFINE(TASK_PT_FR21, offsetof(struct task_struct, thread.regs.fr[21]));
  100. DEFINE(TASK_PT_FR22, offsetof(struct task_struct, thread.regs.fr[22]));
  101. DEFINE(TASK_PT_FR23, offsetof(struct task_struct, thread.regs.fr[23]));
  102. DEFINE(TASK_PT_FR24, offsetof(struct task_struct, thread.regs.fr[24]));
  103. DEFINE(TASK_PT_FR25, offsetof(struct task_struct, thread.regs.fr[25]));
  104. DEFINE(TASK_PT_FR26, offsetof(struct task_struct, thread.regs.fr[26]));
  105. DEFINE(TASK_PT_FR27, offsetof(struct task_struct, thread.regs.fr[27]));
  106. DEFINE(TASK_PT_FR28, offsetof(struct task_struct, thread.regs.fr[28]));
  107. DEFINE(TASK_PT_FR29, offsetof(struct task_struct, thread.regs.fr[29]));
  108. DEFINE(TASK_PT_FR30, offsetof(struct task_struct, thread.regs.fr[30]));
  109. DEFINE(TASK_PT_FR31, offsetof(struct task_struct, thread.regs.fr[31]));
  110. DEFINE(TASK_PT_SR0, offsetof(struct task_struct, thread.regs.sr[ 0]));
  111. DEFINE(TASK_PT_SR1, offsetof(struct task_struct, thread.regs.sr[ 1]));
  112. DEFINE(TASK_PT_SR2, offsetof(struct task_struct, thread.regs.sr[ 2]));
  113. DEFINE(TASK_PT_SR3, offsetof(struct task_struct, thread.regs.sr[ 3]));
  114. DEFINE(TASK_PT_SR4, offsetof(struct task_struct, thread.regs.sr[ 4]));
  115. DEFINE(TASK_PT_SR5, offsetof(struct task_struct, thread.regs.sr[ 5]));
  116. DEFINE(TASK_PT_SR6, offsetof(struct task_struct, thread.regs.sr[ 6]));
  117. DEFINE(TASK_PT_SR7, offsetof(struct task_struct, thread.regs.sr[ 7]));
  118. DEFINE(TASK_PT_IASQ0, offsetof(struct task_struct, thread.regs.iasq[0]));
  119. DEFINE(TASK_PT_IASQ1, offsetof(struct task_struct, thread.regs.iasq[1]));
  120. DEFINE(TASK_PT_IAOQ0, offsetof(struct task_struct, thread.regs.iaoq[0]));
  121. DEFINE(TASK_PT_IAOQ1, offsetof(struct task_struct, thread.regs.iaoq[1]));
  122. DEFINE(TASK_PT_CR27, offsetof(struct task_struct, thread.regs.cr27));
  123. DEFINE(TASK_PT_ORIG_R28, offsetof(struct task_struct, thread.regs.orig_r28));
  124. DEFINE(TASK_PT_KSP, offsetof(struct task_struct, thread.regs.ksp));
  125. DEFINE(TASK_PT_KPC, offsetof(struct task_struct, thread.regs.kpc));
  126. DEFINE(TASK_PT_SAR, offsetof(struct task_struct, thread.regs.sar));
  127. DEFINE(TASK_PT_IIR, offsetof(struct task_struct, thread.regs.iir));
  128. DEFINE(TASK_PT_ISR, offsetof(struct task_struct, thread.regs.isr));
  129. DEFINE(TASK_PT_IOR, offsetof(struct task_struct, thread.regs.ior));
  130. BLANK();
  131. DEFINE(PT_PSW, offsetof(struct pt_regs, gr[ 0]));
  132. DEFINE(PT_GR1, offsetof(struct pt_regs, gr[ 1]));
  133. DEFINE(PT_GR2, offsetof(struct pt_regs, gr[ 2]));
  134. DEFINE(PT_GR3, offsetof(struct pt_regs, gr[ 3]));
  135. DEFINE(PT_GR4, offsetof(struct pt_regs, gr[ 4]));
  136. DEFINE(PT_GR5, offsetof(struct pt_regs, gr[ 5]));
  137. DEFINE(PT_GR6, offsetof(struct pt_regs, gr[ 6]));
  138. DEFINE(PT_GR7, offsetof(struct pt_regs, gr[ 7]));
  139. DEFINE(PT_GR8, offsetof(struct pt_regs, gr[ 8]));
  140. DEFINE(PT_GR9, offsetof(struct pt_regs, gr[ 9]));
  141. DEFINE(PT_GR10, offsetof(struct pt_regs, gr[10]));
  142. DEFINE(PT_GR11, offsetof(struct pt_regs, gr[11]));
  143. DEFINE(PT_GR12, offsetof(struct pt_regs, gr[12]));
  144. DEFINE(PT_GR13, offsetof(struct pt_regs, gr[13]));
  145. DEFINE(PT_GR14, offsetof(struct pt_regs, gr[14]));
  146. DEFINE(PT_GR15, offsetof(struct pt_regs, gr[15]));
  147. DEFINE(PT_GR16, offsetof(struct pt_regs, gr[16]));
  148. DEFINE(PT_GR17, offsetof(struct pt_regs, gr[17]));
  149. DEFINE(PT_GR18, offsetof(struct pt_regs, gr[18]));
  150. DEFINE(PT_GR19, offsetof(struct pt_regs, gr[19]));
  151. DEFINE(PT_GR20, offsetof(struct pt_regs, gr[20]));
  152. DEFINE(PT_GR21, offsetof(struct pt_regs, gr[21]));
  153. DEFINE(PT_GR22, offsetof(struct pt_regs, gr[22]));
  154. DEFINE(PT_GR23, offsetof(struct pt_regs, gr[23]));
  155. DEFINE(PT_GR24, offsetof(struct pt_regs, gr[24]));
  156. DEFINE(PT_GR25, offsetof(struct pt_regs, gr[25]));
  157. DEFINE(PT_GR26, offsetof(struct pt_regs, gr[26]));
  158. DEFINE(PT_GR27, offsetof(struct pt_regs, gr[27]));
  159. DEFINE(PT_GR28, offsetof(struct pt_regs, gr[28]));
  160. DEFINE(PT_GR29, offsetof(struct pt_regs, gr[29]));
  161. DEFINE(PT_GR30, offsetof(struct pt_regs, gr[30]));
  162. DEFINE(PT_GR31, offsetof(struct pt_regs, gr[31]));
  163. DEFINE(PT_FR0, offsetof(struct pt_regs, fr[ 0]));
  164. DEFINE(PT_FR1, offsetof(struct pt_regs, fr[ 1]));
  165. DEFINE(PT_FR2, offsetof(struct pt_regs, fr[ 2]));
  166. DEFINE(PT_FR3, offsetof(struct pt_regs, fr[ 3]));
  167. DEFINE(PT_FR4, offsetof(struct pt_regs, fr[ 4]));
  168. DEFINE(PT_FR5, offsetof(struct pt_regs, fr[ 5]));
  169. DEFINE(PT_FR6, offsetof(struct pt_regs, fr[ 6]));
  170. DEFINE(PT_FR7, offsetof(struct pt_regs, fr[ 7]));
  171. DEFINE(PT_FR8, offsetof(struct pt_regs, fr[ 8]));
  172. DEFINE(PT_FR9, offsetof(struct pt_regs, fr[ 9]));
  173. DEFINE(PT_FR10, offsetof(struct pt_regs, fr[10]));
  174. DEFINE(PT_FR11, offsetof(struct pt_regs, fr[11]));
  175. DEFINE(PT_FR12, offsetof(struct pt_regs, fr[12]));
  176. DEFINE(PT_FR13, offsetof(struct pt_regs, fr[13]));
  177. DEFINE(PT_FR14, offsetof(struct pt_regs, fr[14]));
  178. DEFINE(PT_FR15, offsetof(struct pt_regs, fr[15]));
  179. DEFINE(PT_FR16, offsetof(struct pt_regs, fr[16]));
  180. DEFINE(PT_FR17, offsetof(struct pt_regs, fr[17]));
  181. DEFINE(PT_FR18, offsetof(struct pt_regs, fr[18]));
  182. DEFINE(PT_FR19, offsetof(struct pt_regs, fr[19]));
  183. DEFINE(PT_FR20, offsetof(struct pt_regs, fr[20]));
  184. DEFINE(PT_FR21, offsetof(struct pt_regs, fr[21]));
  185. DEFINE(PT_FR22, offsetof(struct pt_regs, fr[22]));
  186. DEFINE(PT_FR23, offsetof(struct pt_regs, fr[23]));
  187. DEFINE(PT_FR24, offsetof(struct pt_regs, fr[24]));
  188. DEFINE(PT_FR25, offsetof(struct pt_regs, fr[25]));
  189. DEFINE(PT_FR26, offsetof(struct pt_regs, fr[26]));
  190. DEFINE(PT_FR27, offsetof(struct pt_regs, fr[27]));
  191. DEFINE(PT_FR28, offsetof(struct pt_regs, fr[28]));
  192. DEFINE(PT_FR29, offsetof(struct pt_regs, fr[29]));
  193. DEFINE(PT_FR30, offsetof(struct pt_regs, fr[30]));
  194. DEFINE(PT_FR31, offsetof(struct pt_regs, fr[31]));
  195. DEFINE(PT_SR0, offsetof(struct pt_regs, sr[ 0]));
  196. DEFINE(PT_SR1, offsetof(struct pt_regs, sr[ 1]));
  197. DEFINE(PT_SR2, offsetof(struct pt_regs, sr[ 2]));
  198. DEFINE(PT_SR3, offsetof(struct pt_regs, sr[ 3]));
  199. DEFINE(PT_SR4, offsetof(struct pt_regs, sr[ 4]));
  200. DEFINE(PT_SR5, offsetof(struct pt_regs, sr[ 5]));
  201. DEFINE(PT_SR6, offsetof(struct pt_regs, sr[ 6]));
  202. DEFINE(PT_SR7, offsetof(struct pt_regs, sr[ 7]));
  203. DEFINE(PT_IASQ0, offsetof(struct pt_regs, iasq[0]));
  204. DEFINE(PT_IASQ1, offsetof(struct pt_regs, iasq[1]));
  205. DEFINE(PT_IAOQ0, offsetof(struct pt_regs, iaoq[0]));
  206. DEFINE(PT_IAOQ1, offsetof(struct pt_regs, iaoq[1]));
  207. DEFINE(PT_CR27, offsetof(struct pt_regs, cr27));
  208. DEFINE(PT_ORIG_R28, offsetof(struct pt_regs, orig_r28));
  209. DEFINE(PT_KSP, offsetof(struct pt_regs, ksp));
  210. DEFINE(PT_KPC, offsetof(struct pt_regs, kpc));
  211. DEFINE(PT_SAR, offsetof(struct pt_regs, sar));
  212. DEFINE(PT_IIR, offsetof(struct pt_regs, iir));
  213. DEFINE(PT_ISR, offsetof(struct pt_regs, isr));
  214. DEFINE(PT_IOR, offsetof(struct pt_regs, ior));
  215. /* PT_SZ_ALGN includes space for a stack frame. */
  216. DEFINE(PT_SZ_ALGN, align_frame(sizeof(struct pt_regs), FRAME_ALIGN));
  217. BLANK();
  218. DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
  219. DEFINE(TI_PRE_COUNT, offsetof(struct task_struct, thread_info.preempt_count));
  220. BLANK();
  221. DEFINE(ASM_SIGFRAME_SIZE, PARISC_RT_SIGFRAME_SIZE);
  222. DEFINE(SIGFRAME_CONTEXT_REGS, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
  223. #ifdef CONFIG_64BIT
  224. DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE32);
  225. DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct compat_rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE32);
  226. #else
  227. DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE);
  228. DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
  229. #endif
  230. BLANK();
  231. DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
  232. DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));
  233. DEFINE(ICACHE_COUNT, offsetof(struct pdc_cache_info, ic_count));
  234. DEFINE(ICACHE_LOOP, offsetof(struct pdc_cache_info, ic_loop));
  235. DEFINE(DCACHE_BASE, offsetof(struct pdc_cache_info, dc_base));
  236. DEFINE(DCACHE_STRIDE, offsetof(struct pdc_cache_info, dc_stride));
  237. DEFINE(DCACHE_COUNT, offsetof(struct pdc_cache_info, dc_count));
  238. DEFINE(DCACHE_LOOP, offsetof(struct pdc_cache_info, dc_loop));
  239. DEFINE(ITLB_SID_BASE, offsetof(struct pdc_cache_info, it_sp_base));
  240. DEFINE(ITLB_SID_STRIDE, offsetof(struct pdc_cache_info, it_sp_stride));
  241. DEFINE(ITLB_SID_COUNT, offsetof(struct pdc_cache_info, it_sp_count));
  242. DEFINE(ITLB_OFF_BASE, offsetof(struct pdc_cache_info, it_off_base));
  243. DEFINE(ITLB_OFF_STRIDE, offsetof(struct pdc_cache_info, it_off_stride));
  244. DEFINE(ITLB_OFF_COUNT, offsetof(struct pdc_cache_info, it_off_count));
  245. DEFINE(ITLB_LOOP, offsetof(struct pdc_cache_info, it_loop));
  246. DEFINE(DTLB_SID_BASE, offsetof(struct pdc_cache_info, dt_sp_base));
  247. DEFINE(DTLB_SID_STRIDE, offsetof(struct pdc_cache_info, dt_sp_stride));
  248. DEFINE(DTLB_SID_COUNT, offsetof(struct pdc_cache_info, dt_sp_count));
  249. DEFINE(DTLB_OFF_BASE, offsetof(struct pdc_cache_info, dt_off_base));
  250. DEFINE(DTLB_OFF_STRIDE, offsetof(struct pdc_cache_info, dt_off_stride));
  251. DEFINE(DTLB_OFF_COUNT, offsetof(struct pdc_cache_info, dt_off_count));
  252. DEFINE(DTLB_LOOP, offsetof(struct pdc_cache_info, dt_loop));
  253. BLANK();
  254. DEFINE(TIF_BLOCKSTEP_PA_BIT, 31-TIF_BLOCKSTEP);
  255. DEFINE(TIF_SINGLESTEP_PA_BIT, 31-TIF_SINGLESTEP);
  256. BLANK();
  257. DEFINE(ASM_PMD_SHIFT, PMD_SHIFT);
  258. DEFINE(ASM_PGDIR_SHIFT, PGDIR_SHIFT);
  259. DEFINE(ASM_BITS_PER_PGD, BITS_PER_PGD);
  260. DEFINE(ASM_BITS_PER_PMD, BITS_PER_PMD);
  261. DEFINE(ASM_BITS_PER_PTE, BITS_PER_PTE);
  262. DEFINE(ASM_PMD_ENTRY, ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT));
  263. DEFINE(ASM_PGD_ENTRY, PAGE_OFFSET >> PGDIR_SHIFT);
  264. DEFINE(ASM_PGD_ENTRY_SIZE, PGD_ENTRY_SIZE);
  265. DEFINE(ASM_PMD_ENTRY_SIZE, PMD_ENTRY_SIZE);
  266. DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE);
  267. DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT);
  268. DEFINE(ASM_PT_INITIAL, PT_INITIAL);
  269. BLANK();
  270. /* HUGEPAGE_SIZE is only used in vmlinux.lds.S to align kernel text
  271. * and kernel data on physical huge pages */
  272. #ifdef CONFIG_HUGETLB_PAGE
  273. DEFINE(HUGEPAGE_SIZE, 1UL << REAL_HPAGE_SHIFT);
  274. #else
  275. DEFINE(HUGEPAGE_SIZE, PAGE_SIZE);
  276. #endif
  277. BLANK();
  278. DEFINE(ASM_PDC_RESULT_SIZE, NUM_PDC_RESULT * sizeof(unsigned long));
  279. BLANK();
  280. return 0;
  281. }