pgtable.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. #ifndef _ASM_X86_PGTABLE_H
  2. #define _ASM_X86_PGTABLE_H
  3. #define FIRST_USER_ADDRESS 0
  4. #define _PAGE_BIT_PRESENT 0 /* is present */
  5. #define _PAGE_BIT_RW 1 /* writeable */
  6. #define _PAGE_BIT_USER 2 /* userspace addressable */
  7. #define _PAGE_BIT_PWT 3 /* page write through */
  8. #define _PAGE_BIT_PCD 4 /* page cache disabled */
  9. #define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */
  10. #define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */
  11. #define _PAGE_BIT_FILE 6
  12. #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
  13. #define _PAGE_BIT_PAT 7 /* on 4KB pages */
  14. #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
  15. #define _PAGE_BIT_UNUSED1 9 /* available for programmer */
  16. #define _PAGE_BIT_UNUSED2 10
  17. #define _PAGE_BIT_UNUSED3 11
  18. #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
  19. #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
  20. #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
  21. #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
  22. #define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
  23. #define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
  24. #define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
  25. #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
  26. #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
  27. #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
  28. #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
  29. #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
  30. #define _PAGE_UNUSED2 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2)
  31. #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
  32. #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
  33. #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
  34. #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
  35. #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
  36. #else
  37. #define _PAGE_NX (_AT(pteval_t, 0))
  38. #endif
  39. /* If _PAGE_PRESENT is clear, we use these: */
  40. #define _PAGE_FILE _PAGE_DIRTY /* nonlinear file mapping,
  41. * saved PTE; unset:swap */
  42. #define _PAGE_PROTNONE _PAGE_PSE /* if the user mapped it with PROT_NONE;
  43. pte_present gives true */
  44. #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
  45. _PAGE_ACCESSED | _PAGE_DIRTY)
  46. #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
  47. _PAGE_DIRTY)
  48. /* Set of bits not changed in pte_modify */
  49. #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \
  50. _PAGE_ACCESSED | _PAGE_DIRTY)
  51. #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
  52. #define _PAGE_CACHE_WB (0)
  53. #define _PAGE_CACHE_WC (_PAGE_PWT)
  54. #define _PAGE_CACHE_UC_MINUS (_PAGE_PCD)
  55. #define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT)
  56. #define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
  57. #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
  58. _PAGE_ACCESSED | _PAGE_NX)
  59. #define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \
  60. _PAGE_USER | _PAGE_ACCESSED)
  61. #define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
  62. _PAGE_ACCESSED | _PAGE_NX)
  63. #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
  64. _PAGE_ACCESSED)
  65. #define PAGE_COPY PAGE_COPY_NOEXEC
  66. #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \
  67. _PAGE_ACCESSED | _PAGE_NX)
  68. #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
  69. _PAGE_ACCESSED)
  70. #ifdef CONFIG_X86_32
  71. #define _PAGE_KERNEL_EXEC \
  72. (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
  73. #define _PAGE_KERNEL (_PAGE_KERNEL_EXEC | _PAGE_NX)
  74. #ifndef __ASSEMBLY__
  75. extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
  76. #endif /* __ASSEMBLY__ */
  77. #else
  78. #define __PAGE_KERNEL_EXEC \
  79. (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
  80. #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
  81. #endif
  82. #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
  83. #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
  84. #define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
  85. #define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
  86. #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
  87. #define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
  88. #define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER)
  89. #define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT)
  90. #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
  91. #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
  92. #ifdef CONFIG_X86_32
  93. # define MAKE_GLOBAL(x) __pgprot((x))
  94. #else
  95. # define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL)
  96. #endif
  97. #define PAGE_KERNEL MAKE_GLOBAL(__PAGE_KERNEL)
  98. #define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO)
  99. #define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC)
  100. #define PAGE_KERNEL_RX MAKE_GLOBAL(__PAGE_KERNEL_RX)
  101. #define PAGE_KERNEL_WC MAKE_GLOBAL(__PAGE_KERNEL_WC)
  102. #define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
  103. #define PAGE_KERNEL_UC_MINUS MAKE_GLOBAL(__PAGE_KERNEL_UC_MINUS)
  104. #define PAGE_KERNEL_EXEC_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_EXEC_NOCACHE)
  105. #define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE)
  106. #define PAGE_KERNEL_LARGE_EXEC MAKE_GLOBAL(__PAGE_KERNEL_LARGE_EXEC)
  107. #define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL)
  108. #define PAGE_KERNEL_VSYSCALL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL_NOCACHE)
  109. /* xwr */
  110. #define __P000 PAGE_NONE
  111. #define __P001 PAGE_READONLY
  112. #define __P010 PAGE_COPY
  113. #define __P011 PAGE_COPY
  114. #define __P100 PAGE_READONLY_EXEC
  115. #define __P101 PAGE_READONLY_EXEC
  116. #define __P110 PAGE_COPY_EXEC
  117. #define __P111 PAGE_COPY_EXEC
  118. #define __S000 PAGE_NONE
  119. #define __S001 PAGE_READONLY
  120. #define __S010 PAGE_SHARED
  121. #define __S011 PAGE_SHARED
  122. #define __S100 PAGE_READONLY_EXEC
  123. #define __S101 PAGE_READONLY_EXEC
  124. #define __S110 PAGE_SHARED_EXEC
  125. #define __S111 PAGE_SHARED_EXEC
  126. #ifndef __ASSEMBLY__
  127. /*
  128. * ZERO_PAGE is a global shared page that is always zero: used
  129. * for zero-mapped memory areas etc..
  130. */
  131. extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
  132. #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
  133. extern spinlock_t pgd_lock;
  134. extern struct list_head pgd_list;
  135. /*
  136. * The following only work if pte_present() is true.
  137. * Undefined behaviour if not..
  138. */
  139. static inline int pte_dirty(pte_t pte)
  140. {
  141. return pte_flags(pte) & _PAGE_DIRTY;
  142. }
  143. static inline int pte_young(pte_t pte)
  144. {
  145. return pte_flags(pte) & _PAGE_ACCESSED;
  146. }
  147. static inline int pte_write(pte_t pte)
  148. {
  149. return pte_flags(pte) & _PAGE_RW;
  150. }
  151. static inline int pte_file(pte_t pte)
  152. {
  153. return pte_flags(pte) & _PAGE_FILE;
  154. }
  155. static inline int pte_huge(pte_t pte)
  156. {
  157. return pte_flags(pte) & _PAGE_PSE;
  158. }
  159. static inline int pte_global(pte_t pte)
  160. {
  161. return pte_flags(pte) & _PAGE_GLOBAL;
  162. }
  163. static inline int pte_exec(pte_t pte)
  164. {
  165. return !(pte_flags(pte) & _PAGE_NX);
  166. }
  167. static inline int pte_special(pte_t pte)
  168. {
  169. return 0;
  170. }
  171. static inline int pmd_large(pmd_t pte)
  172. {
  173. return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
  174. (_PAGE_PSE | _PAGE_PRESENT);
  175. }
  176. static inline pte_t pte_mkclean(pte_t pte)
  177. {
  178. return __pte(pte_val(pte) & ~_PAGE_DIRTY);
  179. }
  180. static inline pte_t pte_mkold(pte_t pte)
  181. {
  182. return __pte(pte_val(pte) & ~_PAGE_ACCESSED);
  183. }
  184. static inline pte_t pte_wrprotect(pte_t pte)
  185. {
  186. return __pte(pte_val(pte) & ~_PAGE_RW);
  187. }
  188. static inline pte_t pte_mkexec(pte_t pte)
  189. {
  190. return __pte(pte_val(pte) & ~_PAGE_NX);
  191. }
  192. static inline pte_t pte_mkdirty(pte_t pte)
  193. {
  194. return __pte(pte_val(pte) | _PAGE_DIRTY);
  195. }
  196. static inline pte_t pte_mkyoung(pte_t pte)
  197. {
  198. return __pte(pte_val(pte) | _PAGE_ACCESSED);
  199. }
  200. static inline pte_t pte_mkwrite(pte_t pte)
  201. {
  202. return __pte(pte_val(pte) | _PAGE_RW);
  203. }
  204. static inline pte_t pte_mkhuge(pte_t pte)
  205. {
  206. return __pte(pte_val(pte) | _PAGE_PSE);
  207. }
  208. static inline pte_t pte_clrhuge(pte_t pte)
  209. {
  210. return __pte(pte_val(pte) & ~_PAGE_PSE);
  211. }
  212. static inline pte_t pte_mkglobal(pte_t pte)
  213. {
  214. return __pte(pte_val(pte) | _PAGE_GLOBAL);
  215. }
  216. static inline pte_t pte_clrglobal(pte_t pte)
  217. {
  218. return __pte(pte_val(pte) & ~_PAGE_GLOBAL);
  219. }
  220. static inline pte_t pte_mkspecial(pte_t pte)
  221. {
  222. return pte;
  223. }
  224. extern pteval_t __supported_pte_mask;
  225. static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
  226. {
  227. return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
  228. pgprot_val(pgprot)) & __supported_pte_mask);
  229. }
  230. static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
  231. {
  232. return __pmd((((phys_addr_t)page_nr << PAGE_SHIFT) |
  233. pgprot_val(pgprot)) & __supported_pte_mask);
  234. }
  235. static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
  236. {
  237. pteval_t val = pte_val(pte);
  238. /*
  239. * Chop off the NX bit (if present), and add the NX portion of
  240. * the newprot (if present):
  241. */
  242. val &= _PAGE_CHG_MASK;
  243. val |= pgprot_val(newprot) & (~_PAGE_CHG_MASK) & __supported_pte_mask;
  244. return __pte(val);
  245. }
  246. /* mprotect needs to preserve PAT bits when updating vm_page_prot */
  247. #define pgprot_modify pgprot_modify
  248. static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
  249. {
  250. pgprotval_t preservebits = pgprot_val(oldprot) & _PAGE_CHG_MASK;
  251. pgprotval_t addbits = pgprot_val(newprot);
  252. return __pgprot(preservebits | addbits);
  253. }
  254. #define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK)
  255. #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
  256. #ifndef __ASSEMBLY__
  257. #define __HAVE_PHYS_MEM_ACCESS_PROT
  258. struct file;
  259. pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
  260. unsigned long size, pgprot_t vma_prot);
  261. int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
  262. unsigned long size, pgprot_t *vma_prot);
  263. #endif
  264. /* Install a pte for a particular vaddr in kernel space. */
  265. void set_pte_vaddr(unsigned long vaddr, pte_t pte);
  266. #ifdef CONFIG_PARAVIRT
  267. #include <asm/paravirt.h>
  268. #else /* !CONFIG_PARAVIRT */
  269. #define set_pte(ptep, pte) native_set_pte(ptep, pte)
  270. #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte)
  271. #define set_pte_present(mm, addr, ptep, pte) \
  272. native_set_pte_present(mm, addr, ptep, pte)
  273. #define set_pte_atomic(ptep, pte) \
  274. native_set_pte_atomic(ptep, pte)
  275. #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd)
  276. #ifndef __PAGETABLE_PUD_FOLDED
  277. #define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd)
  278. #define pgd_clear(pgd) native_pgd_clear(pgd)
  279. #endif
  280. #ifndef set_pud
  281. # define set_pud(pudp, pud) native_set_pud(pudp, pud)
  282. #endif
  283. #ifndef __PAGETABLE_PMD_FOLDED
  284. #define pud_clear(pud) native_pud_clear(pud)
  285. #endif
  286. #define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep)
  287. #define pmd_clear(pmd) native_pmd_clear(pmd)
  288. #define pte_update(mm, addr, ptep) do { } while (0)
  289. #define pte_update_defer(mm, addr, ptep) do { } while (0)
  290. #endif /* CONFIG_PARAVIRT */
  291. #endif /* __ASSEMBLY__ */
  292. #ifdef CONFIG_X86_32
  293. # include "pgtable_32.h"
  294. #else
  295. # include "pgtable_64.h"
  296. #endif
  297. #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
  298. #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
  299. #ifndef __ASSEMBLY__
  300. enum {
  301. PG_LEVEL_NONE,
  302. PG_LEVEL_4K,
  303. PG_LEVEL_2M,
  304. PG_LEVEL_1G,
  305. PG_LEVEL_NUM
  306. };
  307. #ifdef CONFIG_PROC_FS
  308. extern void update_page_count(int level, unsigned long pages);
  309. #else
  310. static inline void update_page_count(int level, unsigned long pages) { }
  311. #endif
  312. /*
  313. * Helper function that returns the kernel pagetable entry controlling
  314. * the virtual address 'address'. NULL means no pagetable entry present.
  315. * NOTE: the return type is pte_t but if the pmd is PSE then we return it
  316. * as a pte too.
  317. */
  318. extern pte_t *lookup_address(unsigned long address, unsigned int *level);
  319. /* local pte updates need not use xchg for locking */
  320. static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
  321. {
  322. pte_t res = *ptep;
  323. /* Pure native function needs no input for mm, addr */
  324. native_pte_clear(NULL, 0, ptep);
  325. return res;
  326. }
  327. static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr,
  328. pte_t *ptep , pte_t pte)
  329. {
  330. native_set_pte(ptep, pte);
  331. }
  332. #ifndef CONFIG_PARAVIRT
  333. /*
  334. * Rules for using pte_update - it must be called after any PTE update which
  335. * has not been done using the set_pte / clear_pte interfaces. It is used by
  336. * shadow mode hypervisors to resynchronize the shadow page tables. Kernel PTE
  337. * updates should either be sets, clears, or set_pte_atomic for P->P
  338. * transitions, which means this hook should only be called for user PTEs.
  339. * This hook implies a P->P protection or access change has taken place, which
  340. * requires a subsequent TLB flush. The notification can optionally be delayed
  341. * until the TLB flush event by using the pte_update_defer form of the
  342. * interface, but care must be taken to assure that the flush happens while
  343. * still holding the same page table lock so that the shadow and primary pages
  344. * do not become out of sync on SMP.
  345. */
  346. #define pte_update(mm, addr, ptep) do { } while (0)
  347. #define pte_update_defer(mm, addr, ptep) do { } while (0)
  348. #endif
  349. /*
  350. * We only update the dirty/accessed state if we set
  351. * the dirty bit by hand in the kernel, since the hardware
  352. * will do the accessed bit for us, and we don't want to
  353. * race with other CPU's that might be updating the dirty
  354. * bit at the same time.
  355. */
  356. #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
  357. extern int ptep_set_access_flags(struct vm_area_struct *vma,
  358. unsigned long address, pte_t *ptep,
  359. pte_t entry, int dirty);
  360. #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
  361. extern int ptep_test_and_clear_young(struct vm_area_struct *vma,
  362. unsigned long addr, pte_t *ptep);
  363. #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
  364. extern int ptep_clear_flush_young(struct vm_area_struct *vma,
  365. unsigned long address, pte_t *ptep);
  366. #define __HAVE_ARCH_PTEP_GET_AND_CLEAR
  367. static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
  368. pte_t *ptep)
  369. {
  370. pte_t pte = native_ptep_get_and_clear(ptep);
  371. pte_update(mm, addr, ptep);
  372. return pte;
  373. }
  374. #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
  375. static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
  376. unsigned long addr, pte_t *ptep,
  377. int full)
  378. {
  379. pte_t pte;
  380. if (full) {
  381. /*
  382. * Full address destruction in progress; paravirt does not
  383. * care about updates and native needs no locking
  384. */
  385. pte = native_local_ptep_get_and_clear(ptep);
  386. } else {
  387. pte = ptep_get_and_clear(mm, addr, ptep);
  388. }
  389. return pte;
  390. }
  391. #define __HAVE_ARCH_PTEP_SET_WRPROTECT
  392. static inline void ptep_set_wrprotect(struct mm_struct *mm,
  393. unsigned long addr, pte_t *ptep)
  394. {
  395. clear_bit(_PAGE_BIT_RW, (unsigned long *)&ptep->pte);
  396. pte_update(mm, addr, ptep);
  397. }
  398. /*
  399. * clone_pgd_range(pgd_t *dst, pgd_t *src, int count);
  400. *
  401. * dst - pointer to pgd range anwhere on a pgd page
  402. * src - ""
  403. * count - the number of pgds to copy.
  404. *
  405. * dst and src can be on the same page, but the range must not overlap,
  406. * and must not cross a page boundary.
  407. */
  408. static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
  409. {
  410. memcpy(dst, src, count * sizeof(pgd_t));
  411. }
  412. #include <asm-generic/pgtable.h>
  413. #endif /* __ASSEMBLY__ */
  414. #endif /* _ASM_X86_PGTABLE_H */