All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] arm64/fpsimd: Use ID_AA64PFR0_EL1_.* macros
Date: Mon, 7 Nov 2016 16:31:16 +0000	[thread overview]
Message-ID: <f0a6a6de-8a54-52d3-f0c6-773c43989eb7@arm.com> (raw)
In-Reply-To: <1441303979-9535-1-git-send-email-kuleshovmail@gmail.com>

On 03/09/15 19:12, Alexander Kuleshov wrote:
> The 26d75e67c commit (arm64/cpufeature.h: Add macros for a cpu features
> testing) provides set of macros for the testing processor's FP and advanced
> SIMD features.
>
> Let's use these macros instead of direct calculation.
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  arch/arm64/kernel/fpsimd.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
> index 44d6f75..12943a5 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -27,6 +27,7 @@
>
>  #include <asm/fpsimd.h>
>  #include <asm/cputype.h>
> +#include <asm/cpufeature.h>
>
>  #define FPEXC_IOF	(1 << 0)
>  #define FPEXC_DZF	(1 << 1)
> @@ -333,13 +334,13 @@ static int __init fpsimd_init(void)
>  {
>  	u64 pfr = read_cpuid(ID_AA64PFR0_EL1);
>
> -	if (pfr & (0xf << 16)) {
> +	if (ID_AA64PFR0_EL1_FP(pfr)) {
>  		pr_notice("Floating-point is not implemented\n");
>  		return 0;
>  	}
>  	elf_hwcap |= HWCAP_FP;
>
> -	if (pfr & (0xf << 20))
> +	if (ID_AA64PFR0_EL1_ADV_SIMD(pfr))
>  		pr_notice("Advanced SIMD is not implemented\n");
>  	else
>  		elf_hwcap |= HWCAP_ASIMD;
>

Similar to the previous one, this won't apply anymore.

Suzuki

WARNING: multiple messages have this Message-ID (diff)
From: Suzuki.Poulose@arm.com (Suzuki K Poulose)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm64/fpsimd: Use ID_AA64PFR0_EL1_.* macros
Date: Mon, 7 Nov 2016 16:31:16 +0000	[thread overview]
Message-ID: <f0a6a6de-8a54-52d3-f0c6-773c43989eb7@arm.com> (raw)
In-Reply-To: <1441303979-9535-1-git-send-email-kuleshovmail@gmail.com>

On 03/09/15 19:12, Alexander Kuleshov wrote:
> The 26d75e67c commit (arm64/cpufeature.h: Add macros for a cpu features
> testing) provides set of macros for the testing processor's FP and advanced
> SIMD features.
>
> Let's use these macros instead of direct calculation.
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  arch/arm64/kernel/fpsimd.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
> index 44d6f75..12943a5 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -27,6 +27,7 @@
>
>  #include <asm/fpsimd.h>
>  #include <asm/cputype.h>
> +#include <asm/cpufeature.h>
>
>  #define FPEXC_IOF	(1 << 0)
>  #define FPEXC_DZF	(1 << 1)
> @@ -333,13 +334,13 @@ static int __init fpsimd_init(void)
>  {
>  	u64 pfr = read_cpuid(ID_AA64PFR0_EL1);
>
> -	if (pfr & (0xf << 16)) {
> +	if (ID_AA64PFR0_EL1_FP(pfr)) {
>  		pr_notice("Floating-point is not implemented\n");
>  		return 0;
>  	}
>  	elf_hwcap |= HWCAP_FP;
>
> -	if (pfr & (0xf << 20))
> +	if (ID_AA64PFR0_EL1_ADV_SIMD(pfr))
>  		pr_notice("Advanced SIMD is not implemented\n");
>  	else
>  		elf_hwcap |= HWCAP_ASIMD;
>

Similar to the previous one, this won't apply anymore.

Suzuki

  reply	other threads:[~2016-11-07 16:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 18:11 [PATCH 1/3] arm64/cpufeature.h: Add macros for a cpu features testing Alexander Kuleshov
2015-09-03 18:11 ` Alexander Kuleshov
2015-09-03 18:12 ` [PATCH 2/3] arm64/setup: Use ID_AA64ISAR0_EL1_.* macros Alexander Kuleshov
2015-09-03 18:12   ` Alexander Kuleshov
2015-09-04 11:26   ` Catalin Marinas
2015-09-04 11:26     ` Catalin Marinas
2016-11-07 16:30   ` Suzuki K Poulose
2016-11-07 16:30     ` Suzuki K Poulose
2015-09-03 18:12 ` [PATCH 3/3] arm64/fpsimd: Use ID_AA64PFR0_EL1_.* macros Alexander Kuleshov
2015-09-03 18:12   ` Alexander Kuleshov
2016-11-07 16:31   ` Suzuki K Poulose [this message]
2016-11-07 16:31     ` Suzuki K Poulose
2015-09-04 11:25 ` [PATCH 1/3] arm64/cpufeature.h: Add macros for a cpu features testing Catalin Marinas
2015-09-04 11:25   ` Catalin Marinas
2015-09-04 12:00 ` Suzuki K. Poulose
2015-09-04 12:00   ` Suzuki K. Poulose
2015-09-04 12:19   ` Alexander Kuleshov
2015-09-04 12:19     ` Alexander Kuleshov
2015-09-16 14:48     ` Suzuki K. Poulose
2015-09-16 14:48       ` Suzuki K. Poulose

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=f0a6a6de-8a54-52d3-f0c6-773c43989eb7@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=kuleshovmail@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.