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: 4587721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4EA289F1D6 for ; Fri, 18 Jul 2014 20:58:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 827B02018E for ; Fri, 18 Jul 2014 20:57:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9AD192011D for ; Fri, 18 Jul 2014 20:57:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X8FCL-0004MW-5n; Fri, 18 Jul 2014 20:56:09 +0000 Received: from mail-qg0-f50.google.com ([209.85.192.50]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X8FCI-0004Gv-5n for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 20:56:06 +0000 Received: by mail-qg0-f50.google.com with SMTP id q108so3611114qgd.37 for ; Fri, 18 Jul 2014 13:55:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=MzltkxJaYNCWWGb3qI6mea++os0gYQSTOuEqTMDksmI=; b=Bqp3GQDpSJSnmNrdF0HWV7uwIkHWCv8JJbdSMfFMvrw26DYN0Ybvg1Qgqq8ICkp8tu 5+dP5SONt2XHGxMdStrWG5TN4B1/v+EIRI4JkM5M6mEC+zfF/tFPUSLlwI7qjd9cPtyi mff4BGS+U0SENPR18PiumjBs+RGWwl0i35o4xnRIS0WcdT+EeRyYCmKN1VTkTpmDKYWK jpKRp02p2uqOjtHZ2eGSJd1MBc9HFfgcSzkP0aNM7L6odIrhrfLSSj8FrwmPhHXuy2Ti GEQUB2oSX5BrGJMeOE+gZS/v7IcWl5dQq657kh3r9bVgffCnTfvozwTCMaJXBJ1R507l Fnkw== X-Gm-Message-State: ALoCoQkOVuddWX4JhL+iU1YQ9jC9v0eT00diENqiYvG0HRwIzu0EwOhmfBfQJBHB/3e/Edv2vUZR 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_135606_291424_3290B5EC X-CRM114-Status: GOOD ( 18.91 ) X-Spam-Score: -0.7 (/) Cc: linaro-kernel@lists.linaro.org, Russell King - ARM Linux , Catalin Marinas , Daniel Lezcano , linux-kernel@vger.kernel.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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;