From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E33C38142 for ; Sat, 28 Jan 2023 09:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xphRgMBqZ1daJnGdJxdMRN3GKCVw6QjUg58f3V79FgY=; b=zxIEurGyaihRCX 3nTSJ/y63OldATg57gJ3RQSwGEhGWqdMokbY4m8+I2yjv7KdXoyG513gBHismUr+O5vf8u9F7Sog1 sFIsCOoWs8g0qFPzRnVsin31mtlQgnkqCVELQAfYBFdXaVdj9m19JtSkdI8Sr3zPoZTMqHElIJuzB QMc6UyQk66ZSF2FyTn5a3kmKJC8cupIIaklzSag/BGY9oaR/CRhwcW0eaYpr4BHyxO8YO09pf1G85 JymkCzZBheqdH4a5gd6OaCg4OZ0fXnnJHL6k0W5Jv3eqBulXY1tvmoOqjIFNda/M9qSIrhqTjBPWw HA434LplXiPcQkDAggsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLh6M-00HVbe-KF; Sat, 28 Jan 2023 09:02:22 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLh6J-00HVaR-UX; Sat, 28 Jan 2023 09:02:21 +0000 Received: by mail-wm1-x32c.google.com with SMTP id j36-20020a05600c1c2400b003dc39cb9c33so2673682wms.1; Sat, 28 Jan 2023 01:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=v7ARCz3cVaBFOjYkC77qL/HBEniL1qdQHS5E6K6GFOY=; b=aqbRojTHRCVjzGUAj7OwNNFidQtZRaRDHHmAjBWeAFhAl4EP6lU/HQ+DT3lz3ORLRs krDbFNMyaAoPDNNbr2Us4LfdqxvtQoKw/VqPFwWdtmeZaX2Yr/xMNSAvUp0bHiLiSOj3 SN1iYBMZrJW6Tuoe05d5ixjoXDQyxOx+hHgkYRdk2YredIT5D868vyI7+JtGnCIwsINP AC8gyFLqm6XouHJKilNfBj6iNxK7cGu1Nhc9VlLOm0nqQCpyycdmijDtgityKjfCFibc kBECjMNCFbqcxj8dsEQrghcf75B90yP81hRDkvCSROQeKfuHc3hus0w8nNDlJyMcHou/ rQVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=v7ARCz3cVaBFOjYkC77qL/HBEniL1qdQHS5E6K6GFOY=; b=5vLXA5fiR5T1C+SXXRuaruasSHaE1fGp3jFv6nlg7/GLD3Akj/b2b0A4UdGx6ouDpq vwEYNMd3tt+andnDvBZvMn+BbMMxOdLFH9Qfpw7qTXrwMX1AVuKETQ0PrZitbqcyWAVD f6zLULp/84EMPM96VaI181lV0hwlJXxOYJd56Jb4HUutX9kMG/u5ccJZi5db7ggKQoeK ufeLBBFd3qK+nwLp4spSrPuDV7Ys1WCFeGISQhcfhid9a8SHTiSCalSMHR7gFF9vnvbF z63gd1UuUamQ5W4hqaEDNjDcLC5j4eG8ub86J9yppOStmqcltnTutNFo1NmPO3JgSmBY 0egQ== X-Gm-Message-State: AFqh2krOX+yCdVBTuLDvoMePUY4Ok4qswwbwkj88ziLbal4E/xbfK7cC cio9AMz4zmYiW1gG9MplDRE= X-Google-Smtp-Source: AMrXdXshtli+OqZ9VwFCdRpOAvHTMs/09zG9TMwa0gaZMZJ8uG1JiJOtVlF/BhmQxoXBbhlR7WJAkg== X-Received: by 2002:a05:600c:5116:b0:3db:1a8:c041 with SMTP id o22-20020a05600c511600b003db01a8c041mr42453030wms.17.1674896535134; Sat, 28 Jan 2023 01:02:15 -0800 (PST) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id f28-20020a5d58fc000000b002be5401ef5fsm6212824wrd.39.2023.01.28.01.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Jan 2023 01:02:14 -0800 (PST) Date: Sat, 28 Jan 2023 18:02:13 +0900 From: Stafford Horne To: Mike Rapoport Cc: Andrew Morton , 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 , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , 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, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230125190757.22555-1-rppt@kernel.org> <20230125190757.22555-4-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230125190757.22555-4-rppt@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230128_010220_009610_4BDB5A16 X-CRM114-Status: GOOD ( 15.52 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Jan 25, 2023 at 09:07:57PM +0200, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Every architecture that supports FLATMEM memory model defines its own > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > Use mips/powerpc version implemented as static inline as a generic > implementation of pfn_valid() and drop its per-architecture definitions > > Signed-off-by: Mike Rapoport (IBM) > --- > arch/alpha/include/asm/page.h | 4 ---- > arch/arc/include/asm/page.h | 1 - > arch/csky/include/asm/page.h | 1 - > arch/hexagon/include/asm/page.h | 1 - > arch/ia64/include/asm/page.h | 4 ---- > arch/loongarch/include/asm/page.h | 13 ------------- > arch/m68k/include/asm/page_no.h | 2 -- > arch/microblaze/include/asm/page.h | 1 - > arch/mips/include/asm/page.h | 13 ------------- > arch/nios2/include/asm/page.h | 9 --------- > arch/openrisc/include/asm/page.h | 2 -- > arch/parisc/include/asm/page.h | 4 ---- > arch/powerpc/include/asm/page.h | 9 --------- > arch/riscv/include/asm/page.h | 5 ----- > arch/sh/include/asm/page.h | 3 --- > arch/sparc/include/asm/page_32.h | 1 - > arch/um/include/asm/page.h | 1 - > arch/x86/include/asm/page_32.h | 4 ---- > arch/x86/include/asm/page_64.h | 4 ---- > arch/xtensa/include/asm/page.h | 2 -- > include/asm-generic/memory_model.h | 12 ++++++++++++ > include/asm-generic/page.h | 2 -- > 22 files changed, 12 insertions(+), 86 deletions(-) > [...] > diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h > index aab6e64d6db4..52b0d7e76446 100644 > --- a/arch/openrisc/include/asm/page.h > +++ b/arch/openrisc/include/asm/page.h > @@ -80,8 +80,6 @@ typedef struct page *pgtable_t; > > #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) > > -#define pfn_valid(pfn) ((pfn) < max_mapnr) > - > #define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr))) > > #endif /* __ASSEMBLY__ */ For OpenRISC Acked-by: Stafford Horne _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv