Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp189993rwn; Wed, 7 Sep 2022 23:12:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4KlXAlqT8GR+XqJbLb2MXUcgr5u3ZugVxeqci/RMwnw0vXaguRgNTVDB+lvURQ/hMEar6W X-Received: by 2002:a65:6e9a:0:b0:435:6009:4b62 with SMTP id bm26-20020a656e9a000000b0043560094b62mr2573807pgb.596.1662617570276; Wed, 07 Sep 2022 23:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662617570; cv=none; d=google.com; s=arc-20160816; b=cufvwFjh7gHTDWwepxYvW9EV2K6JPIi279+6MJiNOJN6/ZkeSVbLPqIokZI08pZh4R 0+GdWfsIq3i85bAx1WVNGGCHSs0WbL/sB0tc2DOVLng291eMqGx0JqRFQIhNBR1b+Qxc F4ArM9kX7pnEQ6womqsRC/o4j8PVSCeQT3kPSGN06HpLOSjCAlv/0BDMOrayey6loG+u iobo78yY7gtezsDhBmcBGAxWbFqCXkDq1LQKqEFzK9YShNWPOqt7TpjxyIZPFJpAYoKD kp3el5Xafa2zB7OwIyncmLYnmdD4QAbIVreq1tgMb5jw7OE6u+ovo7mfmGuyvL9zY2QD FK+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=szI3zqUcU5ygdwQzhWqdTsCFOqSohPiA2mJp+LlcsW0=; b=VE2zZ43iJT9fHS00knln9DcBD+qTJQLLutwKaevr78YHZh6VFtwxfFfn1pCFXMyrMH K4tTXqM2PjXYTK12UZEL+lMbB1pkUW+6Rjd8duDhrLthl2c8+gVU32qvdwv6ukZRHHbt PR3eiq1QYtKqJtHOtQDH//3rFsGjGDtPJtJdnPHRO3xoEZrW8s3IVuuZilJxB1qupZYp REuwqLFD8kfCdtPY3QIZjGzTeEYxdjNFwEUSgDpLP6P8eerBhX5V+FNjZQ904jPwsYGD F+ae9soZwsnIohLaPYcY5ROjbUdHaCDAVC02zuwLLnINf3JncFO54wWOCtEgRy8D4fAQ gl7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ku2XVBcA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 194-20020a6300cb000000b0042890f36268si14369177pga.857.2022.09.07.23.12.38; Wed, 07 Sep 2022 23:12:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ku2XVBcA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbiIHGC3 (ORCPT + 99 others); Thu, 8 Sep 2022 02:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230150AbiIHGC0 (ORCPT ); Thu, 8 Sep 2022 02:02:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 501CACAC4E; Wed, 7 Sep 2022 23:02:22 -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 ams.source.kernel.org (Postfix) with ESMTPS id D5B07B81F9E; Thu, 8 Sep 2022 06:02:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F130CC433D6; Thu, 8 Sep 2022 06:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662616939; bh=x0GKCvCjflBtX1AF1k1VB/0WylD+G87f6QGZUG42Y2c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ku2XVBcA2SI7p1XDOyy886e45Ao6j8Vf6BL3m9vb5/jRoJBMWZyJZE0CEwY0kSqps Hh0n8nfIk1uCuE3LC6HwdVZoxOQUN8qzGVRMtx423YhdIHty++t7SYfQvW2ipo2RRS 4Bls6YxoiZ+f/VG3IoE3hxD4KWaAksAsE/Pa/9yE= Date: Thu, 8 Sep 2022 08:02:41 +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 v3 4/4] drivers: misc: Add Support for TMR Inject IP Message-ID: References: <20220908042444.2866731-1-appana.durga.kedareswara.rao@amd.com> <20220908042444.2866731-5-appana.durga.kedareswara.rao@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220908042444.2866731-5-appana.durga.kedareswara.rao@amd.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2022 at 09:54:44AM +0530, Appana Durga Kedareswara rao wrote: > The Triple Modular Redundancy(TMR) provides functional fault injection by > changing selected MicroBlaze instructions, which provides the possibility > to verify that the TMR subsystem error detection and fault recovery logic > is working properly, provided sysfs entries which allow the user to inject > a fault. > > Usage: > echo 1 > /sys/kernel/debug/xtmr_inject/inject_fault/inject_fault > > Signed-off-by: Appana Durga Kedareswara rao > --- > Changes for v3: > --> Updated the driver to use fault-injection api as suggested by Greg. > --> Updated the Kconfig to compile the driver as a module. > 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,magic value. > > MAINTAINERS | 6 + > drivers/misc/Kconfig | 10 ++ > drivers/misc/Makefile | 1 + > drivers/misc/xilinx_tmr_inject.c | 181 +++++++++++++++++++++++++++++++ > 4 files changed, 198 insertions(+) > create mode 100644 drivers/misc/xilinx_tmr_inject.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5fc5ec13985e..1207effa8e15 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13284,6 +13284,12 @@ 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 > > +MICROBLAZE TMR INJECT > +M: Appana Durga Kedareswara rao > +S: Supported > +F: Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml > +F: drivers/misc/xilinx_tmr_inject.c > + > MICROCHIP AT91 DMA DRIVERS > M: Ludovic Desroches > M: Tudor Ambarus > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 1508cc29b05a..7b1930a7f18a 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -506,6 +506,16 @@ config TMR_MANAGER > > Say N here unless you know what you are doing. > > +config TMR_INJECT > + tristate "Select TMR Inject" > + depends on TMR_MANAGER && FAULT_INJECTION But if CONFIG_FAULT_INJECTION_DEBUG_FS is not enabled, does this driver actually do anything? Why not just depend on that option? thanks, greg k-h