From: "Markus F.X.J. Oberhumer" <markus@oberhumer.com>
To: Dave Rodgman <dave.rodgman@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "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>,
"minchan@kernel.org" <minchan@kernel.org>,
"sergey.senozhatsky.work@gmail.com"
<sergey.senozhatsky.work@gmail.com>,
"sonnyrao@google.com" <sonnyrao@google.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
nd <nd@arm.com>, "sfr@canb.auug.org.au" <sfr@canb.auug.org.au>
Subject: Re: [PATCH 3/8] lib/lzo: enable 64-bit CTZ on Arm
Date: Thu, 6 Dec 2018 16:51:55 +0100 [thread overview]
Message-ID: <5C09459B.5090201@oberhumer.com> (raw)
In-Reply-To: <20181130142600.13782-4-dave.rodgman@arm.com>
I think that LZO_USE_CTZ64 should only be defined for ARM64 and
not for 32-bit ARM.
On 2018-11-30 15:26, Dave Rodgman wrote:
> From: Matt Sealey <matt.sealey@arm.com>
>
> ARMv6 Thumb state introduced an RBIT instruction which, combined with CLZ
> as present in ARMv5, introduces an extremely fast path for counting
> trailing zeroes.
>
> Enable the use of the GCC builtin for this on ARMv6+ with
> CONFIG_THUMB2_KERNEL to ensure we get the 'new' instruction usage.
>
> We do not bother enabling LZO_USE_CTZ64 support for ARMv5 as the builtin
> code path does the same thing as the LZO_USE_CTZ32 code, only with more
> register pressure.
>
> Link: http://lkml.kernel.org/r/20181127161913.23863-4-dave.rodgman@arm.com
> Signed-off-by: Matt Sealey <matt.sealey@arm.com>
> Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Markus F.X.J. Oberhumer <markus@oberhumer.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Nitin Gupta <nitingupta910@gmail.com>
> Cc: Richard Purdie <rpurdie@openedhand.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
> Cc: Sonny Rao <sonnyrao@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> lib/lzo/lzodefs.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/lzo/lzodefs.h b/lib/lzo/lzodefs.h
> index e1b3cf6459a9..c0193f726db0 100644
> --- a/lib/lzo/lzodefs.h
> +++ b/lib/lzo/lzodefs.h
> @@ -33,9 +33,14 @@
> #define LZO_USE_CTZ32 1
> #elif defined(CONFIG_X86) || defined(CONFIG_PPC)
> #define LZO_USE_CTZ32 1
> -#elif defined(CONFIG_ARM) && (__LINUX_ARM_ARCH__ >= 5)
> +#elif defined(CONFIG_ARM)
> +#if (__LINUX_ARM_ARCH__ >= 5)
> #define LZO_USE_CTZ32 1
> #endif
> +#if (__LINUX_ARM_ARCH__ >= 6) && defined(CONFIG_THUMB2_KERNEL)
> +#define LZO_USE_CTZ64 1
> +#endif
> +#endif
>
> #define M1_MAX_OFFSET 0x0400
> #define M2_MAX_OFFSET 0x0800
>
--
Markus Oberhumer, <markus@oberhumer.com>, http://www.oberhumer.com/
next prev parent reply other threads:[~2018-12-06 15:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 14:26 [PATCH v4 0/7] lib/lzo: performance improvements Dave Rodgman
2018-11-30 14:26 ` [PATCH 1/8] lib/lzo: tidy-up ifdefs Dave Rodgman
2018-12-06 15:49 ` Markus F.X.J. Oberhumer
2018-11-30 14:26 ` [PATCH 2/8] lib/lzo: clean-up by introducing COPY16 Dave Rodgman
2018-12-06 15:56 ` Markus F.X.J. Oberhumer
2018-11-30 14:26 ` [PATCH 3/8] lib/lzo: enable 64-bit CTZ on Arm Dave Rodgman
2018-12-06 15:51 ` Markus F.X.J. Oberhumer [this message]
2018-11-30 14:26 ` [PATCH 4/8] lib/lzo: 64-bit CTZ on arm64 Dave Rodgman
2018-12-06 15:52 ` Markus F.X.J. Oberhumer
2018-11-30 14:26 ` [PATCH 5/8] lib/lzo: fast 8-byte copy " Dave Rodgman
2018-12-06 15:53 ` Markus F.X.J. Oberhumer
2018-11-30 14:26 ` [PATCH 6/8] lib/lzo: implement run-length encoding Dave Rodgman
2018-12-06 15:56 ` Markus F.X.J. Oberhumer
2018-11-30 14:26 ` [PATCH 7/8] lib/lzo: separate lzo-rle from lzo Dave Rodgman
2018-12-01 8:48 ` Herbert Xu
2018-11-30 14:26 ` [PATCH 8/8] zram: default to lzo-rle instead of lzo Dave Rodgman
2018-12-05 7:30 ` [PATCH v4 0/7] lib/lzo: performance improvements Sergey Senozhatsky
2018-12-05 9:50 ` Dave Rodgman
2018-12-05 10:20 ` Sergey Senozhatsky
2018-12-06 15:47 ` Markus F.X.J. Oberhumer
2018-12-06 16:22 ` Matt Sealey
2018-12-07 15:54 ` Dave Rodgman
2019-01-07 15:35 ` Dave Rodgman
-- strict thread matches above, loose matches on Subject: below --
2018-11-30 11:47 [PATCH v3 " Dave Rodgman
2018-11-30 11:47 ` [PATCH 3/8] lib/lzo: enable 64-bit CTZ on Arm 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=5C09459B.5090201@oberhumer.com \
--to=markus@oberhumer.com \
--cc=Matt.Sealey@arm.com \
--cc=akpm@linux-foundation.org \
--cc=dave.rodgman@arm.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.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=sergey.senozhatsky.work@gmail.com \
--cc=sfr@canb.auug.org.au \
--cc=sonnyrao@google.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.