[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230125190757.22555-3-rppt@kernel.org>
Date: Wed, 25 Jan 2023 21:07:56 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>, Brian Cain <bcain@...cinc.com>,
"David S. Miller" <davem@...emloft.net>,
Dinh Nguyen <dinguyen@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Greg Ungerer <gerg@...ux-m68k.org>,
Guo Ren <guoren@...nel.org>, Helge Deller <deller@....de>,
Huacai Chen <chenhuacai@...nel.org>,
Matt Turner <mattst88@...il.com>,
Max Filippov <jcmvbkbc@...il.com>,
Michael Ellerman <mpe@...erman.id.au>,
Michal Simek <monstr@...str.eu>,
Palmer Dabbelt <palmer@...belt.com>,
Rich Felker <dalias@...c.org>,
Richard Weinberger <richard@....at>,
Stafford Horne <shorne@...il.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Vineet Gupta <vgupta@...nel.org>,
WANG Xuerui <kernel@...0n.name>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
linux-alpha@...r.kernel.org, linux-arch@...r.kernel.org,
linux--csky@...r.kernel.org, linux-hexagon@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-sh@...r.kernel.org, linux-snps-arc@...ts.infradead.org,
linux-um@...ts.infradead.org, linux-xtensa@...ux-xtensa.org,
linuxppc-dev@...ts.ozlabs.org, loongarch@...ts.linux.dev,
openrisc@...ts.librecores.org, sparclinux@...r.kernel.org,
x86@...nel.org, "Mike Rapoport (IBM)" <rppt@...nel.org>
Subject: [PATCH 2/3] mips: drop definition of pfn_valid() for DISCONTIGMEM
From: "Mike Rapoport (IBM)" <rppt@...nel.org>
There is stale definition of pfn_valid() for DISCONTINGMEM memory model
guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery.
Remove everything but definition of pfn_valid() for FLATMEM.
Signed-off-by: Mike Rapoport (IBM) <rppt@...nel.org>
---
arch/mips/include/asm/page.h | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 96bc798c1ec1..9286f11ff6ad 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -235,21 +235,6 @@ static inline int pfn_valid(unsigned long pfn)
return pfn >= pfn_offset && pfn < max_mapnr;
}
-#elif defined(CONFIG_SPARSEMEM)
-
-/* pfn_valid is defined in linux/mmzone.h */
-
-#elif defined(CONFIG_NUMA)
-
-#define pfn_valid(pfn) \
-({ \
- unsigned long __pfn = (pfn); \
- int __n = pfn_to_nid(__pfn); \
- ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \
- NODE_DATA(__n)->node_spanned_pages) \
- : 0); \
-})
-
#endif
#define virt_to_pfn(kaddr) PFN_DOWN(virt_to_phys((void *)(kaddr)))
--
2.35.1
Powered by blists - more mailing lists