cregit-Linux how code gets into the kernel

Release 4.14 arch/sh/include/asm/pgalloc.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_SH_PGALLOC_H

#define __ASM_SH_PGALLOC_H

#include <linux/quicklist.h>
#include <asm/page.h>


#define QUICK_PT 0	
/* Other page table pages that are zero on free */

extern pgd_t *pgd_alloc(struct mm_struct *);
extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);

#if PAGETABLE_LEVELS > 2
extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
extern void pmd_free(struct mm_struct *mm, pmd_t *pmd);
#endif


static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) { set_pmd(pmd, __pmd((unsigned long)pte)); }

Contributors

PersonTokensPropCommitsCommitProp
Stuart Menefy2676.47%133.33%
Linus Torvalds720.59%133.33%
Paul Mundt12.94%133.33%
Total34100.00%3100.00%


static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte) { set_pmd(pmd, __pmd((unsigned long)page_address(pte))); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt3083.33%133.33%
Stuart Menefy513.89%133.33%
Martin Schwidefsky12.78%133.33%
Total36100.00%3100.00%

#define pmd_pgtable(pmd) pmd_page(pmd) /* * Allocate and free page tables. */
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { return quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds1244.44%120.00%
Linus Torvalds (pre-git)829.63%120.00%
Paul Mundt725.93%360.00%
Total27100.00%5100.00%


static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) { struct page *page; void *pg; pg = quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); if (!pg) return NULL; page = virt_to_page(pg); if (!pgtable_page_ctor(page)) { quicklist_free(QUICK_PT, NULL, pg); return NULL; } return page; }

Contributors

PersonTokensPropCommitsCommitProp
Martin Schwidefsky2735.53%114.29%
Kirill A. Shutemov1722.37%114.29%
Paul Mundt1722.37%228.57%
Linus Torvalds911.84%114.29%
Linus Torvalds (pre-git)67.89%228.57%
Total76100.00%7100.00%


static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) { quicklist_free(QUICK_PT, NULL, pte); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1352.00%233.33%
Paul Mundt624.00%233.33%
Benjamin Herrenschmidt520.00%116.67%
Linus Torvalds14.00%116.67%
Total25100.00%6100.00%


static inline void pte_free(struct mm_struct *mm, pgtable_t pte) { pgtable_page_dtor(pte); quicklist_free_page(QUICK_PT, NULL, pte); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt1448.28%228.57%
Martin Schwidefsky620.69%114.29%
Linus Torvalds (pre-git)413.79%228.57%
Benjamin Herrenschmidt413.79%114.29%
Linus Torvalds13.45%114.29%
Total29100.00%7100.00%

#define __pte_free_tlb(tlb,pte,addr) \ do { \ pgtable_page_dtor(pte); \ tlb_remove_page((tlb), (pte)); \ } while (0)
static inline void check_pgt_cache(void) { quicklist_trim(QUICK_PT, NULL, 25, 16); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt1995.00%150.00%
Andrew Morton15.00%150.00%
Total20100.00%2100.00%

#endif /* __ASM_SH_PGALLOC_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt11431.15%527.78%
Matt Fleming7319.95%211.11%
Martin Schwidefsky4311.75%15.56%
Linus Torvalds (pre-git)4010.93%211.11%
Linus Torvalds359.56%211.11%
Stuart Menefy318.47%15.56%
Kirill A. Shutemov174.64%15.56%
Benjamin Herrenschmidt113.01%211.11%
Andrew Morton10.27%15.56%
Greg Kroah-Hartman10.27%15.56%
Total366100.00%18100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.