linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Rao, Appana Durga Kedareswara" <appanad@amd.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	Appana Durga Kedareswara rao
	<appana.durga.kedareswara.rao@amd.com>
Cc: <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
Date: Fri, 9 Sep 2022 14:26:13 +0530	[thread overview]
Message-ID: <f62e5be8-a2ab-13f5-8b01-572bf193a1b2@amd.com> (raw)
In-Reply-To: <Yxr77l3UGbphuJkM@kroah.com>

Hi Greg,

Thanks for the review.

On 09/09/22 2:10 pm, Greg KH wrote:
> 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 <appana.durga.kedareswara.rao@amd.com>
>> ---
>> 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/<dev>/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/<dev>/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 <any value> > /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 <appana.durga.kedareswara.rao@amd.com>
>> +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 <ludovic.desroches@microchip.com>
>>   M:	Tudor Ambarus <tudor.ambarus@microchip.com>
>> 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?

Fault injection happens via debugfs in the tmr-inject driver (4/4 patch 
- xilinx_tmr_inject.c) patch, Fault detection is tracked using tmr 
manager errcnt sysfs entry (/sys/devices/platform/amba_pl/<dev>/errcnt).
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.


Regards,
Kedar.
> 
> thanks,
> 
> greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-09  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09  6:19 [PATCH v4 0/4] drivers: misc: Add support for TMR Manager and Inject IPs Appana Durga Kedareswara rao
2022-09-09  6:19 ` [PATCH v4 1/4] dt-bindings: misc: tmr-manager: Add device-tree binding for TMR Manager Appana Durga Kedareswara rao
2022-09-09  6:19 ` [PATCH v4 2/4] drivers: misc: Add Support " Appana Durga Kedareswara rao
2022-09-09  8:40   ` Greg KH
2022-09-09  8:56     ` Rao, Appana Durga Kedareswara [this message]
2022-09-15 21:33   ` kernel test robot
2022-09-09  6:19 ` [PATCH v4 3/4] dt-bindings: misc: tmr-inject: Add device-tree binding for TMR Inject Appana Durga Kedareswara rao
2022-09-09  6:19 ` [PATCH v4 4/4] drivers: misc: Add Support for TMR Inject IP Appana Durga Kedareswara rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f62e5be8-a2ab-13f5-8b01-572bf193a1b2@amd.com \
    --to=appanad@amd.com \
    --cc=appana.durga.kedareswara.rao@amd.com \
    --cc=arnd@arndb.de \
    --cc=derek.kiernan@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@xilinx.com \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).