[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1f6f2f1-60c9-9dc8-0ad5-14cf94e83487@redhat.com>
Date: Mon, 4 Mar 2019 11:48:18 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Fenghua Yu <fenghua.yu@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
H Peter Anvin <hpa@...or.com>,
Dave Hansen <dave.hansen@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>,
Xiaoyao Li <xiaoyao.li@...el.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
x86 <x86@...nel.org>, kvm@...r.kernel.org
Subject: Re: [PATCH v4 01/17] x86/common: Align cpu_caps_cleared and
cpu_caps_set to unsigned long
On 04/03/19 11:17, Peter Zijlstra wrote:
> On Mon, Mar 04, 2019 at 09:33:16AM +0100, Paolo Bonzini wrote:
>> Why not instead change set_bit/clear_bit to use btsl/btrl instead of
>> btsq/btrq?
>
> At least one of the faulty users (wireless) is in generic code and needs
> fixing regardless.
>
> For better or worse; the bitmap stuff is defined to work on unsigned
> long. Using it on smaller types already relies on small endian; but
> further enabling just makes it worse I feel. Better have the rules be
> uniform.
True that. On the other hand btsl/btrl is also one byte smaller if no
operand is %r8-%r15.
In any case, /me wonders if we should have a macro like
#define DECLARE_LE_BITMAP(name,bits) \
u32 name[DIV_ROUND_UP(bits, 32)] __aligned(sizeof(unsigned long))
Paolo
Powered by blists - more mailing lists