Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp206979yba; Wed, 3 Apr 2019 07:19:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVHjTnLMdA448xMrzBdaP9vTFN+1GgOUZV2jGfWIiBpB4ZSXXUnFJJtZrI5KnEtEZFnQeF X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr139229plo.298.1554301146955; Wed, 03 Apr 2019 07:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554301146; cv=none; d=google.com; s=arc-20160816; b=zpL4CX3ElT+JuuLnSC6X1aAkr2xouEd/h6avpBfI6vFGBZuJ6k+5wMJ86N9ryqZKVQ fLwXPcx95cNpNaJF0ZIkGahZY5389rox8YxIsY2v5NrUFQDw5OY174i76+DchDQ/N9bW RNF0cvVGNQV49IBmkjjhhl2j7PhPa5kCcX6/oCPXB3+JCcqAlfN9avdxjmZRMSD6BaG4 ewEmR5/mHreBlaFR2ji9LvZv5QGyAy+hF3YoaGlXiTQFcE3sen5jbs63rjIx7fvy9R7Y GQRTm+gGCN6d4/Hlf3lnM4wZds0uToGVshRTBC69vbkMOgIb5lBjzRhisr0hVxYDXHUO GObw== 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=PlduaFV1LjO5scXRf9kwcI+ukcg7zXNoRrXpWadVZPc=; b=jPV9ZjLwpXrlGoNh0tI/lROCA03wV4wDvUVEmacGQg1BvPl5AggKb4RQjNR6I+zKF1 AxvFIuaxzk6+frDFuCN8ONGshAOeSfwgDHKcGB0XICwFNMH12/89NIQem7Yyqxm2V9gP TACsskmMbAaTBhjuIRXLg8lDNAzdjhIdExPItzsqzhLt2tzCTNbrgWfyf9kQL9b/xPNU byTzMlpdEpaGOFUdFrNlZvRTn/oG/8IG5GGsYUtU1pdEWfq1DOE51M1CIDFPTQKgh70Y 0wHAmmJMT5I6jfgR0FDLIjekThgIPzxqTnCShpcV1ZpAhJ1tVkCJ0OwrhuUpNTR3veoJ otvQ== 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 b12si8226726pgq.53.2019.04.03.07.18.51; Wed, 03 Apr 2019 07:19:06 -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 S1727035AbfDCORp (ORCPT + 99 others); Wed, 3 Apr 2019 10:17:45 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41658 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfDCORo (ORCPT ); Wed, 3 Apr 2019 10:17:44 -0400 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 41BC4A78; Wed, 3 Apr 2019 07:17:44 -0700 (PDT) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F2073F68F; Wed, 3 Apr 2019 07:17:40 -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 v8 08/20] sparc: mm: Add p?d_large() definitions Date: Wed, 3 Apr 2019 15:16:15 +0100 Message-Id: <20190403141627.11664-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190403141627.11664-1-steven.price@arm.com> References: <20190403141627.11664-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_large() functions/macros. For sparc 64 bit, pmd_large() and pud_large() are already provided, so add #defines to prevent the generic versions (added in a later patch) from being used. CC: "David S. Miller" CC: sparclinux@vger.kernel.org Signed-off-by: Steven Price Acked-by: David S. Miller --- 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 1393a8ac596b..f502e937c8fe 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -713,6 +713,7 @@ static inline unsigned long pte_special(pte_t pte) return pte_val(pte) & _PAGE_SPECIAL; } +#define pmd_large pmd_large static inline unsigned long pmd_large(pmd_t pmd) { pte_t pte = __pte(pmd_val(pmd)); @@ -894,6 +895,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) #define pgd_present(pgd) (pgd_val(pgd) != 0U) #define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL) +#define pud_large pud_large static inline unsigned long pud_large(pud_t pud) { pte_t pte = __pte(pud_val(pud)); -- 2.20.1