Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3094289ybg; Thu, 24 Oct 2019 21:57:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3ySX9ky82VsTHukdctpqOu+z91J28XHwz/fRfUcQxiK5bSr3ZXtybJQgfiE6zsm+M8Mg7 X-Received: by 2002:a50:f010:: with SMTP id r16mr1824279edl.187.1571979428910; Thu, 24 Oct 2019 21:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571979428; cv=none; d=google.com; s=arc-20160816; b=fQUB4OmXxfr5akP+zpZIzChVbGW0e6bM7FgvW+ETt6LJkjwP1gjqc9arUiDcQ6fEzy DOfWZmAd3ubKDxtzwfR3RKdiapenI8OYS4112KyQivAl4OxTM02xkmWDDxar3HJWH9C4 Nc4xAp2tk5WwHVeWY6Um0HC4fyWLecmkb12MlODfYmlyuyL8QJRAjMoorl25Ea7NiGdA orLBU7DApEyNLh4TeBV5zH7Gv2o+zv2TdKAupNOKDWktd8JadQ4eAxXBPYfp42c53gLS 4N4txkSwT2tF9MO5DwIZxHgOBnSc1QpTMp8DhwYHpuMC5Bzkl2Uxv2nf9/tJOpslB9xg mYzA== 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=oq1/W+gSPxME1QpJb1D5mRUa5HoHSLkHrCi5RZp+COE=; b=YcsI74g/npNqW/7EczHd0MUZ5CY+677JESh7JSeD7wnocBx0JZ3Q9Y6a6Jk4I5QQcb 4bJb3s4eWtFNmc/3kCqstFhNWdMcSjksHpbA6WHnWYZwGZndLRzhpcO87wbZpn3B6b+C IvSTPVOQ/7ewCvKUNlj+ILL819r/I6Ou9jiGKBXQM5+9vIUVlFYA5ztbLwbkTYdPMyVj 3EZYokdrKzO2DAAjYAFrAfF+aqp+WUzMnYXaiAzJ/i2dPVQ3VdQq8OcGQgpCNDuGxFIB oy3k3ztKnR6sGRg2gbqUaDWbqhyrS2thsxYauzO/SPQZ++WHrz+mS/qeu/0uqNl6S0b1 zwEQ== 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 c31si477337edb.56.2019.10.24.21.56.44; Thu, 24 Oct 2019 21:57:08 -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 S2438658AbfJXJiJ (ORCPT + 99 others); Thu, 24 Oct 2019 05:38:09 -0400 Received: from foss.arm.com ([217.140.110.172]:44546 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438644AbfJXJiI (ORCPT ); Thu, 24 Oct 2019 05:38:08 -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 C3C354F2; Thu, 24 Oct 2019 02:37:55 -0700 (PDT) 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 F26493F71F; Thu, 24 Oct 2019 02:37:52 -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 v13 09/22] sparc: mm: Add p?d_leaf() definitions Date: Thu, 24 Oct 2019 10:37:03 +0100 Message-Id: <20191024093716.49420-10-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024093716.49420-1-steven.price@arm.com> References: <20191024093716.49420-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 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