Re: [v2] mips: use wsbh/dsbh/dshd on Loongson 3A

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

 



2014-08-20 7:21 GMT+08:00 David Daney <ddaney.cavm@xxxxxxxxx>:
> On 08/15/2014 01:56 AM, chenj wrote:
>>
>> Signed-off-by: chenj <chenj@xxxxxxxxxx>
>> ---
>> This patch is modified from http://patchwork.linux-mips.org/patch/7054/
>> The original author is ralf.
>>
>> v2: using "#if defined(CONFIG_CPU_MIPSR2) ||
>> defined(CONFIG_CPU_LOONGSON3)"
>> instead of "#if cpu_has_wsbh" in csum_partial.S
>>
>>   arch/mips/include/asm/cpu-features.h                       | 10
>> ++++++++++
>>   .../include/asm/mach-cavium-octeon/cpu-feature-overrides.h |  1 +
>>   .../mips/include/asm/mach-loongson/cpu-feature-overrides.h |  2 ++
>>   arch/mips/include/uapi/asm/swab.h                          | 14
>> ++++++++++++--
>>   arch/mips/lib/csum_partial.S                               | 10
>> ++++++++--
>>   arch/mips/net/bpf_jit.c                                    |  2 +-
>>   6 files changed, 34 insertions(+), 5 deletions(-)
>>
> [...]
>
>> diff --git a/arch/mips/include/uapi/asm/swab.h
>> b/arch/mips/include/uapi/asm/swab.h
>> index ac9a8f9..20b884a 100644
>> --- a/arch/mips/include/uapi/asm/swab.h
>> +++ b/arch/mips/include/uapi/asm/swab.h
>
> [...]
>
>> @@ -46,8 +53,11 @@ static inline __attribute_const__ __u32
>> __arch_swab32(__u32 x)
>>   static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
>>   {
>>         __asm__(
>> +       "       .set    push                    \n"
>> +       "       .set    arch=mips64r2           \n"
>>         "       dsbh    %0, %1\n"
>>         "       dshd    %0, %0"
>> +       "       .set    pop                     \n"
>>         : "=r" (x)
>>         : "r" (x));
>>
>
> This section of the patch is defective.  It appears to have not been compile
> tested.
>
> On mips-for-linux-next commit d4c5edf76f14720a32805202129dfa8206560035
> produces:
Really sorry for that, I've submitted a patch for this:
http://patchwork.linux-mips.org/patch/7550/


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux