From patchwork Fri Jul 18 20:55:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 33909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A0206208CF for ; Fri, 18 Jul 2014 20:55:59 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf18190582oac.9 for ; Fri, 18 Jul 2014 13:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=RG4pptu8Lux+DCw+tZRrD7W478IgdpJlnpUOPda2mjs=; b=Q6TTbDiymfDnFJXcdzrBjSdKGIaXdRJ50NEMUemHlLTaeswdIoFqmQXfBMq5Nh57xF EoKsETnzraSubUV3ADqLPRqmfh+eQHEr1D1iNbHxcEua4yn0hlIaHqHJrQHEaBng0fkg utDeIo0X7I+aSyEdL3QAiIKOtyTBHTzrw75tioGcWd1b9Kd8tYCSejJ8ttNagzJTCE7j aTIKnrIAiL7yz0sCtkFeieQAeodY9ZKqCabIS0XBTUp2Jg9bf/+4uX2PBJ3VSu7bcpcO i6L+pbemEdSTtwWzDKJNcCAAUtvfpJz5UPkh2CZ/4BE3VrAlVkucLqvpZvJtu93UNcQs kUOA== X-Gm-Message-State: ALoCoQmnK14H5EhskgR/C3Smxob/6wccQB0PGERlJ/CT2Vz5C3+jHQ1xC69PTsly9AIRX5HgKhGh X-Received: by 10.182.119.129 with SMTP id ku1mr3801047obb.20.1405716959310; Fri, 18 Jul 2014 13:55:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.102 with SMTP id 93ls1142348qgo.10.gmail; Fri, 18 Jul 2014 13:55:59 -0700 (PDT) X-Received: by 10.52.24.68 with SMTP id s4mr7976221vdf.37.1405716959223; Fri, 18 Jul 2014 13:55:59 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id m8si6901671vcp.78.2014.07.18.13.55.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 13:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so8455052vcb.9 for ; Fri, 18 Jul 2014 13:55:59 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr9537549vcq.50.1405716959149; Fri, 18 Jul 2014 13:55:59 -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 tc5csp40763vcb; Fri, 18 Jul 2014 13:55:58 -0700 (PDT) X-Received: by 10.66.219.42 with SMTP id pl10mr8391789pac.22.1405716957638; Fri, 18 Jul 2014 13:55:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pg1si3560900pdb.486.2014.07.18.13.55.56; Fri, 18 Jul 2014 13:55:56 -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 S1762591AbaGRUzq (ORCPT + 23 others); Fri, 18 Jul 2014 16:55:46 -0400 Received: from mail-qg0-f41.google.com ([209.85.192.41]:58908 "EHLO mail-qg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762181AbaGRUzp (ORCPT ); Fri, 18 Jul 2014 16:55:45 -0400 Received: by mail-qg0-f41.google.com with SMTP id q107so3685371qgd.0 for ; Fri, 18 Jul 2014 13:55:44 -0700 (PDT) X-Received: by 10.140.24.243 with SMTP id 106mr11638192qgr.11.1405716944432; Fri, 18 Jul 2014 13:55:44 -0700 (PDT) Received: from xanadu.home (modemcable177.143-130-66.mc.videotron.ca. [66.130.143.177]) by mx.google.com with ESMTPSA id g35sm7302271qgf.49.2014.07.18.13.55.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 13:55:43 -0700 (PDT) Date: Fri, 18 Jul 2014 16:55:42 -0400 (EDT) From: Nicolas Pitre To: Steven Rostedt cc: Ingo Molnar , Daniel Lezcano , Russell King - ARM Linux , Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH 2/4] ARM: add IPI tracepoints In-Reply-To: <20140718160418.54d11f6a@gandalf.local.home> Message-ID: References: <1405660735-13408-1-git-send-email-nicolas.pitre@linaro.org> <1405660735-13408-3-git-send-email-nicolas.pitre@linaro.org> <20140718160418.54d11f6a@gandalf.local.home> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 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: nicolas.pitre@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.178 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: , On Fri, 18 Jul 2014, Steven Rostedt wrote: > On Fri, 18 Jul 2014 01:18:53 -0400 > Nicolas Pitre wrote: > > > > -#ifdef CONFIG_IRQ_WORK > > -void arch_irq_work_raise(void) > > -{ > > - if (is_smp()) > > - smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK); > > -} > > +static const char *ipi_types[NR_IPI] > > +#ifdef CONFIG_TRACING > > +__tracepoint_string > > #endif > > Oh, this is ugly. I should probably add a define when !CONFIG_TRACING > is set. Something like: > > #ifdef CONFIG_TRACING > ... > #else > # define __tracepoint_string > #endif > > Such that users of __tracepoint_string don't need to add ugly ifdefs in > the code. > > If you want to add that to ftrace_event.h to this series, I'll ack it. Here's the patch I have at the head of the series now, with the above ugliness changed to an unconditional __tracepoint_string attribute. From: Nicolas Pitre Date: Fri, 18 Jul 2014 16:34:39 -0400 Subject: [PATCH] trace: don't refer __tracepoint_string to an undefined linker section When CONFIG_TRACING is not set, the linker script doesn't specify any __tracepoint_str section. Let those __tracepoint_string marked strings live in the default rodata section in that case. Signed-off-by: Nicolas Pitre --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index cff3106ffe..d6346607e4 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -606,7 +606,11 @@ do { \ static const char *___tp_str __tracepoint_string = str; \ ___tp_str; \ }) +#ifdef CONFIG_TRACING #define __tracepoint_string __attribute__((section("__tracepoint_str"))) +#else +#define __tracepoint_string +#endif #ifdef CONFIG_PERF_EVENTS struct perf_event;