Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4342335imb; Wed, 6 Mar 2019 11:00:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyDr9C8G1kiwR/Y/76Nh1X6U5iG9gauUJwfhaRvuUBWamblSAd5lRxuSpcJjAwIpxHbaoTk X-Received: by 2002:a17:902:854b:: with SMTP id d11mr8210910plo.224.1551898838918; Wed, 06 Mar 2019 11:00:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551898838; cv=none; d=google.com; s=arc-20160816; b=onf7bL1vTJ0Z3CEY2alWPS8VcOKwAvAdlyFuM7sCWmxgLgWY/HnT6qjMJ5CKj2Vk+A yaUhEesRU+pgWgPWHpLT1Ylk5OQyqO0YE87zigCTnthqqZ3b0fzu9ubccAQ+x06RAMEQ CESiglCdb7fp5tVki9I/hl2PkEv4dM3nkvTqsXdDP6zNb3yxMo3W7RzbJbwhERGKeQ0j S643M/77xGawSLMsI8p9O24EmTpes2oum0YLGXBWHjNxdsWRommU1+eQwAObfWlYFJBM zH1bJOx/Hb4misRmtaXZGQuUfaDsIrxRCijSdojuDSwtLfyMWuYPVMMBXY4yvJZlAkdR u1HA== 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=5THteukl9LjchCZjOSfwp3HvyVvejyfMSn/dfz+5mKg=; b=VZGgr53t3le2skrFwYgZnA3OI8Ev5O4lFqzqZQe9brg8yQsPS2Rorn8ilZvadOVa1h NtmR/UvPcfSmGB1sAlfhhhsobTEVcBqgmKlXQnXU7VPBY/jepLDprIF/uPiNK4yQ5ygS YkfwABQyIo0mfJB2guKkGtIas5AUGjvR5gnZaZNN1vh/TC0EdZ86zgWz7F8P90T4Ai0O iMxi/VUsNpiUz5JUP4L7yw/K2SNmy7yq8N7jrLdZj+NMZ1xxl76DoAqKDc0ccWyJzaUt eRlQL9g8afZNoR954syLC9+6OLsKteUEbO5uQ8xVowGCCEVHfys2VzLIAsNZUaX86e1/ Dpag== 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 b2si2049734pgl.531.2019.03.06.11.00.23; Wed, 06 Mar 2019 11:00:38 -0800 (PST) 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 S1729992AbfCFPxK (ORCPT + 99 others); Wed, 6 Mar 2019 10:53:10 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:34412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729934AbfCFPvN (ORCPT ); Wed, 6 Mar 2019 10:51:13 -0500 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 142FE1684; Wed, 6 Mar 2019 07:51:13 -0800 (PST) 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 8609E3F703; Wed, 6 Mar 2019 07:51:09 -0800 (PST) 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" , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v4 07/19] sparc: mm: Add p?d_large() definitions Date: Wed, 6 Mar 2019 15:50:19 +0000 Message-Id: <20190306155031.4291-8-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190306155031.4291-1-steven.price@arm.com> References: <20190306155031.4291-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 --- 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