Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp761390ybl; Fri, 6 Dec 2019 05:55:10 -0800 (PST) X-Google-Smtp-Source: APXvYqw8hxaLDYScjSPA2ZCLWuwUk3/4cMY327uKcIv4csH8jbW6RXH9cQRs6jJTBSdOjTMlZ1cp X-Received: by 2002:aca:de03:: with SMTP id v3mr6856735oig.162.1575640510437; Fri, 06 Dec 2019 05:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575640510; cv=none; d=google.com; s=arc-20160816; b=rbHCim4Bs9lJ4i4i73+U8YaF/mOSIVkm6ROWYBWc9y95Gt/IXpFRnf9Rm34H93X0jg MkQcj0cVg3S+P/KOZ0Ex8Pg4o+VjaK6tmrkGyP9OSoHZTYcPVWiWjyOi8NspFxBuf3Q8 NveZ8WgAk+F5d4v245PoH5+dMaIVII8fzJ75gNDNTwO+D3+u3mx6UtUxvQ1xqWaIiRAX sWhd/61Y21lX1rlPX4VHESrZ39Fc3dSsePbRi/DPFaLH5KvarpwYzJlc2g1TXrHfbC36 M/becUZo6qR0g+LD6a/WBfsYt1u2ycSSmH0dIOCurofkdfxP5BwpDs0tLX+ZBcnFDkRx zZ8A== 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=RoQjGMLFYrdZoHN7pnzDXFwgn9uitPJFSerxCdr2tBg=; b=PB6o1EvbAzneYkphAdt2IEf/JCaZRZSkKMRGUOBusw8WJCr4yCt0WGOk+QC17xjqwd bU+8sXBDrzwR2wFhK5LnjbJlHtUMik7zEPxwKRXBQkYcrfn7GQS+Bz7k2WIMtakXNGmi 9UHrruxdBsXnyPTVxwcdRZKh+gyhjMlKhCCVtqVYfH3D8e8nSIvmvKTXkSHW3I9+w4+8 zOArYJZSmKhJleN7n7H3YQzq64eLH3GPdjWcVW6gjPzSFdFi+IOH9QjOLhFN3PHo/DZj ilJ8Ao1loLwewjN8Tl41LF/3af5rxpbjEY946GVXsgoLQ6zjajHxmlumrc+dxdozoQYE GdEw== 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 i5si370266oif.211.2019.12.06.05.54.58; Fri, 06 Dec 2019 05:55:10 -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 S1726674AbfLFNyM (ORCPT + 99 others); Fri, 6 Dec 2019 08:54:12 -0500 Received: from foss.arm.com ([217.140.110.172]:44658 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726654AbfLFNyL (ORCPT ); Fri, 6 Dec 2019 08:54:11 -0500 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 B7FA011D4; Fri, 6 Dec 2019 05:54:10 -0800 (PST) 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 002AD3F718; Fri, 6 Dec 2019 05:54:07 -0800 (PST) From: Steven Price To: Andrew Morton , 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 v16 09/25] sparc: mm: Add p?d_leaf() definitions Date: Fri, 6 Dec 2019 13:53:00 +0000 Message-Id: <20191206135316.47703-10-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191206135316.47703-1-steven.price@arm.com> References: <20191206135316.47703-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 Acked-by: David S. Miller 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