From patchwork Fri Jul 11 11:38:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 33483 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 53A0420672 for ; Fri, 11 Jul 2014 11:38:40 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf6052946pab.11 for ; Fri, 11 Jul 2014 04:38:39 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=2/IJcFXZ11N9kITyfRXKH6mDDo9wRHW0wz+N3bU1Jkg=; b=D7k9vwXg5nh6t7v5BJf0I1wEOoLyjdo4qfdpDMVnOWNRtV8PDu1GeC9o2RxWzmTflY 8jZk09F32Ua3M3+WVR4LNd6bvwvQj1BYgpkt/ByGtJb2kQ6Xw/7OsZ6bYjl8XWRuLp7W cmJNtA3yjsKVx35TTSEsv48sGRFLgrqL5alZWIQGGO2PI1JoE68LoHBfbErn07zxaVRc IC35KRQLV8m5Pcn+CjE4Ix3odfVpFGQld9tANZohezN2BSH7R7DebfUPTd3KwdrGQjgv rPgR8IgtOOMwgI8EsexPTQQ2enyMiJrh40JTiEOIwCb97DN3iX8CsX1/aVoKAhsfMbGY QLIA== X-Gm-Message-State: ALoCoQnmgFb39AoeIEXY1Czl55pRTAhFOd2cw9PmU1Q+qogjtqrzT4b3ccI/2pykAB7wNxUYYQBp X-Received: by 10.68.195.9 with SMTP id ia9mr26094718pbc.7.1405078717392; Fri, 11 Jul 2014 04:38:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.71 with SMTP id o65ls386156qgo.4.gmail; Fri, 11 Jul 2014 04:38:37 -0700 (PDT) X-Received: by 10.52.239.6 with SMTP id vo6mr266761vdc.59.1405078717261; Fri, 11 Jul 2014 04:38:37 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id wx3si1346629vdc.10.2014.07.11.04.38.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 04:38:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hq11so1786250vcb.27 for ; Fri, 11 Jul 2014 04:38:37 -0700 (PDT) X-Received: by 10.220.2.18 with SMTP id 18mr331330vch.49.1405078717165; Fri, 11 Jul 2014 04:38:37 -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.37.5 with SMTP id tc5csp27900vcb; Fri, 11 Jul 2014 04:38:36 -0700 (PDT) X-Received: by 10.68.96.194 with SMTP id du2mr33675295pbb.105.1405078716335; Fri, 11 Jul 2014 04:38:36 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9si2172467pas.196.2014.07.11.04.38.34; Fri, 11 Jul 2014 04:38:34 -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 S1753431AbaGKLi0 (ORCPT + 28 others); Fri, 11 Jul 2014 07:38:26 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:39383 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbaGKLiY (ORCPT ); Fri, 11 Jul 2014 07:38:24 -0400 Received: by mail-wg0-f48.google.com with SMTP id x13so939850wgg.19 for ; Fri, 11 Jul 2014 04:38:23 -0700 (PDT) X-Received: by 10.180.105.170 with SMTP id gn10mr4315285wib.31.1405078703613; Fri, 11 Jul 2014 04:38:23 -0700 (PDT) Received: from ards-macbook-pro.local (141-138-33-167.dsl.iskon.hr. [141.138.33.167]) by mx.google.com with ESMTPSA id fc7sm4635394wjc.37.2014.07.11.04.38.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 04:38:22 -0700 (PDT) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , rostedt@goodmis.org, dipankar@in.ibm.com, paulmck@linux.vnet.ibm.com Subject: [PATCH] rcu: define tracepoint strings only if CONFIG_TRACING is set Date: Fri, 11 Jul 2014 13:38:12 +0200 Message-Id: <1405078692-29957-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 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: ard.biesheuvel@linaro.org 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.182 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: , 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 Cc: rostedt@goodmis.org Cc: dipankar@in.ibm.com Cc: paulmck@linux.vnet.ibm.com --- kernel/rcu/tree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index f1ba77363fbb..ac1984149eb5 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -79,9 +79,16 @@ 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. */ +#ifdef CONFIG_TRACING +#define DEFINE_TPS(sname) \ +static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; +#else +#define DEFINE_TPS(sname) +#endif + #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \ static char sname##_varname[] = #sname; \ -static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; \ +DEFINE_TPS(sname) \ struct rcu_state sname##_state = { \ .level = { &sname##_state.node[0] }, \ .call = cr, \