Commit 18b026da authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

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
parents ec5d85e7 c7a75d07
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -269,9 +269,7 @@ static void xgene_free_domains(struct xgene_msi *msi)

static int xgene_msi_init_allocator(struct xgene_msi *xgene_msi)
{
	int size = BITS_TO_LONGS(NR_MSI_VEC) * sizeof(long);

	xgene_msi->bitmap = kzalloc(size, GFP_KERNEL);
	xgene_msi->bitmap = bitmap_zalloc(NR_MSI_VEC, GFP_KERNEL);
	if (!xgene_msi->bitmap)
		return -ENOMEM;

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

	kfree(msi->msi_groups);

	kfree(msi->bitmap);
	bitmap_free(msi->bitmap);
	msi->bitmap = NULL;

	xgene_free_domains(msi);
+1 −1
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size)
		return 1;
	}

	if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) {
	if ((size > SZ_1K) && (size < SZ_4G) && !(*ib_reg_mask & (1 << 0))) {
		*ib_reg_mask |= (1 << 0);
		return 0;
	}