Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp498978pxb; Wed, 24 Feb 2021 07:38:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZcR7vplZiilUGZ/eDH7n6z4ZIzKvjIzIucOHPHnwGHC/c3kdBOqBSuNnHOW3g0oeJROI7 X-Received: by 2002:a17:906:5ac2:: with SMTP id x2mr1163248ejs.486.1614181106959; Wed, 24 Feb 2021 07:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614181106; cv=none; d=google.com; s=arc-20160816; b=cnW3Shdn+WN7l2QhVqG+cVwnw2mpolaDTOr+UH+yCxrnCs50NIYjuiDNK7nSS+X4A9 iBILMAAXH4BCgiNcY2d53zam0tI1kWlG5pA1T+tP8L65eNnEFAyEI0dOoJSSzpxqZ54t aWBbak2nYby7OpTVVcTGAUYb3eDYNTWhv3IxNrT9RCsBaCXgMyv3+z4zil+Kh5K46c2C gktqpTNy0CbKmT6UKgW91aew+o8YwNbLa/CFuhUE6U5ZMNaacp4kdlkSJ6pF2Qj85F+e f1MDvEZX6XdlG7UvnQgxzI1pDH+Gpm7VWTcjs6I2/hI0zzCPnq6ezxw1hlla37QhV1wN Kksw== 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; bh=jOJNw/MySlmNu6oQKkDA1PjtSICqp4Wa7ifNVP10fSs=; b=0uRhIOlMNsw5gnha2T7VhhsyS6wdj1e40jup6zJjWeatyfNxa5p8hZvJr5yV9I8vV8 qq99BlsoRtfIoOE1EaM/5MI/xS9SI+knzZqyA7d1DOufXWXr/iFpODsgS9L9xUeFmSwF RhwqRdJgDlUegjsrsHSP/4wSoXtvgKttZ6C1FVYrppcVC4MIV27cvWEIwYdPVpmls/vq ZAdM4Lcai9hAtBVt3CLh+L2/bDc6xSuh/IjPjrI3UEby1d6ch+YeOZUB3Cqt/ytAzWLJ 84fea/S7I/6pHrxShf1z2Vu17uq1k64XFRXjd3cNJHuD5o6/epH88m6m0RRcO+3mjfQp L/vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si1338902ejh.579.2021.02.24.07.37.53; Wed, 24 Feb 2021 07:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233242AbhBXPhI (ORCPT + 99 others); Wed, 24 Feb 2021 10:37:08 -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-kernel@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