From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933434AbbFIMfc (ORCPT ); Tue, 9 Jun 2015 08:35:32 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52040 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753964AbbFIMf0 (ORCPT ); Tue, 9 Jun 2015 08:35:26 -0400 Date: Tue, 9 Jun 2015 05:34:48 -0700 From: tip-bot for Dave Hansen Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, dave.hansen@linux.intel.com, mingo@kernel.org, akpm@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, dave@sr71.net, torvalds@linux-foundation.org Reply-To: hpa@zytor.com, tglx@linutronix.de, dave.hansen@linux.intel.com, akpm@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, dave@sr71.net, torvalds@linux-foundation.org In-Reply-To: <20150607183704.007686CE@viggo.jf.intel.com> References: <20150607183704.007686CE@viggo.jf.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/fpu] x86/mpx: Introduce new 'directory entry' to 'addr' helper function Git-Commit-ID: 54587653904c552c56b9dec153d7a89063394b09 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 54587653904c552c56b9dec153d7a89063394b09 Gitweb: http://git.kernel.org/tip/54587653904c552c56b9dec153d7a89063394b09 Author: Dave Hansen AuthorDate: Sun, 7 Jun 2015 11:37:04 -0700 Committer: Ingo Molnar CommitDate: Tue, 9 Jun 2015 12:24:33 +0200 x86/mpx: Introduce new 'directory entry' to 'addr' helper function Currently, to get from a bounds directory entry to the virtual address of a bounds table, we simply mask off a few low bits. However, the set of bits we mask off is different for 32-bit and 64-bit binaries. This breaks the operation out in to a helper function and also adds a temporary variable to store the result until we are sure we are returning one. Signed-off-by: Dave Hansen Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150607183704.007686CE@viggo.jf.intel.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/mpx.h | 1 - arch/x86/mm/mpx.c | 41 ++++++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/mpx.h b/arch/x86/include/asm/mpx.h index 871e5e5..99d374e 100644 --- a/arch/x86/include/asm/mpx.h +++ b/arch/x86/include/asm/mpx.h @@ -45,7 +45,6 @@ #define MPX_BNDSTA_TAIL 2 #define MPX_BNDCFG_TAIL 12 #define MPX_BNDSTA_ADDR_MASK (~((1UL<