Message ID | 20250423113123.888700-1-sughosh.ganu@linaro.org |
---|---|
State | Accepted |
Commit | 23e7088dde1a182bbc6b75bc642ee789f23429b2 |
Headers | show |
Series | lmb: use a different bit position for LMB_NOMAP | expand |
On Wed, 23 Apr 2025 17:01:23 +0530, Sughosh Ganu wrote: > The LMB memory region attributes flags are used to specify the > behaviour of the memory regions with respect to allocations -- for > e.g. it is allowed to re-allocate a memory region already reserved > with the LMB_NONE flag. The flags use values with different bit > positions through the BIT() macro. Move the LMB_NOMAP value to bit > position 1, and also move the other flags accordingly. Using bit > position 0 for LMB_NOMAP results in the logic in > lmb_print_region_flags() to break, which prints an incorrect value for > the regions with LMB_NOMAP atribute. > > [...] Applied to u-boot/master, thanks! [1/1] lmb: use a different bit position for LMB_NOMAP commit: 23e7088dde1a182bbc6b75bc642ee789f23429b2
diff --git a/include/lmb.h b/include/lmb.h index 0d316c64c0a..606a92cca48 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -27,9 +27,9 @@ * %LMB_NONOTIFY: Do not notify other modules of changes to this memory region */ #define LMB_NONE 0 -#define LMB_NOMAP BIT(0) -#define LMB_NOOVERWRITE BIT(1) -#define LMB_NONOTIFY BIT(2) +#define LMB_NOMAP BIT(1) +#define LMB_NOOVERWRITE BIT(2) +#define LMB_NONOTIFY BIT(3) /** * enum lmb_map_op - memory map operation
The LMB memory region attributes flags are used to specify the behaviour of the memory regions with respect to allocations -- for e.g. it is allowed to re-allocate a memory region already reserved with the LMB_NONE flag. The flags use values with different bit positions through the BIT() macro. Move the LMB_NOMAP value to bit position 1, and also move the other flags accordingly. Using bit position 0 for LMB_NOMAP results in the logic in lmb_print_region_flags() to break, which prints an incorrect value for the regions with LMB_NOMAP atribute. Fixes: 3d56c06551d ("lmb: Move enum lmb_flags to a u32") Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> --- include/lmb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)