Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6127547ybi; Wed, 31 Jul 2019 08:47:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEW9vLExFYfcC5XP+D6Sijm0uWzB1Ho4D3I5ZUlJAOtdJTeWvFQo10T4AMUZ2sQeYyI9l/ X-Received: by 2002:a63:6a81:: with SMTP id f123mr36100722pgc.348.1564588068740; Wed, 31 Jul 2019 08:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564588068; cv=none; d=google.com; s=arc-20160816; b=H5A4T5/9/jBfZfePb6DPXzd+9Ts5fFALJw40uV7FYzsubB0TFqPNG0pWyGJqKKpf8O sHIWOi22flh8x7bP9eYCMmym1AUc0yXUUe+kHX+w44vJy7CL4lTO7ImJoWbbxcAXx62m 0Ew3H0FplwHl0lhYhBHMcDDl2gBvl1XpSjDq/Hp726CcAGGzTR7QSPhUKmgvTQw8fh3x PJ0zLNfQLaTbzr+5VwzHXkuE96PZ6nvuYHyzj212vfGoYiyFioVjEohWzCVbZjk5Uo1D zn7gA78WGFDxOQc8ZNAOS8JlJVDaKtr5wY++TmL6zB3bgilprJLKbJPqvNFgtcBuYQIU DSKw== 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=SeXVsMnk2ItLAq9xssoCnMjuOjZOxOqXJMYOSk/jj2w=; b=h2+Ngu2MRrX0W6OQk1tDSdUIu4+L86tsXxwzJ31/D3wbNDxYLSxJI5y7O+wJjnGIAt bzKjmADoQly6mtIc37KeLJkVA4taAocLHVZjftvNAT5tjTn9jehLbnJcHQiQX1TcchkR NkqxIJd635GgyeXCZgqFRDHEdHxE4pUPiO7H61TM0px1SgCZ2d1xXgsh3GTkLz/9Z7oV fZucSCWIoW5Tr1thX3XhvLBWEjXBJPOZJejgc5w7FXj/V/8BOg0wJaubHVul8pPBRdDE QqXZ65hm9jqqm44R8cvryMuPrStYO7GbYaQngLQB3onxkSNuNlEIGVivRY13D3n8EK02 ItMg== 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 v16si1762425pjb.91.2019.07.31.08.47.33; Wed, 31 Jul 2019 08:47:48 -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 S1729807AbfGaPqk (ORCPT + 99 others); Wed, 31 Jul 2019 11:46:40 -0400 Received: from foss.arm.com ([217.140.110.172]:49736 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729758AbfGaPqg (ORCPT ); Wed, 31 Jul 2019 11:46:36 -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 230CC1570; Wed, 31 Jul 2019 08:46:36 -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 21C233F694; Wed, 31 Jul 2019 08:46:33 -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 v10 08/22] s390: mm: Add p?d_leaf() definitions Date: Wed, 31 Jul 2019 16:45:49 +0100 Message-Id: <20190731154603.41797-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190731154603.41797-1-steven.price@arm.com> References: <20190731154603.41797-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 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