From patchwork Wed Apr 3 04:30:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10882797 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 2B2601708 for ; Wed, 3 Apr 2019 04:31:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE34289A2 for ; Wed, 3 Apr 2019 04:31:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03C4E289CE; Wed, 3 Apr 2019 04:31:30 +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 AD24E289A2 for ; Wed, 3 Apr 2019 04:31:29 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=P2aDP1tXPtVyQxnsszgh2kDFgsVp1RebmNXRrZydZVU=; b=lyy/+sYosc/sJS962y6fSJmGsq VJFpZfYs2yZ6HnpnAh9rOw3bOgf+kWiaTwbh8ZMD4OtgOgZ2YqjTreiYFBk9CxY9zP4rILtXrMdk7 Gwr8dOtvEx2U8VkMhjoCybUmvT6exURz0e6qsFRX3g8gcDz96TYyUXTaPsvJZDCSqQt+FPJx+xpwa 9XcRW42d9oR4WUga3awHI9wdzBNFNk3VEZNSvtOUDmctc70ZyAvq5wRYEVO/0NUvOIQyra6znt3an +FaGrA8CpX99AO/w7rPq1GzXvHdesKuqyTjwGjtw8jfETkULxIeixKkaxg9GlFzx2GHbPMVbHu73b 4VPVXVNQ==; 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 1hBXYc-00055N-Nw; Wed, 03 Apr 2019 04:31:26 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBXY0-0004GE-RX for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 04:31:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 82E851596; Tue, 2 Apr 2019 21:30:48 -0700 (PDT) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.97]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0EB103F721; Tue, 2 Apr 2019 21:30:42 -0700 (PDT) From: Anshuman Khandual To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, akpm@linux-foundation.org, will.deacon@arm.com, catalin.marinas@arm.com Subject: [PATCH 6/6] arm64/mm: Enable ZONE_DEVICE Date: Wed, 3 Apr 2019 10:00:06 +0530 Message-Id: <1554265806-11501-7-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554265806-11501-1-git-send-email-anshuman.khandual@arm.com> References: <1554265806-11501-1-git-send-email-anshuman.khandual@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_213049_359332_DE16D3C4 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. 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: mark.rutland@arm.com, mhocko@suse.com, david@redhat.com, robin.murphy@arm.com, cai@lca.pw, pasha.tatashin@oracle.com, logang@deltatee.com, james.morse@arm.com, cpandya@codeaurora.org, arunks@codeaurora.org, dan.j.williams@intel.com, mgorman@techsingularity.net, osalvador@suse.de MIME-Version: 1.0 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 Arch implementation for functions which create or destroy vmemmap mapping (vmemmap_populate, vmemmap_free) can comprehend and allocate from inside device memory range through driver provided vmem_altmap structure which fulfils all requirements to enable ZONE_DEVICE on the platform. Hence just enable ZONE_DEVICE by subscribing to ARCH_HAS_ZONE_DEVICE. But this is only applicable for ARM64_4K_PAGES (ARM64_SWAPPER_USES_SECTION_MAPS) only which creates vmemmap section mappings and utilize vmem_altmap structure. Signed-off-by: Anshuman Khandual --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index db3e625..b5d8cf5 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -31,6 +31,7 @@ config ARM64 select ARCH_HAS_SYSCALL_WRAPPER select ARCH_HAS_TEARDOWN_DMA_OPS if IOMMU_SUPPORT select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST + select ARCH_HAS_ZONE_DEVICE if ARM64_4K_PAGES select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_INLINE_READ_LOCK if !PREEMPT select ARCH_INLINE_READ_LOCK_BH if !PREEMPT