From patchwork Fri Oct 5 16:16:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10628415 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 4E034933 for ; Fri, 5 Oct 2018 16:16:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34CE129A11 for ; Fri, 5 Oct 2018 16:16:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26A6129A22; Fri, 5 Oct 2018 16:16:51 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2B2229A11 for ; Fri, 5 Oct 2018 16:16:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA37B6B000D; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CAA696B0010; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B24576B000E; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it1-f197.google.com (mail-it1-f197.google.com [209.85.166.197]) by kanga.kvack.org (Postfix) with ESMTP id 864F46B000C for ; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) Received: by mail-it1-f197.google.com with SMTP id d194-v6so2699791itb.8 for ; Fri, 05 Oct 2018 09:16:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :date:message-id:mime-version:content-transfer-encoding:subject; bh=3A95gTC3UBhjFMbTrQi/maD+GSnteQXniK8/YyqhrUo=; b=bPrqXcX+od9BImED5Al1DO2oqPYuRa02or3QERXibfGTewxhpPYqECeS+T5MjJdpBe QXDHOqCk9ihCP+Bg8CdqRhwcOC3hT6tLOYKpSng8G3sJGf3GSZCDyniDvjJdHThCr9mR yZvWB2b5XfPV5N2K7Wv2UYfh5MrtZXjZuVcooNTTBtW9B38yQQbwd7fVSf0Up44X0FOp 4wFh7o973iLoQ5mYslvXGmktpJocmzN+WuSlMI/bNuJN4WViSGEApMdsqzim9itdapUi lBw9tGbtI/V/OlQe79y6v7GVdpANn7vLNFOePG8OfMeLJjpLLoxxBMaeGaH8ty9a+ooe IA7w== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-Gm-Message-State: ABuFfohHpWlmjIrqhvUckggVL4K2NGpfknPpJQbZ1idFA0Q1qJvOYb+C qNRitpdEUr5RduSVE/Ilalpq1CFSMIF5jQlAufc05shui/6jqXH4Tb/m/gD4cH7+v6an6K5lIV6 QMnHtweDfo4iusvKq+CjxPEK9yKrNI059PgIxCAhVfEJNFGmJhJtsL+wymxJ68vFX8Q== X-Received: by 2002:a05:660c:40e:: with SMTP id c14mr8337710itk.119.1538756208204; Fri, 05 Oct 2018 09:16:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV60qaWFMfcZRGKaCo6m16mQOUGA0n0cKH8J5H0Hf4DLG/UEDPCd6fzMf+Wt59nIfjXKbyVm/ X-Received: by 2002:a05:660c:40e:: with SMTP id c14mr8337661itk.119.1538756207388; Fri, 05 Oct 2018 09:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756207; cv=none; d=google.com; s=arc-20160816; b=Boq5DvPSr2ofcit4CWXfmm9/Qk8hdAanZCH6G0szI2lIJYNdmTITysP6zfRryldm4Z +DQGhYCOqXIQQm2fZXlC9Q8DfwF5cnU5B+H41iuMvr64kLhM4vg/9Sa9xdt1xQ35tPEI ghCLNzrjaTRNbVJGRRMXkQ0R/oCB8bInL2ccWV4RbnQ7NlZ62PirV3j/aw0vXLLVrcmq JkbU4n25DUs4u2JCzInhiQCJ8/KAprKrPiNJKY9sPtgO1JHw/UH0XaEZQQeq5RMaPiwZ ojZ2Khw53AD5OlmV47oNQxXp1UNUUufr3yIKvQihTVGE1PnZCiGK4Kl9mTikRnR+6Yjf 2cFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:message-id:date:cc :to:from; bh=3A95gTC3UBhjFMbTrQi/maD+GSnteQXniK8/YyqhrUo=; b=VDfNEcCHKv7jSmFSvqA+zUVbpFYzqZbQfej+1aoMAMXSV0XvWao+qMmDYDaxlQw6kn TO18KxnCadolVLazdd6b4GO2P0T3oH374mArqOZNF4KbPc9nhGJEDXiQDFYwBXmZT16+ hVFWsEDbJnv61+zIc1HcdMEFRZvi+/mv1IpY9TgLmt8a1zce9oeBwFjjwe/OL6ZjOyiy Jwtz6E6j8xbWhb0fu5b+mhusCYQY7ZizaMFLoHoSgq2YJqd1ld/i+UKgR6ob8c55xkAw COnOYrkLy2N6Datnb9z850EgW5jaAzVSKJNqE9whwo2Urz+m/fAhhrjDLZ/bXV/V6V44 xmKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by mx.google.com with ESMTPS id s77-v6si6284203jad.70.2018.10.05.09.16.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Oct 2018 09:16:46 -0700 (PDT) Received-SPF: pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) client-ip=207.54.116.67; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com 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 1g8SmS-0008D1-Iy; Fri, 05 Oct 2018 10:16:45 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1g8SmR-0000eV-S9; Fri, 05 Oct 2018 10:16:43 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Cc: Stephen Bates , Palmer Dabbelt , Albert Ou , Christoph Hellwig , Logan Gunthorpe Date: Fri, 5 Oct 2018 10:16:37 -0600 Message-Id: <20181005161642.2462-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-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, sbates@raithlin.com, palmer@sifive.com, aou@eecs.berkeley.edu, hch@lst.de, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH 0/5] 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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Hi Everyone, This patchset is intended to implement sparsemem on RISC-V. The first few patches are introducing a common helper used by the sparesmem implementation in other architectures and the final patch is the actual RISC-V implementation. This is the first small step in supporting P2P on RISC-V. Thanks, Logan --- Logan Gunthorpe (5): mm/sparse: add common helper to mark all memblocks present ARM: mm: make use of new memblocks_present() helper arm64: mm: make use of new memblocks_present() helper sh: mm: make use of new memblocks_present() helper RISC-V: Implement sparsemem arch/arm/mm/init.c | 17 +---------------- arch/arm64/mm/init.c | 20 +------------------- arch/riscv/Kconfig | 23 +++++++++++++++++++++++ arch/riscv/include/asm/pgtable.h | 24 ++++++++++++++++++++---- 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 +------ include/linux/mmzone.h | 6 ++++++ mm/sparse.c | 15 +++++++++++++++ 10 files changed, 89 insertions(+), 46 deletions(-) create mode 100644 arch/riscv/include/asm/sparsemem.h -- 2.19.0