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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 58133C32750 for ; Tue, 13 Aug 2019 16:15:04 +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 2D84320840 for ; Tue, 13 Aug 2019 16:15:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LPRbvjmw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D84320840 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=3l2/DE/d38c8G8AvAVex4EGXzKLYp/0SEBrrDYS4vYI=; b=LPRbvjmw7c4XjX ZrQ5z1nJGGSW5je2EfWd2XRcVIx8CgH3iQxehgledOocIKsmOjSmVWmfAQUym1TVfLPJIXhxafGq7 0j9X6A04tCaYhXIiU3gcQGfMz5sQe6RZqMLItQiix78e0RkyKoveSYQ921DhLCEADBjw9+xB2dOMw iNsPCSGQtrpQvGiIAdSEIZ/MbXGt7cYQUsEfyyW9ke6CwwQoC9JrITvt6INYG0R4NeijbnU0yYAQY MenkNU5a14r/jr3DIeOnFJQ0je5pZuqnv7cKG/JWO/te1X0fqHpJs0m4kcB2d0DmdHgeGiHGV/P5b iaaOCzP3UwICky0T+hgw==; 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 1hxZRu-0005Yc-DH; Tue, 13 Aug 2019 16:15:02 +0000 Received: from ale.deltatee.com ([207.54.116.67]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxZRr-0005NK-4i for linux-riscv@lists.infradead.org; Tue, 13 Aug 2019 16:15:00 +0000 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1hxZRj-0008W3-Gj; Tue, 13 Aug 2019 10:14:52 -0600 To: Greentime Hu 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> From: Logan Gunthorpe Message-ID: <5506c875-9387-acc9-a7fe-5b7c10036c40@deltatee.com> Date: Tue, 13 Aug 2019 10:14:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 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: hch@lst.de, michaeljclark@mac.com, linux-riscv@lists.infradead.org, greentime.hu@sifive.com, olof@lixom.net, paul.walmsley@sifive.com, 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 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_091459_539258_13AA59E7 X-CRM114-Status: UNSURE ( 9.62 ) 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 , paul.walmsley@sifive.com, 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 12:04 a.m., Greentime Hu wrote: > I think flat mem doesn't support memory-with-hole scenario. > In mm/Kconfig, it says > " > For systems that have holes in their physical address > spaces and for features like NUMA and memory hotplug, > choose "Sparse Memory" > " > IMHO, the memory-with-hole scenario should only be tested for sparse > mem but flat mem. Fair enough. > The generic pfn_valid() is just for non-mmu arches. The generic pfn_valid() in asm-generic is only for non-mmu arches. > Every architecture > with mmu defines their own pfn_valid(). Not true. Arm64, for example just uses the generic implementation in mmzone.h. My main question is whether we can just do that. If we can't we should probably structure it like powerpc where they only use the arch-specific helper for CONFIG_FLATMEM instead of when CONFIG_SPARSEMEM isn't set. Logan _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv