From patchwork Sun Jan 29 12:42:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13120103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57BD4C636CB for ; Sun, 29 Jan 2023 12:43:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA3576B0075; Sun, 29 Jan 2023 07:43:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D52736B0078; Sun, 29 Jan 2023 07:43:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF3026B007B; Sun, 29 Jan 2023 07:43:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B2BDB6B0075 for ; Sun, 29 Jan 2023 07:43:33 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 89BFB1602CD for ; Sun, 29 Jan 2023 12:43:33 +0000 (UTC) X-FDA: 80407802706.17.6725761 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id D972840011 for ; Sun, 29 Jan 2023 12:43:31 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kHOqK+fk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674996212; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5Zt7ZxpHybkBwEx2qiHDDQ63acJkzkg2BBP3/SGx/KA=; b=y2NKXyL7PgjWFTlLlXFnLZAGv0/aFTARpxSnc5S8ezEvKjVA/uQIUX42GgKvB+B0l5qmrj Fkw52Jd04TT5vpT0gPhPh11lBOp7HCy4ewJoEEXEOw0+kVWlkycWHPUx1q/2c0Vv73AMek y0KhxE0DHABiFxpINHvS69qa8oqvGsE= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kHOqK+fk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674996212; a=rsa-sha256; cv=none; b=YMYMvckoJyHmNtYA5vI0xXwisRZD9+OreFx9jr72CDceV13gEkn7Y1bwcgwka4hs3g1CJG IBme3yNVTbeBZJPxTrHU2oPmmApsK9/0pHeHxgaOyi9uAl709M2xMavRDpyJJssKVnB4Hh qM1T7r5q/A4BsedgcC/3UVTX4tfrcbg= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13E1C60D32; Sun, 29 Jan 2023 12:43:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11014C4339C; Sun, 29 Jan 2023 12:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674996210; bh=TNKTwe+UR0ceH94DVHkVlPLs1JCpp400iKAUs+FXrEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kHOqK+fkBQfue2/LgvXT5/OFdAT2H2FDvjblZicbNXbJBXdpPk6eRh5KAzlpLxCYr +ZshLmihJgfk3B+zAwo730+puTcbIc8k+mnQeD2+zmdUjKYXlyfsgcn6GYvHDuUc19 AOHGXLEYgfNJeOc530SeCns3uW1t7x0orjihKEYEIIT5GQHR6IqYB/gEFrjidz/2dv f0dKfcsUeo0xUm2dYF+qX8c/XDVdQtMrsNcKx4lXhoiKAIFdyDDeO7DFDI10MnLJsj Zihs3LV7jZdAazuy4Qto4ScBNLLuXUWDyHAfB37wPKFgGicdZknfE+MkdxncDSrEh9 WkpxoaJlG/GPw== From: Mike Rapoport To: Andrew Morton Cc: Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, "Mike Rapoport (IBM)" Subject: [PATCH v2 3/4] mips: drop definition of pfn_valid() for DISCONTIGMEM Date: Sun, 29 Jan 2023 14:42:34 +0200 Message-Id: <20230129124235.209895-4-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230129124235.209895-1-rppt@kernel.org> References: <20230129124235.209895-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D972840011 X-Stat-Signature: wt3jgtthq3ea414p1wpdz8zcrpmajn11 X-HE-Tag: 1674996211-269306 X-HE-Meta: U2FsdGVkX18y33rf11WpRUkrYmGkU34guStmDc0uJhhwvT1LaZo4ASd0gscJUiUzFfPcAKECX0vYuKcUriS8zXVMAg0pBuQuH9AV03Uenpv2Dw9SNFS0DrH0G413ivaM/6ghpxBkVLC4iUFQN0wmNnw2BSn5gtSNsuHkMApJOFIRv0kKwaiQyw+PPaHQaT6b39+XiENZ3PFgZhLKeUjW5M/lD2LL3nzTLHsOVd2N+z2wHaQr1aiH44Nt+/yBEg+p1uedagZtaZd8I16JL52f9+Bo7f8A6j6QqkLogA9U5i7B9nDTBgx1nLM80fjkDAHy8+aNT2p49tC03UC2X3bw2Mo+upb6TivSB8WHBXeZDlqSKLVV6ug2aq2ZzRhgAbECP6+45h8hR5F55Z6GeCFG8oVyVZoHsBXUdpct8Cn8t1B0F4eb2vcJQ9sYKe/LvoNfPfa7bJERMeEgJnZEQ9RAe/u9HK7dvYjBDmehxm5s2pCn6DH6tC9pTSIPIVKTAbQsbMR7W4fYN1RXmOBd/4Qy93MOkPx97xc69kprlaaM2N3Fm+lr+SWxJguNjmaofPG6I3ZZzTh48fPEbr3Mb4nyDpZTKLFoI7RsGXnscGR+x/DSW+8H0f4rxjp86ud8TuXmLP3tnQ7zZVm6QU3Qiz5xXYpJsHw0FfCaVZqwQ7Gr5lTIZYOGkwK/P6M2uxoKlj1jCGHDOdC6HpOnosau0TecQUWcjx0Tso9dvIgfZsWh4y1lf+x0sX8hcXlIyoIkzNrGVdNw4Cu4zCqUdHQUc3+rY2pjfV5O22wbsxFYnWD1e+yvw4tsTMi2zuDsoBbp4LQkiAQ7Bsp1bmTyHr5B2HsySYWFbE+Sx4LaKASpVHfqYfx+oE1C1995kZ27giacGm/MO2EK8GeemY3oztrE8O+l+ewA8H7JJKKMiSK9l6qJAWKu1txSjxkUrx5GCtZ0JxJjs8j9IlUnsBDw5aagN/5 OhyMLR34 OupVh2DzCXRfZg8aFPvxV6VV1SQbtqgBkmrXtZAmsBCjWwl3pIgdsylWPlYp0klZ4zafF21JN11rGsAG3nL5MND8YDj/dJrIDe9ajagDxi1mlr+Ovf3934MRapgSTS17WfjItMcJM0AS1K+eWc+oGBVGtDP5Byq6Ro3tKYX+1cxRZWmTitQB0e9IrwBhdh/S1Q+tR2V7i22x8Z5c7M17nTgJ1GeTu0mGlwzGuWgK1aC4E0CysMEkh5Dn42qsL0jVb2vrZezwwDcE2Z5PKDH1plj8lJzGJNrp1qTfPiBX8eNrjRTXXzTluwXFMrKBimePb/719x0sWRJmcWLFyo4oFVF9/Z1jWlIrMkF9qP1wy13E7kEvDyVmbZxzhmzmnXFx7o7yt0lu6bb1s2vAhjIzCXDkLYcJbb7Ue6ochp2Z5xajb9xS6+5eef54yNyXVWQwfwSri9iCDWX1gWudKYOKN9aMbfhOFVmRvG2Ks X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Mike Rapoport (IBM)" 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) Reviewed-by: David Hildenbrand --- 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)))