hwspinlocktest: Fix build against latest kernel
PATCH 1/1 hwspinlocktest: Fix build against latest kernel
A recent change in the kernel removed a function that this test was calling. This patch removes the calls to that function and modifies the flow to not need it.
--- ...test-Remove-hwspin_lock_get_id-calls.patch | 70 +++++++++++++++++++ .../hwspinlocktest/hwspinlocktest_0.1.bb | 10 ++- 2 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch new file +70 -0
@@ -0,0 +1,70 @@ +From fb986ed355cd488da64da9eb94d0f260bb329d5b Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <[email protected]> +Date: Fri, 11 Apr 2025 13:49:11 -0500 +Subject: [PATCH] omap_hwspinlock_test: Remove hwspin_lock_get_id() calls + +The hwspin_lock_get_id() function was removed in the most recent +kernel [1]. We can safely stop using this function even for older kernels, +so go ahead and take these changes. + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fec04edb74126f21ac628c7be763c97deb49f69d + +Upstream-Status: Inactive-Upstream [private repo] + +Signed-off-by: Ryan Eatmon <[email protected]> +--- + omap_hwspinlock_test.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/omap_hwspinlock_test.c b/omap_hwspinlock_test.c +index b180138..f3e0912 100644 +--- a/omap_hwspinlock_test.c ++++ b/omap_hwspinlock_test.c +@@ -26,12 +26,12 @@ struct hwspinlock_data { + const unsigned int max_locks; + }; + +-static int hwspin_lock_test(struct hwspinlock *hwlock) ++static int hwspin_lock_test(struct hwspinlock *hwlock, int lock_num) + { + int i; + int ret; + +- pr_err("\nTesting lock %d\n", hwspin_lock_get_id(hwlock)); ++ pr_err("\nTesting lock %d\n", lock_num); + for (i = 0; i < count; i++) { + ret = hwspin_trylock(hwlock); + if (ret) { +@@ -82,7 +82,7 @@ static int hwspin_lock_test_all_locks(unsigned int max_locks) + continue; + } + +- ret1 = hwspin_lock_test(hwlock); ++ ret1 = hwspin_lock_test(hwlock, i); + if (ret1) { + pr_err("hwspinlock tests failed on lock %d\n", i); + ret = ret1; +@@ -147,17 +147,17 @@ static int hwspin_lock_test_all_phandle_locks(unsigned int max_locks) + continue; + } + +- ret1 = hwspin_lock_test(hwlock); ++ ret1 = hwspin_lock_test(hwlock, i); + if (ret1) { + pr_err("hwspinlock test failed on DT lock %d, ret = %d\n", +- hwspin_lock_get_id(hwlock), ret1); ++ hwlock_id, ret1); + ret = ret1; + } + + ret1 = hwspin_lock_free(hwlock); + if (ret1) { + pr_err("hwspin_lock_free failed on lock %d\n", +- hwspin_lock_get_id(hwlock)); ++ hwlock_id); + ret = ret1; + } + } +-- +2.17.1 +
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +7 -3
@@ -5,9 +5,13 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c inherit module -SRC_URI = "git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \ - file://0001-Fix-Makefile-for-to-build-with-yocto.patch \ - file://0002-Add-support-for-AM62-SoCs.patch " +SRC_URI = "\ + git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \ + file://0001-Fix-Makefile-for-to-build-with-yocto.patch \ + file://0002-Add-support-for-AM62-SoCs.patch \ + file://0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch \ +" + SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed" S = "${WORKDIR}/git"
Signature · 1 line
2.17.1
Hi Praneeth,
Quoted 6 lines · Ryan Eatmon via lists.yoctoproject.org
A recent change in the kernel removed a function that this test was calling. This patch removes the calls to that function and modifies the flow to not need it.
Signed-off-by Ryan Eatmon <[email protected]>---
<snip>
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c · line 9
Quoted 2 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +2
-0+SRC_URI = "\ + git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
What's preventing us to move this repository under [0] or [1] ?
[0]: https://github.com/TexasInstruments/
--
Chirag
Quoted 8 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +5
-0+ file://0001-Fix-Makefile-for-to-build-with-yocto.patch \ + file://0002-Add-support-for-AM62-SoCs.patch \ + file://0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch \ +" + SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed" S = "${WORKDIR}/git"
Quoted 17 lines · Chirag Shilwant via lists.yoctoproject.org
Hi Praneeth,
Quoted 6 lines · Ryan Eatmon via lists.yoctoproject.org
A recent change in the kernel removed a function that this test was calling. This patch removes the calls to that function and modifies the flow to not need it.
Signed-off-by Ryan Eatmon <[email protected]>---
<snip>
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c · line 9
Quoted 2 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +2
-0+SRC_URI = "\ + git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
Quoted 6 lines
What's preventing us to move this repository under [0] or [1] ?
+ Suman
Quoted 9 lines
Quoted 9 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +5
-0+ file://0001-Fix-Makefile-for-to-build-with-yocto.patch \ + file://0002-Add-support-for-AM62-SoCs.patch \ + file://0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch \ +" + SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed" S = "${WORKDIR}/git"
Quoted 18 lines · Denys Dmytriyenko
Quoted 17 lines · Chirag Shilwant via lists.yoctoproject.org
Hi Praneeth,
Quoted 6 lines · Ryan Eatmon via lists.yoctoproject.org
A recent change in the kernel removed a function that this test was calling. This patch removes the calls to that function and modifies the flow to not need it.
Signed-off-by Ryan Eatmon <[email protected]>---
<snip>
Quoted 2 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +2
-0+SRC_URI = "\ + git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
Quoted 8 lines
Quoted 6 lines
What's preventing us to move this repository under [0] or [1] ?
+ Suman
As discussed here: https://lists.yoctoproject.org/g/meta-arago/topic/109054399#msg15583
We want to move away from the personal repo to a maintainable location with new owner.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +5
-0+ file://0001-Fix-Makefile-for-to-build-with-yocto.patch \ + file://0002-Add-support-for-AM62-SoCs.patch \ + file://0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch \ +" + SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed" S = "${WORKDIR}/git"
Quoted 27 lines · Praneeth
Quoted 24 lines · Denys Dmytriyenko
Quoted 23 lines · Chirag Shilwant via lists.yoctoproject.org
Hi Praneeth,
Quoted 6 lines · Ryan Eatmon via lists.yoctoproject.org
A recent change in the kernel removed a function that this test was calling. This patch removes the calls to that function and modifies the flow to not need it.
Signed-off-by Ryan Eatmon <[email protected]>---
<snip>
Quoted 3 lines
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb +2
-0+SRC_URI = "\ +
git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master\What's preventing us to move this repository under [0] or [1] ?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
+ Suman
As discussed here: https://lists.yoctoproject.org/g/meta-arago/topic/109054399#msg15583
We want to move away from the personal repo to a maintainable location with new owner.
And as soon as you all make that decision and make that happen, I'm more than happy to submit patches the new project.\
In the meantime... I need to get builds back up and working.
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
+ file://0001-Fix-Makefile-for-to-build-with-yocto.patch \
+ file://0002-Add-support-for-AM62-SoCs.patch \
+ file://0001-omap_hwspinlock_test-Remove-hwspin_lock_get_id-calls.patch \
+"
+
SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed"
S = "${WORKDIR}/git"
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS