From patchwork Wed Feb 27 17:05:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10832049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23D9A188E for ; Wed, 27 Feb 2019 17:13:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 069322E328 for ; Wed, 27 Feb 2019 17:13:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDE3F2E637; Wed, 27 Feb 2019 17:13:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6AA222E632 for ; Wed, 27 Feb 2019 17:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hnZIi6lmgB1sDwCwxu0xgn913LdgAw0azpYgOswUclY=; b=oSjk43CXUQEhXQ 1qje/ItmTD0a5Ps/URiGSSAppseawoKM4O/W4ZA0PG9USN6FDrEBAQuVD+BfQ8lzwlbrsW7qZ5D+I oimNpMtTy4jw0FG/U/Lb8s4FGyyzTb9JNGFfovR217PJhDnUy8Uh3B5gpFj1zW6W+LTTii8nJVq54 Tqx12/IgGkYsvk4TB6wlgFsgax+DUIfg1LQPxrPeJFkJM7ya3QI9AB8Ssr3THg5N/anuevSWBOPr1 zNDEIGxpYvfvvJXI/eZc05Lq2Wh4ZrZXEWUxgiq6D+udjipXM70pQxctLFpUFDujQfKkcxN+6cQE+ J1LO9sUE6JKKOcDvBp6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz2m5-0007AE-1f; Wed, 27 Feb 2019 17:13:41 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz2gL-0000g7-Ic for linux-arm-kernel@lists.infradead.org; Wed, 27 Feb 2019 17:07:58 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190227_090746_277911_5306A9C7 X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , x86@kernel.org, Arnd Bergmann , Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Dave Hansen , Will Deacon , linux-kernel@vger.kernel.org, Steven Price , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , sparclinux@vger.kernel.org, James Morse , Thomas Gleixner , "David S. Miller" , linux-arm-kernel@lists.infradead.org, "Liang, Kan" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: David S. Miller --- 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)