From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (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 9E7E4388E40 for ; Fri, 10 Apr 2026 12:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.234.252.31 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775823591; cv=none; b=JJRqjdhze4urYZyRkDhb5r7E5IyaP3DRbAZ0PNz2g6DWQ11xuc3xuL3QKngudSBGtE5xIXLDD0acJnF3vnVaz3Pjv01VnLvRQD7iCd4qr43dENnk/aaEc5SaHdkWt07CuQf1GOu4S2mMam0hdCR9d5mqFdm/xlgRjq9xp04kAJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775823591; c=relaxed/simple; bh=r17Pe0N1ahBhrB3JYh2nj0lozuwWxFWE8s4wbHnNz1U=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=fXrMJIlYbKJId4l40b7QX+/mqrMp7zYGrI1NEa7yezzSXt3selmC3B66KrECWUWnKhwfqfVc7A3ZgY+ynpGFXoM+UUoRReDq3RVinF369EWAFucCqwpiY7RHragKqviErWF0BpEcsaSY0y0HnkTdlZJKhMTMTM4+iKJbaaTHhog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=okWRwWiK; arc=none smtp.client-ip=172.234.252.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="okWRwWiK" Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7208F435AB; Fri, 10 Apr 2026 12:19:50 +0000 (UTC) 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: linux-m68k@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