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: 10099273 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 7ADD460325 for ; Thu, 7 Dec 2017 14:19:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F14D29BDE for ; Thu, 7 Dec 2017 14:19:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62ADE29C7D; Thu, 7 Dec 2017 14:19:48 +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=unavailable 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 5612F29BDE for ; Thu, 7 Dec 2017 14:19:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F8356E7F2; Thu, 7 Dec 2017 14:19:46 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B9526E7F2 for ; Thu, 7 Dec 2017 14:19:45 +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 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:/Hj3QWtnzbc=:BQZoZqVf0VE+BL3mXqhxaT e0wdR5T4plLmeVI+CQhalNmWJYZk+IYp+VHU4Fjz6x2bBpGX3XPZxu8w1ZWhEvf+EO/U86Si1 D2iIhYKso/phaZzbhHjBLqgr+t4dDUDv3Q+TJYlfE2HYurJXc6Kq7jue+RA847LbNhXWHVo59 yu52EDr9gtGwhgd0lGNSzCUYE1hnnrjhVd+vn/GMCLqouWcTrcvM3zy8ZCvQBNkSybjNRUNCs 9wRVrUxvnxvhAjR4AL2Z6Js4zBEqT+OWeQGqkMOBWsY1dKNJHivwO8xDI1CjM3zp+aFkjUbRP ecVFC9lARF8BXNMNvR9B/Fxz9L14xld7pFd0f5F/DKihqweSDPyA8EEFT218GCJ/g9GVVZ86D rgffsPuzclOoEet8rphg9UVUf2EjhtcgVf5FT3M8X9druqEpr9x6vcjRKp4QQF0IhrIHszCni FAyKuPhyg0e08pgJVi39/C361USd0sgeJ/pBXh9btaQzORs7/sg0zl5svN3RxH6I+ZqwPKuVR GJmkLa00fIepNgKJjGatXTXoZMtmDBMT9mHkAET54qGqxpnCR/EdINrXS0pYrfVLtdQI/cnr5 +NlqnH7ctt2TCzO8rIVH39ECj+lg9VVeae8hMJxS1dTpSG8M/9ISFS1cdNuoll+FmPeRyZm06 YoDBoioQiUHR9/k/apViWAbdlmxBQvxnaJCEuFTtkipLzNk/kNxXvxFNZVoTmapCCER8eM1vW 5FW+lGjuh2v/nOMCL/cM2IfhGYf4dpSS/cWJpQ== Cc: Arnd Bergmann , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mika Kuoppala Subject: [Intel-gfx] [PATCH] drm/i915: add FTRACE dependency for DRM_I915_TRACE_GEM X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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