From patchwork Fri Jul 11 20:50:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 33518 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 158E820672 for ; Fri, 11 Jul 2014 20:53:06 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id h18sf771221igc.1 for ; Fri, 11 Jul 2014 13:53:06 -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=w1lxhEoeVU59P0+Uf1eg6O/VvQdxH7XlT7ujpX18YxY=; b=lNXQrvppDGjobQbCFQv0+Ey/P8LldEGDYhXMtnrivqR3SgVHhODL4J1hB2IipPOSsn 4QXuHXkmkpL00dawsSlL61HmPQs4iJEywZi564h/irZscWudD9OsMLGJML8UGUACpr6h tSOEvpqdmqOM2p2FDkc//LjJS2HID6uRT1rMhDjS9CHGoldKkKSM1jsz8Uh+4u3lRUoD YaNW6Nb2xh0JVQEv8LC4PAH6wPgbd9zVs39eu7NMaCyONAk0Z1N73Kgf0jOSJGANb9PL NGizng/4gJEtPo0vdEfkDMgM1nXk+WWIuD46034oNO/dX0ta98uoDQ0O730txFromZ0H I1aQ== X-Gm-Message-State: ALoCoQlhSQwieHjkEE7Opm+rLoUujp1l+N2h3jYxczCi4+aFBc/WBv5bew+t6VT8jPc6h8qLzHAq X-Received: by 10.50.171.134 with SMTP id au6mr3031564igc.7.1405111986429; Fri, 11 Jul 2014 13:53:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls508618qgf.66.gmail; Fri, 11 Jul 2014 13:53:06 -0700 (PDT) X-Received: by 10.52.63.226 with SMTP id j2mr1140567vds.43.1405111986317; Fri, 11 Jul 2014 13:53:06 -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 d9si2559856vek.22.2014.07.11.13.53.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 13:53:06 -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 hq11so3164025vcb.13 for ; Fri, 11 Jul 2014 13:53:06 -0700 (PDT) X-Received: by 10.58.188.199 with SMTP id gc7mr1637812vec.4.1405111986199; Fri, 11 Jul 2014 13:53:06 -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 tc5csp65482vcb; Fri, 11 Jul 2014 13:53:05 -0700 (PDT) X-Received: by 10.70.27.66 with SMTP id r2mr1275142pdg.98.1405111985277; Fri, 11 Jul 2014 13:53:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id se3si3554229pac.228.2014.07.11.13.53.04; Fri, 11 Jul 2014 13:53:04 -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 S1753363AbaGKUwy (ORCPT + 28 others); Fri, 11 Jul 2014 16:52:54 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]:61594 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbaGKUwx (ORCPT ); Fri, 11 Jul 2014 16:52:53 -0400 Received: by mail-we0-f181.google.com with SMTP id q59so1616936wes.12 for ; Fri, 11 Jul 2014 13:52:50 -0700 (PDT) X-Received: by 10.194.185.238 with SMTP id ff14mr1644186wjc.9.1405111969290; Fri, 11 Jul 2014 13:52:49 -0700 (PDT) Received: from ards-macbook-pro.local (160-2.dsl.iskon.hr. [89.164.160.2]) by mx.google.com with ESMTPSA id lk5sm11252282wic.18.2014.07.11.13.52.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jul 2014 13:52:48 -0700 (PDT) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , rostedt@goodmis.org, paulmck@linux.vnet.ibm.com Subject: [PATCH v2] rcu: define tracepoint strings only if CONFIG_TRACING is set Date: Fri, 11 Jul 2014 22:50:45 +0200 Message-Id: <1405111845-3588-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: paulmck@linux.vnet.ibm.com --- v2: - s/DEFINE_TPS/DEFINE_RCU_TPS/ 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..eec9f3d6f506 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_RCU_TPS(sname) \ +static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; +#else +#define DEFINE_RCU_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_RCU_TPS(sname) \ struct rcu_state sname##_state = { \ .level = { &sname##_state.node[0] }, \ .call = cr, \