Message ID | 20230720032848.1306349-1-linux@roeck-us.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2865087vqt; Wed, 19 Jul 2023 20:53:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlEvEFurmJF1VvFaOmgiIkmIlU2ejpST/Bcxsa4FhY6PnCU5tZvjZNMt73EP7PiEkhOYuHAR X-Received: by 2002:a05:6a00:3985:b0:673:6cb4:7b0c with SMTP id fi5-20020a056a00398500b006736cb47b0cmr5182669pfb.2.1689825239153; Wed, 19 Jul 2023 20:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689825239; cv=none; d=google.com; s=arc-20160816; b=t+wq5x87lLmw287v/pH6If62zaO6QbLlVGLKow2cGEX1eX67oDyVpmtK1zfS156t1q TXEXMPkKTxb1VFONdhe6nnNWWQ5eKvoRpmeFDgkLMYUp1UwjW5MM8EdFQu0JNOryRAHT pmw6mss0ximRv6YNKhludvJUX3rLLII5lUofXwYL9ucX5EEAgiCmsEHv0QdFAgTEozRL cbTZkcNY394FeW0jZP71VJIJxgyNRy+U6jlvgxbV/J9StWo+vDBuM2rYT0+mGXNmZ4mB YNsRNczJmEg4YJoRU0trJFYCI6wTiqVjXBfgm4ZzlsRaUwZichk0zChVJd3pPzdQ1u1R jU1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=ZOBPZEd7GO5bOVU93EomlLr6fy4u0fAwVai5NlTK4qI=; fh=JuR3MKiWAj55R51kzxw12G54eDCo8KRHpj6+qbYT4gc=; b=lvWfReqg0z0OEZ0GuE0OY9x768k+3HIToQyRDuBlm4N3myUWKrdFEAilLBhomM7+9o DKTQ12iDE6ZquxGX3xZ6JfCbZvPsDoCJiZ/hEm+Q5m7VdUKe7iFs7TrOhmSHF3t7XFts SaOIoPa61igPL7BKvBWMspNjNwX4rhPTCNHOZKyRMx58o3NBOzNxA8nMY19fwcJsGWyz OqM8lttZ/mJlq/PMZTXOaY9ZYu3+bCCNz+knV/4DBv3Zl6J93o7VaWDNJT2l9bDzKAXX xtIr3muIYk/3E3YCvw9uHq0xhWYt/qWPq/szCZvo92iJCU7MhWJnaPVDjebP6AM1l2fs sFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=iun6+ASZ; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a637442000000b0056350e75736si2827742pgn.529.2023.07.19.20.53.46; Wed, 19 Jul 2023 20:53:59 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=iun6+ASZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbjGTD24 (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 23:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjGTD2x (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 23:28:53 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4B3DF0 for <linux-kernel@vger.kernel.org>; Wed, 19 Jul 2023 20:28:52 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-666edfc50deso255979b3a.0 for <linux-kernel@vger.kernel.org>; Wed, 19 Jul 2023 20:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689823732; x=1692415732; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=ZOBPZEd7GO5bOVU93EomlLr6fy4u0fAwVai5NlTK4qI=; b=iun6+ASZGI0sU3iFgPFeqYBIT1wuJH7wIckALTtwON4eaY06xEGDnbZ8/AjOquEvUg B8zylO1anH8htwUTeRs4NOedNvOiz5VIdb3oXSoYSs+2RFz9LzSaVm1m4chwe5WOU6ug 0+4Z3DQVPBzryOUCJXspHjs1UrQdbhvP9DbQuvMhcW+IbibzEVBr918jWczN0pJ+s7Y8 rB1IX/JlW376iVheZvYTCKFRhy/3mtzms6ipmXybvmnL+eUh/sc1rZWX6SFg+AzFH6oR lvqGX0VYgiAWzXEQOB+q4mF2Aqx4x0Hfi0AeqmAlayGEpOipRjaV9xb11XyZYkquPBU4 dalQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689823732; x=1692415732; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZOBPZEd7GO5bOVU93EomlLr6fy4u0fAwVai5NlTK4qI=; b=WEWbTAbuLEJq5+hEjNjKEpPmFMqy50zzNUNLBC7D8WPrjoBDIcvjxjmXg8vOuZRWjO BVY7zBSyBAChflIID7gf2OmW/gN8tuZVs+pw6nErkN5ff85LobGURIq9ULpFZBi+al8P WdMO7gDnjASmkPngqSOhrSOpPtuhDRt7hEQWaWuckRr1Qbr0HwiWa95U+pcKgaKqo/ot Qhn6zPTLtJDJAvKi7qoRhO98P5N3tmCBYB+tHJ5eUTY75j8Tys9Mqv1hUJ1hqqFvbGJq TZo3QU6pOEzUTpZssCFy5fJQoSby2ly78cKuFG8XvC5WQ5snAu4rwCLdrtPHWZLFVCQM G9og== X-Gm-Message-State: ABy/qLanf0JnN2J+T1cgRGdBRVVxE/s24lCbvXp+FXFmP6GYqieCsgLM KSNq09bXvpHBruzIbp+aygBxzLQ8m7c= X-Received: by 2002:a05:6a00:1988:b0:656:c971:951 with SMTP id d8-20020a056a00198800b00656c9710951mr6176601pfl.8.1689823731912; Wed, 19 Jul 2023 20:28:51 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 15-20020aa7920f000000b006829b27f252sm14713pfo.93.2023.07.19.20.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 20:28:51 -0700 (PDT) Sender: Guenter Roeck <groeck7@gmail.com> From: Guenter Roeck <linux@roeck-us.net> To: Mark Brown <broonie@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J . Wysocki" <rafael@kernel.org>, linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net> Subject: [PATCH 1/2] regmap: Disable locking for RBTREE and MAPLE unit tests Date: Wed, 19 Jul 2023 20:28:47 -0700 Message-Id: <20230720032848.1306349-1-linux@roeck-us.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771910190025273867 X-GMAIL-MSGID: 1771910190025273867 |
Series |
[1/2] regmap: Disable locking for RBTREE and MAPLE unit tests
|
|
Commit Message
Guenter Roeck
July 20, 2023, 3:28 a.m. UTC
REGCACHE_RBTREE and REGCACHE_MAPLE dynamically allocate memory
for regmap operations. This is incompatible with spinlock based locking
which is used for fast_io operations. Disable locking for the associated
unit tests to avoid lockdep splashes.
Fixes: f033c26de5a5 ("regmap: Add maple tree based register cache")
Fixes: 2238959b6ad2 ("regmap: Add some basic kunit tests")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/base/regmap/regmap-kunit.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Wed, 19 Jul 2023 20:28:47 -0700, Guenter Roeck wrote: > REGCACHE_RBTREE and REGCACHE_MAPLE dynamically allocate memory > for regmap operations. This is incompatible with spinlock based locking > which is used for fast_io operations. Disable locking for the associated > unit tests to avoid lockdep splashes. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next Thanks! [1/2] regmap: Disable locking for RBTREE and MAPLE unit tests (no commit info) [2/2] regmap: Reject fast_io regmap configurations with RBTREE and MAPLE caches commit: ee43f5bb23340c27603c3ad8ef94f677ad7cb9ad All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
On Wed, 19 Jul 2023 20:28:47 -0700, Guenter Roeck wrote: > REGCACHE_RBTREE and REGCACHE_MAPLE dynamically allocate memory > for regmap operations. This is incompatible with spinlock based locking > which is used for fast_io operations. Disable locking for the associated > unit tests to avoid lockdep splashes. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next Thanks! [1/2] regmap: Disable locking for RBTREE and MAPLE unit tests commit: a9e26169cfda651802f88262a315146fbe4bc74c All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/base/regmap/regmap-kunit.c b/drivers/base/regmap/regmap-kunit.c index 24257aa9004d..9ff3018a46aa 100644 --- a/drivers/base/regmap/regmap-kunit.c +++ b/drivers/base/regmap/regmap-kunit.c @@ -58,6 +58,9 @@ static struct regmap *gen_regmap(struct regmap_config *config, int i; struct reg_default *defaults; + config->disable_locking = config->cache_type == REGCACHE_RBTREE || + config->cache_type == REGCACHE_MAPLE; + buf = kmalloc(size, GFP_KERNEL); if (!buf) return ERR_PTR(-ENOMEM); @@ -889,6 +892,8 @@ static struct regmap *gen_raw_regmap(struct regmap_config *config, config->cache_type = test_type->cache_type; config->val_format_endian = test_type->val_endian; + config->disable_locking = config->cache_type == REGCACHE_RBTREE || + config->cache_type == REGCACHE_MAPLE; buf = kmalloc(size, GFP_KERNEL); if (!buf)