Received: by 10.223.185.116 with SMTP id b49csp669222wrg; Wed, 14 Feb 2018 05:15:49 -0800 (PST) X-Google-Smtp-Source: AH8x225s+YfOWNIFYoDybQrqTHAZpDssEfTqU8Vx9Wbq9dQNmH4ZTx8DABe5f+pRtuuAwnJ995qX X-Received: by 2002:a17:902:7716:: with SMTP id n22-v6mr4449276pll.388.1518614149600; Wed, 14 Feb 2018 05:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518614149; cv=none; d=google.com; s=arc-20160816; b=D3gMISvRqMKfM24Shj6NGadXlKDxG5QXJy30oJW9jcp0NbOhCYyMcOGzV215tzLeBw TzUyin1tEJm1HIJUxuYwyLyeOnWkUhKQURoxBFAbTzjdhLM3QNUg6kevJNe6mR5GeiUM urx3XTWVLmT6mTW5DdYQbhV8zPflrJSOR3IYMhobxoqbdjDcvYjbbgqfkpvIGo9xngng BDXfWqG9jtOoH++i7Bd9AKJNcBncsS8hS8V2t3bdNBTRJQGA1UW5NPMBg5/XKEFQNlEr Szqa3rSNvH1EuBDknh00mpqYLEatQwTYzmnR9+GMHUJOwR6tb64ojGm7kfCSaWWj3uFd n01g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=cLGJYsJwSRUbLnIW/3oJTg9Tlm+OaE6EGgI9gq0ENzc=; b=nB/vJVc4gWzClc8ndlE5o9TXjYpOuOqIGY0+ekK68bHuk6eAjKLDNyZXhI4WmVs+Cv gkVZb8sVt9kAxa7yr9kbDbUtCV+7eV7gYZ1EZdJlRv3P1ArmWNq4xWV0wS9XPrt1d5Ft kEpelgtIGoYvuEA+w6TMO9xdnbsMlLVn/sPPnwr9qoqraKAMMJTxO8EMld8sSKjATPvc GC8h3v8h6I078339sQMF2t+ZIH2Ya/JvNVKGMUyrEdur8wHSLLy+PpMw9OaS7oDDfN7b W72vlvrxzexOs3TPrV/ovGICaEfFSwnzDaA/zlczsXrF1u5gfEumxXQ9icocGLewZ522 9nBw== 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 l7si2075470pgf.710.2018.02.14.05.15.34; Wed, 14 Feb 2018 05:15:49 -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 S967798AbeBNNOz (ORCPT + 99 others); Wed, 14 Feb 2018 08:14:55 -0500 Received: from terminus.zytor.com ([198.137.202.136]:54687 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967729AbeBNNOy (ORCPT ); Wed, 14 Feb 2018 08:14:54 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w1ED4Kou026774; Wed, 14 Feb 2018 05:04:20 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w1ED4Kv5026771; Wed, 14 Feb 2018 05:04:20 -0800 Date: Wed, 14 Feb 2018 05:04:20 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: "tip-bot for Kirill A. Shutemov" Message-ID: Cc: torvalds@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, bp@suse.de, peterz@infradead.org, tglx@linutronix.de, luto@amacapital.net, kirill.shutemov@linux.intel.com, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, peterz@infradead.org, bp@suse.de, mingo@kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, kirill.shutemov@linux.intel.com, luto@amacapital.net In-Reply-To: <20180214111656.88514-2-kirill.shutemov@linux.intel.com> References: <20180214111656.88514-2-kirill.shutemov@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52 Git-Commit-ID: b83ce5ee91471d19c403ff91227204fb37c95fb2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b83ce5ee91471d19c403ff91227204fb37c95fb2 Gitweb: https://git.kernel.org/tip/b83ce5ee91471d19c403ff91227204fb37c95fb2 Author: Kirill A. Shutemov AuthorDate: Wed, 14 Feb 2018 14:16:48 +0300 Committer: Ingo Molnar CommitDate: Wed, 14 Feb 2018 13:11:13 +0100 x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52 __PHYSICAL_MASK_SHIFT is used to define the mask that helps to extract physical address from a page table entry. Although real physical address space available may differ between machines, it's safe to use 52 as __PHYSICAL_MASK_SHIFT. Unused bits above log2(MAXPHYADDR) up to bit 51 are reserved and must be 0. Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180214111656.88514-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/page_64_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h index e140731..f68e652 100644 --- a/arch/x86/include/asm/page_64_types.h +++ b/arch/x86/include/asm/page_64_types.h @@ -52,11 +52,12 @@ #define __START_KERNEL_map _AC(0xffffffff80000000, UL) /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */ -#ifdef CONFIG_X86_5LEVEL + #define __PHYSICAL_MASK_SHIFT 52 + +#ifdef CONFIG_X86_5LEVEL #define __VIRTUAL_MASK_SHIFT 56 #else -#define __PHYSICAL_MASK_SHIFT 46 #define __VIRTUAL_MASK_SHIFT 47 #endif