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
This commit is contained in:
Коммит
18b026da34
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче