|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] RISCV/bitops: Use Zbb to provide arch-optimised bitops
On 3/7/25 1:12 PM, Andrew Cooper wrote:
On 07/03/2025 12:01 pm, Jan Beulich wrote:On 07.03.2025 12:50, Oleksii Kurochko wrote:On 3/6/25 9:19 PM, Andrew Cooper wrote:On 05/03/2025 7:34 am, Jan Beulich wrote: Could we really drop *_BYTEORDER? For example, LONG_BYTEORDER for Arm could be either 2 or 3 depends on Arm32 or Arm64 is used. Also, it seems like the follwoing could be moved there too: #define POINTER_ALIGN BYTES_PER_LONGThis one is likely fine to move.#define BITS_PER_LLONG 64This one is only fine to move imo when converted to #define BITS_PER_LONG (BYTES_PER_LLONG << 3)Erm? That's mixing long and long long types. Presuming that's an errant L, then sure.#define BITS_PER_BYTE 8Personally I'd rather leave this per-arch. The others can truly be derived; this one can't be. If we centralize, imo we should also convert the " << 3" to " * BITS_PER_BYTE".It is highly unlikely that Xen will ever run on a system where CHAR_BIT isn't 8. So I suggest it stays central to reduce complexity. If an arch ever needs to change it, the complexity can be added then. Does it make sense to ifdef that? Or, at least, before defintion of BITS_PER_BYTE something like: #if CHAR_BIT != 8 #error "CHAR_BIT isn't 8" #endif ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |