Uh oh!
There was an error while loading. Please reload this page.
Fix fw boot retry - V3 - #519
Conversation
60fcee3 to
b13600dCompare
keyonjie
left a comment
There was a problem hiding this comment.
good fixes. minor change comment inline may be better.
There was a problem hiding this comment.
How about changing it like this:
if (!ret) {
dev_dbg(sdev->dev, "Firmware download successful, booting...\n");
goto done;
}
dev_err(sdev->dev, "error: load fw failed ret: %d\n", ret);
err:
plbossart
left a comment
There was a problem hiding this comment.
first patch is good, second one less clear, needs more work. Thanks!
There was a problem hiding this comment.
going from here to done: looks odd, why would you get the stream tag at this point?
There was a problem hiding this comment.
@plbossart@keyonjie I've fixed this to disable the DSP after stream cleanup.
e0acdf8 to
682cb12Compare682cb12 to
302f5c7Compare
plbossart
left a comment
There was a problem hiding this comment.
nicer code but you still search for the same stream twice when you could run the search loop only once.
Uh oh!
There was an error while loading. Please reload this page.
61871d6 to
d73a5edCompareUse the optimized register polling implementation in 9f57798 for the IPC DONE bit from ROM Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
plbossart
left a comment
There was a problem hiding this comment.
One doubt still on the error on the returned value, see below. one more version and we can merge I guess.
There was a problem hiding this comment.
is there a reason why you want to return here without doing the DSP disable? Or is it a leftover from the previous code before you added the DSP disable?
There was a problem hiding this comment.
@plbossart we should disable the DSP only in case of errors. if ret is 0, it means fw boot was successful.
There was a problem hiding this comment.
@ranj063 the diff format is misleading, see the entire code
ret1=cl_cleanup(sdev, &sdev->dmab, stream);
if (ret1<0) {
dev_err(sdev->dev, "error: Code loader DSP cleanup failed\n"); ret=ret1;
}
if (!ret)
returnret;Why would you return if ret1 was not zero? the cleanup failed at this point
There was a problem hiding this comment.
@plbossart if cleanup fails, ret1 will be negative and I set ret to ret1 and the condition (!ret) will not be true. So we will not return but proceed with disabling the DSP.
There was a problem hiding this comment.
@plbossart maybe I should add some comments to make it clearer
There was a problem hiding this comment.
@plbossart I've added some comments to make the error flow a bit clearer. Please let me know if thats helpful.
Disable DSP if cl_copy_fw() fails. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
d73a5ed to
6401848Compare
plbossart
left a comment
There was a problem hiding this comment.
LGTM, waiting for CI results before merge.
Add JIT support for the load_acquire and store_release instructions. The implementation is similar to the kernel where: load_acquire => plain load -> lwsync store_release => lwsync -> plain store To test the correctness of the implementation, following selftests were run: [fedora@linux-kernel bpf]$ sudo ./test_progs -a \ verifier_load_acquire,verifier_store_release,atomics thesofproject#11/1 atomics/add:OK thesofproject#11/2 atomics/sub:OK thesofproject#11/3 atomics/and:OK thesofproject#11/4 atomics/or:OK thesofproject#11/5 atomics/xor:OK thesofproject#11/6 atomics/cmpxchg:OK thesofproject#11/7 atomics/xchg:OK thesofproject#11 atomics:OK thesofproject#519/1 verifier_load_acquire/load-acquire, 8-bit:OK thesofproject#519/2 verifier_load_acquire/load-acquire, 8-bit @unpriv:OK thesofproject#519/3 verifier_load_acquire/load-acquire, 16-bit:OK thesofproject#519/4 verifier_load_acquire/load-acquire, 16-bit @unpriv:OK thesofproject#519/5 verifier_load_acquire/load-acquire, 32-bit:OK thesofproject#519/6 verifier_load_acquire/load-acquire, 32-bit @unpriv:OK thesofproject#519/7 verifier_load_acquire/load-acquire, 64-bit:OK thesofproject#519/8 verifier_load_acquire/load-acquire, 64-bit @unpriv:OK thesofproject#519/9 verifier_load_acquire/load-acquire with uninitialized src_reg:OK thesofproject#519/10 verifier_load_acquire/load-acquire with uninitialized src_reg @unpriv:OK thesofproject#519/11 verifier_load_acquire/load-acquire with non-pointer src_reg:OK thesofproject#519/12 verifier_load_acquire/load-acquire with non-pointer src_reg @unpriv:OK thesofproject#519/13 verifier_load_acquire/misaligned load-acquire:OK thesofproject#519/14 verifier_load_acquire/misaligned load-acquire @unpriv:OK thesofproject#519/15 verifier_load_acquire/load-acquire from ctx pointer:OK thesofproject#519/16 verifier_load_acquire/load-acquire from ctx pointer @unpriv:OK thesofproject#519/17 verifier_load_acquire/load-acquire with invalid register R15:OK thesofproject#519/18 verifier_load_acquire/load-acquire with invalid register R15 @unpriv:OK thesofproject#519/19 verifier_load_acquire/load-acquire from pkt pointer:OK thesofproject#519/20 verifier_load_acquire/load-acquire from flow_keys pointer:OK thesofproject#519/21 verifier_load_acquire/load-acquire from sock pointer:OK thesofproject#519 verifier_load_acquire:OK thesofproject#556/1 verifier_store_release/store-release, 8-bit:OK thesofproject#556/2 verifier_store_release/store-release, 8-bit @unpriv:OK thesofproject#556/3 verifier_store_release/store-release, 16-bit:OK thesofproject#556/4 verifier_store_release/store-release, 16-bit @unpriv:OK thesofproject#556/5 verifier_store_release/store-release, 32-bit:OK thesofproject#556/6 verifier_store_release/store-release, 32-bit @unpriv:OK thesofproject#556/7 verifier_store_release/store-release, 64-bit:OK thesofproject#556/8 verifier_store_release/store-release, 64-bit @unpriv:OK thesofproject#556/9 verifier_store_release/store-release with uninitialized src_reg:OK thesofproject#556/10 verifier_store_release/store-release with uninitialized src_reg @unpriv:OK thesofproject#556/11 verifier_store_release/store-release with uninitialized dst_reg:OK thesofproject#556/12 verifier_store_release/store-release with uninitialized dst_reg @unpriv:OK thesofproject#556/13 verifier_store_release/store-release with non-pointer dst_reg:OK thesofproject#556/14 verifier_store_release/store-release with non-pointer dst_reg @unpriv:OK thesofproject#556/15 verifier_store_release/misaligned store-release:OK thesofproject#556/16 verifier_store_release/misaligned store-release @unpriv:OK thesofproject#556/17 verifier_store_release/store-release to ctx pointer:OK thesofproject#556/18 verifier_store_release/store-release to ctx pointer @unpriv:OK thesofproject#556/19 verifier_store_release/store-release, leak pointer to stack:OK thesofproject#556/20 verifier_store_release/store-release, leak pointer to stack @unpriv:OK thesofproject#556/21 verifier_store_release/store-release, leak pointer to map:OK thesofproject#556/22 verifier_store_release/store-release, leak pointer to map @unpriv:OK thesofproject#556/23 verifier_store_release/store-release with invalid register R15:OK thesofproject#556/24 verifier_store_release/store-release with invalid register R15 @unpriv:OK thesofproject#556/25 verifier_store_release/store-release to pkt pointer:OK thesofproject#556/26 verifier_store_release/store-release to flow_keys pointer:OK thesofproject#556/27 verifier_store_release/store-release to sock pointer:OK thesofproject#556 verifier_store_release:OK Summary: 3/55 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Tested-by: Saket Kumar Bhaskar <skb99@linux.ibm.com> Reviewed-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250717202935.29018-2-puranjay@kernel.org
This is a follow-up to #507.