From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 435FBC5474A for ; Wed, 28 Aug 2024 07:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8U3dDY88O2vpegt5tdm1XLlAxWTD6p5tdomjdL2cajw=; b=CiPlvL4wasJrfY+2xdkg8TMiQM PIGMEX+UGAN73ZKgpqkkQnWnUMdDMPmzS4vKf7XXSNubB1lNNpmvo0sOFDsIgr6fR/bzqN9nQ78Iu iZjO7Of8zBF2ejM0r2/JWIzo/yvX2SVuCOsUObw3aQbonXnqftS8PJhegqEVNrYxYZ/LPFJbyaFSo eRBmtdr4Iwrgb+4EkPZIz7NTK6F/IBjROZhsoyI3dPrB7gLbGl8gxRFSa3PQ4tPMjbH4j3ya+9dT/ hxIcs1Yh6iBA+uST6FoVVIEgX6+Xrv3XhhjzFINZKusKS/fUu3/S0vwI7qT4FklhZZXANIrQbIK5z Ru9m5vAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjCxi-0000000EEpl-3tLq; Wed, 28 Aug 2024 07:19:26 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjCvn-0000000EECl-1gGg for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 07:17:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 6356FA43398; Wed, 28 Aug 2024 07:17:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBB02C4AF54; Wed, 28 Aug 2024 07:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724829049; bh=D1LvT+0ZwgaS7/bKpyzMjT0ea/bY4C6HjXl2N37bG6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D7tpSkQHyYzO6X6fKv/doxB2rRG3sj7dA7lNnds5qaWTXO/vPbPIzqwteYbDx6xXr +rXAtuIx4HqgVMzxNumGZans6AMGdNxmB6K4fvA4e5egTZs/r1h4B54oz9OnZ0WLdG zObLKmR1KBFfOMoatKUAmAElsCwfTMCAmCo/Cn2A= Date: Wed, 28 Aug 2024 09:10:46 +0200 From: Greg Kroah-Hartman To: Stephen Boyd Cc: Harry Austen , Michael Turquette , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michal Simek , Shubhrajyoti Datta , Dave Ertman , Ira Weiny , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 7/9] uio: add Xilinx user clock monitor support Message-ID: <2024082824-emphasis-thwarting-4ef4@gregkh> References: <20240826123602.1872-1-hpausten@protonmail.com> <20240826123602.1872-8-hpausten@protonmail.com> <2024082655-cubicle-flashily-6ab3@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_001727_601288_D1928C62 X-CRM114-Status: GOOD ( 29.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 27, 2024 at 04:40:52PM -0700, Stephen Boyd wrote: > Quoting Harry Austen (2024-08-27 12:08:52) > > On Mon Aug 26, 2024 at 2:11 PM BST, Greg Kroah-Hartman wrote: > > > On Mon, Aug 26, 2024 at 12:38:36PM +0000, Harry Austen wrote: > > > > Xilinx clocking wizard IP core supports monitoring of up to four > > > > optional user clock inputs, with a corresponding interrupt for > > > > notification in change of clock state (stop, underrun, overrun or > > > > glitch). Give userspace access to this monitor logic through use of the > > > > UIO framework. > > > > > > > > Implemented as an auxiliary_driver to avoid introducing UIO dependency > > > > to the main clock driver. > > > > > > > > Signed-off-by: Harry Austen > > > > --- > > > > drivers/uio/Kconfig | 8 ++++ > > > > drivers/uio/Makefile | 1 + > > > > drivers/uio/uio_xlnx_clk_mon.c | 71 ++++++++++++++++++++++++++++++++++ > > > > 3 files changed, 80 insertions(+) > > > > create mode 100644 drivers/uio/uio_xlnx_clk_mon.c > > > > > > > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > > > > index b060dcd7c6350..ca8a53de26a67 100644 > > > > --- a/drivers/uio/Kconfig > > > > +++ b/drivers/uio/Kconfig > > > > @@ -164,4 +164,12 @@ config UIO_DFL > > > > opae-sdk/tools/libopaeuio/ > > > > > > > > If you compile this as a module, it will be called uio_dfl. > > > > + > > > > +config UIO_XLNX_CLK_MON > > > > + tristate "Xilinx user clock monitor support" > > > > + depends on COMMON_CLK_XLNX_CLKWZRD > > > > + help > > > > + Userspace I/O interface to the user clock monitor logic within the > > > > + Xilinx Clocking Wizard IP core. > > > > > > Why do you want a UIO api for a clock device? What userspace code is > > > going to access the hardware this way? Why not use the normal > > > kernel/user apis instead? > > > > I was just trying to provide userspace access to these _unexpected_ clock > > status event indications (clock stopped, underrun, overrun or glitched) and UIO That is going to be a brand-new user/kernel api that isn't documented anywhere and will be unique to this one device. Please don't do that. > Maybe unexpected events can be indicated through the EDAC subsystem, > except that is usually about memory or cache errors, not device driver > issues. If you all need a new way to report issues like this to userspace, then let's create the correct api for it, don't require userspace to mmap a random device and expect to poke around in it safely to get the information. Odds are that mmap will change with the next version of this device, right? thanks, greg k-h