Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / nios2 / include / asm / pgalloc.h
blobce6bb8e74271f149e82e48f6732688bc54cf5a07
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 1994 - 2001, 2003 by Ralf Baechle
7 * Copyright (C) 1999, 2000, 2001 Silicon Graphics, Inc.
8 */
10 #ifndef _ASM_NIOS2_PGALLOC_H
11 #define _ASM_NIOS2_PGALLOC_H
13 #include <linux/mm.h>
15 #include <asm-generic/pgalloc.h>
17 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
18 pte_t *pte)
20 set_pmd(pmd, __pmd((unsigned long)pte));
23 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
24 pgtable_t pte)
26 set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
29 extern pgd_t *pgd_alloc(struct mm_struct *mm);
31 #define __pte_free_tlb(tlb, pte, addr) \
32 do { \
33 pagetable_pte_dtor(page_ptdesc(pte)); \
34 tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \
35 } while (0)
37 #endif /* _ASM_NIOS2_PGALLOC_H */