From patchwork Wed Jan 9 20:39:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10754909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA1D413B5 for ; Wed, 9 Jan 2019 20:39:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9F5D28646 for ; Wed, 9 Jan 2019 20:39:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDB6829614; Wed, 9 Jan 2019 20:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 71DE628646 for ; Wed, 9 Jan 2019 20:39:23 +0000 (UTC) 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:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LnkI36nefWNj5lrBYWmmfsE+oKz6+x9xdp8WUc3vBZ4=; b=cB+DA9rAomJjrY LZ6PbF9/x2aFZk7mgTRTk2e9Hi5h9XgOb4PpYZt+A8k8ALsgrxSRFGjdICgzCG8qV5a/NYx+PzuOp EovV+Imjl4qD6dZrd1Z2yjzoEMlb8BI+sRX8mHgTTtR5+CStDOFOio1UcMMIyXpvOFNgi1C7q9F2o HBZ9cY5DYM3MECv8K/4eMyjDVBH1RmjX1ANNWgdaoc8FzBP28h71YERveMnDNfHcZt3KvVHE19Jzw rliOHONeH3ZwU0jN4yhFNUb8Rf64udzvO3NTT4hF68QQ8+i7kL8jGrMmzMXBij6wv+RGynZHX8JHS 58ZbtiR3xxmZxsmuTLHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghKdG-0000le-Fo; Wed, 09 Jan 2019 20:39:22 +0000 Received: from ale.deltatee.com ([207.54.116.67]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghKdB-0000ky-Tb for linux-riscv@lists.infradead.org; Wed, 09 Jan 2019 20:39:19 +0000 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 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 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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190109_123918_010631_803E3B6E X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Palmer Dabbelt , Logan Gunthorpe , Christoph Hellwig , Stephen Bates Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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