From: Yanteng Si <siyanteng@loongson.cn>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
Huacai Chen <chenhuacai@gmail.com>,
siyanteng01@gmail.com, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-mips@vger.kernel.org, Yanteng Si <siyanteng@loongson.cn>
Subject: [PATCH] MIPS: mm: remove function __uncached_access()
Date: Sat, 23 Jan 2021 13:59:26 +0800 [thread overview]
Message-ID: <20210123055926.4137197-1-siyanteng@loongson.cn> (raw)
Remove unnecessary functions.
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
arch/mips/loongson2ef/common/mem.c | 11 -----------
arch/mips/mm/cache.c | 8 --------
drivers/char/mem.c | 7 -------
3 files changed, 26 deletions(-)
diff --git a/arch/mips/loongson2ef/common/mem.c b/arch/mips/loongson2ef/common/mem.c
index 057d58bb470e..fceb3ee47eb0 100644
--- a/arch/mips/loongson2ef/common/mem.c
+++ b/arch/mips/loongson2ef/common/mem.c
@@ -41,14 +41,3 @@ void __init prom_init_memory(void)
memblock_add(LOONGSON_HIGHMEM_START, highmemsize << 20);
#endif /* !CONFIG_64BIT */
}
-
-/* override of arch/mips/mm/cache.c: __uncached_access */
-int __uncached_access(struct file *file, unsigned long addr)
-{
- if (file->f_flags & O_DSYNC)
- return 1;
-
- return addr >= __pa(high_memory) ||
- ((addr >= LOONGSON_MMIO_MEM_START) &&
- (addr < LOONGSON_MMIO_MEM_END));
-}
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 23b16bfd97b2..9cfd432d99f6 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -207,11 +207,3 @@ void cpu_cache_init(void)
setup_protection_map();
}
-
-int __weak __uncached_access(struct file *file, unsigned long addr)
-{
- if (file->f_flags & O_DSYNC)
- return 1;
-
- return addr >= __pa(high_memory);
-}
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 43c871dc7477..869b9f5e8e03 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -291,13 +291,6 @@ static int uncached_access(struct file *file, phys_addr_t addr)
* attribute aliases.
*/
return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
-#elif defined(CONFIG_MIPS)
- {
- extern int __uncached_access(struct file *file,
- unsigned long addr);
-
- return __uncached_access(file, addr);
- }
#else
/*
* Accessing memory above the top the kernel knows about or through a
--
2.27.0
next reply other threads:[~2021-01-23 6:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-23 5:59 Yanteng Si [this message]
2021-01-23 8:02 ` [PATCH] MIPS: mm: remove function __uncached_access() Greg Kroah-Hartman
[not found] ` <CAEensMzm-SFt88CuWo6mdxhHGTRtVK93pMF+=ux0ZVVUUU4OtA@mail.gmail.com>
2021-01-24 8:15 ` Greg Kroah-Hartman
[not found] ` <CAEensMxkfaGMEEtz+z7A4wjvAVmSDk8v66jJQANX9e9uHYZfzA@mail.gmail.com>
2021-01-24 14:05 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210123055926.4137197-1-siyanteng@loongson.cn \
--to=siyanteng@loongson.cn \
--cc=arnd@arndb.de \
--cc=chenhuacai@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-mips@vger.kernel.org \
--cc=siyanteng01@gmail.com \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).