Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7412886ybi; Mon, 22 Jul 2019 12:43:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc1Y5WwhTxQQLXZD61Bejz4uGUApeSLLg9iCtCpjX4r6QUocAhP7EiJg3FaNhOPXc8Lezm X-Received: by 2002:a63:2cd5:: with SMTP id s204mr58399943pgs.95.1563824596628; Mon, 22 Jul 2019 12:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563824596; cv=none; d=google.com; s=arc-20160816; b=Gsqt33ukpIG51lOXTOlkXaiNhF4Qfz2CVDKCxmxINae93UiVREZUH3i8eow2bpPCi9 mDpBGh/96cAsWJpRRJ5/ND9QRf1GH4OwiIfggAesJir3c8aVnH/CnHmS3UOVVZ1uh9+h JiyoZXE+oaon0eKN9AzHzDxgX6n3matekOtL1T8KbGCLqtCkS1OpUKg3/NCYgt5SiWuo dyFpawghWz9K6ubpak74F65/CkhbIitFbau9GEKu2RKlF3YmCj4sh01Sdf02FDhJSext c5OMNDlqRYExmvpPNs4LMsB9RXJgXugowxIT5kk9JVT2VW2MIRtSwDTCwSTDvRjM5v7D WBow== 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=9yNPMoYJcGoxoxeHWzB9fU8wwaC0bR8nBAs+Hiw9CLE=; b=xIrflYGvfwoYUyoqYySxFgHf6sAIQ8ZZ9bVUTCl4MsS785WTsRv6TdKhxcYF4f9FIC 497uDqB/51Sw/ggUdahk9uKTZALdEGAvP3IIXNBUAMMe1Ln7zZcROK4PPHa6j217mDm9 cYlVXbeQ53tnMtk+1ZFh34gHgM3l0iIKPMoBziDYUI8AseMfkluVkN/u2snvSNwj81aH slytYIE58sax6G2YTqkw6U4NuMrrghYtcqvwtYBGNkzTNS7TWipTPeIdawM1tNxuf+bs f9N9BWBx+uA1OKUONFzH9UkvrfAaKYJtODkm+exz0+py0ThQES6LAHdS0dZS5ymH1Q71 MDCw== 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 a25si10833107pfi.186.2019.07.22.12.43.00; Mon, 22 Jul 2019 12:43:16 -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 S1729818AbfGVPmt (ORCPT + 99 others); Mon, 22 Jul 2019 11:42:49 -0400 Received: from foss.arm.com ([217.140.110.172]:40236 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729797AbfGVPms (ORCPT ); Mon, 22 Jul 2019 11:42:48 -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 0D49F1596; Mon, 22 Jul 2019 08:42:48 -0700 (PDT) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 41F493F694; Mon, 22 Jul 2019 08:42:45 -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 v9 08/21] sparc: mm: Add p?d_leaf() definitions Date: Mon, 22 Jul 2019 16:41:57 +0100 Message-Id: <20190722154210.42799-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722154210.42799-1-steven.price@arm.com> References: <20190722154210.42799-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 1599de730532..a78b968ae3fa 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