<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi/riscv_atomic.c, branch v1.4</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/riscv_atomic.c?h=v1.4</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/riscv_atomic.c?h=v1.4'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2023-12-08T08:36:40Z</updated>
<entry>
<title>lib: sbi: Replace __atomic_op_bit_ord with __atomic intrinsics</title>
<updated>2023-12-08T08:36:40Z</updated>
<author>
<name>Anup Patel</name>
<email>anup@brainfault.org</email>
</author>
<published>2023-12-08T08:24:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=88398696c816dfc79d5301180dfe42a5d8c497c9'/>
<id>urn:sha1:88398696c816dfc79d5301180dfe42a5d8c497c9</id>
<content type='text'>
Simplify atomic-related bit operations through __atomic intrinsics.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Fix __atomic_op_bit_ord and comments</title>
<updated>2023-12-08T08:17:31Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2023-11-15T14:59:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=11bf49b44466b821d0936419caf24befab0a61b7'/>
<id>urn:sha1:11bf49b44466b821d0936419caf24befab0a61b7</id>
<content type='text'>
The original code returns the value of the word before modification.
When modifying the upper 32 bits under RV64, the value returned via
int return will have no meaning. Corrected to return the value of the
bit. And modify the function description.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Remove xchg/cmpxchg implemented via lr/sc</title>
<updated>2023-12-08T05:24:35Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2023-11-08T03:28:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6b9a8494828d3983784fb46bb6cd2b6cc9a54ab1'/>
<id>urn:sha1:6b9a8494828d3983784fb46bb6cd2b6cc9a54ab1</id>
<content type='text'>
lr/sc is part of the A extension. If the A extension is not supported,
lr/sc cannot be used. So remove xchg/cmpxchg.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: fix atomic_add_return</title>
<updated>2021-04-09T13:21:02Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2021-04-06T03:34:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=70ffc3e2e690f2b7bcea456f49206b636420ef5f'/>
<id>urn:sha1:70ffc3e2e690f2b7bcea456f49206b636420ef5f</id>
<content type='text'>
The unsigned length may be 4 bytes or 8 bytes, amoadd.w only applies
to 4 bytes hence this patch.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: Use more consistent name for atomic xchg() and cmpxchg()</title>
<updated>2020-03-28T08:02:38Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-26T12:40:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5b6957eed75ca7842861e0f6765d0f6a64408e05'/>
<id>urn:sha1:5b6957eed75ca7842861e0f6765d0f6a64408e05</id>
<content type='text'>
We should remove the "arch_" prefix from atomic xchg() and cmpxchg()
function names to have consistent naming of all atomic functions.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Fix coding style issues</title>
<updated>2020-03-10T04:57:28Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2020-03-09T03:52:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=650c0e525ce60e80b6756aa8cc4eeae5b20ccbd8'/>
<id>urn:sha1:650c0e525ce60e80b6756aa8cc4eeae5b20ccbd8</id>
<content type='text'>
This fixes various coding style issues found in the SBI codes.
No functional changes.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: Move bits related defines and macros to sbi_bitops.h</title>
<updated>2020-03-08T05:36:18Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-04T05:38:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=00d332bbe726d85e4c2b81ab0a08182612f96c03'/>
<id>urn:sha1:00d332bbe726d85e4c2b81ab0a08182612f96c03</id>
<content type='text'>
The right location for all bits related defines and macros is
sbi_bitops.h hence this patch. With this patch, the sbi_bits.h
is redundant so we remove it.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: Fix typo in atomic exchange functions</title>
<updated>2020-02-22T04:34:38Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2020-02-21T23:47:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c3b3b8f43b49e4fa8fde5e916cd8d573687e3626'/>
<id>urn:sha1:c3b3b8f43b49e4fa8fde5e916cd8d573687e3626</id>
<content type='text'>
There is a typo in atomic operations code which prevents the
usage of riscv atomic instructions even if it is supported.

Fix the typo.

Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: Support atomic swap instructions</title>
<updated>2019-08-31T07:43:47Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2019-08-29T22:19:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6bd1512024c84250a248dea37f30b71a2c4c260f'/>
<id>urn:sha1:6bd1512024c84250a248dea37f30b71a2c4c260f</id>
<content type='text'>
If compiler supports riscv atomic instructions, we should
use them instead of legacy gcc built-in macros
__sync_lock_test_and_set in atomic exchange functions.

Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: Provide an atomic exchange function unsigned long</title>
<updated>2019-08-16T03:12:52Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2019-08-15T01:02:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f6e13e0dd30b164eb444bc08c70fa1b8576e0bca'/>
<id>urn:sha1:f6e13e0dd30b164eb444bc08c70fa1b8576e0bca</id>
<content type='text'>
Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
</feed>
