Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1099407ybl; Wed, 14 Aug 2019 10:41:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqye2SlLxQTm6zFm7220IpTBRrcBf3Broq5tDIDNu/GB9Pvcf9HWozMu0TOXvLBUFKLm4cAi X-Received: by 2002:a17:90a:b102:: with SMTP id z2mr820178pjq.91.1565804506659; Wed, 14 Aug 2019 10:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565804506; cv=none; d=google.com; s=arc-20160816; b=FgjYdaL+TB4Ub88aRla/n5oLQ15XVUdQkUV3V5SEL5cVkgSs7H3uI27M0oUSOI33HX zu51aKictWpAbxU7Y+YXKFaknW42JoGcdAayecnzLgsXlYClBpO+kqM3y2ZEM8Gc6mM0 5HaXG8eInmqYTSYgX6qlgJku0T0t8SYP2nFQaw9MzZxwDY99r/pfzNjasmA3bc6RObb1 JeLDIbWfzQNNfns7rrmmnU0p74XYfUC/0djVPkEMlNr81a3vOoxeSmBLR3wnPrzjghKM HThC0xlEUfOvhtp8Va9GJiLFXZaAletSC9T5rRbBIe5KqjXv5WCBeYUGZArdOlm4xNxA aOAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=fP44QmXwF6Mg2mIRi/RT9fhyHn5OWWxhydLg4BD1uS4=; b=AvzHyIGLxjBrRNxTpNqSYPLee9aI7nwumEWKGqnSXiaXKWX2jrha8XhlvyVgPgC1Um 4YF8ed+2K8b80mal0cvKQ3C71//fA+ytn5xySRmDJzI2mRi5DMC9HFTvJRi0Rz2aFi/5 JRoktXxQUizh1/gpr6JjkJgLZoki/FX/1iaTpj4tysBwwRAh8S/w3bfyfyzWQ9BpoO2U P3yHgkLSgjf5lh0FkTfiVydPlKwL4FjfbCFMoYP3w1jbCwVJ35MwaJkBvkZbrBjnyeBN hrzSR4R6/ygcyXTX3DamVFXUsby00G0burLBndjh1HZ7kBOW0NwXjms+rpHTtbPEXgZU v6AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=PI7xit+d; 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 q145si151530pfc.31.2019.08.14.10.41.30; Wed, 14 Aug 2019 10:41:46 -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; dkim=pass header.i=@sifive.com header.s=google header.b=PI7xit+d; 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 S1728520AbfHNRki (ORCPT + 99 others); Wed, 14 Aug 2019 13:40:38 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:33589 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728348AbfHNRki (ORCPT ); Wed, 14 Aug 2019 13:40:38 -0400 Received: by mail-oi1-f193.google.com with SMTP id u15so74096677oiv.0 for ; Wed, 14 Aug 2019 10:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=fP44QmXwF6Mg2mIRi/RT9fhyHn5OWWxhydLg4BD1uS4=; b=PI7xit+dZLXUlxKvwo/gXsJQxdoTcrfr0UA3Utn7IenDX7G8/2TcQ9ny8Pg3hFd7rV +vNYAmF+4TkNzo0Zy8YvBIiJMjk/LVE6otiLKnLO2xVODtsqGqSk/ivbhqUCQj+Stuak y/HotcGdP+uXTvZbmUMY3IxzZMYtEFyIm+sCFR0xh43HsUtJ3cjAuFnDwI1I9kJDukZT RSOFFMYbzrx4JjLJJvmqT1Ou8pRDdAkAeuz1RlyFAwjQYd1RSfL/Xa+uoKQzlvmM6Hnb SF/MCnq5UyD1l1YLZAsxcfl5eZceDDekHEm7WMGjP+ULqtHsAaecBNiWmd6j+D5D9RMM qCCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=fP44QmXwF6Mg2mIRi/RT9fhyHn5OWWxhydLg4BD1uS4=; b=ph6MLehdg+HYMmuIeTcr8zlDG6YOiewGdfawUUwkZxm8cAOi1BVScAUcOOaq/AhIYn X3tVbYsKhuMbEyL70B0JNay3ymqYiT+mteFscVhWojdMn7e1YS20raZC8pFMUFhMfSL2 LRh8/4eSGQKG0zkmnlBqdUN6OwlkXaXIyoynIbDazv21rvV3q/fWDuk24yAg2hmn0gID bEJ5mGOIbq6H/tASoOf9rFNo54ax44vtuukQ35K+rQyiaLwXeWcjTrLuUKF8j4f7s8y3 F3R+GCplvZ/VPqOMJ0dgZl5v9oPdtBd0vSy7AqLxwSyZPtm9uDudJKg4C464q8GGeCe4 YZFA== X-Gm-Message-State: APjAAAUf6ggzcDaixb9le7hh9PiG1NohhhTwLAx6puFFg8bIyPiTctQT LKv5LRqlFewLQdOkHSxUmQB9iw== X-Received: by 2002:a05:6638:52:: with SMTP id a18mr475292jap.75.1565804437448; Wed, 14 Aug 2019 10:40:37 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id a7sm270991iok.19.2019.08.14.10.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 10:40:36 -0700 (PDT) Date: Wed, 14 Aug 2019 10:40:35 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Logan Gunthorpe , Greentime Hu cc: Rob Herring , Albert Ou , Andrew Waterman , Palmer Dabbelt , Linux Kernel Mailing List , Stephen Bates , Olof Johansson , greentime.hu@sifive.com, linux-riscv@lists.infradead.org, Michael Clark , Christoph Hellwig , linux-mm@vger.kernel.org Subject: Re: [PATCH v4 2/2] RISC-V: Implement sparsemem In-Reply-To: <0d81412d-73fc-fa56-6f84-dedda72b9cc6@deltatee.com> Message-ID: 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> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. - Paul