From patchwork Wed Nov 7 20:54:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10673091 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 473C114BD for ; Wed, 7 Nov 2018 20:55:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3823B2D1E2 for ; Wed, 7 Nov 2018 20:55:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C6062D1EE; Wed, 7 Nov 2018 20:55:44 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 D667E2D1E9 for ; Wed, 7 Nov 2018 20:55:43 +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=whSdTK7Rqnwfr4skblUvtea1OZyjXNmAMH3VZ4g41Qo=; b=WrXK7vzagN7D7x fz+vfMZz5fODhZNQzTZ+boSrmUtEC+5N+FMIKn1PjwpzmTZkOsqoWDcOjJtFHSbgbip3MClYp6y9I ovZEao4ik4ZO4JFpvexF9fvi/n83X0EmymcYBnzJrVncWrzI+sLL5SiiuDb2itXucIBTKnnAzp18T pf0GuY8Ek6diWQr3E1mHnPPEcHSz7BsEfNyaoCtiOAfffuDwAw+1GZdTBn3sD4A4V1M9bwDMPnnpy zkLHLXn5cOWwazx8FYu+isP8c9Rh9C5R0Ojc3TQG6bDOaYWywJvQWO7aVN1FsEPfxoWDV7+S4EAk3 S/zxWnZNMZIs2a2tVrXQ==; 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 1gKUrV-0000WU-K8; Wed, 07 Nov 2018 20:55:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKUql-0006su-Mo; Wed, 07 Nov 2018 20:54:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Subject:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=R4Izts2P2Ifk2FxnuILJiJT1RAXIShGsS/Lf7lqM0fU=; b=lvPHIw/x/m22tE1opQj5XBANQ oy7T6e6/1eGwBoK3yXuyrVkl1obUosJhGcq5Pf2YuOpTaLrPaU/d0pV3MBkPJScr6Mxr0456QlPi/ TZHNXHVoHG9fjMI0BuMUPRgmRN1+CpCvKWNsmW/ESvawcPflRGi6Js4JOcFa6pvrOVV4OvDluauhZ Z8MOhJF17gggZVoC7lWHAS8RbWC8W2+nPKccz4WHyLi3rhx5iSDQCTz6rHildoSikanuo/ZzOwC7E OH4ODw+VjwxkuNuz7H+aYCsDXw8hQT59ePqRZar30bb64n9wSnGFWQaeyFO7LeYY05z+fHUWX5PIK 4UweHojWQ==; Received: from ale.deltatee.com ([207.54.116.67]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKUqh-0002vf-IZ; Wed, 07 Nov 2018 20:54:54 +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 1gKUqS-0005zG-Dt; Wed, 07 Nov 2018 13:54:37 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gKUqQ-00011F-4e; Wed, 07 Nov 2018 13:54:34 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, Andrew Morton Date: Wed, 7 Nov 2018 13:54:31 -0700 Message-Id: <20181107205433.3875-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-arch@vger.kernel.org, linux-sh@vger.kernel.org, akpm@linux-foundation.org, sbates@raithlin.com, palmer@sifive.com, aou@eecs.berkeley.edu, hch@lst.de, arnd@arndb.de, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v2 0/2] Introduce common code for risc-v sparsemem support 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-20181107_205451_765658_0CE76AF7 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Arnd Bergmann , Palmer Dabbelt , Stephen Bates , Logan Gunthorpe , Christoph Hellwig Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These are the first two common patches in my series to introduce sparsemem support to RISC-V. The full series was posted last cycle here [1] and the latest version can be found here [2]. As recommended by Palmer, I'd like to get the changes to common code merged and then I will pursue the cleanups in the individual arches (arm, arm64, and sh) as well as add the new feature to riscv. I would suggest we merge these two patches through Andrew's mm tree. Thanks, Logan [1] https://lore.kernel.org/lkml/20181015175702.9036-1-logang@deltatee.com/T/#u [2] https://github.com/sbates130272/linux-p2pmem.git riscv-sparsemem-v4 --- Changes in v2: * Added a comment documenting the awkwardly named memblocks_present() function, as suggested by Andrew. -- Logan Gunthorpe (2): mm: Introduce common STRUCT_PAGE_MAX_SHIFT define mm/sparse: add common helper to mark all memblocks present arch/arm64/include/asm/memory.h | 9 --------- arch/arm64/mm/init.c | 8 -------- include/asm-generic/fixmap.h | 1 + include/linux/mm_types.h | 5 +++++ include/linux/mmzone.h | 6 ++++++ mm/sparse.c | 16 ++++++++++++++++ 6 files changed, 28 insertions(+), 17 deletions(-) -- 2.19.0