pgalloc.h (762f99f4f3cb41a775b5157dd761217beba65873) | pgalloc.h (f7536442353d1b6bb0c7c8ad1ec549d9fa215106) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef __ASM_CSKY_PGALLOC_H 4#define __ASM_CSKY_PGALLOC_H 5 6#include <linux/highmem.h> 7#include <linux/mm.h> 8#include <linux/sched.h> --- 30 unchanged lines hidden (view full) --- 39 return pte; 40} 41 42static inline pgd_t *pgd_alloc(struct mm_struct *mm) 43{ 44 pgd_t *ret; 45 pgd_t *init; 46 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef __ASM_CSKY_PGALLOC_H 4#define __ASM_CSKY_PGALLOC_H 5 6#include <linux/highmem.h> 7#include <linux/mm.h> 8#include <linux/sched.h> --- 30 unchanged lines hidden (view full) --- 39 return pte; 40} 41 42static inline pgd_t *pgd_alloc(struct mm_struct *mm) 43{ 44 pgd_t *ret; 45 pgd_t *init; 46 |
47 ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); | 47 ret = (pgd_t *) __get_free_page(GFP_KERNEL); |
48 if (ret) { 49 init = pgd_offset(&init_mm, 0UL); 50 pgd_init((unsigned long *)ret); 51 memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, 52 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); 53 /* prevent out of order excute */ 54 smp_mb(); 55#ifdef CONFIG_CPU_NEED_TLBSYNC --- 19 unchanged lines hidden --- | 48 if (ret) { 49 init = pgd_offset(&init_mm, 0UL); 50 pgd_init((unsigned long *)ret); 51 memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, 52 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); 53 /* prevent out of order excute */ 54 smp_mb(); 55#ifdef CONFIG_CPU_NEED_TLBSYNC --- 19 unchanged lines hidden --- |