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: 10831965 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 E182A1880 for ; Wed, 27 Feb 2019 17:07:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAA9D2E305 for ; Wed, 27 Feb 2019 17:07:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEC242E31F; Wed, 27 Feb 2019 17:07:55 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 095692E306 for ; Wed, 27 Feb 2019 17:07:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FFFD8E0017; Wed, 27 Feb 2019 12:07:48 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5ADB88E0001; Wed, 27 Feb 2019 12:07:48 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4788E8E0017; Wed, 27 Feb 2019 12:07:48 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id DC5338E0001 for ; Wed, 27 Feb 2019 12:07:47 -0500 (EST) Received: by mail-ed1-f70.google.com with SMTP id h16so7211728edq.16 for ; Wed, 27 Feb 2019 09:07:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nxjOX6LayepjKtF9PaCGEhuHv91+mgqyka9gC1xojUs=; b=NlLRuUxqFIy82wYJOJZx0P2voAxG6pNj2bRB9c9WPh4Rp7ewXowXNvPp8IlCZ3yIBa 6ZOBSnzj2jrCpcVf4NgZkL4rWxIoWUaKc0hNUic36VyWAgUlUKG+qQpyVkNMn98Sr/CX PrgHH2IEiLAUs66IRMQKiL0ZptPmFgUonx5ArhfOGFUSMOM9LWGf+elvQWvUxNPNQW4i Gn7KX+5gYgRC3A3CTbJdbQfIr6lfmFAEZEWSjCjwDinikmZtC1kOvWVHzJwfNIy/Iecz hws0tr4ccNvFRa/+dI1D89ihQ+n6Ox7K3hpUEZgL0F01f6rkqYM8x96ENuyUqhEEk3/f wGJQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com X-Gm-Message-State: AHQUAuaQln5mLHxgI/15BGwEF5zuBa6XVrZRDBloV4rP6ftkBx/BM0og EbWoj+8c6NYaFFRpcckoQPtQ1Zfx+Onfq/Nq901sEBZ2lElOm9mmO0sjIpUt5BxAH5JrEOTUO3q keIsAtMVWqBoDE5MjI+bWAj9rEGcTtD3nPW1CUY3OiUrHuRAawNRetY4Gs32nNeh63w== X-Received: by 2002:a17:906:4347:: with SMTP id z7mr2301074ejm.190.1551287267408; Wed, 27 Feb 2019 09:07:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IaX/79sQE66n4F8zyJeAOLHMcFJr1KjiZ2VjJ3WcNRrRE7DvJPEu2tp3/R3FgRQHPjDj79l X-Received: by 2002:a17:906:4347:: with SMTP id z7mr2301010ejm.190.1551287266346; Wed, 27 Feb 2019 09:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287266; cv=none; d=google.com; s=arc-20160816; b=RP01+Ikw71/zA1sGYWE7HoRNEIYy3OmxQnjjo08/TxBocqttHxf/Woz9UnG8Zexs21 t75xTx39NcRJ10ByZGUXv080haMJ+pveJF5Zp7iJsKqIvv3mZWRlYnD1kYCkyWonh0Xy FLl/4WSaoBhP06Pgd/loWIJcRFpEvD2QEaSE5iFgr6uj8Mk3XhlM4kFBvy3FtpjSrPbm Ly5Lcpvai4F+4WijqUO9HVTYgBDpZUyCeG68REsuNhOuVJki5mKBu2vqLs4x9mQserxg 1D5y7DmNUcyhkCPLl3u1GJGCZ8a59fnif0bNiLGElixlP6ZgQbOShpqMhW+0WfwVTOb6 pKiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=nxjOX6LayepjKtF9PaCGEhuHv91+mgqyka9gC1xojUs=; b=iPG/l7w2Cr/SPVWMTxbaCUQF8+63wfbHh5+1Nl73552dfV9Ax0SWkBreTGn+9JRpcP 1968BlrplS/cJEdZXcqIbbNXwKCczilxdyvgRPhSrav/VizF6ihVESEqijW0Na++suQA TMOhC1n2xivcTwW3+3RE8hv7B4hZBb3kAJoPFUtsUPxUSqxAvC2VJyj7wysF6RPZOxH3 LGakXpxO9RLPLNgFqkpgk269Pc+NUQKDaR92tl4bVhJp/NyF9cdtqpbGOIjokYe6kfPz jVVF8oiVXQ2BFsSQpytvbq35KGsKQROg/q5xmVJmNO2Z6UcEGBDe5hxF4t3Lo7t08NZ0 uMtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id t38si4774738eda.121.2019.02.27.09.07.46 for ; Wed, 27 Feb 2019 09:07:46 -0800 (PST) Received-SPF: pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of steven.price@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steven.price@arm.com 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?b?SsOpcsO0bWUgR2xpc3Nl?= , 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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)