lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/6] lib/lzo: enable 64-bit CTZ on Arm
From
Date
On 2018-11-21 18:31, Christoph Hellwig wrote:
>> #define LZO_USE_CTZ32 1
>> #elif defined(__i386__) || defined(__powerpc__)
>> #define LZO_USE_CTZ32 1
>> -#elif defined(__arm__) && (__LINUX_ARM_ARCH__ >= 5)
>> +#elif defined(__arm__)
>> +#if (__LINUX_ARM_ARCH__ >= 5)
>> #define LZO_USE_CTZ32 1
>> #endif
>> +#if (__LINUX_ARM_ARCH__ >= 6) && (CONFIG_THUMB2_KERNEL)
>> +#define LZO_USE_CTZ64 1
>
> All of this really needs to be driven by Kconfig symbols that
> the architecture selects instead of magic arch ifdefs here.

LZO_USE_CTZ32 and LZO_USE_CTZ64 should only be defined if there
is a *fast* hardware instruction.

It would be nice if there exists a kernel #define we could
use for detecting that.

--
Markus Oberhumer, <markus@oberhumer.com>, http://www.oberhumer.com/

\
 
 \ /
  Last update: 2018-11-22 04:06    [W:0.063 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site