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: 10673075 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 7FF7414BD for ; Wed, 7 Nov 2018 20:54:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72BBD2D1D3 for ; Wed, 7 Nov 2018 20:54:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66FB92D1CE; Wed, 7 Nov 2018 20:54:41 +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 029DD2D1D2 for ; Wed, 7 Nov 2018 20:54:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C6BA26B0565; Wed, 7 Nov 2018 15:54:39 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BF44D6B0567; Wed, 7 Nov 2018 15:54:39 -0500 (EST) 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 AE4D96B0568; Wed, 7 Nov 2018 15:54:39 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it1-f198.google.com (mail-it1-f198.google.com [209.85.166.198]) by kanga.kvack.org (Postfix) with ESMTP id 816846B0565 for ; Wed, 7 Nov 2018 15:54:39 -0500 (EST) Received: by mail-it1-f198.google.com with SMTP id s195-v6so4152229itc.6 for ; Wed, 07 Nov 2018 12:54:39 -0800 (PST) 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=R4Izts2P2Ifk2FxnuILJiJT1RAXIShGsS/Lf7lqM0fU=; b=GWyxf76z++MNZe1+/TTmWQpJ4/piSVB9E1HzLE2PBAg1X5I5QtNvnzsW/cCsHGAlAV RW9egUey7TIIOLX14tMTgiLJQqLBozlbSc5ics03vEgrsZR1yTwa4KOZX3gntYDKVO6N 1tf2UDfotTi5DD/P7fQjHkelZlWZbKGuQ/QFeRPdvhHgiAtbInRGMD2pn2WSKaqPSHrM xI0kC9JWPNdny/9RlfY1hogYnLUH/ThNGyksBmIaEFo9v8Lp6lnWhUxkXNH/0tq56i8X Nhgfcv7Px759ny4RCFjB7waMUjdYlrlSKYPc91aTxhX58qy1hxvmA35cajswooWetdGv 98pQ== 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: AGRZ1gKFKYNapHkUnoSChn0EX2Q5LtrMivoggKMnwkiZOOK3dWh3Jc7U w0Zc7LORl3LX7UoW96T3LfNF0IECcJGIeIDqmItpo+VW8mMe018bVB6ZSc1oj3MV2ZyN6Zydvit VLymrMxVGytEs++Ye2s1vVm8TwzB5efz6rnuOk3Fql490p8S4JvNBHtqkHKJ1LH7aKQ== X-Received: by 2002:a6b:f014:: with SMTP id w20-v6mr1449188ioc.12.1541624079271; Wed, 07 Nov 2018 12:54:39 -0800 (PST) X-Google-Smtp-Source: AJdET5e+osRWQHIOuF4ZmlbRi4/PfJc20KhpMKN2PtSuH9WljxuIOBKxHTuPKXGX38mxC7kcTPM+ X-Received: by 2002:a6b:f014:: with SMTP id w20-v6mr1449154ioc.12.1541624078451; Wed, 07 Nov 2018 12:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541624078; cv=none; d=google.com; s=arc-20160816; b=eqGO0u07t0U0oz24dTjU/9MdSPk1/J2iexGh9DskSDjCWDrm1KFF2ufV5sYI4OAFHO LLOUfHnnJFr1njhczsbCVjfWGFRLukiku/a0PS2zuDGxfB/13J87tqjS5RUJGdTaN1zD AscHs5xdMWG48bj30Rlht7tOn7KYYasCUFrC/khplysU7CbLv4ME6vszmb+Mp1wib9K2 ZWVKUzj7kkj82brRsw5uf/YCGIYAK+wSFONL8e95T9a5yvxfbnAN1w7YuJlGwyIZpYZe znYdbGleMIKWQjN0wT52n63EjcOj/8vlfgD/tPnh5P2t3PkW5hv8uqpxy5mRAThUyzVh PyPQ== 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=R4Izts2P2Ifk2FxnuILJiJT1RAXIShGsS/Lf7lqM0fU=; b=fhqOl4b26R5Z1JdWeI3NZtJNU9LzLdlDb02rq+Wm5ztk491ko8KsJ8QmHJV2EBA2I3 SZuHvdJ6tz9o4zXWVxVSbnu/Vkxf57noZwqhAsE3r2ifLTprKarlMVAyArPjVyTAp8nv PNpqZbEeHFu37aGK4TDo/Rtm17mC5o6Ffcp72xVKd0q7ljg0+vNCGvjpMyRy0V9gSOZg U9yGlf3BOYIXGTwPddVngRFnLxp6JREIgvbbYP4TGzBorvdgRUg92kIiw2Ul1qOfz3dj Rzi+612ZX9ACKLqVKAsa28oZByFjB0AIRtOWzjnB+C0Uz9FExem9Io384ER9yNxtMvq0 wTLA== 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 h66-v6si1106793ioa.16.2018.11.07.12.54.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 12:54:38 -0800 (PST) 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 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 Cc: Stephen Bates , Palmer Dabbelt , Albert Ou , Christoph Hellwig , Arnd Bergmann , Logan Gunthorpe 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-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 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