Received: by 10.192.165.148 with SMTP id m20csp2211810imm; Thu, 26 Apr 2018 07:33:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49TqPCp1oIDaefe3qwKHH3t5jEDNwjpAePUCN8bIBrxMKme8KuE3vyNkKtK49vwjfMCvGta X-Received: by 2002:a17:902:aa0b:: with SMTP id be11-v6mr34886152plb.179.1524753200144; Thu, 26 Apr 2018 07:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524753200; cv=none; d=google.com; s=arc-20160816; b=m2fagAUrdu5NHdjJDi1o/vskhn0YkzRbL/20kOKiKE3wN40EfKdHF9jR6wK++MhyDV GfoB/XWW2LJY1nSgJ0+lkDN+bUnR8BXe/VnZXpY3SeQOWfftXXK/ymvB4kcF6HpBVb6y F7HEzLmBx4crKAK3pqgAXzN62kQtuMSTs66h8/Aqtl7GhN3hxsfUYflCmkAlIF47UQ6R vRwmHV44jalT8jQJKilG5uR78/LNox7J0idTYduwQS0QCvO1V6nvO3XPtgKAnUfFykDj j4wyinVwOBe19VTgUb3GRWal5kKxYWmZ2oabNq2Fwq3D3kRvhLYaTWyZkltIaZovAFxI y3Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=UWFAR5Zf8I8J4zDSRRT782t/dmUo9oTA7CgFEY/chZw=; b=ZHEsxwMuhj13b6zebC4Qu+ZVOE7SMS42soq5NsdaDHJHnBvHi1Mis9NP1GK19YwKde rPXY4vrGg4hXiL6ZK1wfhXzSwmuR6mQ0bC6GyugcYrcia5vaqYR89UG8J8HxRU07LSw3 I4Rp6TtOv59rQPDOKW2T5OeGt9Jh4mrw5I6vnxcyAcqPCJ2otZNITffWFpAEV8i4DbVV dxRckHovtrEdp0te5fNFlF6WJ0DsULVCehXf1TCkr/Mfk6+KPxt+muTlwkEA4GzDUnU/ dQEz4Qfm/SFiCYBgiRT8uJYFezIQjUlGrQca48Gt9NFOwubKLyGv5qnDvLChhbxf4PKi tx1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sent.com header.s=fm3 header.b=Q/U76KnC; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nnQD3cZH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si16241963pgs.51.2018.04.26.07.33.06; Thu, 26 Apr 2018 07:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sent.com header.s=fm3 header.b=Q/U76KnC; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=nnQD3cZH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756679AbeDZOaF (ORCPT + 99 others); Thu, 26 Apr 2018 10:30:05 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35627 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598AbeDZO2w (ORCPT ); Thu, 26 Apr 2018 10:28:52 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E5FE621AC7; Thu, 26 Apr 2018 10:28:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 26 Apr 2018 10:28:51 -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=UWFAR5Zf8I8J4zDSR RT782t/dmUo9oTA7CgFEY/chZw=; b=Q/U76KnCWE+z8ZM0hNCpIFgYSomqZKKsB +GIrV1z9O48x9CzKAtWL99HixFP5DrlmQVzEcFY77mTGPHjATwViv4G8aRxTAjy7 Rt1H/AGnh5hABlilaZ5GWoTzbH7nVVrnt+k4GmbNJmztNPynvy38OgzoZTx++GK1 RZ7igDoOD1Ywtf5odXhaE/8RAblMwAykEcn/KbO7A7gvo7c5TujZna6/NByYGjed kradyVMJlBeFxYUu7NgcaGVerMx6t0ZTcJUlGh7bb/ecI3Tm0VWBITdBFX/+npw7 BSeTSb4dE2JLzjx696eBJ4BWaotSillNwmB996oKRrGJ1+umwoWOw== 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=UWFAR5Zf8I8J4zDSRRT782t/dmUo9oTA7CgFEY/chZw=; b=nnQD3cZH gWJO4yk97gNkjTgAwlprLwB496zgM7sK7vaOug4awPqA+5BN6P9okIEejSDanzMd IcJ43+0QXQ528YTHlTGqnlPDucn7+xPNwwCWqOGqnle9yDVgnxdwbOf49kMDNveU VDkAZZwHMRgpb0AkFeyRyuaE9zo6BpQHlTwB1hZjy4NKkG3w9E+lkiaW2Uq2ylAP PSnBSL9sHv5gb6qSD/B0Vm2p4ayPDOIqbHcfCQgJgbDgx641WlQWT5H0KU2FMkJ+ HO8SDfwgVSg4h79higobo1by5EgVyk8KxdLixlRGPAYE4/9wt1F9PKxHGJk3a2uy aUhTQWqDcMNM1w== 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 8C98BE47A0; Thu, 26 Apr 2018 10:28:51 -0400 (EDT) From: Zi Yan To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Zi Yan , "David S. Miller" , sparclinux@vger.kernel.org Subject: [RFC PATCH 8/9] sparc: mm: migrate: add pmd swap entry to support thp migration. Date: Thu, 26 Apr 2018 10:28:03 -0400 Message-Id: <20180426142804.180152-9-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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zi Yan Signed-off-by: Zi Yan Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: linux-mm@kvack.org --- arch/sparc/include/asm/pgtable_32.h | 2 ++ arch/sparc/include/asm/pgtable_64.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 4eebed6c6781..293bf9f8f949 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -367,7 +367,9 @@ static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset) } #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(x) ((pte_t) { (x).val }) +#define __swp_entry_to_pmd(x) ((pmd_t) { (x).val }) static inline unsigned long __get_phys (unsigned long addr) diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 339920fdf9ed..2811aef4a636 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -1031,7 +1031,9 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp); ((long)(offset) << (PAGE_SHIFT + 8UL))) \ } ) #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(x) ((pte_t) { (x).val }) +#define __swp_entry_to_pmd(x) ((pmd_t) { (x).val }) int page_in_phys_avail(unsigned long paddr); -- 2.17.0