pgalloc.h (d053cf0d771f6547cb0537759a9af63cf402908d) pgalloc.h (2fb4706057bcf8261b3b0521ec7a62b54b82ce48)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2#ifndef _ASM_POWERPC_BOOK3S_64_PGALLOC_H
3#define _ASM_POWERPC_BOOK3S_64_PGALLOC_H
4/*
5 */
6
7#include <linux/slab.h>
8#include <linux/cpumask.h>

--- 71 unchanged lines hidden (view full) ---

80
81static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
82{
83 if (radix_enabled())
84 return radix__pgd_free(mm, pgd);
85 kmem_cache_free(PGT_CACHE(PGD_INDEX_SIZE), pgd);
86}
87
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2#ifndef _ASM_POWERPC_BOOK3S_64_PGALLOC_H
3#define _ASM_POWERPC_BOOK3S_64_PGALLOC_H
4/*
5 */
6
7#include <linux/slab.h>
8#include <linux/cpumask.h>

--- 71 unchanged lines hidden (view full) ---

80
81static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
82{
83 if (radix_enabled())
84 return radix__pgd_free(mm, pgd);
85 kmem_cache_free(PGT_CACHE(PGD_INDEX_SIZE), pgd);
86}
87
88static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
88static inline void p4d_populate(struct mm_struct *mm, p4d_t *pgd, pud_t *pud)
89{
89{
90 *pgd = __pgd(__pgtable_ptr_val(pud) | PGD_VAL_BITS);
90 *pgd = __p4d(__pgtable_ptr_val(pud) | PGD_VAL_BITS);
91}
92
93static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
94{
95 pud_t *pud;
96
97 pud = kmem_cache_alloc(PGT_CACHE(PUD_CACHE_INDEX),
98 pgtable_gfp_flags(mm, GFP_KERNEL));

--- 69 unchanged lines hidden ---
91}
92
93static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
94{
95 pud_t *pud;
96
97 pud = kmem_cache_alloc(PGT_CACHE(PUD_CACHE_INDEX),
98 pgtable_gfp_flags(mm, GFP_KERNEL));

--- 69 unchanged lines hidden ---