Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3836275pxb; Fri, 4 Feb 2022 18:36:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm5OAOOm/+F+jHJkSS0DijnQmbRQaBN3oWFyIcwunsN9m7QrpEWlzfKb/M4JWYgEQa1UMD X-Received: by 2002:a17:903:244b:: with SMTP id l11mr6004822pls.96.1644028582753; Fri, 04 Feb 2022 18:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644028582; cv=none; d=google.com; s=arc-20160816; b=UV5Kjwvz5bNW6SZa4g9BTGqCD71ryYTGE6+d7YIPh3aN649pQftImZezMyI5FTPUJe BD1yda+SGKkqpBrG+dXPweGgWoxJEBzqX0jn5ETvNvEKcHo0TsY4f0bZpl2bsXTEfOhR 0pS3p3isYZCKnBLf2LlBdTw3ry95bsbsBtTNRsUXoay747XF+Qot8JWMDgXrGNpYEbJZ mqKYF0C1/bhqETT/PAA8VYeurGEIzCv2SMCUe+v+1RDqSVxb9jOtRDVT1KgSxgfyB3BK EAEHo/Arq0zJyDCFdlPi7nvHtZWyz7FmvMhV+ZFhhnPzGCuF6hgqF8T7tnXtiyg1360m JenA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RksNAMhH5Jdhvi6mfS4+KhrwPyqm2XJrsjLWqJJDp+8=; b=wbEidNKxxGksuhrBiCV8v6zsVPw/4GXKXft4r9My5cYtoRadLPU1Dkvx8Glzgk3Jsv 3voomX5a1NxkkLno026yOz7SCwDJM5Rk8ujhRuqeQq78O22+vUVfVNaPi4GGnl+NE2xX kUrcSsZIknTn4QhtfCPv5DBwSOdDD9s6ecA6hoz6Ka14Hn9n2ROazxhQ5DJaHu9e929e EqwKWGP2XQYBc7MyozmSCUIDyyOpLkZYyuv7QV1mHt2nPrmZnAkmXgKhGqjc5VxGjfue f/DF2G4EivHWkpgct8QlBUTZNSGcvOgBYVxzDzyCWidUXE+HAo92r9e6e4P3NqDLutDg Phog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P64uR2lt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g68si3400984pgc.591.2022.02.04.18.36.10; Fri, 04 Feb 2022 18:36:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P64uR2lt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236953AbiBDUHG (ORCPT + 99 others); Fri, 4 Feb 2022 15:07:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237196AbiBDUGb (ORCPT ); Fri, 4 Feb 2022 15:06:31 -0500 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9C8C061778 for ; Fri, 4 Feb 2022 12:05:21 -0800 (PST) Received: by mail-oo1-xc29.google.com with SMTP id t75-20020a4a3e4e000000b002e9c0821d78so5880984oot.4 for ; Fri, 04 Feb 2022 12:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RksNAMhH5Jdhvi6mfS4+KhrwPyqm2XJrsjLWqJJDp+8=; b=P64uR2ltLhXlRC+DXILM0XeyWEQeWtVSx1Xg9l59OShSIYknxCX/QTaxdi3pLbvykJ 4oBNmHZtjy/nzGas90yNMeal2Lg5X+BpJnCILWLeM249X4fkioyYLnuqA1IgcMS++IdY Uu2S8sgKYMs1Y6vztwK/WsiRPp53FfaObPkEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RksNAMhH5Jdhvi6mfS4+KhrwPyqm2XJrsjLWqJJDp+8=; b=lVCDItfXysoMT2Z8vaamfzhAzckMw1GaSQFAp6uf3XA6oZ81NwKkjVBuNl30py+F7m zlyb7K1XRUafHeMtgMQLB+uyr0GZUlb0JJDUM2jOOchLQUot6ItuYL9YXElFPKzuyFQe /4+4pSeNZakbE8UaeUzvBYjxiA8US0P0mE9bC5e48u5QKRVnsGI8uHJ4QY8KqEbloAdW AjFjQOzigW9H+oacc0lmaJeVv9AKyvMhO5Ll1v0UqZYaic7hCH+lAoyBfBgsPQPZgIbE LBYsMIllJPIWX0kzwAnj0uFjVf9QcGIj42cVTAf3tGyHC2jUYlBiQ0gPvaYJtIZcsnas grDw== X-Gm-Message-State: AOAM530c5cBwkEsj9FkJBLEXtwlReHnDYz4lveebLlrooSDA61lylNtF jYE4y8jRC5YX/aS37JAvk1e61HpabovMKg== X-Received: by 2002:a05:6870:b283:: with SMTP id c3mr1089453oao.196.1644005120700; Fri, 04 Feb 2022 12:05:20 -0800 (PST) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com. [209.85.167.182]) by smtp.gmail.com with ESMTPSA id h203sm1224304oif.27.2022.02.04.12.05.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 12:05:20 -0800 (PST) Received: by mail-oi1-f182.google.com with SMTP id t199so9729269oie.10 for ; Fri, 04 Feb 2022 12:05:19 -0800 (PST) X-Received: by 2002:a05:6808:2026:: with SMTP id q38mr2128798oiw.243.1644005119281; Fri, 04 Feb 2022 12:05:19 -0800 (PST) MIME-Version: 1.0 References: <1587620791-5279-1-git-send-email-peng.fan@nxp.com> <20200423104000.GD4808@sirena.org.uk> <20200423112244.GH4808@sirena.org.uk> <20200424103004.GB5850@sirena.org.uk> In-Reply-To: From: Brian Norris Date: Fri, 4 Feb 2022 12:05:07 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: regmap: mmio: lack of runtime_pm support for debugfs To: Mark Brown Cc: Peng Fan , "rafael@kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "S.j. Wang" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After a bit more thinking: On Fri, Feb 4, 2022 at 11:21 AM Brian Norris wrote: > Anyway, I'll probably just go with precious_reg() as suggested above. Unfortunately, precious_reg() wouldn't be quite safe either -- we could do a single check for pm_runtime_active(), but we have no way of knowing (guaranteeing) that it will remain active throughout the remainder of the debugfs operation. For all we know, some other actor could be *just* finishing with (and PM-suspending) our domain immediately after the check. And we can't grab a reference, because we don't have a callback for balancing that back out. If I really want to solve this, I might have to go with adding a debugfs-specific runtime_pm flag, and (to avoid too many side effects) use that with pm_runtime_get_if_active() in regmap-debugfs.c. Brian