From patchwork Tue Jan 6 04:30:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 16759 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 7A10FDE19D for ; Tue, 6 Jan 2009 15:31:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751422AbZAFEbE (ORCPT ); Mon, 5 Jan 2009 23:31:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751667AbZAFEbD (ORCPT ); Mon, 5 Jan 2009 23:31:03 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:50492 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbZAFEbB (ORCPT ); Mon, 5 Jan 2009 23:31:01 -0500 Received: from gandalf ([74.67.89.75]) by hrndva-omta04.mail.rr.com with ESMTP id <20090106043059.RYUF6316.hrndva-omta04.mail.rr.com@gandalf>; Tue, 6 Jan 2009 04:30:59 +0000 Date: Mon, 5 Jan 2009 23:30:58 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Heiko Carstens cc: Sam Ravnborg , LKML , Steven Rostedt , Ingo Molnar , "David S. Miller" , sparclinux Subject: Re: ftrace breaks sparc64 build In-Reply-To: <20090105231136.GA5073@osiris.boeblingen.de.ibm.com> Message-ID: References: <20090105181922.GA25622@uranus.ravnborg.org> <20090105195415.GA6204@uranus.ravnborg.org> <20090105213107.GA27293@uranus.ravnborg.org> <20090105220156.GC8592@uranus.ravnborg.org> <20090105231136.GA5073@osiris.boeblingen.de.ibm.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Tue, 6 Jan 2009, Heiko Carstens wrote: Sam and Heiko, I'm trying to see if the (a ? b : c) construct is causing the issue. Can you test this patch. Thanks, -- Steve --- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d95da10..e13ad24 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -113,7 +113,8 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); * "Define 'is'", Bill Clinton * "Define 'if'", Steven Rostedt */ -#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \ +#define if(cond) if ((__builtin_constant_p((cond)) && !!(cond)) || \ + (!__builtin_constant_p((cond)) && \ ({ \ int ______r; \ static struct ftrace_branch_data \ @@ -130,7 +131,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); else \ ______f.miss++; \ ______r; \ - })) + }))) #endif /* CONFIG_PROFILE_ALL_BRANCHES */ #else