Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4455767ybp; Mon, 7 Oct 2019 08:41:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7GBq6LSUC/8/K+4rH1XxDXUMOuWeEJFJEBMuzM5vmZp3XkSxUjiwYl6Vz5OIly9BhbHQB X-Received: by 2002:a50:9250:: with SMTP id j16mr29947631eda.160.1570462910251; Mon, 07 Oct 2019 08:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570462910; cv=none; d=google.com; s=arc-20160816; b=rjJ+hzn5dPizG7kohwLgrAOukW5sSWNnrcDYcF0ATHilvmmrhNtbviWaMF808LyXOc mMaa4ZbWW3Z5jsgDK0y31rxUGMoEg28GKk9CpWAYAl6VUdL528N0BkDTtPpYcg/00bH1 p12G0T9nf7R3E0I+leKRX3mdBYsf8Z5aKjo5IbXW3Vi1HFR3noRnnPK0Ax/Jleff9nmI ptAP7c6Dmoxc+gET/BnrlwggV0yv/JBYiYzt/R3Gvu0vthr/tLKBx6Y+DOlR/cvz2vj2 Sm66dD0GXo/PfAy7cO3ppdV/MWbkKrYJNDI7QlBX+QjiaZiuVlg5IeVbE1TQhTKcqPzh xsxQ== 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=Euqe5ny56ywxkWmLJTcj36E6MU4yq71QyOiMRg7X9JUEDO8GUvmqaPLssWQEsl4HAk wwfnlS+/dSHZPBBnOTWR4WX+KtcXfxZKLq0p6krgOpD3xVAQs8vDzlZGXZzvWUlnFs0u 9rv6pOU8449Zr5cECl5giKfe+nzOjV8mJYYMzdmsbX5sWIIGU/xkSU2EdV8WKnqIOXRI 8wZpbKayro2DsdUVGcnb//zSgMk9elC11N4gclRMNOS2JJf2tCds35dKI3f6roJN3Ujx IVO+jWUjTdqpd43N2KGWvWP7iU/ezKHKC4x05rwGsv2XADX1yXfG81ZBVTSutVLIKdpd B/cw== 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 si30si7302076ejb.92.2019.10.07.08.41.27; Mon, 07 Oct 2019 08:41:50 -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 S1728983AbfJGPjJ (ORCPT + 99 others); Mon, 7 Oct 2019 11:39:09 -0400 Received: from foss.arm.com ([217.140.110.172]:38470 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728390AbfJGPjG (ORCPT ); Mon, 7 Oct 2019 11:39:06 -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 E680E1684; Mon, 7 Oct 2019 08:39:05 -0700 (PDT) Received: from e112269-lin.arm.com (unknown [10.1.197.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E2EFE3F6C4; Mon, 7 Oct 2019 08:39:02 -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 v11 08/22] s390: mm: Add p?d_leaf() definitions Date: Mon, 7 Oct 2019 16:38:08 +0100 Message-Id: <20191007153822.16518-9-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191007153822.16518-1-steven.price@arm.com> References: <20191007153822.16518-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