Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1727955ybg; Sat, 19 Oct 2019 01:12:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKe+3AS9n7EcBjGtb+PcUTUUK4NL4zKWeVPabKHQB3qwS+OMRVSiu0cxR72QkWAnHmNuG8 X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr12575450ejj.57.1571472744640; Sat, 19 Oct 2019 01:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472744; cv=none; d=google.com; s=arc-20160816; b=bCZZfhViDJ5kJsXukQxrrTXyN5MrL3ol53DPM7/1zLStl5/4OaHxcKZdpQMoIKWxAo avV/r+Ekppsp5cuyX8sZWrP95jlvQ0DsQ3zA+jQUX9DP6cGsJBu2D1yh2EAx9eqSwhkm rZd/eqJ9qJlg5cbk7IJ4gBnfmYCiy4xLUdZy/j1uaki5zGIH2AXSEd8AfJaACApnNM0l 8fTOgScKCFzWQ4d1ZXJiGsHeLqUJYk/uRAxDVYDB+TtzKeQ1QmRy4tH+6SxouP8lo1jK jsgn9B+9Csy8+TngPWvTviRA44ymVd0ZTR3YlBK2I30TOU+vrhcs5tnRFNeGonMZaMgT g5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oq1/W+gSPxME1QpJb1D5mRUa5HoHSLkHrCi5RZp+COE=; b=B0EE4WEV2c63ANif5YmkAZ+FpiQLq/i9hvXQbFX9YA7FQ2EUzGl8LhX8O6Cksq/FB+ e+u3U5Nh/3Ljkd5lRrhCYxO5EyNGKXe3onD9ZGFlIQ4BKiSEX4dN272YbSGL1Xp0k6oD g4fwbcL3dL5EdYWYJISilOGRyPX5TU5NLdndsfFCqFK3cJsi+7Rr3e13W98wHfpBP7fu h+6xSXEybELicGwshINVkokX+M13XJiY/KDLYtClBjBQglgtuWqTxvrdCKWJIOFFEa0Z 6RzqbsbDeZRVT4V7Eo9rbj1jC8IHgqyMRoYkiBBs1ss4317JWBag41SvUyqRPW+RO616 8M7w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si4905822ejf.28.2019.10.19.01.12.01; Sat, 19 Oct 2019 01:12:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633559AbfJRKO6 (ORCPT + 99 others); Fri, 18 Oct 2019 06:14:58 -0400 Received: from [217.140.110.172] ([217.140.110.172]:32824 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2442459AbfJRKNu (ORCPT ); Fri, 18 Oct 2019 06:13:50 -0400 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 8B33664F; Fri, 18 Oct 2019 03:13:28 -0700 (PDT) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C04C93F6C4; Fri, 18 Oct 2019 03:13:25 -0700 (PDT) From: Steven Price To: linux-mm@kvack.org Cc: Steven Price , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , Andrew Morton , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v12 09/22] sparc: mm: Add p?d_leaf() definitions Date: Fri, 18 Oct 2019 11:12:35 +0100 Message-Id: <20191018101248.33727-10-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191018101248.33727-1-steven.price@arm.com> References: <20191018101248.33727-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For sparc 64 bit, pmd_large() and pud_large() are already provided, so add macros to provide the p?d_leaf names required by the generic code. CC: "David S. Miller" CC: sparclinux@vger.kernel.org Signed-off-by: Steven Price --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 6ae8016ef4ec..43206652eaf5 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -683,6 +683,7 @@ static inline unsigned long pte_special(pte_t pte) return pte_val(pte) & _PAGE_SPECIAL; } +#define pmd_leaf pmd_large static inline unsigned long pmd_large(pmd_t pmd) { pte_t pte = __pte(pmd_val(pmd)); @@ -867,6 +868,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) /* only used by the stubbed out hugetlb gup code, should never be called */ #define pgd_page(pgd) NULL +#define pud_leaf pud_large static inline unsigned long pud_large(pud_t pud) { pte_t pte = __pte(pud_val(pud)); -- 2.20.1