Message ID | edd341a6e86ceac2717c59680d4e5e7fc3321b5d.1719319093.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable build of full Xen for RISC-V | expand |
On 25.06.2024 15:51, Oleksii Kurochko wrote: > constant_test_bit() is functionally the same as generic_test_bit(), > so constant_test_bit() can be dropped and replaced with > generic_test_bit(). > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com> (Didn't I ask for this to be done, so perhaps also Requested-by or alike?)
On Tue, 2024-06-25 at 16:51 +0200, Jan Beulich wrote: > On 25.06.2024 15:51, Oleksii Kurochko wrote: > > constant_test_bit() is functionally the same as generic_test_bit(), > > so constant_test_bit() can be dropped and replaced with > > generic_test_bit(). > > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > Acked-by: Jan Beulich <jbeulich@suse.com> > (Didn't I ask for this to be done, so perhaps also Requested-by or > alike?) Yes, it was you, sorry. For sure, we should added Requested-by. ( I had cherry-picking from other my branch where I didn't add Requested-by and just not double- check before send to xen-devel ) Could you please add Requested-by during the merge? Thank in advance! ~ Oleksii
diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h index f9aa60111f..8c0403405a 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -277,12 +277,6 @@ static inline int test_and_change_bit(int nr, volatile void *addr) test_and_change_bit(nr, addr); \ }) -static inline int constant_test_bit(int nr, const volatile void *addr) -{ - return ((1U << (nr & 31)) & - (((const volatile unsigned int *)addr)[nr >> 5])) != 0; -} - static inline int variable_test_bit(int nr, const volatile void *addr) { int oldbit; @@ -297,7 +291,7 @@ static inline int variable_test_bit(int nr, const volatile void *addr) #define arch_test_bit(nr, addr) ({ \ __builtin_constant_p(nr) ? \ - constant_test_bit(nr, addr) : \ + generic_test_bit(nr, addr) : \ variable_test_bit(nr, addr); \ })
constant_test_bit() is functionally the same as generic_test_bit(), so constant_test_bit() can be dropped and replaced with generic_test_bit(). Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- Changes in V13: - new patch ( this patch is dependent on xen: introduce generic non-atomic test_*bit() ) --- xen/arch/x86/include/asm/bitops.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)