Kernel: Fix definition of CAP_TO_MASK

The default type for integer literals is signed int, so we were
accidentally smearing those bits to the upper 32 bit of the result.
This resulted in extremely unreasonable timeouts.
This commit is contained in:
Idan Horowitz 2024-04-22 16:21:42 +03:00 committed by Andreas Kling
commit a2b2209ea5
Notes: sideshowbarker 2024-07-17 21:11:12 +09:00

View file

@ -53,7 +53,7 @@ static constexpr u16 ID_CTRL_SHADOW_DBBUF_MASK = 0x0100;
static constexpr u8 CAP_DBL_SHIFT = 32;
static constexpr u8 CAP_DBL_MASK = 0xf;
static constexpr u8 CAP_TO_SHIFT = 24;
static constexpr u64 CAP_TO_MASK = 0xff << CAP_TO_SHIFT;
static constexpr u64 CAP_TO_MASK = 0xffu << CAP_TO_SHIFT;
static constexpr u32 MQES(u64 cap)
{
return (cap & 0xffff) + 1;