mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
782de70c42
Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem cache for page table allocations on several architectures that do not use PAGE_SIZE tables for one or more levels of the page table hierarchy. Most architectures do not implement these functions and use __weak default NOP implementation of pgd_cache_init(). Since there is no such default for pgtable_cache_init(), its empty stub is duplicated among most architectures. Rename the definitions of pgd_cache_init() to pgtable_cache_init() and drop empty stubs of pgtable_cache_init(). Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Will Deacon <will@kernel.org> [arm64] Acked-by: Thomas Gleixner <tglx@linutronix.de> [x86] Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
100 lines
1.6 KiB
C
100 lines
1.6 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* arch/sh/mm/nommu.c
|
|
*
|
|
* Various helper routines and stubs for MMUless SH.
|
|
*
|
|
* Copyright (C) 2002 - 2009 Paul Mundt
|
|
*/
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/string.h>
|
|
#include <linux/mm.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/tlbflush.h>
|
|
#include <asm/page.h>
|
|
#include <linux/uaccess.h>
|
|
|
|
/*
|
|
* Nothing too terribly exciting here ..
|
|
*/
|
|
void copy_page(void *to, void *from)
|
|
{
|
|
memcpy(to, from, PAGE_SIZE);
|
|
}
|
|
|
|
__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
|
|
{
|
|
memcpy(to, from, n);
|
|
return 0;
|
|
}
|
|
|
|
__kernel_size_t __clear_user(void *to, __kernel_size_t n)
|
|
{
|
|
memset(to, 0, n);
|
|
return 0;
|
|
}
|
|
|
|
void local_flush_tlb_all(void)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void local_flush_tlb_mm(struct mm_struct *mm)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|
unsigned long end)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void local_flush_tlb_one(unsigned long asid, unsigned long page)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void __flush_tlb_global(void)
|
|
{
|
|
}
|
|
|
|
void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
|
|
{
|
|
}
|
|
|
|
void __init kmap_coherent_init(void)
|
|
{
|
|
}
|
|
|
|
void *kmap_coherent(struct page *page, unsigned long addr)
|
|
{
|
|
BUG();
|
|
return NULL;
|
|
}
|
|
|
|
void kunmap_coherent(void *kvaddr)
|
|
{
|
|
BUG();
|
|
}
|
|
|
|
void __init page_table_range_init(unsigned long start, unsigned long end,
|
|
pgd_t *pgd_base)
|
|
{
|
|
}
|
|
|
|
void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
|
|
{
|
|
}
|