[CRIU] [PATCH 5/8] asm: convert the ARM implementation of bit operations to the reference

Christopher Covington cov at codeaurora.org
Tue Mar 11 12:58:13 PDT 2014


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?"

> 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?

Thanks,
Christopher

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.


More information about the CRIU mailing list