[CRIU] [PATCH 5/8] asm: convert the ARM implementation of bit operations to the reference
Pavel Emelyanov
xemul at parallels.com
Tue Mar 11 13:05:40 PDT 2014
On 03/11/2014 11:58 PM, Christopher Covington wrote:
> Hi Pavel,
>
> On 03/11/2014 02:43 PM, Pavel Emelyanov wrote:
>> On 03/10/2014 12:51 PM, Alexander Kartashov wrote:
>>> The implementation of bit operations for ARM isn't actually
>>> architecture-specific so it would rather be shared with
>>> the upcoming port for AArch64 that won't provide optimized
>>> implementation of bit operations.
>>>
>>> Proposed-by: Christopher Covington <cov at codeaurora.org>
>>> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
>>> ---
>>> arch/arm/include/asm/bitops.h | 119 ++---------------------------------------
>>> include/asm-generic/bitops.h | 116 +++++++++++++++++++++++++++++++++++++++
>>
>> The include/asm-generic/bitops.h file makes me think this is shared
>> between arm-s and x86, but the latter still has its own implementation.
>
> The x86 port _could_ use the generic version written in C, but instead brings
> its own presumably more optimal version written in assembly. In this context,
> I interpret your question to fundamentally be, "Which architecture ports use
> the generic implementation?"
Yes.
>> Maybe we can put this file into arch/ and share it between arm and arm64?
>
> The location of the file should not affect its ability to be included/used by
> any architecture port. As for the first part of the question, how does moving
> it to arch/ (which I believe would be a deviation from the Linux kernel layout
> that some might expect) answer the question above?
Ah, I see. So the intention is to include this file only from arch/include/
in case architecture wants C-bitops. Well, OK, this makes sense to me. I'll
add a comment into asm-generic/bitops.h saying that this file is not for
inclusion from anywhere but arch/include/bitops.h
> Thanks,
> Christopher
>
Thanks,
Pavel
More information about the CRIU
mailing list