Patch "regmap: Disable locking for RBTREE and MAPLE unit tests" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    regmap: Disable locking for RBTREE and MAPLE unit tests

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     regmap-disable-locking-for-rbtree-and-maple-unit-tes.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c2a44187248c0e3c4131846b1e79fa02f3905eb3
Author: Guenter Roeck <linux@xxxxxxxxxxxx>
Date:   Wed Jul 19 20:28:47 2023 -0700

    regmap: Disable locking for RBTREE and MAPLE unit tests
    
    [ Upstream commit a9e26169cfda651802f88262a315146fbe4bc74c ]
    
    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@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230720032848.1306349-1-linux@xxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/base/regmap/regmap-kunit.c b/drivers/base/regmap/regmap-kunit.c
index f76d416881349..0b3dacc7fa424 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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux