Skip to content

Commit 18b026d

Browse files
committed
Merge branch 'remotes/lorenzo/pci/xgene'
- Use bitmap ops for MSI allocator (Christophe JAILLET) - Fix IB window setup, which was broken by the fact that IB resources are now sorted in address order instead of DT dma-ranges order (Rob Herring) * remotes/lorenzo/pci/xgene: PCI: xgene: Fix IB window setup PCI: xgene-msi: Use bitmap_zalloc() when applicable
2 parents ec5d85e + c7a75d0 commit 18b026d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

drivers/pci/controller/pci-xgene-msi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,7 @@ static void xgene_free_domains(struct xgene_msi *msi)
269269

270270
static int xgene_msi_init_allocator(struct xgene_msi *xgene_msi)
271271
{
272-
int size = BITS_TO_LONGS(NR_MSI_VEC) * sizeof(long);
273-
274-
xgene_msi->bitmap = kzalloc(size, GFP_KERNEL);
272+
xgene_msi->bitmap = bitmap_zalloc(NR_MSI_VEC, GFP_KERNEL);
275273
if (!xgene_msi->bitmap)
276274
return -ENOMEM;
277275

@@ -360,7 +358,7 @@ static int xgene_msi_remove(struct platform_device *pdev)
360358

361359
kfree(msi->msi_groups);
362360

363-
kfree(msi->bitmap);
361+
bitmap_free(msi->bitmap);
364362
msi->bitmap = NULL;
365363

366364
xgene_free_domains(msi);

drivers/pci/controller/pci-xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size)
465465
return 1;
466466
}
467467

468-
if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) {
468+
if ((size > SZ_1K) && (size < SZ_4G) && !(*ib_reg_mask & (1 << 0))) {
469469
*ib_reg_mask |= (1 << 0);
470470
return 0;
471471
}

0 commit comments

Comments
 (0)