Re: [PATCH v2 1/2] powerpc: pci-ioda: use bitmap_alloc() in pnv_ioda_pick_m64_pe()
From: Yury Norov
Date: Wed Aug 13 2025 - 20:43:29 EST
On Tue, Aug 12, 2025 at 11:07:08AM +1000, Andrew Donnellan wrote:
> On Mon, 2025-08-11 at 12:51 -0400, Yury Norov wrote:
>
> > - /* Allocate bitmap */
> > - size = ALIGN(phb->ioda.total_pe_num / 8, sizeof(unsigned long));
> > - pe_alloc = kzalloc(size, GFP_KERNEL);
> > + pe_alloc = bitmap_alloc(phb->ioda.total_pe_num, GFP_KERNEL);
>
> I haven't checked whether or not this has practical impact given what we later
> do with the bitmap - does this need to be bitmap_zalloc() to match the existing
> use of kzalloc()?
That's fair. I'll send v3 with bitmap_zalloc().