Release 4.14 arch/xtensa/include/asm/pgalloc.h
/*
* include/asm-xtensa/pgalloc.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Copyright (C) 2001-2007 Tensilica Inc.
*/
#ifndef _XTENSA_PGALLOC_H
#define _XTENSA_PGALLOC_H
#ifdef __KERNEL__
#include <linux/highmem.h>
#include <linux/slab.h>
/*
* Allocating and freeing a pmd is trivial: the 1-entry pmd is
* inside the pgd, so has no extra memory associated with it.
*/
#define pmd_populate_kernel(mm, pmdp, ptep) \
(pmd_val(*(pmdp)) = ((unsigned long)ptep))
#define pmd_populate(mm, pmdp, page) \
(pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
#define pmd_pgtable(pmd) pmd_page(pmd)
static inline pgd_t*
pgd_alloc(struct mm_struct *mm)
{
return (pgd_t*) __get_free_pages(GFP_KERNEL | __GFP_ZERO, PGD_ORDER);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Chris Zankel | 27 | 100.00% | 2 | 100.00% |
Total | 27 | 100.00% | 2 | 100.00% |
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
free_page((unsigned long)pgd);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Chris Zankel | 20 | 80.00% | 2 | 66.67% |
Benjamin Herrenschmidt | 5 | 20.00% | 1 | 33.33% |
Total | 25 | 100.00% | 3 | 100.00% |
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
unsigned long address)
{
pte_t *ptep;
int i;
ptep = (pte_t *)__get_free_page(GFP_KERNEL);
if (!ptep)
return NULL;
for (i = 0; i < 1024; i++)
pte_clear(NULL, 0, ptep + i);
return ptep;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Kirill A. Shutemov | 49 | 70.00% | 1 | 33.33% |
Chris Zankel | 21 | 30.00% | 2 | 66.67% |
Total | 70 | 100.00% | 3 | 100.00% |
static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
unsigned long addr)
{
pte_t *pte;
struct page *page;
pte = pte_alloc_one_kernel(mm, addr);
if (!pte)
return NULL;
page = virt_to_page(pte);
if (!pgtable_page_ctor(page)) {
__free_page(page);
return NULL;
}
return page;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Kirill A. Shutemov | 32 | 45.71% | 3 | 42.86% |
Chris Zankel | 24 | 34.29% | 3 | 42.86% |
Martin Schwidefsky | 14 | 20.00% | 1 | 14.29% |
Total | 70 | 100.00% | 7 | 100.00% |
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
free_page((unsigned long)pte);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Chris Zankel | 15 | 60.00% | 2 | 50.00% |
Benjamin Herrenschmidt | 5 | 20.00% | 1 | 25.00% |
Kirill A. Shutemov | 5 | 20.00% | 1 | 25.00% |
Total | 25 | 100.00% | 4 | 100.00% |
static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
{
pgtable_page_dtor(pte);
__free_page(pte);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Chris Zankel | 12 | 48.00% | 2 | 40.00% |
Martin Schwidefsky | 8 | 32.00% | 1 | 20.00% |
Benjamin Herrenschmidt | 4 | 16.00% | 1 | 20.00% |
Kirill A. Shutemov | 1 | 4.00% | 1 | 20.00% |
Total | 25 | 100.00% | 5 | 100.00% |
#define pmd_pgtable(pmd) pmd_page(pmd)
#endif /* __KERNEL__ */
#endif /* _XTENSA_PGALLOC_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Chris Zankel | 166 | 54.79% | 4 | 44.44% |
Kirill A. Shutemov | 87 | 28.71% | 3 | 33.33% |
Martin Schwidefsky | 36 | 11.88% | 1 | 11.11% |
Benjamin Herrenschmidt | 14 | 4.62% | 1 | 11.11% |
Total | 303 | 100.00% | 9 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.