summaryrefslogtreecommitdiffstats
path: root/hw/npu.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/npu.c')
-rw-r--r--hw/npu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/npu.c b/hw/npu.c
index 08eee61c..fcc19417 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -241,10 +241,10 @@ static int64_t npu_dev_cfg_bar_write(struct npu_dev *dev,
/* Update BAR base address */
if (offset == pcrf->start) {
- bar->base &= 0xffffffff00000000;
+ bar->base &= 0xffffffff00000000UL;
bar->base |= (data & 0xfffffff0);
} else {
- bar->base &= 0x00000000ffffffff;
+ bar->base &= 0x00000000ffffffffUL;
bar->base |= ((uint64_t)data << 32);
PCI_VIRT_CFG_NORMAL_RD(pvd, PCI_CFG_CMD, 4, &pci_cmd);
@@ -1052,7 +1052,7 @@ static void assign_mmio_bars(uint32_t gcid, uint32_t xscom,
* Link#3-BAR#1: UNASSIGNED
*/
xscom_write(gcid, xscom + NPU_AT_SCOM_OFFSET + NX_BAR,
- 0x0211000043500000);
+ 0x0211000043500000UL);
xscom_read(gcid, npu_link_scom_base(npu_dn, xscom, 0) + NX_MMIO_BAR_0,
&mem_start);
OpenPOWER on IntegriCloud