Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755273AbdDEMCV (ORCPT ); Wed, 5 Apr 2017 08:02:21 -0400 Received: from mga03.intel.com ([134.134.136.65]:52483 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185AbdDEMBS (ORCPT ); Wed, 5 Apr 2017 08:01:18 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,278,1486454400"; d="scan'208";a="952137067" Date: Wed, 5 Apr 2017 15:00:30 +0300 From: "Kirill A. Shutemov" To: Denys Vlasenko Cc: brgerst@gmail.com, torvalds@linux-foundation.org, akpm@linux-foundation.org, luto@amacapital.net, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, luto@kernel.org, peterz@infradead.org, bp@alien8.de, hpa@zytor.com, dave.hansen@intel.com, tglx@linutronix.de, mingo@kernel.org, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/mm] x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert Message-ID: <20170405120029.ckl2a5bc3ikydozw@black.fi.intel.com> References: <20170330080731.65421-3-kirill.shutemov@linux.intel.com> <53f40ad7-2775-517f-91d1-bde811697045@redhat.com> <20170405111258.5ro7momzscweinuf@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161126 (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1638 Lines: 42 On Wed, Apr 05, 2017 at 01:50:27PM +0200, Denys Vlasenko wrote: > Er.... "Change top bits ... ((47 or 56 [bits] depending on paging mode)"? > I know that's wrong and that's not what you meant to say, > but it can be read this way too. "47th" instead of "47" > would eliminate this reading, but you removed "th". > > Spell it out to eliminate any chance of confusion: > > Change top bits to match most significant bit (47th or 56th bit > depending on paging mode) in the address. > ---------------------8<----------------------- >From 5dec28ba49387ff444e447213b553506e253616d Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Wed, 5 Apr 2017 14:06:15 +0300 Subject: [PATCH] x86/asm: Fix comment in return_from_SYSCALL_64 On x86-64 __VIRTUAL_MASK_SHIFT depends on paging mode now. Signed-off-by: Kirill A. Shutemov --- arch/x86/entry/entry_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 607d72c4a485..edec30584eb8 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -266,7 +266,8 @@ return_from_SYSCALL_64: * If width of "canonical tail" ever becomes variable, this will need * to be updated to remain correct on both old and new CPUs. * - * Change top 16 bits to be the sign-extension of 47th bit + * Change top bits to match most significant bit (47th or 56th bit + * depending on paging mode) in the address. */ shl $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx sar $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx -- Kirill A. Shutemov