Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4442576img; Tue, 26 Mar 2019 09:28:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwnn/NhTZrpK/A0qsHCfWbnFUpXwHEGxs9AoOcW+1h/zHrbNDrymL54PwHZJ8GwExhlayF X-Received: by 2002:a17:902:9688:: with SMTP id n8mr32372743plp.133.1553617693504; Tue, 26 Mar 2019 09:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553617693; cv=none; d=google.com; s=arc-20160816; b=PyIvZLUCP5tWpijWnwhSgtd5lbhRdxxx3/xUyZGTO8jBdi4/ApatR7ypVwvxr8wxJA WBPJiLf5qJCEVWAVlvYkmq4LXkV2dgX/Kd8WdVHt1rJjvED1U5oqu4UyOPwnMt0qXyD6 Y8oCr0SkbgWTI3yk7/vjA2RHfs7ktrKn4Cd3SDai/zZ3NOKpJG1jM59eK5wfbz9Snw2T NW4g3bd4Ecqg1hVq5jB3lYiBgb1qeJ7bRGe+l1j5UqqxKRN+ziOFT4MkZCowgZ8Pe6bd 4XX6hpm6PosRKL0bEqyEd4bKvdwnWnBf5BgVKkpHA0wvbhl44v7JRzU95JxnBHfG1A/p b9Bg== 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=0vSKlHELcBJikMhabDnhYLk8Ev68BRV/95iBwTjGZGzDDEfZ2sbswt2hr3Uex/y6Is Dzou6elzwmaIaKYGz75UJ0Fih/Dv04QUKrMF2EtVn7BFhEz6/IW7UailzGRtw2Lr/9/7 tc7LJmAb56dxzR/iP02lfFjahYM5QOKE6uFM1SOXlKEwU2QTSXM9vD/4wcjc5UEjfJjE xNvEMzdZFJJgetuG3op5IlJf+yt9lGcGt6tV5bUe+xMrY/y9tL88DTrhjQm+EcCEUMy3 WUP++80ArrT5PEOU7Uu87DDCadEXqxH6WW9frRB77QX1ZjyvGlPMk+O2l1ptV7FlPh6o bN4w== 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 t33si16575113pgl.530.2019.03.26.09.27.58; Tue, 26 Mar 2019 09:28:13 -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 S1732190AbfCZQ1E (ORCPT + 99 others); Tue, 26 Mar 2019 12:27:04 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39740 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbfCZQ1D (ORCPT ); Tue, 26 Mar 2019 12:27:03 -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 B41F4174E; Tue, 26 Mar 2019 09:27:02 -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 319873F614; Tue, 26 Mar 2019 09:26:59 -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" , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v6 07/19] sparc: mm: Add p?d_large() definitions Date: Tue, 26 Mar 2019 16:26:12 +0000 Message-Id: <20190326162624.20736-8-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190326162624.20736-1-steven.price@arm.com> References: <20190326162624.20736-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