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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8AB2C32750 for ; Tue, 13 Aug 2019 16:50:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 78B5320842 for ; Tue, 13 Aug 2019 16:50:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EIeR3fpP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78B5320842 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=deltatee.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tqR5K2UtQ609R+Ba0Lc6Cg+Lc/WH3HzAYvfh8dOlwPk=; b=EIeR3fpPLiYrAu 6uqGpaVFkHDMPv/ToyIvjRMx5zj+AZgVD29IKXgtRB238U1JNtmj3kdE56Xy0fHOhUXM5JHlKU3j+ Ec+m2nEg96YJNgNUEokpFgjAg5yCEO5G6sF+y6Scep0CkDcMhBMFifoNrTHNnoVmbyTPIMthFC3ny BB0bVmEMxVKkO+ruD0XKkEFB0YVs58S33L0V9x72NjSz9AJdcabcKE7m9b7yizcYMd/u3aJKaVcxu uRdB31dSwBLk765CbH1gTR4yeHsjscVwoP16Mhf01Mgn5O3px0rSMDXAiQNGeG7XobOjVEkLI01e4 C3mhfEvJ3+vlw/SUfEmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxZzj-0003PC-9d; Tue, 13 Aug 2019 16:49:59 +0000 Received: from ale.deltatee.com ([207.54.116.67]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxZzg-0003Oi-4L for linux-riscv@lists.infradead.org; Tue, 13 Aug 2019 16:49:58 +0000 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hxZzc-0000UT-Fb; Tue, 13 Aug 2019 10:49:53 -0600 To: Paul Walmsley References: <20190109203911.7887-1-logang@deltatee.com> <20190109203911.7887-3-logang@deltatee.com> <0926a261-520e-4c40-f926-ddd40bb8ce44@deltatee.com> <96156909-1453-d487-ff66-a041d67c74d6@deltatee.com> <5506c875-9387-acc9-a7fe-5b7c10036c40@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Tue, 13 Aug 2019 10:49:51 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-CA X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-mm@vger.kernel.org, hch@lst.de, michaeljclark@mac.com, linux-riscv@lists.infradead.org, greentime.hu@sifive.com, olof@lixom.net, sbates@raithlin.com, linux-kernel@vger.kernel.org, palmer@sifive.com, andrew@sifive.com, aou@eecs.berkeley.edu, robh@kernel.org, green.hu@gmail.com, paul.walmsley@sifive.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH v4 2/2] RISC-V: Implement sparsemem X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190813_094956_214984_364CF15D X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Albert Ou , Andrew Waterman , Palmer Dabbelt , Linux Kernel Mailing List , Stephen Bates , linux-mm@vger.kernel.org, Greentime Hu , Olof Johansson , greentime.hu@sifive.com, linux-riscv@lists.infradead.org, Michael Clark , Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On 2019-08-13 10:39 a.m., Paul Walmsley wrote: > On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > >> On 2019-08-13 12:04 a.m., Greentime Hu wrote: >> >>> Every architecture with mmu defines their own pfn_valid(). >> >> Not true. Arm64, for example just uses the generic implementation in >> mmzone.h. > > arm64 seems to define their own: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/Kconfig#n899 Oh, yup. My mistake. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/mm/init.c#n235 > > While there are many architectures which have their own pfn_valid(); > oddly, almost none of them set HAVE_ARCH_PFN_VALID ? Yes, much of this is super confusing. Seems HAVE_ARCH_PFN_VALID only matters if SPARSEMEM is set. So risc-v probably doesn't need to set it and we just need a #ifdef !CONFIG_FLATMEM around the pfn_valid definition like other arches. Logan _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv