From patchwork Thu Dec 7 14:14:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10099259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4E41260360 for ; Thu, 7 Dec 2017 14:14:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 416C028C79 for ; Thu, 7 Dec 2017 14:14:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3483928CF9; Thu, 7 Dec 2017 14:14:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C63B028C79 for ; Thu, 7 Dec 2017 14:14:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF1836E7F6; Thu, 7 Dec 2017 14:14:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id B44766E7F6 for ; Thu, 7 Dec 2017 14:14:27 +0000 (UTC) Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M4ZiO-1fH7QL0FVU-00yfOE; Thu, 07 Dec 2017 15:14:17 +0100 From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie Subject: [PATCH] drm/i915: add FTRACE dependency for DRM_I915_TRACE_GEM Date: Thu, 7 Dec 2017 15:14:00 +0100 Message-Id: <20171207141413.2008240-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:t24B+QiT6GOsOiHtavM5D7g0UhPZxpzFJCzxko+qYIJ02B0ngM1 KfR8CVAwIc0zhDbwR2VVUfL4Aw3l/OM/GuYss/cTWPv0LWFAxDC0oZuswre+fU8rinWeTiM 2J3fnJdfgeHFdyCGmnnzErBGgC1fRJZRo+BKjBwuYGa+MXt36iNfCg3lRN8vAim97YBpRQo 7qLdkd2qa+8oRlgGk3fRw== X-UI-Out-Filterresults: notjunk:1; V01:K0:dy5C7oJSo9g=:u5nj6ZUWM+SgaHZnbBlzC2 h7JP/UnPQzzbmD6bKPh7zbYuDOPfIt5MyZZ/xl7zbA3PYxA7NHSHvaTRdtOue0zr93Ggu+hKj XfxWhChQqPn8mr8rrYTXDE9/w5Z1wgORMi+aJCrsMphxeP8W/aNxK/NS27UwXZuZcNnyRVih7 MGRRNSkeJ5vw9yxYRj29/V9xEcWcTDO6FP3LrEz8MS3nHGNRWgmkABLd2oQSh/N+GAojU19DB TI6OFLMvJGPasZ/EAe1b6ZeEVZYPxKwXHbDF28HFoTt1k2lcmxug247xRFQmAuzhgFGwfDeZ9 V7kRNA7nq2drDoUqTfRoNcKfFSe6DDKZguY43FmGfj9/wnnCWNxcqpdkehgEs4dLc5huWk98W bb/aB1nCGbp9loNWOndb5KppOMuVIO3NqT7jBhs/OTZ5Bsj9JDHxCH9jY3MVpODLm9+RVcBG3 EG8mgbez8yIq4GOaDneX/cyA5U1MjSs2OWlh8e6B123aVyB8ihNONiPIOahUTKQVhd8Q8mWhl YhYcGWvyEaJmqoT6Cqu/hSgJuPbGo48u6DSBIZWStUiyHi21iQ4peg5pa8uuAzqh+hBt6IoXy OlfcVQ2TsBfK3803Gjsnbs/s9pCUGx8TdXMxOEjoS9pZb4wxd5lhOyR+HH9EZGUw0wqPfF7eK SXqi7wxPd576NMl8lwcpbBGeU9/TaSLquv2bH+20oGn4BsUJK7N9gUXeCuQqifPU6XFur7Yse 3bpni4TKiKwCDmVxbqKAfRoHfiXaKxFro4RTfg== Cc: Arnd Bergmann , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mika Kuoppala X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The new trace option gratuitously added a 'select TRACING' statement, which now causes build failures in other code that assumed tracepoints were only available with FTRACE: ERROR: "__tracepoint_ucsi_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_register_port" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_notify" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_reset_ppm" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! ERROR: "__tracepoint_ucsi_run_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! drivers/usb/dwc3/gadget.o: In function `__dwc3_prepare_one_trb': gadget.c:(.text+0x1c5): undefined reference to `__tracepoint_dwc3_prepare_trb' drivers/usb/dwc3/gadget.o: In function `__dwc3_cleanup_done_trbs': gadget.c:(.text+0x3f0): undefined reference to `__tracepoint_dwc3_complete_trb' drivers/usb/dwc3/gadget.o: In function `dwc3_gadget_ep_free_request': gadget.c:(.text+0x666): undefined reference to `__tracepoint_dwc3_free_request' This adds an explicit FTRACE dependency here, to ensure this is already the case. This matches what the other drivers have that select TRACING. Generally speaking, there is a bigger problem with CONFIG_DRM_I915_DEBUG though, it selects several other partially related symbols (DEBUGFS, I2C_CHARDEV, PREEMPT_COUNT, X86_MSR, etc that are each user-visible and that other symbols in turn depend on. This can easily lead to circular dependencies and should be avoided. I tried turning those all into 'depends on', which is normally a good strategy, but that seems to completely defeat the intention of CONFIG_DRM_I915_DEBUG. It might be better to just remove this completely, possibly replace it with a Kconfig fragment. Fixes: bccd3b831185 ("drm/i915: Use trace_printk to provide a death rattle for GEM") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index fa36491495b1..1a1b9732f657 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -18,6 +18,7 @@ config DRM_I915_WERROR config DRM_I915_DEBUG bool "Enable additional driver debugging" depends on DRM_I915 + depends on FTRACE # for DRM_I915_TRACE_GEM select DEBUG_FS select PREEMPT_COUNT select I2C_CHARDEV @@ -53,6 +54,7 @@ config DRM_I915_DEBUG_GEM config DRM_I915_TRACE_GEM bool "Insert extra ftrace output from the GEM internals" + depends on FTRACE select TRACING default n help