~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sparc/include/asm/pgalloc_32.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _SPARC_PGALLOC_H
  3 #define _SPARC_PGALLOC_H
  4 
  5 #include <linux/kernel.h>
  6 #include <linux/sched.h>
  7 #include <linux/pgtable.h>
  8 
  9 #include <asm/pgtsrmmu.h>
 10 #include <asm/vaddrs.h>
 11 #include <asm/page.h>
 12 
 13 struct page;
 14 
 15 void *srmmu_get_nocache(int size, int align);
 16 void srmmu_free_nocache(void *addr, int size);
 17 
 18 extern struct resource sparc_iomap;
 19 
 20 pgd_t *get_pgd_fast(void);
 21 static inline void free_pgd_fast(pgd_t *pgd)
 22 {
 23         srmmu_free_nocache(pgd, SRMMU_PGD_TABLE_SIZE);
 24 }
 25 
 26 #define pgd_free(mm, pgd)       free_pgd_fast(pgd)
 27 #define pgd_alloc(mm)   get_pgd_fast()
 28 
 29 static inline void pud_set(pud_t * pudp, pmd_t * pmdp)
 30 {
 31         unsigned long pa = __nocache_pa(pmdp);
 32 
 33         set_pte((pte_t *)pudp, __pte((SRMMU_ET_PTD | (pa >> 4))));
 34 }
 35 
 36 #define pud_populate(MM, PGD, PMD)      pud_set(PGD, PMD)
 37 
 38 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm,
 39                                    unsigned long address)
 40 {
 41         return srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE,
 42                                  SRMMU_PMD_TABLE_SIZE);
 43 }
 44 
 45 static inline void free_pmd_fast(pmd_t * pmd)
 46 {
 47         srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE);
 48 }
 49 
 50 #define pmd_free(mm, pmd)               free_pmd_fast(pmd)
 51 #define __pmd_free_tlb(tlb, pmd, addr)  pmd_free((tlb)->mm, pmd)
 52 
 53 #define pmd_populate(mm, pmd, pte)      pmd_set(pmd, pte)
 54 
 55 void pmd_set(pmd_t *pmdp, pte_t *ptep);
 56 #define pmd_populate_kernel             pmd_populate
 57 
 58 pgtable_t pte_alloc_one(struct mm_struct *mm);
 59 
 60 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
 61 {
 62         return srmmu_get_nocache(SRMMU_PTE_TABLE_SIZE,
 63                                  SRMMU_PTE_TABLE_SIZE);
 64 }
 65 
 66 
 67 static inline void free_pte_fast(pte_t *pte)
 68 {
 69         srmmu_free_nocache(pte, SRMMU_PTE_TABLE_SIZE);
 70 }
 71 
 72 #define pte_free_kernel(mm, pte)        free_pte_fast(pte)
 73 
 74 void pte_free(struct mm_struct * mm, pgtable_t pte);
 75 #define __pte_free_tlb(tlb, pte, addr)  pte_free((tlb)->mm, pte)
 76 
 77 #endif /* _SPARC_PGALLOC_H */
 78 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php