On 01/19/2017 09:04 AM, Alex Bennée wrote: > +/* Helper function to slurp va_args list into a bitmap > + */ > +static inline unsigned long make_mmu_index_bitmap(va_list args) > +{ > + unsigned long bitmap = 0; > + int mmu_index = va_arg(args, int); > + > + /* An empty va_list would be a bad call */ > + g_assert(mmu_index > 0); > + > + do { > + set_bit(mmu_index, &bitmap); > + mmu_index = va_arg(args, int); > + } while (mmu_index >= 0); > + > + return bitmap; > +} > +
Why don't we just pass in this bitmap in the first place? It's much better than having to use varargs in tlb_flush_by_mmuidx... r~