Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1847538ybz; Thu, 23 Apr 2020 07:05:02 -0700 (PDT) X-Google-Smtp-Source: APiQypI5APa2E4oi9LfO4eA244/s/YRfzMu8Y+ZBZ6+pDcgKK9ljnjC56Pq1OSAFFHSMwweibUXW X-Received: by 2002:a17:906:3e96:: with SMTP id a22mr2830300ejj.232.1587650702197; Thu, 23 Apr 2020 07:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587650702; cv=none; d=google.com; s=arc-20160816; b=Xj8APK6iBV8QFUi0aEfqgOY9UinJuGFDyL58vKnJ22kstJFOQd1aZIGhPUyUcvICi3 h6OSVuz5Dv5aoJ+3/apvf42jifaQjj6XCMOv8HigTOggCYlxgIlR45saj58xXMumgSg4 qaC2UwBhpzpUuzfwA6DU2jYDnLYCjHmq5Trl8yAAp/VYyHTgnF1/s+2LjcCYqqJDjYmg VMXOs7itgL90Ri+8jdyJbxZEZdREP+DQBdW0lyZKqw6+hcAHZLnlJ2+D1bIDLJ01w5zj yICMR5QqnLTorMlcOk6RMq7I7/VqDy/drsiOsgIlLHhzIlzMeu4kD6eLnwYRfNlcsil6 pQnA== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=XLDFrv2jiD51nOSPOtJa7d/hYZrDwxozV8Gqrq+n+Wk=; b=mtjB1QyRqhqAeeOt4uPpm8KWyIkgGbLtCsWK6hsxPNN6lGVY2ECmKQO5cdb95D4L50 Wg/wpO+0OcOsIig7g2VyQzrZ1SSBmB55116bnzEkVS/VnE79qR6MKEJP+r2vS50DMBSX IJZz70ohZs8wp+uiJbGBCMPyaG9RFRIZr7KciQjSWZXdoeTIZskLCqLm9vZHbb+7Y/LH xIILZ3dEMqkwJvvTz0f3X+vaV7Q9Igu8jG8ilQW/2XCfEBgWcUpAtDqwpNBXy3NwzfJk JrRoKlAa5kZsmXh7FV8Ah4vjROaxJY/Ul89ZAfG7PeOfNdVYk55011q5rNkgVAIFVby5 Q4Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si1156624ejb.380.2020.04.23.07.04.33; Thu, 23 Apr 2020 07:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbgDWM0r (ORCPT + 99 others); Thu, 23 Apr 2020 08:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726789AbgDWM0q (ORCPT ); Thu, 23 Apr 2020 08:26:46 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA68C08E934; Thu, 23 Apr 2020 05:26:46 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jRawC-0005GC-Ry; Thu, 23 Apr 2020 14:26:40 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 5966D1C0244; Thu, 23 Apr 2020 14:26:40 +0200 (CEST) Date: Thu, 23 Apr 2020 12:26:39 -0000 From: "tip-bot2 for Christoph Hellwig" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm: Use pgprotval_t in protval_4k_2_large() and protval_large_2_4k() Cc: Christoph Hellwig , Borislav Petkov , "Peter Zijlstra (Intel)" , x86 , LKML In-Reply-To: <20200422170116.GA28345@lst.de> References: <20200422170116.GA28345@lst.de> MIME-Version: 1.0 Message-ID: <158764479990.28353.14903341506618201022.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/mm branch of tip: Commit-ID: 325518e9b743686f471e7a4ef617b57c91386795 Gitweb: https://git.kernel.org/tip/325518e9b743686f471e7a4ef617b57c91386795 Author: Christoph Hellwig AuthorDate: Wed, 22 Apr 2020 18:53:08 +02:00 Committer: Borislav Petkov CommitterDate: Thu, 23 Apr 2020 11:38:42 +02:00 x86/mm: Use pgprotval_t in protval_4k_2_large() and protval_large_2_4k() Use the proper type for "raw" page table values. Signed-off-by: Christoph Hellwig Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200422170116.GA28345@lst.de --- arch/x86/include/asm/pgtable_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 567abdb..7b6ddcf 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -478,7 +478,7 @@ static inline pteval_t pte_flags(pte_t pte) unsigned long cachemode2protval(enum page_cache_mode pcm); -static inline unsigned long protval_4k_2_large(unsigned long val) +static inline pgprotval_t protval_4k_2_large(pgprotval_t val) { return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT)); @@ -487,7 +487,7 @@ static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot) { return __pgprot(protval_4k_2_large(pgprot_val(pgprot))); } -static inline unsigned long protval_large_2_4k(unsigned long val) +static inline pgprotval_t protval_large_2_4k(pgprotval_t val) { return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | ((val & _PAGE_PAT_LARGE) >>