cregit-Linux how code gets into the kernel

Release 4.14 arch/m68k/include/asm/motorola_pgalloc.h

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

#define _MOTOROLA_PGALLOC_H

#include <asm/tlb.h>
#include <asm/tlbflush.h>

extern pmd_t *get_pointer_table(void);
extern int free_pointer_table(pmd_t *);


static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { pte_t *pte; pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); if (pte) { __flush_page_to_ram(pte); flush_tlb_kernel_page(pte); nocache_page(pte); } return pte; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds5594.83%125.00%
Andrew Morton11.72%125.00%
Christoph Lameter11.72%125.00%
Roman Zippel11.72%125.00%
Total58100.00%4100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel2480.00%133.33%
Benjamin Herrenschmidt516.67%133.33%
Linus Torvalds13.33%133.33%
Total30100.00%3100.00%


static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) { struct page *page; pte_t *pte; page = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0); if(!page) return NULL; if (!pgtable_page_ctor(page)) { __free_page(page); return NULL; } pte = kmap(page); __flush_page_to_ram(pte); flush_tlb_kernel_page(pte); nocache_page(pte); kunmap(page); return page; }

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel4548.91%112.50%
Kirill A. Shutemov2628.26%112.50%
Linus Torvalds1111.96%112.50%
Linus Torvalds (pre-git)66.52%112.50%
Andrew Morton22.17%225.00%
Martin Schwidefsky11.09%112.50%
Christoph Lameter11.09%112.50%
Total92100.00%8100.00%


static inline void pte_free(struct mm_struct *mm, pgtable_t page) { pgtable_page_dtor(page); cache_page(kmap(page)); kunmap(page); __free_page(page); }

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel1539.47%125.00%
Linus Torvalds (pre-git)1334.21%125.00%
Martin Schwidefsky615.79%125.00%
Benjamin Herrenschmidt410.53%125.00%
Total38100.00%4100.00%


static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page, unsigned long address) { pgtable_page_dtor(page); cache_page(kmap(page)); kunmap(page); __free_page(page); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1535.71%114.29%
Roman Zippel1228.57%114.29%
Martin Schwidefsky614.29%114.29%
Benjamin Herrenschmidt49.52%114.29%
Andrew Morton37.14%228.57%
Linus Torvalds24.76%114.29%
Total42100.00%7100.00%


static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { return get_pointer_table(); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1361.90%150.00%
Roman Zippel838.10%150.00%
Total21100.00%2100.00%


static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) { return free_pointer_table(pmd); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1150.00%133.33%
Roman Zippel627.27%133.33%
Benjamin Herrenschmidt522.73%133.33%
Total22100.00%3100.00%


static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, unsigned long address) { return free_pointer_table(pmd); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1142.31%120.00%
Roman Zippel830.77%120.00%
Benjamin Herrenschmidt415.38%120.00%
Andrew Morton311.54%240.00%
Total26100.00%5100.00%


static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) { pmd_free(mm, (pmd_t *)pgd); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1866.67%133.33%
Benjamin Herrenschmidt725.93%133.33%
Roman Zippel27.41%133.33%
Total27100.00%3100.00%


static inline pgd_t *pgd_alloc(struct mm_struct *mm) { return (pgd_t *)get_pointer_table(); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1571.43%133.33%
Linus Torvalds419.05%133.33%
Roman Zippel29.52%133.33%
Total21100.00%3100.00%


static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) { pmd_set(pmd, pte); }

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel2385.19%150.00%
Linus Torvalds414.81%150.00%
Total27100.00%2100.00%


static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) { pmd_set(pmd, page_address(page)); }

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel2482.76%125.00%
Linus Torvalds (pre-git)26.90%125.00%
Linus Torvalds26.90%125.00%
Martin Schwidefsky13.45%125.00%
Total29100.00%4100.00%

#define pmd_pgtable(pmd) pmd_page(pmd)
static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) { pgd_set(pgd, pmd); }

Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel2177.78%150.00%
Linus Torvalds (pre-git)622.22%150.00%
Total27100.00%2100.00%

#endif /* _MOTOROLA_PGALLOC_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Roman Zippel19438.88%212.50%
Linus Torvalds (pre-git)13527.05%16.25%
Linus Torvalds7915.83%212.50%
Benjamin Herrenschmidt295.81%212.50%
Kirill A. Shutemov265.21%16.25%
Martin Schwidefsky214.21%16.25%
Andrew Morton91.80%425.00%
Geert Uytterhoeven30.60%16.25%
Christoph Lameter20.40%16.25%
Greg Kroah-Hartman10.20%16.25%
Total499100.00%16100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.