Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2021943img; Wed, 27 Feb 2019 09:10:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IaebsDJ8j2v+nq4jlZJ5xuh8m3FJ7qVGG9apzDF9hlL/7IRRczyNAXfbJEqPP3MVevwW2Ud X-Received: by 2002:a62:e214:: with SMTP id a20mr2616640pfi.192.1551287406366; Wed, 27 Feb 2019 09:10:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287406; cv=none; d=google.com; s=arc-20160816; b=u0QtErD+BJo9v7IaC5x5T5ZEjebTXaKHAvpm2/U77gGoH2W0Y0yIiCoBqIwqIHnzc1 8NVQ3kGWuTm4g3a2pJx6Z+M1XpPkftKQ19oiXFFy95gdzbAhX6EhiNnrtnmrQBBbrvQN cFE8e5bXYlQEMufCpMYxTZrrAh7Mr4JBcJb+/lguVOYWhI2XHouAicK7VfwYCiMYzEAa DnGnFeTrOaqkMgdcbMdIEBZHDz6Q+ob2r3U+3x1eoit109WCflhhi0SgggjJsaU1QDLs Xkkz52jpxUo0f9HvMk/J4hPzkDf59fkjJfl9EMq5RKu7CM3T866PEdLZL16GT/3IYbfd RKxA== 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=nxjOX6LayepjKtF9PaCGEhuHv91+mgqyka9gC1xojUs=; b=lts7vAbUv0L6x1R9B57Nmv6nJ9xv4qKl/iyDnoKLRy0TCxss8jotSKxKhbw1tgCyUM XP0pbFlAeLofbZMUyCD9OC4pSuvJLzbYnN3JAknKVDVgzXouVkWg3Ale6X62RK7hyZQ8 I3W1/6OqMdXzeBJof7sTLcfl+1ookb1UIkDtX+Q9n+PWVzLe5uJ8n7BpsFh9YCW5geDb u34Z0t+lX9/yflmYXyJ84WtBvSM7eMEPF6jj3pp6xgG8XRJP+VNv7ExZrCtESYPVpTts yUcdroBYQ2kd6zW7P8kxz5UOxsAo3G30Nd+Slm8HXvybtFzQXPOtq+kX4iFmo7YZ7pCO O4Ow== 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 w12si15749211pld.183.2019.02.27.09.09.51; Wed, 27 Feb 2019 09:10:06 -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 S1730464AbfB0RHr (ORCPT + 99 others); Wed, 27 Feb 2019 12:07:47 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36450 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730448AbfB0RHp (ORCPT ); Wed, 27 Feb 2019 12:07:45 -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 6C3B4A78; Wed, 27 Feb 2019 09:07:45 -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 DE2B83F738; Wed, 27 Feb 2019 09:07:41 -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 v3 20/34] sparc: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:54 +0000 Message-Id: <20190227170608.27963-21-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190227170608.27963-1-steven.price@arm.com> References: <20190227170608.27963-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, we don't support large pages, so add stubs returning 0. CC: "David S. Miller" CC: sparclinux@vger.kernel.org Signed-off-by: Steven Price --- arch/sparc/include/asm/pgtable_32.h | 10 ++++++++++ arch/sparc/include/asm/pgtable_64.h | 1 + 2 files changed, 11 insertions(+) diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 4eebed6c6781..dbc533e4c460 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -177,6 +177,11 @@ static inline int pmd_none(pmd_t pmd) return !pmd_val(pmd); } +static inline int pmd_large(pmd_t pmd) +{ + return 0; +} + static inline void pmd_clear(pmd_t *pmdp) { int i; @@ -199,6 +204,11 @@ static inline int pgd_present(pgd_t pgd) return ((pgd_val(pgd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } +static inline int pgd_large(pgd_t pgd) +{ + return 0; +} + static inline void pgd_clear(pgd_t *pgdp) { set_pte((pte_t *)pgdp, __pte(0)); diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 1393a8ac596b..c32b26bdea53 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -892,6 +892,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) #define pgd_page_vaddr(pgd) \ ((unsigned long) __va(pgd_val(pgd))) #define pgd_present(pgd) (pgd_val(pgd) != 0U) +#define pgd_large(pgd) (0) #define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL) static inline unsigned long pud_large(pud_t pud) -- 2.20.1