lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131205160027.GA13200@roeck-us.net>
Date:	Thu, 5 Dec 2013 08:00:27 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	Leela Krishna Amudala <l.krishna@...sung.com>
Cc:	Tomasz Figa <tomasz.figa@...il.com>,
	Olof Johansson <olof@...om.net>,
	Doug Anderson <dianders@...omium.org>,
	Wim Van Sebroeck <wim@...ana.be>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Ben Dooks <ben-linux@...ff.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>,
	"linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] watchdog: s3c2410_wdt: Report when the watchdog reset
 the system

On Thu, Dec 05, 2013 at 01:27:13PM +0530, Leela Krishna Amudala wrote:
> Hi Guenter Roeck,
> 
> On Tue, Dec 3, 2013 at 3:06 AM, Guenter Roeck <linux@...ck-us.net> wrote:
> >
> > On Mon, Dec 02, 2013 at 12:47:53PM -0800, Olof Johansson wrote:
> > > On Mon, Dec 2, 2013 at 12:21 PM, Guenter Roeck <linux@...ck-us.net> wrote:
> > > > On Mon, Dec 02, 2013 at 10:14:41AM -0800, Doug Anderson wrote:
> > > >> A good watchdog driver is supposed to report when it was responsible
> > > >> for resetting the system.  Implement this for the s3c2410, at least on
> > > >> exynos5250 and exynos5420 where we already have a pointer to the PMU
> > > >> registers to read the information.
> > > >>
> > > >> Signed-off-by: Doug Anderson <dianders@...omium.org>
> > > >> ---
> > > >> This patch is based atop Leela Krishna's recent series that ends with
> > > >> (ARM: dts: update watchdog device nodes for Exynos5250 and Exynos5420)
> > > >> AKA <https://patchwork.kernel.org/patch/3251861/>.
> > > >>
> > > >>  drivers/watchdog/s3c2410_wdt.c | 42 +++++++++++++++++++++++++++++++++++++++---
> > > >>  1 file changed, 39 insertions(+), 3 deletions(-)
> > > >>
> > > >> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> > > >> index 47f4dcf..2c87d37 100644
> > > >> --- a/drivers/watchdog/s3c2410_wdt.c
> > > >> +++ b/drivers/watchdog/s3c2410_wdt.c
> > > >> @@ -62,9 +62,13 @@
> > > >>  #define CONFIG_S3C2410_WATCHDOG_ATBOOT               (0)
> > > >>  #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15)
> > > >>
> > > >> +#define RST_STAT_REG_OFFSET          0x0404
> > > >>  #define WDT_DISABLE_REG_OFFSET               0x0408
> > > >>  #define WDT_MASK_RESET_REG_OFFSET    0x040c
> > > >>  #define QUIRK_NEEDS_PMU_CONFIG               (1 << 0)
> > > >> +#define QUIRK_HAS_RST_STAT           (1 << 1)
> > > >> +#define QUIRKS_NEED_PMUREG           (QUIRK_NEEDS_PMU_CONFIG | \
> > > >> +                                      QUIRK_HAS_RST_STAT)
> > > >>
> > > > I am not really happy about the NEED (both of them, really) here.
> > > > How about HAS instead ?
> > >
> > > Ah, I just commented on these things on our internal review site too
> > > on this patch. I don't even think a quirk is needed -- just use the
> > > presence of a non-0 rst_stat_reg to tell if you need to use regmap.
> > >
> > Agreed; same is true for the QUIRK_NEEDS_PMU_CONFIG related registers
> > as well.
> >
> 
> As Tomasz Figa suggested I introduced quirks,
> 
'quirk' implies a workaround for non-standard or broken hardware,
not a flag indicating device specific functionality.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ