From patchwork Thu Apr 26 14:27:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 10366117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 732DE601D3 for ; Thu, 26 Apr 2018 14:30:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B3F5291A3 for ; Thu, 26 Apr 2018 14:30:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54914291FA; Thu, 26 Apr 2018 14:30:17 +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,DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI 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 750B6291A3 for ; Thu, 26 Apr 2018 14:30:10 +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=AGApxYH5LHLCltSyPP6n/N+dZGp6EaC6YuMzdfxl9tQ=; b=Rxb1ul1PitR1r7yfmrkkRihprk ou0Yl5lnIMwa0pH70+KQS6HzYxIWeox/reIqlAULji/ETpqxak/isQ9ZOtS1bI4TmaPe/RNmN0jtQ meF0sjzJyzqeGLSM/1L3RoQVUwzaDT9BIuwFKcD5DGynEGioSphQ261PIlkC0Zf+WuTlWrDULMBdh wQyhyOXDuN8eHSG3wKBLgxz65x4AXkdsi0gkD1i+ufEX88GZfYJfSBagLqQIGM3Novb0B6Lxx5ej+ zfYc0DvuRvdo2lY8a8du+PKo3rogN19KClw98dOEjw5ife/e+wmSITaY+NcxYSt+DiGiG1tR8x0x6 ZxHZ0BRw==; 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 1fBhuI-0008Gc-ON; Thu, 26 Apr 2018 14:29:58 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBhtP-0007hA-QU for linux-arm-kernel@lists.infradead.org; Thu, 26 Apr 2018 14:29:10 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CCFD720FED; Thu, 26 Apr 2018 10:28:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 26 Apr 2018 10:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XB2/KI/4YqFvG33L7 srr/3b23qYpdzAVd++sR+K44Qs=; b=QEuhs8rRKNRpiJlcXOHkj4K6H8WEcZRGU OW0iBKGaiVb36O6LwxsvJYWcOkGm61G/i6vcGeJ0zJFfQZq/TUkoPjUcorWf0D3W rn7lA/epAlR14BCE6D4IhO0tG3Hy2jYc8tpqrm85JtQ9BllltcdPKj8I7l+f3dWe NUnU0lIDXdv/vu36H3tEE65P/w5TdcrAy7YXX5CRtZrGHaP2NXB0nnJ+Dh+hKduq AfPjauHzZ8ZMVqBc3UZ6IkcPqXDrZ9QBGIUNj0vl4EPc1hmadDxjCOrUehQF0nn6 XZH91UqD3PRh0VQ37/eojgGxP0su6bLMQQRAJEC6t5DVcCiUnkolA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=XB2/KI/4YqFvG33L7srr/3b23qYpdzAVd++sR+K44Qs=; b=kaT9B+zP kJHdQI5Z7qXge8e5ihYeHRx6O0eh+h9dBUfme+qiY2sq3ToPzv+LmqvU1sZ7fcYf LE5kZlJ4IPfdM/oiIr3PGFWUOR4t2luzXe5XESfOtOPLuPJ4HWHbWb8NzNnKYvOt BwlNMfZTnpUx0UPeZbWGKZ0osAG8+UVeqUVjP79UNrfNbXtyvGJkEcpoSf9yyH13 9GaDeCOwOHbH2bG5p7EpO2tRByBf5r3oXtA6SbA7eSKWzyfi2dwYox4rQjHx4R0R jtT/kqunAcOGzVn68B7yXrjuvv9NA65wCL8vyFppzGkmelIi4RGOwYp/q92R3R5G eVpjwve34GgxZg== X-ME-Sender: Received: from tenansix.rutgers.edu (pool-165-230-225-59.nat.rutgers.edu [165.230.225.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 85454E4924; Thu, 26 Apr 2018 10:28:50 -0400 (EDT) From: Zi Yan To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 2/9] arm: mm: migrate: add pmd swap entry to support thp migration. Date: Thu, 26 Apr 2018 10:27:57 -0400 Message-Id: <20180426142804.180152-3-zi.yan@sent.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180426142804.180152-1-zi.yan@sent.com> References: <20180426142804.180152-1-zi.yan@sent.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180426_072904_004209_BCB71508 X-CRM114-Status: UNSURE ( 8.46 ) 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: Marc Zyngier , Zi Yan , Russell King , Christoffer Dall , linux-arm-kernel@lists.infradead.org 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 From: Zi Yan Signed-off-by: Zi Yan Cc: Russell King Cc: Christoffer Dall Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mm@kvack.org --- arch/arm/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index a757401129f9..d4b35514e96a 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -347,7 +347,9 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) #define __swp_entry(type,offset) ((swp_entry_t) { ((type) << __SWP_TYPE_SHIFT) | ((offset) << __SWP_OFFSET_SHIFT) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) +#define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val(pmd) }) #define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) +#define __swp_entry_to_pmd(swp) ((pmd_t) { (swp).val }) /* * It is an error for the kernel to have more swap files than we can