All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus F.X.J. Oberhumer" <markus@oberhumer.com>
To: Christoph Hellwig <hch@infradead.org>,
	Dave Rodgman <dave.rodgman@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	nd <nd@arm.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Matt Sealey <Matt.Sealey@arm.com>,
	"nitingupta910@gmail.com" <nitingupta910@gmail.com>,
	"rpurdie@openedhand.com" <rpurdie@openedhand.com>,
	"minchan@kernel.org" <minchan@kernel.org>,
	"sergey.senozhatsky.work@gmail.com" 
	<sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 2/6] lib/lzo: enable 64-bit CTZ on Arm
Date: Thu, 22 Nov 2018 04:06:15 +0100	[thread overview]
Message-ID: <5BF61D27.5000002@oberhumer.com> (raw)
In-Reply-To: <20181121173114.GA14352@infradead.org>

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/

  parent reply	other threads:[~2018-11-22  3:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 11:59 [PATCH 1/6] lib/lzo: clean-up by introducing COPY16 Dave Rodgman
2018-11-21 11:59 ` [PATCH 2/6] lib/lzo: enable 64-bit CTZ on Arm Dave Rodgman
2018-11-21 17:31   ` Christoph Hellwig
2018-11-21 18:30     ` Matt Sealey
2018-11-22  3:06     ` Markus F.X.J. Oberhumer [this message]
2018-11-21 11:59 ` [PATCH 4/6] lib/lzo: fast 8-byte copy on arm64 Dave Rodgman
2018-11-21 11:59 ` [PATCH 3/6] lib/lzo: 64-bit CTZ on Arm aarch64 Dave Rodgman
2018-11-21 11:59 ` [PATCH 5/6] lib/lzo: implement run-length encoding Dave Rodgman
2018-11-21 11:59 ` [PATCH 6/6] lib/lzo: separate lzo-rle from lzo Dave Rodgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5BF61D27.5000002@oberhumer.com \
    --to=markus@oberhumer.com \
    --cc=Matt.Sealey@arm.com \
    --cc=dave.rodgman@arm.com \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=nd@arm.com \
    --cc=nitingupta910@gmail.com \
    --cc=rpurdie@openedhand.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.