From patchwork Wed Feb 27 17:05:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10832165 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 2FCF717E9 for ; Wed, 27 Feb 2019 18:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B66F2EB60 for ; Wed, 27 Feb 2019 18:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D50C2EB66; Wed, 27 Feb 2019 18:11:28 +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 A100E2EAC3 for ; Wed, 27 Feb 2019 18:11:27 +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=/tzWTXpLsSkZV0Sy45sAfaN3Qp/M+vhv6NCF4lAGxeY=; b=WWnUBupc7VzPBO xr+toU7bKEIHcjVhQdv6qsbWqe8jqSWw45Mr/YY4zuUYlHInjEXNaiAg5Bk3sYonZZ8gW/DP7cWTz l2KXsavVrMDrpv4FbiFWtnjYXAO46Xj1FPARwnUN1vkbhMxKV8v3W+obPtiJ1LbkEDfUOCR0fhRmy yrTjeALvxHGYQLG24ENsivxOolZHxLjkaK4CR9aIwYUb8P83KSFn6Xz2jmzHgcP7GRd2QxIcIv4nA m7THHBi92MBG7e8UPqR5GKQ6gxj873ulEZ21DUW+eBPRDy+2VbsSPs01eNU2wZtOsR6VnIws89OrV /GnC+aFbyVrUhiGE0Lkw==; 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 1gz3ft-0006jx-F8; Wed, 27 Feb 2019 18:11:21 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz3fN-00063D-N4 for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Feb 2019 18:10:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cpDv3mBvbD8hNAclYHZlrnWhwlRtUYmq/kJWE5bqZAU=; b=iiORBsypTjsNxPqzaWKCHcFf7P 7bz+E6DFUxY9X4DvvbnN4kH7Y5wQQmNOfc/F1GGq3l716V/xnmokXORBH40Mb8r69HZ5F5oetCO7G 2wiUzOGDn8ZIJnNtLRzUS68LPomG5ezm3kcy8k5Q8HBBsHXXnfn9/GEjTwQm4ty8TxHDMr1AwzKdW VSkNXvkjpgSz4U9ZtcFzBL2Lf5C+HXjwQynU//euQSBHB89HLzIpIsWaHFEpdJxx1JBFFK2mrLIFl CHJKgsQJZ9FUAiS/K6yjMsfVO0ACaaDWvjOVTFj1r1U2Rb18zPdAgBUdDhmf7ikivNSsk0/oOoEd7 UqfZBJvg==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gz2g2-0005Uz-Ir for linux-arm-kernel@lists.infradead.org; Wed, 27 Feb 2019 17:07:28 +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 8FFCD1688; Wed, 27 Feb 2019 09:07:25 -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 DEAE63F738; Wed, 27 Feb 2019 09:07:21 -0800 (PST) From: Steven Price To: linux-mm@kvack.org Subject: [PATCH v3 15/34] parisc: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:49 +0000 Message-Id: <20190227170608.27963-16-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_120726_711971_AD798F13 X-CRM114-Status: GOOD ( 16.32 ) 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 , Peter Zijlstra , Catalin Marinas , Dave Hansen , Will Deacon , "H. Peter Anvin" , "Liang, Kan" , Helge Deller , x86@kernel.org, "James E.J. Bottomley" , Steven Price , Ingo Molnar , Arnd Bergmann , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse 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 parisc, we don't support large pages, so add stubs returning 0. CC: "James E.J. Bottomley" CC: Helge Deller CC: linux-parisc@vger.kernel.org Signed-off-by: Steven Price Acked-by: Helge Deller # parisc --- arch/parisc/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index c7bb74e22436..1f38c85a9530 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -302,6 +302,7 @@ extern unsigned long *empty_zero_page; #endif #define pmd_bad(x) (!(pmd_flag(x) & PxD_FLAG_VALID)) #define pmd_present(x) (pmd_flag(x) & PxD_FLAG_PRESENT) +#define pmd_large(x) (0) static inline void pmd_clear(pmd_t *pmd) { #if CONFIG_PGTABLE_LEVELS == 3 if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) @@ -324,6 +325,7 @@ static inline void pmd_clear(pmd_t *pmd) { #define pgd_none(x) (!pgd_val(x)) #define pgd_bad(x) (!(pgd_flag(x) & PxD_FLAG_VALID)) #define pgd_present(x) (pgd_flag(x) & PxD_FLAG_PRESENT) +#define pgd_large(x) (0) static inline void pgd_clear(pgd_t *pgd) { #if CONFIG_PGTABLE_LEVELS == 3 if(pgd_flag(*pgd) & PxD_FLAG_ATTACHED) @@ -342,6 +344,7 @@ static inline void pgd_clear(pgd_t *pgd) { static inline int pgd_none(pgd_t pgd) { return 0; } static inline int pgd_bad(pgd_t pgd) { return 0; } static inline int pgd_present(pgd_t pgd) { return 1; } +static inline int pgd_large(pgd_t pgd) { return 0; } static inline void pgd_clear(pgd_t * pgdp) { } #endif