qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines
Date: Mon, 23 Jan 2017 11:11:48 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]