From patchwork Wed Apr 3 14:16:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 10883967 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 B6BC5922 for ; Wed, 3 Apr 2019 14:29:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99DD228675 for ; Wed, 3 Apr 2019 14:29:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C2D9286EE; Wed, 3 Apr 2019 14:29:31 +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 3A71428675 for ; Wed, 3 Apr 2019 14:29:31 +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=bVP9ynVEfQjLyjMTAQBVb09tUpsismiTJu5X03uT7Vg=; b=uI6x/3mb4yckRG Yj7yJdDSEsxCPLEHKhwBct/MA1ikJQRpvpfajE3kGrIBIT99kDCUn6Q2QlnAQKjOMs0Lq/CdwtrbI qoZxFevaTbVjjMS15NzliTeqywuwGxBXJhIeXQhwMi8otxvvznUy+Amo4lu8ep1YYt+rGv/+UabfJ J2nkqaBIw2QK1Mzr06ndBThFD1q+MnHqJqTNGd9UKhuSdSaCRokPhhST4cc6xUTekK//lVSMwxmnH Ym2JIq+JsZGZKj8e0P+5u8YcCk/Yhfa9CR87HRgGwMYXdUIstZR4TF8xGfuOFGcwLJfgvWfH/j3ex 1UOE6z5QRLG4fbxf0QaA==; 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 1hBgtM-00046f-MO; Wed, 03 Apr 2019 14:29:28 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBgs1-00026j-O5 for linux-arm-kernel@bombadil.infradead.org; Wed, 03 Apr 2019 14:28:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=EIMxzs3KcJ4jmgX2iikj+tJ0Q4+Nen0h2D0kdVtq1V0=; b=pWXz+r7D+eMkuo5WH+gA9dVG0v uIxQ0ufzifniGL1DDVnYRXNUr9uSOLrX1HpSCbM5bbrAO8eIFa3t+1dvP7o7rzRIVcVp0QnhdBPrF t9h5A3SQdFbMjddbr/TGz9Y5ZE1tmHt2RPVBmlZqFvWP2HWKKvioO3nbtLr79/xBsHkyOXP1JJcXM fXw8/AZAYqChnkE7nWVbCeJ1RzwTIUEh1TsJWNtS2b5brHNBpuKlD5ZBplkb3NX1P6p88WOiu726r P4ToWKK8NOgW+SvHiRJDIMteUKgPgvaE87iPpLmied2HTsCtjs3s6izY8ez8FTLswbesJJT0gj6Sy Goh2zZJQ==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBghw-0000OM-Vc for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 14:17:43 +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 4F4521682; Wed, 3 Apr 2019 07:17:40 -0700 (PDT) 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 75C643F68F; Wed, 3 Apr 2019 07:17:36 -0700 (PDT) From: Steven Price To: linux-mm@kvack.org Subject: [PATCH v8 07/20] s390: mm: Add p?d_large() definitions Date: Wed, 3 Apr 2019 15:16:14 +0100 Message-Id: <20190403141627.11664-8-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190403141627.11664-1-steven.price@arm.com> References: <20190403141627.11664-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-20190403_151741_230236_71C037DB X-CRM114-Status: GOOD ( 12.58 ) 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" , linux-s390@vger.kernel.org, x86@kernel.org, Steven Price , Ingo Molnar , Arnd Bergmann , Heiko Carstens , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Martin Schwidefsky , Andrew Morton 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 s390, pud_large() and pmd_large() are already implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. CC: Martin Schwidefsky CC: Heiko Carstens CC: linux-s390@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 76dc344edb8c..3ad4c69e1f2d 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -679,6 +679,7 @@ static inline int pud_none(pud_t pud) return pud_val(pud) == _REGION3_ENTRY_EMPTY; } +#define pud_large pud_large static inline int pud_large(pud_t pud) { if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) != _REGION_ENTRY_TYPE_R3) @@ -696,6 +697,7 @@ static inline unsigned long pud_pfn(pud_t pud) return (pud_val(pud) & origin_mask) >> PAGE_SHIFT; } +#define pmd_large pmd_large static inline int pmd_large(pmd_t pmd) { return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0;