mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 19:14:30 +08:00
09cfefb7fa
Add memory management support for LoongArch, including: cache and tlb management, page fault handling and ioremap/mmap support. Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
28 lines
591 B
C
28 lines
591 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
|
*/
|
|
|
|
#include <asm/io.h>
|
|
|
|
void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size)
|
|
{
|
|
return ((void __iomem *)TO_CACHE(phys_addr));
|
|
}
|
|
|
|
void __init early_iounmap(void __iomem *addr, unsigned long size)
|
|
{
|
|
|
|
}
|
|
|
|
void *early_memremap_ro(resource_size_t phys_addr, unsigned long size)
|
|
{
|
|
return early_memremap(phys_addr, size);
|
|
}
|
|
|
|
void *early_memremap_prot(resource_size_t phys_addr, unsigned long size,
|
|
unsigned long prot_val)
|
|
{
|
|
return early_memremap(phys_addr, size);
|
|
}
|