linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>,
	linux-watchdog@vger.kernel.org, linux-rtc@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>,
	Lars Alex Pedersen <laa@kamstrup.com>,
	Bruno Thomsen <bth@kamstrup.com>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: watchdog: pcf2127: systemd fails on 5.11
Date: Wed, 24 Feb 2021 07:25:29 -0800	[thread overview]
Message-ID: <20210224152529.GA242356@roeck-us.net> (raw)
In-Reply-To: <YDZp/u+fO/8HX8qo@piout.net>

On Wed, Feb 24, 2021 at 04:00:14PM +0100, Alexandre Belloni wrote:
> Hi,
> 
> On 24/02/2021 15:55:00+0100, Bruno Thomsen wrote:
> > You could be right about that, I don't think the watchdog feature should
> > be available for use if the alarm feature is enabled due to how CTRL2
> > register behaves.
> > 
> > The hardware I am testing on is a custom board, but it's actually
> > possible to get a Raspberry Pi module called RasClock that has
> > the chip.
> > 
> 
> I have an eval board for the PCF2127 (and PCF2129), the OM13513.
> 
> > I will test some locking around WD_VAL register access as that is used
> > in pcf2127_wdt_ping function.
> > 
> > My initial test shows that spin_lock_irqsave around regmap calls are not
> > a good idea as it result in:
> > BUG: scheduling while atomic: watchdog/70/0x00000002
> > BUG: scheduling while atomic: systemd/1/0x00000002
> > 
> 
> The issue is not only regmap but the fact that i2C and spi accesses are
> allowed to sleep.
> 
Correct, those would have to be mutexes.

Thanks,
Guenter

      reply	other threads:[~2021-02-24 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 12:35 watchdog: pcf2127: systemd fails on 5.11 Bruno Thomsen
2021-02-22 22:43 ` Guenter Roeck
2021-02-24 14:55   ` Bruno Thomsen
2021-02-24 15:00     ` Alexandre Belloni
2021-02-24 15:25       ` Guenter Roeck [this message]

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=20210224152529.GA242356@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bruno.thomsen@gmail.com \
    --cc=bth@kamstrup.com \
    --cc=laa@kamstrup.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-watchdog@vger.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).