summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-20 12:39:08 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-20 12:39:08 -0800
commitb98adc197f7300e875fbcd4cf5dfa5ebe3d6dc08 (patch)
treeb34acf7e17cc3e5cc952632f4067c01ca9053737 /tools/testing
parentddefe07f600b89762853a50a61bb4ee0e3f864ed (diff)
parenta02576de05178f15ffe6fc7551496de7de8acfde (diff)
Merge tag 'cxl-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Pull cxl fixes from Dave Jiang: "A small collection of CXL fixes" * tag 'cxl-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/port: Fix endpoint RAS error unmasking cxl/test: Free the decoder registry when cxl_test_init() fails cxl/region: Reject a repeat write of an endpoint decoder to targetN cxl/region: Restore a target's position from its slot after sorting
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/cxl/test/cxl.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 3eb1051b1ee8..e3bed17ae253 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -2436,6 +2436,17 @@ static int cxl_topo_init(void)
return cxl_type3_topo_init();
}
+static void free_decoder_registry(void)
+{
+ unsigned long index;
+ void *entry;
+
+ xa_for_each(&decoder_registry, index, entry) {
+ xa_erase(&decoder_registry, index);
+ kfree(entry);
+ }
+}
+
static __init int cxl_test_init(void)
{
struct range mappable;
@@ -2525,20 +2536,11 @@ err_gen_pool_add:
gen_pool_destroy(cxl_mock_pool);
err_gen_pool_create:
unregister_cxl_mock_ops(&cxl_mock_ops);
+ free_decoder_registry();
+ xa_destroy(&decoder_registry);
return rc;
}
-static void free_decoder_registry(void)
-{
- unsigned long index;
- void *entry;
-
- xa_for_each(&decoder_registry, index, entry) {
- xa_erase(&decoder_registry, index);
- kfree(entry);
- }
-}
-
static __exit void cxl_test_exit(void)
{
hmem_test_exit();