From patchwork Wed Dec 13 20:46:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 121860 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5959193qgn; Wed, 13 Dec 2017 12:47:51 -0800 (PST) X-Google-Smtp-Source: ACJfBovbbrZ/ve/6MlrJouQxo6NwSbcfir75HZ7wtFZDHMnrRottPbCGK1SG440tz/48SGe7D5h0 X-Received: by 10.99.122.71 with SMTP id j7mr6342265pgn.89.1513198071740; Wed, 13 Dec 2017 12:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513198071; cv=none; d=google.com; s=arc-20160816; b=w8FF7aaHvyh9EmDwRDwq7r+yCeV4VSQZpRe6nmU7pg2PBrjoU3NxHVVHwrF5KjDKKR 1YmR3m2++/d22qX5LwLQIpH6CF4pGfljQOt7+PHN/A4otnz5kvmvUOaIqMnIWA6N5/Bl AEqc3elEMJFP9D+81GXJnSGg7GkyBThqHdnCBsDV90V/HoyPNwxLSTS2lFBQ6NVgC4PO Hi9URxnH6JVhLFHnqKVKF6YApXygGFBY4W6YXlA8AdxjJCaRL1bvE4NSVUFWG1nqK4Xt 3cAPQBC/nhFPHhyaF5eM5EyPVJ+37TSo8rrVPRVPlKsZAYnJTO/r9zlpilcTaoCQTWLi Xw/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :references:subject:cc:to:from:date:user-agent:message-id :dmarc-filter:arc-authentication-results; bh=eTYSGMO8Ct1I4auwf3oRp2NFmHLg/ouY6WNM9FCFKmk=; b=RVPgoG6o9jTIB3/kn70df7zKLJMJnegPiC9R01JCkdmqZ7ko0GCAo/o9bT74QqT7YU Rg5DoSh5hAw6UAVP5r9/aRkJKYAltrf32w6h1RdTr7BqFHpHOU0sMY12FBaYAxnwfcJz ZnYHLBbsG9HNr+RAApzqpXxUzwXvDVUrEkKhH5FzPP3uMcYx5fgdcxGdRMoA/FMMMmnq ZklPpqvhSin/6tZzeg2tmGvVf+6TV1cTe8gJGKzdUyR6QZwr+zli6WKHzkrRmnoKP4Nn NNGYldMFOLWeC9Yf26LLc+w+oCcfK4hkMEq/L5HABzRa/5g2QnYAFdIcIr4xMY836aPG /7cA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k91si1919196pld.115.2017.12.13.12.47.51; Wed, 13 Dec 2017 12:47:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753940AbdLMUrr (ORCPT + 12 others); Wed, 13 Dec 2017 15:47:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:47882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbdLMUri (ORCPT ); Wed, 13 Dec 2017 15:47:38 -0500 Received: from gandalf.local.home (cpe-172-100-180-131.stny.res.rr.com [172.100.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 54409218C5; Wed, 13 Dec 2017 20:47:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54409218C5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Received: from rostedt by gandalf.local.home with local (Exim 4.89) (envelope-from ) id 1ePDwH-0003PW-EU; Wed, 13 Dec 2017 15:47:37 -0500 Message-Id: <20171213204737.338950499@goodmis.org> User-Agent: quilt/0.63-1 Date: Wed, 13 Dec 2017 15:46:58 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Joel Fernandes , Arnd Bergmann Subject: [for-next][PATCH 2/7] tracing: always define trace_{irq, preempt}_{enable_disable} References: <20171213204656.366789624@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0002-tracing-always-define-trace_-irq-preempt-_-enable_di.patch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann We get a build error in the irqsoff tracer in some configurations: kernel/trace/trace_irqsoff.c: In function 'trace_preempt_on': kernel/trace/trace_irqsoff.c:855:2: error: implicit declaration of function 'trace_preempt_enable_rcuidle'; did you mean 'trace_irq_enable_rcuidle'? [-Werror=implicit-function-declaration] trace_preempt_enable_rcuidle(a0, a1); The problem is that trace_preempt_enable_rcuidle() has different definition based on multiple Kconfig symbols, but not all combinations have a valid definition. This changes the conditions so that we always get exactly one definition of each of the four tracing macros. I have not tried to verify that these definitions are sensible, but now we can build all randconfig combinations again. Link: http://lkml.kernel.org/r/20171019083230.2450779-1-arnd@arndb.de Fixes: d59158162e03 ("tracing: Add support for preempt and irq enable/disable events") Acked-by: Joel Fernandes Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) --- include/trace/events/preemptirq.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.13.2 diff --git a/include/trace/events/preemptirq.h b/include/trace/events/preemptirq.h index f5024c560d8f..9c4eb33c5a1d 100644 --- a/include/trace/events/preemptirq.h +++ b/include/trace/events/preemptirq.h @@ -56,15 +56,18 @@ DEFINE_EVENT(preemptirq_template, preempt_enable, #include -#else /* !CONFIG_PREEMPTIRQ_EVENTS */ +#endif /* !CONFIG_PREEMPTIRQ_EVENTS */ +#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING) #define trace_irq_enable(...) #define trace_irq_disable(...) -#define trace_preempt_enable(...) -#define trace_preempt_disable(...) #define trace_irq_enable_rcuidle(...) #define trace_irq_disable_rcuidle(...) +#endif + +#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT) +#define trace_preempt_enable(...) +#define trace_preempt_disable(...) #define trace_preempt_enable_rcuidle(...) #define trace_preempt_disable_rcuidle(...) - #endif