* [PATCH] mpc8xxx: fsl_pamu: Update data type in config_pamu
@ 2021-02-05 8:31 Priyanka Jain
0 siblings, 0 replies; only message in thread
From: Priyanka Jain @ 2021-02-05 8:31 UTC (permalink / raw)
To: u-boot
Update data type of '1' to '1ull' in below assignment
size = 1ull << sizebit;
to fix incorrect assignment issue.
e.g: when sizebit was 31, 0x80000000 got sign extended to
0xffffffff_80000000
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reported-by: Dean Saridakis <dean.saridakis@baesystems.com>
---
arch/powerpc/cpu/mpc8xxx/fsl_pamu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index 2c378b7615..5229949951 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -390,7 +390,7 @@ int config_pamu(struct pamu_addr_tbl *tbl, int num_entries, uint32_t liodn)
return -1;
sizebit = __ilog2_roundup_64(size);
- size = 1 << sizebit;
+ size = 1ull << sizebit;
debug("min start_addr is %llx\n", min_addr);
debug("max end_addr is %llx\n", max_addr);
debug("size found is %llx\n", size);
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-05 8:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 8:31 [PATCH] mpc8xxx: fsl_pamu: Update data type in config_pamu Priyanka Jain
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.