Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7301850ybi; Mon, 22 Jul 2019 10:35:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVhGp+jdP8uetl3sYgEB52+eUDI0VjHQnp5DTtvDc0LMiQuNYfD/iYWSBlvht7zEMANkSj X-Received: by 2002:a63:c013:: with SMTP id h19mr42402018pgg.108.1563816943270; Mon, 22 Jul 2019 10:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563816943; cv=none; d=google.com; s=arc-20160816; b=paZvXEkIE5+1kLCwwpfFTTYVHEhSs7KwMBhiQdUa/ybvkj0XoHgdttTcbXuodoMEMa SVxB1AZUEazZglzdpXPI1sAScFHLaLkZylfsKtCoNCrMdu0xKPS5rl9c7l4QgufVF7Zr Paqchl+lhepbQxz4lFaYVBtKI3/VAy+0YM0WdZJXVPjysFkk9a+fMqbIJq4WdZaJffKD anfAkN95W1U5Lk+Cg9PsuUNlch9LWEJ6LgxaiH8NX1mtKxo4+ZuljirTRsZ502fXuPKW DtqB5OfTp2C9dpZSgpfCNrFu3duUvu6ZoEIzJRfrfWmWpfMVvnoiefzEMtyIAgv9Qhzx nVBA== 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=j8DVKsa3geScdVXHlFrTdufGUqyaSXLPJxaAhWlrnjk=; b=GXs0HcRk9t36j4FuCAXMAwB26FpY9XEBSw9h4pCFxnVH3AHB53FUM3s3zY+IZONUc2 XlsXlaZULkSYSe40kgLDtSUertqKR1fN7NvqUEis9B5S8Z1uCFnOai9OkLy/gX4n80ik pdA8vq1tBZm2WDX7dmjCCFLAFMI3PE9vBcDfs1Vs4fZIvVJBdQ777KsbDqkUjl/j55Db KvR8Kij9aTTNVJO7Vzm6wIgeJnsFf0V0dmagXZ9EWJ1acC9Xsq3yFpqX2S+3Oe1AXRHn 2XJnLedc80PETcctXtNNpD/uJixlG7QKu50cxHwwsAA7ZhoD2jV12pqfeN/OSCXE/V+j YWeA== 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 3si12838745pfn.170.2019.07.22.10.35.27; Mon, 22 Jul 2019 10:35:43 -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 S1729791AbfGVPmr (ORCPT + 99 others); Mon, 22 Jul 2019 11:42:47 -0400 Received: from foss.arm.com ([217.140.110.172]:40204 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729752AbfGVPmp (ORCPT ); Mon, 22 Jul 2019 11:42:45 -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 0BDA01509; Mon, 22 Jul 2019 08:42:45 -0700 (PDT) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 257E33F694; Mon, 22 Jul 2019 08:42:42 -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 , Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org Subject: [PATCH v9 07/21] s390: mm: Add p?d_leaf() definitions Date: Mon, 22 Jul 2019 16:41:56 +0100 Message-Id: <20190722154210.42799-8-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722154210.42799-1-steven.price@arm.com> References: <20190722154210.42799-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: 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 9b274fcaacb6..f99a5f546e5e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -674,6 +674,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) @@ -691,6 +692,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