Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4323198imb; Wed, 6 Mar 2019 10:30:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyqEwOmquGakj/RgWF9QUZNT+g2JJcvNsw7JiLeu2JjujO/LD1P7FzsZ4HFk5pKIMT4W5n6 X-Received: by 2002:a17:902:7615:: with SMTP id k21mr8574135pll.152.1551897041259; Wed, 06 Mar 2019 10:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551897041; cv=none; d=google.com; s=arc-20160816; b=tPCiERkAshAeBtxSAFNCRVYepdA85fMjGi5M46U9c54fd48Yn57Krnpjkr61XrMuHI C8dZyYvZdsqDtkPM5UkDt/9qu52La86Y5WpWK7L62JIGyn8EdIulWdhlab8N0DtsAUMZ rzSWfrpTz66Wn3i5KtdQgpx+HRuKV2rP/s3OXGAg+jPLjAgE6Z6vtBOmsjJ/3qiQHOyj Tucy1NgccT+N8HhBOwaatAXltoGSoAa4vvLXXJxoOFN2MFgvIEuw/Q92roAd3oC/2DdE 3+MGP9/zx456EUQMYKZj2X7BHwzQa+iswCZ+lDU08W07R7OZbMsw+/Ahk+l5XuZLHjMY MHJQ== 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=FbmI8H/LDLwwCfkSNCFyqL30B69VDCB+cT3TXJ207I8=; b=yML+nxIA5UlLnh36wvMYgw43o33RWnZ2CmaZ11BGftq7kfli37+I4BCwK9AS8J08Ty OXinniV15GoGrY0qvQ514lhCNEpFJyn2MQnDA8NXFnU3YFlwO4J3rl3loAr2hflPgmpq fNyAaiMNrLvGxMrdspOQ/Xo+DRTHW2JmMx4GqkVpciEO9mV3Yff+NEtJvquMLYSnxVBJ 1EnQ4RTXkLtqPdUmCd8/UL+U6ds2H7bW/z1B73QfF4FfXqPDUsdnIBdW2O0xorrhV7c3 7c2alOiv6w5A0whvvELtrVJQ5muKlYFhIx/HNdKsYtu+owCnL+oCtY3a0Iv/S2ABV/Ax WQmw== 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 1si2101680plj.313.2019.03.06.10.30.25; Wed, 06 Mar 2019 10:30:41 -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 S1729945AbfCFPvO (ORCPT + 99 others); Wed, 6 Mar 2019 10:51:14 -0500 Received: from foss.arm.com ([217.140.101.70]:34380 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727566AbfCFPvJ (ORCPT ); Wed, 6 Mar 2019 10:51:09 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4631D80D; Wed, 6 Mar 2019 07:51:09 -0800 (PST) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 94F673F703; Wed, 6 Mar 2019 07:51:05 -0800 (PST) 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" , Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org Subject: [PATCH v4 06/19] s390: mm: Add p?d_large() definitions Date: Wed, 6 Mar 2019 15:50:18 +0000 Message-Id: <20190306155031.4291-7-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190306155031.4291-1-steven.price@arm.com> References: <20190306155031.4291-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_large() functions/macros. For s390, pud_large() and pmd_large() are already implemented as static inline functions. Add a #define so we don't pick up the generic version introduced in a later patch. 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 063732414dfb..1f188004ba95 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -679,6 +679,7 @@ static inline int pud_none(pud_t pud) return pud_val(pud) == _REGION3_ENTRY_EMPTY; } +#define pud_large pud_large static inline int pud_large(pud_t pud) { if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) != _REGION_ENTRY_TYPE_R3) @@ -696,6 +697,7 @@ static inline unsigned long pud_pfn(pud_t pud) return (pud_val(pud) & origin_mask) >> PAGE_SHIFT; } +#define pmd_large pmd_large static inline int pmd_large(pmd_t pmd) { return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0; -- 2.20.1