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 A8032ECAAD3 for ; Fri, 9 Sep 2022 08:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7IlP0fobejrwMYP7JfXGzgSNDJ9S+Z5neq7X8OSgGyE=; b=vG4gfNgLnSlV8N n5R8vT20Ojxs+EByzYweyRLjum4l7osDLHBs01TLEr5Ijk8RutwQ4+RGHPq/I4uza2rg6PosloeOj frDVDu1AM6zg9OgqMQkwJ0s3VIhD4yF77Tuia1dTgAFHV3s24X7jhQDEbqQkWdfEmXAwYqEsrsk0p lY5O5hH/QD7vHC+rVVVGbBvZl7/zI3RRPO4qa7GcUGChJRKtAAkuUASTHis2NMcdfTh53sbR5m2JU HpZLpCfJv2RLauWdCTZkv2BEOR4D2aU/UfocyIO8GTdpiC9MPbbnSc0kjSjPWrfAo1Xs95Ye73k/L z26DgKf2Jy7rV99gGUHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWZYm-00EjIS-5M; Fri, 09 Sep 2022 08:40:24 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWZYh-00EjGP-TH for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 08:40:21 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 94F7FB823C3; Fri, 9 Sep 2022 08:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE0F7C433D6; Fri, 9 Sep 2022 08:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662712817; bh=9yRkOSU/jhy0yb04tTkefir1DzZzdH+ZB6co9dc3weA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qtxazmq0gg7UBZZPr703Rdav5VN1PcwrIbH3jAm1cj+ISTUgnYKITIY/biMRN4D4c fNUIzObZwhVj02H9U7PD4lZs17pS6H9nX8OgT0q+xzXY/ssqdA7/M6cetrnLV78TuT yu4N0uW2ZivKsvuf2Sfah1jGpOxHsW0bKCX9HQo4= Date: Fri, 9 Sep 2022 10:40:14 +0200 From: Greg KH To: Appana Durga Kedareswara rao Cc: appanad@amd.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, derek.kiernan@xilinx.com, dragan.cvetic@xilinx.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, git@amd.com Subject: Re: [PATCH v4 2/4] drivers: misc: Add Support for TMR Manager Message-ID: References: <20220909061916.2935431-1-appana.durga.kedareswara.rao@amd.com> <20220909061916.2935431-3-appana.durga.kedareswara.rao@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220909061916.2935431-3-appana.durga.kedareswara.rao@amd.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_014020_282560_6374E709 X-CRM114-Status: GOOD ( 26.29 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 09, 2022 at 11:49:14AM +0530, Appana Durga Kedareswara rao wrote: > Triple Modular Redundancy(TMR) subsystem contains three microblaze cores, > subsystem is fault-tolerant and continues to operate nominally after > encountering an error. Together with the capability to detect and recover > from errors, the implementation ensures the reliability of the entire > subsystem. TMR Manager is responsible for performing recovery of the > subsystem detects the fault via a break signal it invokes microblaze > software break handler which calls the tmr manager driver api to > update the error count and status, added support for fault detection > feature via sysfs interface. > > Usage: > To know the break handler count(Error count): > cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt > > Signed-off-by: Appana Durga Kedareswara rao > --- > Changes for v4: > --> None. > Changes for v3: > --> Corrected month in the sysfs-driver-xilinx-tmr-manager file > --> Updated the Kconfig to compile the driver as a module > --> Removed unneeded status sysfs attribute > Changes for v2: > --> Fixed Month in the sysfs description. > --> Fixed line over 80 char in driver. > --> Replaced kstrtol with kstrtoul as suggested by Michal. > --> Added error check for xlnx,magic1 value. > > .../testing/sysfs-driver-xilinx-tmr-manager | 16 ++ > MAINTAINERS | 7 + > drivers/misc/Kconfig | 10 + > drivers/misc/Makefile | 3 +- > drivers/misc/xilinx_tmr_manager.c | 222 ++++++++++++++++++ > 5 files changed, 257 insertions(+), 1 deletion(-) > create mode 100644 Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > create mode 100644 drivers/misc/xilinx_tmr_manager.c > > diff --git a/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > new file mode 100644 > index 000000000000..2a97be6ae849 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > @@ -0,0 +1,16 @@ > +What: /sys/devices/platform/amba_pl//errcnt > +Date: Sep 2022 > +Contact: appana.durga.kedareswara.rao@amd.com > +Description: This control file provides the fault detection count. > + This file cannot be written. > + Example: > + # cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt > + 1 > + > +What: /sys/devices/platform/amba_pl//dis_block_break > +Date: Sep 2022 > +Contact: appana.durga.kedareswara.rao@amd.com > +Description: Write any value to it, This control file enables the break signal. > + This file is write only. > + Example: > + # echo > /sys/devices/platform/amba_pl/44a10000.tmr_manager/dis_block_break > diff --git a/MAINTAINERS b/MAINTAINERS > index f1390b8270b2..5fc5ec13985e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13277,6 +13277,13 @@ W: http://www.monstr.eu/fdt/ > T: git git://git.monstr.eu/linux-2.6-microblaze.git > F: arch/microblaze/ > > +MICROBLAZE TMR MANAGER > +M: Appana Durga Kedareswara rao > +S: Supported > +F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > +F: Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml > +F: drivers/misc/xilinx_tmr_manager.c > + > MICROCHIP AT91 DMA DRIVERS > M: Ludovic Desroches > M: Tudor Ambarus > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 94e9fb4cdd76..1508cc29b05a 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -496,6 +496,16 @@ config VCPU_STALL_DETECTOR > > If you do not intend to run this kernel as a guest, say N. > > +config TMR_MANAGER > + tristate "Select TMR Manager" > + depends on MICROBLAZE && MB_MANAGER > + help > + This option enables the driver developed for TMR Manager. The Triple > + Modular Redundancy(TMR) manager provides support for fault detection > + via sysfs interface. What is the module name? And the fault detection api is in debugfs, not sysfs, right? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5827ECAAD3 for ; Fri, 9 Sep 2022 08:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231426AbiIIIkX (ORCPT ); Fri, 9 Sep 2022 04:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbiIIIkV (ORCPT ); Fri, 9 Sep 2022 04:40:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A945A3E2; Fri, 9 Sep 2022 01:40:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DCA2161F2E; Fri, 9 Sep 2022 08:40:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE0F7C433D6; Fri, 9 Sep 2022 08:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662712817; bh=9yRkOSU/jhy0yb04tTkefir1DzZzdH+ZB6co9dc3weA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qtxazmq0gg7UBZZPr703Rdav5VN1PcwrIbH3jAm1cj+ISTUgnYKITIY/biMRN4D4c fNUIzObZwhVj02H9U7PD4lZs17pS6H9nX8OgT0q+xzXY/ssqdA7/M6cetrnLV78TuT yu4N0uW2ZivKsvuf2Sfah1jGpOxHsW0bKCX9HQo4= Date: Fri, 9 Sep 2022 10:40:14 +0200 From: Greg KH To: Appana Durga Kedareswara rao Cc: appanad@amd.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, derek.kiernan@xilinx.com, dragan.cvetic@xilinx.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, git@amd.com Subject: Re: [PATCH v4 2/4] drivers: misc: Add Support for TMR Manager Message-ID: References: <20220909061916.2935431-1-appana.durga.kedareswara.rao@amd.com> <20220909061916.2935431-3-appana.durga.kedareswara.rao@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220909061916.2935431-3-appana.durga.kedareswara.rao@amd.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Sep 09, 2022 at 11:49:14AM +0530, Appana Durga Kedareswara rao wrote: > Triple Modular Redundancy(TMR) subsystem contains three microblaze cores, > subsystem is fault-tolerant and continues to operate nominally after > encountering an error. Together with the capability to detect and recover > from errors, the implementation ensures the reliability of the entire > subsystem. TMR Manager is responsible for performing recovery of the > subsystem detects the fault via a break signal it invokes microblaze > software break handler which calls the tmr manager driver api to > update the error count and status, added support for fault detection > feature via sysfs interface. > > Usage: > To know the break handler count(Error count): > cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt > > Signed-off-by: Appana Durga Kedareswara rao > --- > Changes for v4: > --> None. > Changes for v3: > --> Corrected month in the sysfs-driver-xilinx-tmr-manager file > --> Updated the Kconfig to compile the driver as a module > --> Removed unneeded status sysfs attribute > Changes for v2: > --> Fixed Month in the sysfs description. > --> Fixed line over 80 char in driver. > --> Replaced kstrtol with kstrtoul as suggested by Michal. > --> Added error check for xlnx,magic1 value. > > .../testing/sysfs-driver-xilinx-tmr-manager | 16 ++ > MAINTAINERS | 7 + > drivers/misc/Kconfig | 10 + > drivers/misc/Makefile | 3 +- > drivers/misc/xilinx_tmr_manager.c | 222 ++++++++++++++++++ > 5 files changed, 257 insertions(+), 1 deletion(-) > create mode 100644 Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > create mode 100644 drivers/misc/xilinx_tmr_manager.c > > diff --git a/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > new file mode 100644 > index 000000000000..2a97be6ae849 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > @@ -0,0 +1,16 @@ > +What: /sys/devices/platform/amba_pl//errcnt > +Date: Sep 2022 > +Contact: appana.durga.kedareswara.rao@amd.com > +Description: This control file provides the fault detection count. > + This file cannot be written. > + Example: > + # cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt > + 1 > + > +What: /sys/devices/platform/amba_pl//dis_block_break > +Date: Sep 2022 > +Contact: appana.durga.kedareswara.rao@amd.com > +Description: Write any value to it, This control file enables the break signal. > + This file is write only. > + Example: > + # echo > /sys/devices/platform/amba_pl/44a10000.tmr_manager/dis_block_break > diff --git a/MAINTAINERS b/MAINTAINERS > index f1390b8270b2..5fc5ec13985e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13277,6 +13277,13 @@ W: http://www.monstr.eu/fdt/ > T: git git://git.monstr.eu/linux-2.6-microblaze.git > F: arch/microblaze/ > > +MICROBLAZE TMR MANAGER > +M: Appana Durga Kedareswara rao > +S: Supported > +F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager > +F: Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml > +F: drivers/misc/xilinx_tmr_manager.c > + > MICROCHIP AT91 DMA DRIVERS > M: Ludovic Desroches > M: Tudor Ambarus > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 94e9fb4cdd76..1508cc29b05a 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -496,6 +496,16 @@ config VCPU_STALL_DETECTOR > > If you do not intend to run this kernel as a guest, say N. > > +config TMR_MANAGER > + tristate "Select TMR Manager" > + depends on MICROBLAZE && MB_MANAGER > + help > + This option enables the driver developed for TMR Manager. The Triple > + Modular Redundancy(TMR) manager provides support for fault detection > + via sysfs interface. What is the module name? And the fault detection api is in debugfs, not sysfs, right? thanks, greg k-h