Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1178058imu; Wed, 9 Jan 2019 13:07:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN446dVVtjWtRXele6YgsD1Fpcba9bHvae0TkMpZ90vjci//kZ7k97X1mTPzDz1kf0yPpaU2 X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr7684061pls.315.1547068056917; Wed, 09 Jan 2019 13:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547068056; cv=none; d=google.com; s=arc-20160816; b=wnyXu773u79frNtdaBMAlndRtItJOvGpzrK0siOOe8IkjXhAE7oEGM5P2gDSBRWr6q sAmDAsresOkaTemEfdM1fHEYUIKws5a5rZriyzd297bSSC20RiW70tw3x8GTldmpDQA1 UxHCbGCuOKj2o7w/vz4nUEqDpoTTU7uKU9I6EO7OWsLUVYm4QY8g+NdeG8w0sGZlrRNj L6Usau4FmVZjQTP8c7eZnSNq856zV8j0PxC+YP+OoD5ebe+YIx3FNTwcC5hiryjCRvEJ N0tVsI/3YYcE0alan5zFnG3/GW0ZGYkuL6018HXMpLztOXDJtZ/ptAX4OOESRHPl9lya RZOw== 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 :mime-version:message-id:date:cc:to:from; bh=RBaJY+1DvUK/zfNbNeXls4uBwr3FC3bICJULrNFBA+I=; b=B/3lw6gjWbMF4CHCjOpQ45ibWNgYDYz3WK+/8Ap0zMd9ayTNQbyd+MW+aI+6WU+xx7 n+4Sss9NuInfIQeeeFHuzosPw6NS1vRO56ilkZJRxvbsw3C/I+YwSWJIsxcAAbsvipC8 lrjVmkJK0xSZVoy7+LegVVJbK1vZm9beQoJaqLNk2e8aJv8rmv+1JLttDtlcqmbgNJ39 CRlv9DbQhIojTwps5hUEWQJk5ZcyOjaGc95Ezr5xKL0+1+tLMeiFbygsV3BCPLZfP91o B4NtuB3RlHBbMcqZBE5sY9igKz6UhCGPUVOaDMt3ilPSyRTF0A3z0BVd1aPek2djsXV6 BAfg== 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 z10si9614906pfm.37.2019.01.09.13.07.21; Wed, 09 Jan 2019 13:07:36 -0800 (PST) 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 S1726855AbfAIUjS (ORCPT + 99 others); Wed, 9 Jan 2019 15:39:18 -0500 Received: from ale.deltatee.com ([207.54.116.67]:60384 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfAIUjR (ORCPT ); Wed, 9 Jan 2019 15:39:17 -0500 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ghKd9-0005yg-US; Wed, 09 Jan 2019 13:39:16 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghKd9-00023x-Ai; Wed, 09 Jan 2019 13:39:15 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Stephen Bates , Palmer Dabbelt , Christoph Hellwig , Logan Gunthorpe Date: Wed, 9 Jan 2019 13:39:09 -0700 Message-Id: <20190109203911.7887-1-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, sbates@raithlin.com, palmer@sifive.com, hch@lst.de, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@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.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH v4 0/2] [PATCH v2 0/6] sparsemem support for RISC-V 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 This patchset implements sparsemem on RISC-V. The first couple patches from the previous version have been merged into v4.20 and the ARM patches have been sent separately to the ARM maintainers. These are the RISC-V patches only. This is the first small step in supporting P2P on RISC-V. -- Changes in v4: * Rebased onto v5.0-rc1 * Changed the SECTION_SIZE_BITS to 27, per Nick Kossifidis Changes in v3 (only sent the common patches): * Rebased on v4.20-rc1 * Minor fixups * Collected Ack from Will Deacon Changes in v2: * Rebase on v4.19-rc8 * Move the STRUCT_PAGE_MAX_SHIFT define into a common header (near the definition of struct page). As suggested by Christoph. * Clean up the unnecessary nid variable in the memblocks_present() function, per Christoph. * Collected tags from Palmer and Catalin. -- Logan Gunthorpe (2): sh: mm: make use of new memblocks_present() helper RISC-V: Implement sparsemem arch/riscv/Kconfig | 23 +++++++++++++++++++++++ arch/riscv/include/asm/pgtable.h | 21 +++++++++++++++++---- arch/riscv/include/asm/sparsemem.h | 11 +++++++++++ arch/riscv/kernel/setup.c | 4 +++- arch/riscv/mm/init.c | 8 ++++++++ arch/sh/mm/init.c | 7 +------ 6 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 arch/riscv/include/asm/sparsemem.h -- 2.19.0