Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp763437ybl; Fri, 6 Dec 2019 05:57:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwdkHDwY98QNyOe+kiiog/uH1Y5Es/Id28xb1dfO4CqcSFDUhTLsA9RToYd7H9i20v4TFAW X-Received: by 2002:aca:f495:: with SMTP id s143mr6266878oih.118.1575640624366; Fri, 06 Dec 2019 05:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575640624; cv=none; d=google.com; s=arc-20160816; b=bVcKpC0I8tsQ2UryoHXrBfGojYo3QwWQY9lt0SgYWIo64J3/WnVj5GL+zg05ekyFUr GXd25tCmJ/2WvlRKIDiF+gFf4x1p2f3E+7R/uFbW/uFYezMq6JuBnYEBrJJVJ5MDeCUa 3Y5O20BBzqN5IX21TMDjLZaVEImiuPu7vIjV6f0lDn70DBk9WhKRRrr+A5Yh84YGtL/f 3+O9qAYW3BQG7I1J25utoNJ0p4dv5UC8FfnnT1bgWJ41bZmRHkZn7bZ1MIxwHXHwDJYq jA62ZQmBhpuPO9GWK8lPBh9OB8HGl4ePf4I2phFsHfKV39FBcGZG2/B+mW9GEM3cdCj6 3Fmg== 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=1Bad0mOLDPIUe0YlDQF0zjpQrChixmLk6/OPaK5Pcec=; b=wnnYPIAc4MCTkeyk8X9AsKWTrBUuUnJkDeuFe8t5qmYW5sl7gIrCLH/0tSxH+1TPgO /AD1CBLd20ZRajCa8CBgILKol4aPDqR2NcN6PgCai2dsc7qnePzyuGeJDKnYW2MzlclG Kkj1XrkTzQjtDTwBsEIye40WMBUy/h7o4fz+7RK2uF8CF6eE7eAUsXPj+9eXGbJpUWYT DDREotE11vZf8navFU86wbAvsfD4oZiHP0FA7P1QG7BkMjmigs2hk/rB2YEldxIqQkj4 HTwjmpcsNu3DHGpyvKIbzRJ7PtbnH7Fu0RRBBeR07UPgjyiI1OncXeijxkU+hl+OjG7/ 0NVA== 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 7si6660795oir.183.2019.12.06.05.56.52; Fri, 06 Dec 2019 05:57:04 -0800 (PST) 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 S1726619AbfLFNyK (ORCPT + 99 others); Fri, 6 Dec 2019 08:54:10 -0500 Received: from foss.arm.com ([217.140.110.172]:44620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbfLFNyI (ORCPT ); Fri, 6 Dec 2019 08:54:08 -0500 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 BE352DA7; Fri, 6 Dec 2019 05:54:07 -0800 (PST) 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 C7E313F718; Fri, 6 Dec 2019 05:54:04 -0800 (PST) From: Steven Price To: Andrew Morton , 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" , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH v16 08/25] s390: mm: Add p?d_leaf() definitions Date: Fri, 6 Dec 2019 13:52:59 +0000 Message-Id: <20191206135316.47703-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191206135316.47703-1-steven.price@arm.com> References: <20191206135316.47703-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 7b03037a8475..137a3920ca36 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -673,6 +673,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) @@ -690,6 +691,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