cregit-Linux how code gets into the kernel

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

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1994 - 2001, 2003 by Ralf Baechle
 * Copyright (C) 1999, 2000, 2001 Silicon Graphics, Inc.
 */
#ifndef _ASM_PGALLOC_H

#define _ASM_PGALLOC_H

#include <linux/highmem.h>
#include <linux/mm.h>
#include <linux/sched.h>


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
Ralf Bächle2470.59%266.67%
Linus Torvalds (pre-git)1029.41%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
Ralf Bächle2466.67%250.00%
Linus Torvalds (pre-git)1130.56%125.00%
Martin Schwidefsky12.78%125.00%
Total36100.00%4100.00%

#define pmd_pgtable(pmd) pmd_page(pmd) /* * Initialize a new pmd table with invalid pointers. */ extern void pmd_init(unsigned long page, unsigned long pagetable); #ifndef __PAGETABLE_PMD_FOLDED
static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) { set_pud(pud, __pud((unsigned long)pmd)); }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle34100.00%1100.00%
Total34100.00%1100.00%

#endif /* * Initialize a new pgd / pmd table with invalid pointers. */ extern void pgd_init(unsigned long page); extern pgd_t *pgd_alloc(struct mm_struct *mm);
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) { free_pages((unsigned long)pgd, PGD_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1348.15%133.33%
Ralf Bächle933.33%133.33%
Benjamin Herrenschmidt518.52%133.33%
Total27100.00%3100.00%


static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { return (pte_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1754.84%114.29%
Linus Torvalds722.58%114.29%
Ralf Bächle412.90%228.57%
Christoph Lameter13.23%114.29%
Masahiro Yamada13.23%114.29%
Andrew Morton13.23%114.29%
Total31100.00%7100.00%


static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { struct page *pte; pte = alloc_pages(GFP_KERNEL, PTE_ORDER); if (!pte) return NULL; clear_highpage(pte); if (!pgtable_page_ctor(pte)) { __free_page(pte); return NULL; } return pte; }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle2334.85%233.33%
Kirill A. Shutemov1624.24%116.67%
Linus Torvalds (pre-git)1624.24%116.67%
Martin Schwidefsky69.09%116.67%
Linus Torvalds57.58%116.67%
Total66100.00%6100.00%


static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) { free_pages((unsigned long)pte, PTE_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds1037.04%120.00%
Ralf Bächle829.63%240.00%
Benjamin Herrenschmidt518.52%120.00%
Linus Torvalds (pre-git)414.81%120.00%
Total27100.00%5100.00%


static inline void pte_free(struct mm_struct *mm, pgtable_t pte) { pgtable_page_dtor(pte); __free_pages(pte, PTE_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle725.93%233.33%
Martin Schwidefsky622.22%116.67%
Linus Torvalds622.22%116.67%
Linus Torvalds (pre-git)414.81%116.67%
Benjamin Herrenschmidt414.81%116.67%
Total27100.00%6100.00%

#define __pte_free_tlb(tlb,pte,address) \ do { \ pgtable_page_dtor(pte); \ tlb_remove_page((tlb), pte); \ } while (0) #ifndef __PAGETABLE_PMD_FOLDED
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { pmd_t *pmd; pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER); if (pmd) pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); return pmd; }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle56100.00%1100.00%
Total56100.00%1100.00%


static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) { free_pages((unsigned long)pmd, PMD_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle2281.48%150.00%
Benjamin Herrenschmidt518.52%150.00%
Total27100.00%2100.00%

#define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x) #endif #ifndef __PAGETABLE_PUD_FOLDED
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) { pud_t *pud; pud = (pud_t *) __get_free_pages(GFP_KERNEL, PUD_ORDER); if (pud) pud_init((unsigned long)pud, (unsigned long)invalid_pmd_table); return pud; }

Contributors

PersonTokensPropCommitsCommitProp
Alex Belits56100.00%1100.00%
Total56100.00%1100.00%


static inline void pud_free(struct mm_struct *mm, pud_t *pud) { free_pages((unsigned long)pud, PUD_ORDER); }

Contributors

PersonTokensPropCommitsCommitProp
Alex Belits27100.00%1100.00%
Total27100.00%1100.00%


static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) { set_pgd(pgd, __pgd((unsigned long)pud)); }

Contributors

PersonTokensPropCommitsCommitProp
Alex Belits34100.00%1100.00%
Total34100.00%1100.00%

#define __pud_free_tlb(tlb, x, addr) pud_free((tlb)->mm, x) #endif /* __PAGETABLE_PUD_FOLDED */ #define check_pgt_cache() do { } while (0) extern void pagetable_init(void); #endif /* _ASM_PGALLOC_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle24941.16%315.79%
Alex Belits13422.15%15.26%
Linus Torvalds (pre-git)9014.88%210.53%
Linus Torvalds416.78%15.26%
Benjamin Herrenschmidt243.97%210.53%
Martin Schwidefsky223.64%15.26%
Kirill A. Shutemov162.64%15.26%
Andrew Morton91.49%210.53%
Atsushi Nemoto71.16%15.26%
David Daney60.99%15.26%
Alexey Dobriyan30.50%15.26%
James Hogan20.33%15.26%
Christoph Lameter10.17%15.26%
Masahiro Yamada10.17%15.26%
Total605100.00%19100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.