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=-5.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 60A86C433DB for ; Wed, 24 Feb 2021 15:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15A0B64ED4 for ; Wed, 24 Feb 2021 15:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232866AbhBXPzv (ORCPT ); Wed, 24 Feb 2021 10:55:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233331AbhBXP0P (ORCPT ); Wed, 24 Feb 2021 10:26:15 -0500 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EBB1C061574; Wed, 24 Feb 2021 07:25:32 -0800 (PST) Received: by mail-oi1-x22f.google.com with SMTP id l133so2762674oib.4; Wed, 24 Feb 2021 07:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PKMBgyiQ3hDdl7FbPyDOO9Us6EgKa0GCpWs3TRxqYBQ=; b=lBcYlcVBOrlhGx/QHSj530pPTtynhE6eKADo+KQDEfgoLH3E4i27/M0KHXblMnDEf2 q4yJRoCF/PvZCJmeNhaUra0LLRicYwqV9+7MO3CebD0K9fekfmk/OgNBBFTzSF96bDDh KHx/UbtaNDRjq6SRjP1ieDbncN54WQFtpQoy4YOI9cCBCCygbToeleTFuYNBC0Y7UN/e FyqEJNfknxIuNg32vf6yimH10bRYNXpNov1YYE1Mzxns7D7wnyrqyqIpADNuC8O0WoaW 3fjT68fRTCBVbVLF71hlPDW8VCBYKog1Fc1Jxkcyhu65LiFuTN9k2NuoVpr1/hdAbtOV +aew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=PKMBgyiQ3hDdl7FbPyDOO9Us6EgKa0GCpWs3TRxqYBQ=; b=R0FcEg0/bjXW5darHU7nxxRQxnT5fXyg+xik86fGJyjLRZlBky2ztGWyYqvi/4UUS4 7Bfkjk2RFmUS6C93MA9IOFINcFUxouIx1NiXqWRoGdIY8upFXmOSyl2pyxz2RyhSLabH KWRSjN+eLcpcJLH+Mc6GxI2WeoLrx7nwjTLebVN1NAXSMApoTb4tQ1U8wKTo3MbaNmmp SwvCqmER4VrsquqPhhi5WaoHhOOzsqqwo3hB2AxCLK3EGMWLxsUhUJrKp0Ex3ErmF+Dq IrDXoCfkwVKPYXtd3aLEmarC6nXF1FyLdBe/O/mnmJL+GSfTKrmtuvhkePpx4tU4lU3X Gm8g== X-Gm-Message-State: AOAM5305pzL4j6VQhZlJeClZP2CrbL4oy1RCBMW7Es3TBLxEvfC2Fcec v9vvr1LY+uEplCf7xQtsFUWIUgMT9lA= X-Google-Smtp-Source: ABdhPJyidE9YuERxBbuFixruSokWU5RV/sXMQ+TmXxzQiiS3vKJOQTcnaILEuAlLopArrHxVtvauAA== X-Received: by 2002:aca:1119:: with SMTP id 25mr3070505oir.156.1614180331649; Wed, 24 Feb 2021 07:25:31 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id e72sm425303ote.26.2021.02.24.07.25.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Feb 2021 07:25:30 -0800 (PST) Sender: Guenter Roeck Date: Wed, 24 Feb 2021 07:25:29 -0800 From: Guenter Roeck To: Alexandre Belloni Cc: Bruno Thomsen , 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: <20210224152529.GA242356@roeck-us.net> References: <20210222224325.GB177866@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org 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