Message ID | 20230125190757.22555-3-rppt@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp439856wrn; Wed, 25 Jan 2023 11:10:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXsCRKgLCQdDvniwJoTwM++R2o5k1bML23R/uRblVGmAj08hqYOmyAHQ/kofohg1WcNSCdDi X-Received: by 2002:a17:906:eb13:b0:869:236c:ac43 with SMTP id mb19-20020a170906eb1300b00869236cac43mr35378650ejb.32.1674673851295; Wed, 25 Jan 2023 11:10:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674673851; cv=none; d=google.com; s=arc-20160816; b=d89hd6iB6llhEGpgOpJyE/UIkbs4/JsjaDFVe1mSluUiNpBaDdQWn+LtHuDl7S2ooP s8wFcyrd7Yp/sOoyR+ezs+RZUR9aiHLbiGckcf7psbxi5CozqfValVC+Ye9/o4Ogi+Kg 5tWGWIyc2hsfhis0S058P3VHH92iGKgwqgR/Jeb65Kt0WKnXtMoFgH2HsY5pAYeY4VwR DNrYFWj38QPt34T8fjW9xwV7FSnw1tlYr+H//x2dg6pvqPVmGpmBzF4MOwEpzyUxkphH A8/uMY21UUIOAlWgHKImESqnkwbwSjA4b4Ca9Nzh0I0zizogLL5gJ0pI/JJYf+rJYYLx u9aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5Zt7ZxpHybkBwEx2qiHDDQ63acJkzkg2BBP3/SGx/KA=; b=pRL8JNIQO34A/MBD9/4UANABJSozVU4txR4Ie5ehYYU8twVtQOPL5E4YRZ3xK+sLbC jXwpKC1EtjPIHNWj43k7+KW2gL+YVMcL53S6330iLthQyUh3s/sa9u6yqEcfdqdIe6Lx 9b77URrw9PpDVoH1eZ1/f795hZ5k1gCCYXBTPQrbppAZU76dq173xOio2PFx5RVGiXqJ i4LMsy4kBGRnc9czXqx/kZAowh2Az/QU5OT65Z4mOTiZQd9XfPDXW/uwlMDQYSTyz0Aw TDaeEWNHfGSB9/oy6o69o7zq+nmxIEoY2DYNJFH1494sBMxdvQmklht1lpB/9QXAoL2X KIDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n3jdBK0r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vs18-20020a170907139200b0084d439b4e0bsi6231214ejb.574.2023.01.25.11.10.27; Wed, 25 Jan 2023 11:10:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n3jdBK0r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236081AbjAYTI4 (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Wed, 25 Jan 2023 14:08:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236083AbjAYTIn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Jan 2023 14:08:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06B595977B; Wed, 25 Jan 2023 11:08:42 -0800 (PST) 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 939BB614DD; Wed, 25 Jan 2023 19:08:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B95D7C433D2; Wed, 25 Jan 2023 19:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674673721; bh=TNKTwe+UR0ceH94DVHkVlPLs1JCpp400iKAUs+FXrEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n3jdBK0rt95oJXQpHyDSd2FKY40hm9U8H2r8cDgoJuDx7YDiY7e//KIo42MnYQDFl yQmL7WKzB7s4oFY8V5/tKLgfG8mwnId3oI9LYhFcsnOt4yGJDZUdVzE2htJsGKqtsZ GO6h8IdJNcv2de5AIgZKhZ4ECBZ+hzs/Tuz45qdKLCt5fmgVLmxMBeCy5EwvVg2waU DDQbULZEonzqn4s3vaAdzVkwi4v8hp/Zo+nZA+yqBMSFvm72KBgBGmtfLGQSnwTPHK 97B7v6Sd79PnhkzX5BjiFX1uoLwgXashF9p/sPPGZHQtMupT6tRcnOuB4caGN44DCv bqdV5sLP3jU5A== From: Mike Rapoport <rppt@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de>, Brian Cain <bcain@quicinc.com>, "David S. Miller" <davem@davemloft.net>, Dinh Nguyen <dinguyen@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Guo Ren <guoren@kernel.org>, Helge Deller <deller@gmx.de>, Huacai Chen <chenhuacai@kernel.org>, Matt Turner <mattst88@gmail.com>, Max Filippov <jcmvbkbc@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>, Michal Simek <monstr@monstr.eu>, Palmer Dabbelt <palmer@dabbelt.com>, Rich Felker <dalias@libc.org>, Richard Weinberger <richard@nod.at>, Stafford Horne <shorne@gmail.com>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Vineet Gupta <vgupta@kernel.org>, WANG Xuerui <kernel@xen0n.name>, Yoshinori Sato <ysato@users.sourceforge.jp>, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.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-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)" <rppt@kernel.org> Subject: [PATCH 2/3] mips: drop definition of pfn_valid() for DISCONTIGMEM Date: Wed, 25 Jan 2023 21:07:56 +0200 Message-Id: <20230125190757.22555-3-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230125190757.22555-1-rppt@kernel.org> References: <20230125190757.22555-1-rppt@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756022808074525967?= X-GMAIL-MSGID: =?utf-8?q?1756022808074525967?= |
Series |
mm, arch: add generic implementation of pfn_valid() for FLATMEM
|
|
Commit Message
Mike Rapoport
Jan. 25, 2023, 7:07 p.m. UTC
From: "Mike Rapoport (IBM)" <rppt@kernel.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@kernel.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)))