From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbbJBHqq (ORCPT ); Fri, 2 Oct 2015 03:46:46 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39241 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbbJBHqn (ORCPT ); Fri, 2 Oct 2015 03:46:43 -0400 Date: Fri, 2 Oct 2015 00:45:55 -0700 From: tip-bot for Ben Hutchings Message-ID: Cc: tglx@linutronix.de, torvalds@linux-foundation.org, efault@gmx.de, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, ben@decadent.org.uk, peterz@infradead.org Reply-To: hpa@zytor.com, ben@decadent.org.uk, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, efault@gmx.de, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <1443660043.2730.15.camel@decadent.org.uk> References: <1443660043.2730.15.camel@decadent.org.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds Git-Commit-ID: f4b4aae1828855db761bf998ce37d3062b1d6446 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: f4b4aae1828855db761bf998ce37d3062b1d6446 Gitweb: http://git.kernel.org/tip/f4b4aae1828855db761bf998ce37d3062b1d6446 Author: Ben Hutchings AuthorDate: Thu, 1 Oct 2015 01:40:43 +0100 Committer: Ingo Molnar CommitDate: Fri, 2 Oct 2015 09:43:21 +0200 x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds On x32, gcc predefines __x86_64__ but long is only 32-bit. Use __ILP32__ to distinguish x32. Fixes this compiler error in perf: tools/include/asm-generic/bitops/__ffs.h: In function '__ffs': tools/include/asm-generic/bitops/__ffs.h:19:8: error: right shift count >= width of type [-Werror=shift-count-overflow] word >>= 32; ^ This isn't sufficient to build perf for x32, though. Signed-off-by: Ben Hutchings Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1443660043.2730.15.camel@decadent.org.uk Signed-off-by: Ingo Molnar --- arch/x86/include/uapi/asm/bitsperlong.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/uapi/asm/bitsperlong.h b/arch/x86/include/uapi/asm/bitsperlong.h index b0ae1c4..217909b 100644 --- a/arch/x86/include/uapi/asm/bitsperlong.h +++ b/arch/x86/include/uapi/asm/bitsperlong.h @@ -1,7 +1,7 @@ #ifndef __ASM_X86_BITSPERLONG_H #define __ASM_X86_BITSPERLONG_H -#ifdef __x86_64__ +#if defined(__x86_64__) && !defined(__ILP32__) # define __BITS_PER_LONG 64 #else # define __BITS_PER_LONG 32