From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98D2137DE96; Fri, 10 Apr 2026 12:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775823590; cv=none; b=dTl4tKcdQ4/iwzVpq5qkkc6IVN7VHh9WEXbfpOT+xWe7EWerc/xv2dvsHM3FNxkgmBMZWCFPAf5+JHSm6m/0l9fGrOCk0uyBQnnR3Lme9CAtLOcsfg3+hQ7zUouQU0AY+QYXoddWCFJCEWrN8hYk+m9N8wpJ6heihZ4+X8T3XfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775823590; c=relaxed/simple; bh=r17Pe0N1ahBhrB3JYh2nj0lozuwWxFWE8s4wbHnNz1U=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=LaNkLv/JG7BZsfehwcyrh4pS9fsCCcGrRH0IN+S4JTBwN7FfTeOZ7FCztdt3R4jCXe5h2aoqCHUQI1gb572reKNb9m85twmbNWAXUb49vdiauJxQZtBUB31di4FroogJPw5AzzJWclj4y0dW4USXNEpR0ZywVJgZMZBrdhUxdJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=okWRwWiK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="okWRwWiK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 704BDC19425; Fri, 10 Apr 2026 12:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775823590; bh=r17Pe0N1ahBhrB3JYh2nj0lozuwWxFWE8s4wbHnNz1U=; h=Date:From:To:Cc:Subject:References:From; b=okWRwWiKRXWxIOYd0Peg6lhswEXmgs6TDBmjhAnD7Q9a6usCqNg9OYWu+roqFftQt CXuq9wugiKbiMxTD+p64hE/DfyXI2OVOyYyt+MQaYOMvBz3HQvYNGX8W9+b4gE14hU 1DViHL5lpk9k7rS0TYmec/vPv8+l0l72HHkjevm3yaDtlLwCxfiyVTiYsTY5w9OTh5 Ju9iD//e8k54q8KUH3ojDg3WjR+Vu3B/cuQgNtmo0Zn1MW3hNX3wOdJ7kCRM+fO7Bg 3Yz29lBDAALUYxAqFMkB8dpm5Y3XPhihE7EzHhldnKqOW+zQ+3nRrzSdk9MbluRvBK 0NZT2IviOMPvg== Date: Fri, 10 Apr 2026 14:19:47 +0200 Message-ID: <20260410120318.658719117@kernel.org> User-Agent: quilt/0.68 From: Thomas Gleixner To: LKML Cc: Bernie Thompson , linux-fbdev@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Lu Baolu , iommu@lists.linux.dev, Michael Grzeschik , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Herbert Xu , linux-crypto@vger.kernel.org, Vlastimil Babka , linux-mm@kvack.org, David Woodhouse , "Theodore Tso" , linux-ext4@vger.kernel.org, Andrew Morton , Uladzislau Rezki , Marco Elver , Dmitry Vyukov , kasan-dev@googlegroups.com, Andrey Ryabinin , Thomas Sailer , linux-hams@vger.kernel.org, "Jason A. Donenfeld" , Richard Henderson , linux-alpha@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Huacai Chen , loongarch@lists.linux.dev, Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Dinh Nguyen , Jonas Bonn , linux-openrisc@vger.kernel.org, Helge Deller , linux-parisc@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Paul Walmsley , linux-riscv@lists.infradead.org, Heiko Carstens , linux-s390@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org Subject: [patch 16/38] fbdev: udlfb: Replace get_cycles() with ktime_get() References: <20260410120044.031381086@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 These metrics are not really requiring CPU cycles and as those are meanlingless when the CPU is running at a different frequency, this can use ktime_get() and achieve the same result. Part of a larger effort to confine get_cycles() access to low level architecture code. Signed-off-by: Thomas Gleixner Cc: Bernie Thompson Cc: linux-fbdev@vger.kernel.org --- Documentation/fb/udlfb.rst | 4 ++-- drivers/video/fbdev/udlfb.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) --- a/Documentation/fb/udlfb.rst +++ b/Documentation/fb/udlfb.rst @@ -156,8 +156,8 @@ metrics_bytes_sent 32-bit count of how USB to communicate the resulting changed pixels to the hardware. Includes compression and protocol overhead -metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the - above pixels (in thousands of cycles). +metrics_cpu_kcycles_used 32-bit count of microseconds used in processing the + above pixels metrics_reset Write-only. Any write to this file resets all metrics above to zero. Note that the 32-bit counters above --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -24,6 +24,7 @@ #include #include #include +#include #include