From patchwork Thu Jan 23 05:56:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 11346777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E7A2921 for ; Thu, 23 Jan 2020 05:55:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5545A24676 for ; Thu, 23 Jan 2020 05:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5545A24676 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5FA656B0003; Thu, 23 Jan 2020 00:55:23 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5A9FB6B0005; Thu, 23 Jan 2020 00:55:23 -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 4C0026B0006; Thu, 23 Jan 2020 00:55:23 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 361186B0003 for ; Thu, 23 Jan 2020 00:55:23 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id B300649960B for ; Thu, 23 Jan 2020 05:55:22 +0000 (UTC) X-FDA: 76407836484.10.root21_862a71f3e8b37 X-Spam-Summary: 50,0,0,bb0d8c235ebc56fd,d41d8cd98f00b204,anshuman.khandual@arm.com,::anshuman.khandual@arm.com:catalin.marinas@arm.com:will@kernel.org:mark.rutland@arm.com:paul.walmsley@sifive.com:palmer@dabbelt.com:tony.luck@intel.com:fenghua.yu@intel.com:dave.hansen@linux.intel.com:luto@kernel.org:peterz@infradead.org:tglx@linutronix.de:mingo@redhat.com:david@redhat.com:rppt@linux.ibm.com:mhocko@suse.com:willy@infradead.org:kirill.shutemov@linux.intel.com:akpm@linux-foundation.org:dan.j.williams@intel.com:pasha.tatashin@soleen.com:linux-arm-kernel@lists.infradead.org:linux-ia64@vger.kernel.org:linux-riscv@lists.infradead.org:x86@kernel.org:linux-kernel@vger.kernel.org,RULES_HIT:41:69:355:379:541:800:960:966:967:968:973:988:989:1260:1261:1345:1431:1437:1534:1542:1711:1730:1747:1777:1792:1963:2196:2199:2393:2525:2565:2682:2685:2693:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3867:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3 953:3956 X-HE-Tag: root21_862a71f3e8b37 X-Filterd-Recvd-Size: 4153 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 23 Jan 2020 05:55:21 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E77801FB; Wed, 22 Jan 2020 21:55:20 -0800 (PST) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3BE6B3F68E; Wed, 22 Jan 2020 21:55:14 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Tony Luck , Fenghua Yu , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , David Hildenbrand , Mike Rapoport , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Andrew Morton , Dan Williams , Pavel Tatashin , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] arm64: Enable vmemmap mapping from device memory Date: Thu, 23 Jan 2020 11:26:26 +0530 Message-Id: <1579758988-18520-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 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: This series enables vmemmap backing memory allocation from device memory ranges on arm64. But before that, it enables vmemmap_populate_basepages() to accommodate struct vmem_altmap based requests. This series applies after latest (v12) arm64 memory hot remove series (https://lkml.org/lkml/2020/1/16/46) on Linux 5.5-rc7. Changes in V1: - Added an WARN_ON() in unmap_hotplug_range() when altmap is provided without the page table backing memory being freed Changes in RFC V2: (https://lkml.org/lkml/2019/10/21/11) - Changed the commit message on 1/2 patch per Will - Changed the commit message on 2/2 patch as well - Rebased on arm64 memory hot remove series (v10) RFC V1: (https://lkml.org/lkml/2019/6/28/32) Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Tony Luck Cc: Fenghua Yu Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: David Hildenbrand Cc: Mike Rapoport Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Andrew Morton Cc: Dan Williams Cc: Pavel Tatashin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-ia64@vger.kernel.org Cc: linux-riscv@lists.infradead.org Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (2): mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages() arm64/mm: Enable vmem_altmap support for vmemmap mappings arch/arm64/mm/mmu.c | 65 +++++++++++++++++++++++++++++----------- arch/ia64/mm/discontig.c | 2 +- arch/riscv/mm/init.c | 2 +- arch/x86/mm/init_64.c | 6 ++-- include/linux/mm.h | 5 ++-- mm/sparse-vmemmap.c | 16 ++++++---- 6 files changed, 66 insertions(+), 30 deletions(-)