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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 934C8C433E0 for ; Wed, 24 Feb 2021 15:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4143264ED4 for ; Wed, 24 Feb 2021 15:55:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234946AbhBXPzo (ORCPT ); Wed, 24 Feb 2021 10:55:44 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:52245 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232866AbhBXPBV (ORCPT ); Wed, 24 Feb 2021 10:01:21 -0500 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 6A495240008; Wed, 24 Feb 2021 15:00:14 +0000 (UTC) Date: Wed, 24 Feb 2021 16:00:14 +0100 From: Alexandre Belloni To: Bruno Thomsen Cc: Guenter Roeck , linux-watchdog@vger.kernel.org, linux-rtc@vger.kernel.org, open list , Lars Alex Pedersen , Bruno Thomsen , NXP Linux Team Subject: Re: watchdog: pcf2127: systemd fails on 5.11 Message-ID: References: <20210222224325.GB177866@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org 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. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com