Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3207899ybg; Fri, 25 Oct 2019 00:21:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFMpFerugVezpQQfBXLEniuHAqGL/PR7Qz232BJj1dFktMC8Y0hDqH3lhvksblhKfl2ANo X-Received: by 2002:aa7:d958:: with SMTP id l24mr2327351eds.234.1571988085799; Fri, 25 Oct 2019 00:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571988085; cv=none; d=google.com; s=arc-20160816; b=DQiogHBbI5+Dc8Tfnhn45rKLixTs5UQBommps2TCmQ6FC83XTe7CcocgNxdN9hMafu qi4M5mc0e50GAnEImgKB2ENg2JcF7m2uVd2oPsuJA63l+B7O8S77m4GgSb160C++PWfl 3GEUUBLZO2VbEDYmL28SfZyUBv2dUOOZAs9Yzr0FsUEQ5Lrv5yxVntguLviMO2LCRQJQ bZm5Z47AU7W5OLEUWE6keoHzbFSCXxDDMMfLN8qOA9lNuN8lczXYUcgtCovkDHoJ2qtj 0aWtYezoCghM/det94GQZ6o5GREkBRW/Brkg658nONzB2FzxgH2RELaNg5bfZYcBovcp QuRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oTJnxLx1Hqz3WTYzalFIm2eNue5AGHuljrF9pdDe1dY=; b=B01OJ55EkrDoob0MsMhMdHHRBiBy6ZUFvvwTvmBFsAiYrtqUCCGO5XZAcoppq9amvW f7rtrjlx62LgzIo9kFMReyApQhvtUf2dZl6ZNFC2+LIJRUzgdIKdGSfcVQGCDgEFJqFR Xcyw0pVxrFwrb40qWo1nlSTG3iM2vJldnU0xNUT/CnG7eRwx9aIJmkYZfFBa/Ae1IMeW DNQ+fDjYzp4ExrbjA4PVRjPBLL0gVzVELUATUrQ5rK+KtontOfXPkEOHlqhWAsi3FB8E 1uFRbp7EDT4Or1ug8fONoznawcuxXMgssUVwHRad04/VNF5QYIuII8RG6NbVQx6DqiGg DX1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si822750edi.179.2019.10.25.00.21.01; Fri, 25 Oct 2019 00:21:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391376AbfJXJjE (ORCPT + 99 others); Thu, 24 Oct 2019 05:39:04 -0400 Received: from foss.arm.com ([217.140.110.172]:44522 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438612AbfJXJiD (ORCPT ); Thu, 24 Oct 2019 05:38:03 -0400 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 BB86D4AE; Thu, 24 Oct 2019 02:37:52 -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 B4E813F71F; Thu, 24 Oct 2019 02:37:49 -0700 (PDT) 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?q?J=C3=A9r=C3=B4me=20Glisse?= , 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" , Andrew Morton , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH v13 08/22] s390: mm: Add p?d_leaf() definitions Date: Thu, 24 Oct 2019 10:37:02 +0100 Message-Id: <20191024093716.49420-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024093716.49420-1-steven.price@arm.com> References: <20191024093716.49420-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 CC: Vasily Gorbik CC: Christian Borntraeger 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 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; -- 2.20.1