Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1104906ybl; Wed, 14 Aug 2019 10:47:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqztJ3uczXMnM40U6KR7XMh5DejjqWmFgaQyGeYtNCuVvojjxRf7vGelSijWCuNK2v/BjGHF X-Received: by 2002:a17:902:6a8b:: with SMTP id n11mr520378plk.263.1565804858958; Wed, 14 Aug 2019 10:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565804858; cv=none; d=google.com; s=arc-20160816; b=GMgCCs/K3MVl8rOxNh+JEkBFv43eFOgO4dtTTjWG1Wi7QGKrW3qYTjUXC8eVrnSLlf qhNJfvB/oOsebTEHHKP0leJk+SCQKMfcuMkq3bbzYbA7QxlS+5QHuPm9afmedp514FFu QJD3q/gGVm2ZTX+YKBH1m0/jyKb20fjK8it1fqLLvRBGGqunY+4krkH2FIHwIXuEozGh RdWTPYrf5y0KBhtsDAuE2MMSQilad4AtWNupAwpuK9myXvjHW+0TmPDLo7FRUj4GGOP7 JD7vgwP0Er2QahoSK/G9K5IwtDLVVXnJy6dtvRgz7tsgjZPve7Hkn+La4qOCI01xVYwX YYug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=y/HZUBJqK5eF4U88eWSR4iJGxxv3Y1xRTquuiBkU6RQ=; b=k7t3ExQ/4vpflXu9bC0pTDCOMMjarXe/lPtyKgqIIwS1X2a4uhDUw370OKt1vyMQoe PlcUEu8GSkfzMaESGGsvwLyHoB0I0798r/28ib5w+lj40szxImEn58Z753NmwK/2sUzm wnA4HT3K8EPhPcTrTrAoYTwTQENzGd7x5XJhdoXBQELfnqVkdZ0rSbtroBF26vbriA2/ DMqP5TAvk7yPA4xxiOEWswPwKM9jDn1tpsL9t6KVJD6UxDd3MKX5QY3yDtOre7qT18n4 rN+ZSrODnpFqaRKT4xe92oTKgexa4R0F4kRAgeNVnRAyh6ttaivT3Tl6vlKQGs2D2aYi HlPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t189si226873pgt.428.2019.08.14.10.47.22; Wed, 14 Aug 2019 10:47:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728428AbfHNRqb (ORCPT + 99 others); Wed, 14 Aug 2019 13:46:31 -0400 Received: from ale.deltatee.com ([207.54.116.67]:38028 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfHNRqb (ORCPT ); Wed, 14 Aug 2019 13:46:31 -0400 Received: from s0106ac1f6bb1ecac.cg.shawcable.net ([70.73.163.230] helo=[192.168.11.155]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hxxLt-00009q-1D; Wed, 14 Aug 2019 11:46:25 -0600 To: Paul Walmsley , Greentime Hu Cc: Rob Herring , Albert Ou , Andrew Waterman , Palmer Dabbelt , Linux Kernel Mailing List , Stephen Bates , linux-mm@vger.kernel.org, Olof Johansson , greentime.hu@sifive.com, linux-riscv@lists.infradead.org, Michael Clark , Christoph Hellwig References: <20190109203911.7887-1-logang@deltatee.com> <0926a261-520e-4c40-f926-ddd40bb8ce44@deltatee.com> <96156909-1453-d487-ff66-a041d67c74d6@deltatee.com> <5506c875-9387-acc9-a7fe-5b7c10036c40@deltatee.com> <0d81412d-73fc-fa56-6f84-dedda72b9cc6@deltatee.com> From: Logan Gunthorpe Message-ID: <26594413-227b-2cc8-0f61-232a6a3907d0@deltatee.com> Date: Wed, 14 Aug 2019 11:46:23 -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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.73.163.230 X-SA-Exim-Rcpt-To: hch@lst.de, michaeljclark@mac.com, linux-riscv@lists.infradead.org, greentime.hu@sifive.com, olof@lixom.net, linux-mm@vger.kernel.org, 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 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-14 11:40 a.m., Paul Walmsley wrote: > On Wed, 14 Aug 2019, Logan Gunthorpe wrote: > >> On 2019-08-14 7:35 a.m., Greentime Hu wrote: >> >>> Maybe this commit explains why it used HAVE_ARCH_PFN_VALID instead of SPARSEMEM. >>> https://github.com/torvalds/linux/commit/7b7bf499f79de3f6c85a340c8453a78789523f85 >>> >>> BTW, I found another issue here. >>> #define FIXADDR_TOP (VMALLOC_START) >>> #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) >>> #define VMEMMAP_END (VMALLOC_START - 1) >>> #define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE) >>> These 2 regions are overlapped. >>> >>> How about this fix? Not sure if it is good for everyone. >> >> Yes, this looks good to me. I can fold these changes into my patch and >> send a v5 to the list. > > The change to FIXADDR_TOP should be separated out into its own patch - it > probably needs to go up as a fix. I don't think so... VMEMMAP_START doesn't exist until the sparsemem patch so it can't be changed until after the sparsemem patch and no sense adding a bug in the sparsemem patch... Logan