From patchwork Thu Oct 19 08:32:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 116347 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp3172205edb; Thu, 19 Oct 2017 01:32:55 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TafKA6Jb+4unSY2Myj96RR+fkcUJdUYrt/eHZWU4MUNKr4r6lwadEIt6nI6avDtkKRtiV1 X-Received: by 10.84.211.79 with SMTP id b73mr899077pli.214.1508401975522; Thu, 19 Oct 2017 01:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508401975; cv=none; d=google.com; s=arc-20160816; b=MK/ZdXW190bFtj8Coah+WP1/h0b6aa0ODG2wo0oUKxAaMMeSFzBmdwrk3lqRawNIvw BX3zZ8tbPXKRWd7FATocxeeJfN4z4kDNf4svnbQbvBfx0raLvRSB8bOMw3DSqqAkU5jg 1GlEysyQDWI3dPQCgmDiVPKneesq977HzpO6yWpT4ozBnyN6h257OjtI5haz0susYaD3 C/n/YCpotBXLWLp4hclsJpT253SXlGo1yyYgEwLDGOMg5wYnAxAfqgZIiWIVaX9S1iBO kK/W6W2quVycwCrhU36fjegwmMSQP8DxR+1CqslkWVoxf1UBPc1xmzLGmxr0p+9LyYHO yVVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0vHf6WSZ5IitmXKfKP0dy4t2ALcB6RHfmwBuMoY8e1U=; b=eqG/KILnVcIkKz4bdqBFkIWd+354b9/rHgwcyWyQArlhkEbMzdEGU7IjX18EZwb9SO SeuliEAYmanPfGdeWCGvObZvHQf9PpKe5qkXYKABpw5lWzQvR5Qej52tzZcJrq8nDTVa xuQCIQ2SQhOTbXsgo/IMLub89o04EuLWBt5l6PHCCnHew/1DeJnPtwiLrO16wutx40Kb gy4AjHso4Mi8/QoIMtU5NvQklvreueIshmNCL/0qOR0UPH3wLOIi9y3EpEQNp5whUqm5 blUP5eTJXoU3ocvbzD0wOuQkmqsmDZUQnLTXiSyf7j416JDow+m31vEpkzzKtOfbgkUG aHLQ== 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 b13si414954pgu.17.2017.10.19.01.32.55; Thu, 19 Oct 2017 01:32:55 -0700 (PDT) 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 S1752440AbdJSIcx (ORCPT + 27 others); Thu, 19 Oct 2017 04:32:53 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:49621 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbdJSIcr (ORCPT ); Thu, 19 Oct 2017 04:32:47 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lln96-1dW2YE2FYO-00ZRr9; Thu, 19 Oct 2017 10:32:34 +0200 From: Arnd Bergmann To: Steven Rostedt , Ingo Molnar Cc: Arnd Bergmann , Joel Fernandes , linux-kernel@vger.kernel.org Subject: [PATCH] tracing: always define trace_{irq, preempt}_{enable_disable} Date: Thu, 19 Oct 2017 10:32:13 +0200 Message-Id: <20171019083230.2450779-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags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ender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Fixes: d59158162e03 ("tracing: Add support for preempt and irq enable/disable events") Signed-off-by: Arnd Bergmann --- include/trace/events/preemptirq.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.9.0 Acked-by: Joel Fernandes 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