Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11165860rwb; Fri, 25 Nov 2022 11:57:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf43AN/UY4qEFGIAj2658Ec38IYDHiedmGRIPDHu+yVCNdPL4+PavVD4GvhjL6ZI9t9jZ0y9 X-Received: by 2002:a63:1942:0:b0:46f:7b0d:3602 with SMTP id 2-20020a631942000000b0046f7b0d3602mr17579536pgz.143.1669406225311; Fri, 25 Nov 2022 11:57:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669406225; cv=none; d=google.com; s=arc-20160816; b=WEgMlWapJNIGbPkzbB9JHIC8ym6+K2Mt9hR5u248RlY7oVMpJjx+WWndzC5tBstZBh pDHtrcRbeapTl9q9SawLMzoq3M9nSbTtJFA0hlzmEj+CTJaOGI3YXxzsP02zqI5/HysP epnALkEvZfE5gDkktskNLSzkgR9URTmgylrHpJn45zeplVNkgfPaIXOzHlXf5QJ9LVH+ 0WomPvPP32R6hv2EK/qxW29l26Dn6xlEcv52E+JYgEf5bARMWYHGhZf7WZ8AOCFIychg ga5sUqg5meKgdfeNCq9b+lhpA4gFDneOUNFtjHxLHffX2xHW0DQYV7RyT5fsC6n99WzO fgbg== 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:dkim-signature; bh=kuGdTMBKEA/3O1Qjt/c8TnmmTW8IDT+wip3hpt+qvOI=; b=jb65ykv5sNNzzfhdoP5+54CecrjYdymIpPlS8092rsJZtApxZQlQWjWqAdaL1ZRwCL AsE7ZX+SFoL9yot/22bAhKVYcbmktMVLuYH42ByPw9sZ/H4pUP1cVYVs7sx6BPv/fJNh RlOcaPOG+NHqhYthaEdxpxf2329w2eSz9TTkX7PDbgMd0V180bHPnm7+BnWOCSsAAAZv Sjv2nYcMr1+nhwinEVtJ6j1NK1s5Ux8C+IrSmSsS8PxumsbXYQOFQRtwnsMIbQqfqnG7 DtYV8/3HgxKU0PxdEVTp1Lho/vN72TnBOFSy3vug9tEb/5TRbD/4koSE+i4+jPk06bX3 5z4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EuaD6P5B; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020a056a0008d000b005739d652a89si5070885pfu.223.2022.11.25.11.56.42; Fri, 25 Nov 2022 11:57:05 -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=@kernel.org header.s=k20201202 header.b=EuaD6P5B; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiKYTbC (ORCPT + 85 others); Fri, 25 Nov 2022 14:31:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiKYTbA (ORCPT ); Fri, 25 Nov 2022 14:31:00 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6113B4A051 for ; Fri, 25 Nov 2022 11:30:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F727B82BF6 for ; Fri, 25 Nov 2022 19:30:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF153C433C1; Fri, 25 Nov 2022 19:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669404656; bh=4R2wkemNfL7NoiM642AxpmAB/0zST92cwO+Erb3Pb5c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EuaD6P5BcqyDYBPiAZYLIwszZOPVAFF29sQNBTKFr6fqvvkxfnMlxRNEByBkfCwUx wu3+62ul2xeMZy/iNqIk09ARExLNyd1RkluzePbJQyNJ8h1zVBWW3lWkLABziE9c58 saW6o0So1OXCuZEqcwfDtO8AAtE5MFTKb3LtI1QqbzdVI9q1oubms/NMgWwpzHWF8O Z58zVeOzCzFTjoBU9dE0VTPY8NBbnxvYM/pheZdF33Lh6zB4eUCRvCPsyU6NjQ46Id MxL1uGJJQGne8rykdPoKtT8MXVql6SMMRz/J1xZo0Xoly7y6zGH4P6s3e5rc+A/ha0 4l2yAIrVFaDgA== Date: Fri, 25 Nov 2022 19:30:52 +0000 From: Mark Brown To: Alexander Stein Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] regmap: cache: downgrade log level for no cache defaults message Message-ID: References: <20220921071054.3132504-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yp5XM8ipNl8d+MS7" Content-Disposition: inline In-Reply-To: <20220921071054.3132504-1-alexander.stein@ew.tq-group.com> X-Cookie: Time and tide wait for no man. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --yp5XM8ipNl8d+MS7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 21, 2022 at 09:10:54AM +0200, Alexander Stein wrote: > Having no cache defaults is not a mistake, especially for devices > which do have some kind of strapping values which can't be provided > statically. For this case a warning is the wrong log level, the initial > cache values do need to be read form hardware. Reduce level to info. > if (!map->reg_defaults_raw) { > bool cache_bypass = map->cache_bypass; > - dev_warn(map->dev, "No cache defaults, reading back from HW\n"); > + dev_info(map->dev, "No cache defaults, reading back from HW\n"); This is a warning which is only generated in the case where we have a non-sparse cache where we won't read from the hardware in the csae of missing values and will instead just substitute zero as a default value. It's warning that we might end up changing values for the device unexpectedly in the case of a read/modify/write cycle that doesn't actually check what the device currently has set. In this case if you can't use a rbtree cache I would recommend bootstrapping by initially reading without a cache first to get the default values, then replacing the regmap with one that uses the defaults you just read. You'll need some care over suspend/resume though. --yp5XM8ipNl8d+MS7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOBF+sACgkQJNaLcl1U h9CK6Qf/ZjTUtwgqo+qDCVj8jMeBqAXGwcxD7fv7GCC4hf6NeeNQeATHZAfR/gJv 9FoQkYcJ6D/rQQdlwn9tcyEn4ulO/UAav4OWqSLAVi/D/iiW7NPURyiBwdovQVub Kn0wH/byMDMGLilxr8haxi8GJKcEusVQj9DwWOqOPSC9kilP1m20VwDczdEk9M0d 6R9q2laPG6Ehmd2w/FljR9qZuZyJE98TfPkwrz/XQGmf1T6brDyA1/kNMokk0dt+ MPe66HGeCTH0n63W6IReKZ6AJrvdTlBXAz7uYkoRyz8dbSzUCKAJOOSyKbCeJJ6/ rgtCL4GO3GegcbjxDm2O4z03MwsgbA== =UX2o -----END PGP SIGNATURE----- --yp5XM8ipNl8d+MS7--