Message ID | 20191101140942.51554-9-steven.price@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=FCiR=YZ=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 24AEE1515 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 1 Nov 2019 14:10:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EFEA321924 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 1 Nov 2019 14:10:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFEA321924 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B0D446B0269; Fri, 1 Nov 2019 10:10:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AE3CB6B026A; Fri, 1 Nov 2019 10:10:19 -0400 (EDT) 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 9F9B16B026B; Fri, 1 Nov 2019 10:10:19 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 8108E6B0269 for <linux-mm@kvack.org>; Fri, 1 Nov 2019 10:10:19 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 17E52181AC1E9 for <linux-mm@kvack.org>; Fri, 1 Nov 2019 14:10:19 +0000 (UTC) X-FDA: 76107893358.26.chin67_3ceb48015d400 X-Spam-Summary: 2,0,0,3887ab1ba6b4ff56,d41d8cd98f00b204,steven.price@arm.com,:akpm@linux-foundation.org::steven.price@arm.com:luto@kernel.org:ard.biesheuvel@linaro.org:arnd@arndb.de:bp@alien8.de:catalin.marinas@arm.com:dave.hansen@linux.intel.com:mingo@redhat.com:james.morse@arm.com:jglisse@redhat.com:peterz@infradead.org:tglx@linutronix.de:will@kernel.org:x86@kernel.org:hpa@zytor.com:linux-arm-kernel@lists.infradead.org:linux-kernel@vger.kernel.org:mark.rutland@arm.com:kan.liang@linux.intel.com:heiko.carstens@de.ibm.com:gor@linux.ibm.com:borntraeger@de.ibm.com:linux-s390@vger.kernel.org,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1311:1314:1345:1359:1437:1515:1534:1541:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2730:2892:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3872:4321:5007:6261:6742:6743:7903:8634:9036:10004:11026:11473:11657:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:13894:14096:14181:1438 4:14394: X-HE-Tag: chin67_3ceb48015d400 X-Filterd-Recvd-Size: 3396 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf39.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 1 Nov 2019 14:10:18 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C49D24F2; Fri, 1 Nov 2019 07:10:17 -0700 (PDT) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C09BC3F718; Fri, 1 Nov 2019 07:10:14 -0700 (PDT) From: Steven Price <steven.price@arm.com> To: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org Cc: Steven Price <steven.price@arm.com>, Andy Lutomirski <luto@kernel.org>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Borislav Petkov <bp@alien8.de>, Catalin Marinas <catalin.marinas@arm.com>, Dave Hansen <dave.hansen@linux.intel.com>, Ingo Molnar <mingo@redhat.com>, James Morse <james.morse@arm.com>, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= <jglisse@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will@kernel.org>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland <Mark.Rutland@arm.com>, "Liang, Kan" <kan.liang@linux.intel.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@de.ibm.com>, linux-s390@vger.kernel.org Subject: [PATCH v15 08/23] s390: mm: Add p?d_leaf() definitions Date: Fri, 1 Nov 2019 14:09:27 +0000 Message-Id: <20191101140942.51554-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191101140942.51554-1-steven.price@arm.com> References: <20191101140942.51554-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
Generic page walk and ptdump
|
expand
|
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 36c578c0ff96..acab5a455490 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -675,6 +675,7 @@ static inline int pud_none(pud_t pud) return pud_val(pud) == _REGION3_ENTRY_EMPTY; } +#define pud_leaf pud_large static inline int pud_large(pud_t pud) { if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) != _REGION_ENTRY_TYPE_R3) @@ -692,6 +693,7 @@ static inline unsigned long pud_pfn(pud_t pud) return (pud_val(pud) & origin_mask) >> PAGE_SHIFT; } +#define pmd_leaf pmd_large static inline int pmd_large(pmd_t pmd) { return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0;
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_leaf() functions/macros. For s390, pud_large() and pmd_large() are already implemented as static inline functions. Add a macro to provide the p?d_leaf names for the generic code to use. CC: Heiko Carstens <heiko.carstens@de.ibm.com> CC: Vasily Gorbik <gor@linux.ibm.com> CC: Christian Borntraeger <borntraeger@de.ibm.com> CC: linux-s390@vger.kernel.org Signed-off-by: Steven Price <steven.price@arm.com> --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+)