Re: [PATCH v2 6/8] cxl/mem: Enable commands via CEL

Bartosz Golaszewski
2021-02-16T13:43:46Z

On Thu, Feb 11, 2021 at 1:12 PM Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>

[snip!]

> >
> > @@ -869,6 +891,14 @@ static struct cxl_mem *cxl_mem_create(struct pci_dev *pdev, u32 reg_lo,
> > mutex_init(&cxlm->mbox_mutex);
> > cxlm->pdev = pdev;
> > cxlm->regs = regs + offset;
> > + cxlm->enabled_cmds =
> > + devm_kmalloc_array(dev, BITS_TO_LONGS(cxl_cmd_count),
> > + sizeof(unsigned long),
> > + GFP_KERNEL | __GFP_ZERO);
>
> Hmm. There doesn't seem to be a devm_bitmap_zalloc
>

FYI I've implemented both devm_bitmap_zalloc() as well as
devm_bitmap_alloc() and made them part of a series I sent out to
linux-gpio two weeks ago (surprisingly - it's nowhere to be found on
lkml or spinics or even patchwork :/). The patches didn't make it for
v5.12 but I'll respin them after the merge window, so we'll have those
devres helpers for v5.13.

Bartosz