<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_byteorder.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_byteorder.h?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_byteorder.h?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2025-07-20T15:45:10Z</updated>
<entry>
<title>include: sbi: fix swap errors with newer gcc -Werror=sequence-point</title>
<updated>2025-07-20T15:45:10Z</updated>
<author>
<name>Ben Dooks</name>
<email>ben.dooks@codethink.co.uk</email>
</author>
<published>2025-07-04T12:29:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=663b05a5f745f6b1360f073587bb57fe9af6a40a'/>
<id>urn:sha1:663b05a5f745f6b1360f073587bb57fe9af6a40a</id>
<content type='text'>
The BSWAPxx() macros are now throwing the following warnings with
newer gcc versions. This is due to throwing an argument in that may
be evaluated more than one (I think) and therefore things like the
example below should be avoided.

Fix by making a set of BSWAPxx() wrappers which specifically only
evaluate 'x' once.

In file included lib/sbi/sbi_mpxy.c:21:
lib/sbi/sbi_mpxy.c: In function ‘sbi_mpxy_write_attrs’:
ib/sbi/sbi_mpxy.c:632:63: error: operation on ‘mem_idx’ may be undefined [-Werror=sequence-point]
  632 |                         attr_val = le32_to_cpu(mem_ptr[mem_idx++]);
      |                                                        ~~~~~~~^~

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Reviewed-by: Rahul Pathak &lt;rahul@summations.net&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Link: https://lore.kernel.org/r/20250704122938.897832-1-ben.dooks@codethink.co.uk
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Support byteorder macros in assembly</title>
<updated>2024-04-05T11:53:51Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2024-03-15T17:36:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5c9a73565f5e6d07cf30ecd7fa511d872050bd2c'/>
<id>urn:sha1:5c9a73565f5e6d07cf30ecd7fa511d872050bd2c</id>
<content type='text'>
Avoid using C types and casts if sbi/sbi_byteorder.h is included in
assembly code

Signed-off-by: Vivian Wang &lt;dramforever@live.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Introduce common endianess conversion macro</title>
<updated>2024-01-10T04:13:28Z</updated>
<author>
<name>Himanshu Chauhan</name>
<email>hchauhan@ventanamicro.com</email>
</author>
<published>2024-01-09T17:00:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b752099da8e37ec9749245fde918e9f7dbd9957e'/>
<id>urn:sha1:b752099da8e37ec9749245fde918e9f7dbd9957e</id>
<content type='text'>
Introduce cpu_to_lle and lle_to_cpu macros which invoke
correct word length cpu_to_le&lt;64/32&gt; conversion based on
__riscv_xlen.

Signed-off-by: Himanshu Chauhan &lt;hchauhan@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Fix BSWAPx() macros for big-endian host</title>
<updated>2023-02-09T04:01:10Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-02-09T03:45:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=aa5dafcb5bfc04f8509a04291402d86d6b5c36d5'/>
<id>urn:sha1:aa5dafcb5bfc04f8509a04291402d86d6b5c36d5</id>
<content type='text'>
The BSWAPx() macros won't do any swapping for big-endian host
because the EXTRACT_BYTE() macro will pickup bytes in reverse
order. Also, the EXTRACT_BYTE() will generate compile error
for constants.

To fix this, we get remove the EXTRACT_BYTE() macro and re-write
BSWAPx() using simple mask and shift operations.

Fixes: 09b34d8cca51 ("include: Add support for byteorder/endianness
conversion")
Reported-by: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>include: Add support for byteorder/endianness conversion</title>
<updated>2023-02-08T12:40:39Z</updated>
<author>
<name>Rahul Pathak</name>
<email>rpathak@ventanamicro.com</email>
</author>
<published>2023-02-02T04:44:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=09b34d8cca513dbd4d52ffd6d3d5b6dedeea516b'/>
<id>urn:sha1:09b34d8cca513dbd4d52ffd6d3d5b6dedeea516b</id>
<content type='text'>
Define macros general byteorder conversion
Define functions for endianness conversion
from general byteorder conversion macros

Signed-off-by: Rahul Pathak &lt;rpathak@ventanamicro.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Sergey Matyukevich &lt;sergey.matyukevich@syntacore.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
