From owner-svn-src-head@freebsd.org Thu Jul 19 11:41:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF461030099; Thu, 19 Jul 2018 11:41:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60FE98C9CE; Thu, 19 Jul 2018 11:41:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4239728B97; Thu, 19 Jul 2018 11:41:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6JBfscW078080; Thu, 19 Jul 2018 11:41:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6JBfrFp078079; Thu, 19 Jul 2018 11:41:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807191141.w6JBfrFp078079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 19 Jul 2018 11:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336479 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 336479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 11:41:54 -0000 Author: manu Date: Thu Jul 19 11:41:53 2018 New Revision: 336479 URL: https://svnweb.freebsd.org/changeset/base/336479 Log: fdt_pinctrl: Add some TSLOG annotations While we see the time spent in the pin controller attach via the hooks in DEVICE_ATTACH, it is useful to see the time spent configuring the pins. Modified: head/sys/dev/fdt/fdt_pinctrl.c head/sys/dev/fdt/fdt_pinctrl_if.m Modified: head/sys/dev/fdt/fdt_pinctrl.c ============================================================================== --- head/sys/dev/fdt/fdt_pinctrl.c Thu Jul 19 11:31:49 2018 (r336478) +++ head/sys/dev/fdt/fdt_pinctrl.c Thu Jul 19 11:41:53 2018 (r336479) @@ -106,10 +106,15 @@ int fdt_pinctrl_register(device_t pinctrl, const char *pinprop) { phandle_t node; + int ret; + TSENTER(); node = ofw_bus_get_node(pinctrl); OF_device_register_xref(OF_xref_from_node(node), pinctrl); - return (pinctrl_register_children(pinctrl, node, pinprop)); + ret = pinctrl_register_children(pinctrl, node, pinprop); + TSEXIT(); + + return (ret); } static int @@ -118,6 +123,8 @@ pinctrl_configure_children(device_t pinctrl, phandle_t phandle_t node, *configs; int i, nconfigs; + TSENTER(); + for (node = OF_child(parent); node != 0; node = OF_peer(node)) { if (!ofw_bus_node_status_okay(node)) continue; @@ -138,6 +145,7 @@ pinctrl_configure_children(device_t pinctrl, phandle_t } OF_prop_free(configs); } + TSEXIT(); return (0); } Modified: head/sys/dev/fdt/fdt_pinctrl_if.m ============================================================================== --- head/sys/dev/fdt/fdt_pinctrl_if.m Thu Jul 19 11:31:49 2018 (r336478) +++ head/sys/dev/fdt/fdt_pinctrl_if.m Thu Jul 19 11:41:53 2018 (r336479) @@ -27,6 +27,7 @@ # #include +#include #include # @@ -35,11 +36,22 @@ INTERFACE fdt_pinctrl; +# Needed for timestamping device probe/attach calls +HEADER { + #include +} + # # Set pins to the specified configuration. The cfgxref arg is an xref phandle # to a descendent node (child, grandchild, ...) of the pinctrl device node. # Returns 0 on success or a standard errno value. # +PROLOG { + TSENTER2(device_get_name(pinctrl)); +} +EPILOG { + TSEXIT2(device_get_name(pinctrl)); +} METHOD int configure { device_t pinctrl; phandle_t cfgxref;