From patchwork Thu Aug 28 18:26:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 36257 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B371120551 for ; Thu, 28 Aug 2014 18:29:33 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf22878111pab.8 for ; Thu, 28 Aug 2014 11:29:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=DqYUMAIm4zH0f95Jr9oqHS8Pj93sgsPY/QC80FPEiRs=; b=c1oJezFB1sw87fizCKNzMXxWHmPJnWEd625969qqAKaNK90DY1iY16rhGxwltpJdwY POjZqcWxI/3Pdk+wfy+yTD4HWwFNqU8y3aguckZggdLekMl/JnRj5+qGB+Kwv5nComAR Fmlk0LIHQD/h/cAk76y0NXMfBEMzJPcxAYRP2ZM51MiL4Lixn4dyRyqGvfmcJ9i1sLY/ 3u5FxJILlhNVFEMABL9JTmeYkkLdjsnPHAbesY7WFaRmmMLlTf6iVjITBPGl4WE5BFyz nLU3lIdpNiE3zDwrDZqC7FBCm0p+icCjb+Gp3POTfdaNv3dcs4FTXmwYIpVWUGjpgl6n B+nQ== X-Gm-Message-State: ALoCoQmcW8GuMczu6gOj4cG/968n0xUJdXK80MJMNCmq31t59RSkRqan/7Reb9SczU/lwR+zxxDT X-Received: by 10.66.66.170 with SMTP id g10mr3029451pat.12.1409250569628; Thu, 28 Aug 2014 11:29:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.240 with SMTP id n103ls743724qgd.13.gmail; Thu, 28 Aug 2014 11:29:29 -0700 (PDT) X-Received: by 10.221.48.201 with SMTP id ux9mr2801109vcb.68.1409250569489; Thu, 28 Aug 2014 11:29:29 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id xd4si4677372vdb.66.2014.08.28.11.29.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 11:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ij19so1297703vcb.40 for ; Thu, 28 Aug 2014 11:29:29 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr4530350vdb.27.1409250569382; Thu, 28 Aug 2014 11:29:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp278990vcb; Thu, 28 Aug 2014 11:29:28 -0700 (PDT) X-Received: by 10.70.100.72 with SMTP id ew8mr8455109pdb.128.1409250568534; Thu, 28 Aug 2014 11:29:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cz5si8104839pbc.117.2014.08.28.11.29.24 for ; Thu, 28 Aug 2014 11:29:25 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684AbaH1S3Q (ORCPT + 26 others); Thu, 28 Aug 2014 14:29:16 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:52832 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032AbaH1S0o (ORCPT ); Thu, 28 Aug 2014 14:26:44 -0400 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Aug 2014 12:26:44 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 28 Aug 2014 12:26:43 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 895583E40044 for ; Thu, 28 Aug 2014 12:26:42 -0600 (MDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s7SGMiKv9240918 for ; Thu, 28 Aug 2014 18:22:44 +0200 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id s7SIV0D2012784 for ; Thu, 28 Aug 2014 12:31:04 -0600 Received: from paulmck-ThinkPad-W500 ([9.70.82.112]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id s7SIV0HU012757; Thu, 28 Aug 2014 12:31:00 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id C47FA38113E; Thu, 28 Aug 2014 11:26:37 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, Ard Biesheuvel , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 08/15] rcu: Define tracepoint strings only if CONFIG_TRACING is set Date: Thu, 28 Aug 2014 11:26:27 -0700 Message-Id: <1409250394-25159-8-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1409250394-25159-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20140828182614.GA23877@linux.vnet.ibm.com> <1409250394-25159-1-git-send-email-paulmck@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14082818-3532-0000-0000-0000043705F5 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: paulmck@linux.vnet.ibm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ard Biesheuvel Commit f7f7bac9cb1c ("rcu: Have the RCU tracepoints use the tracepoint_string infrastructure") unconditionally populates the __tracepoint_str input section, but this section is not assigned an output section if CONFIG_TRACING is not set. This results in the __tracepoint_str turning up in unexpected places, i.e., after _edata. Signed-off-by: Ard Biesheuvel Reviewed-by: Steven Rostedt Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 2719978ea018..dc52dc3b8c3e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -79,9 +79,18 @@ static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; * the tracing userspace tools to be able to decipher the string * address to the matching string. */ -#define RCU_STATE_INITIALIZER(sname, sabbr, cr) \ +#ifdef CONFIG_TRACING +# define DEFINE_RCU_TPS(sname) \ static char sname##_varname[] = #sname; \ -static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; \ +static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; +# define RCU_STATE_NAME(sname) sname##_varname +#else +# define DEFINE_RCU_TPS(sname) +# define RCU_STATE_NAME(sname) __stringify(sname) +#endif + +#define RCU_STATE_INITIALIZER(sname, sabbr, cr) \ +DEFINE_RCU_TPS(sname) \ struct rcu_state sname##_state = { \ .level = { &sname##_state.node[0] }, \ .call = cr, \ @@ -93,7 +102,7 @@ struct rcu_state sname##_state = { \ .orphan_donetail = &sname##_state.orphan_donelist, \ .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ .onoff_mutex = __MUTEX_INITIALIZER(sname##_state.onoff_mutex), \ - .name = sname##_varname, \ + .name = RCU_STATE_NAME(sname), \ .abbr = sabbr, \ }; \ DEFINE_PER_CPU(struct rcu_data, sname##_data)