All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 5/7] arm64: cpufeature: Track 32bit EL0 support
Date: Thu, 14 Apr 2016 17:43:06 +0100	[thread overview]
Message-ID: <20160414164305.GH4584@arm.com> (raw)
In-Reply-To: <1459445255-15653-6-git-send-email-suzuki.poulose@arm.com>

On Thu, Mar 31, 2016 at 06:27:33PM +0100, Suzuki K Poulose wrote:
> Add cpu_hwcap bit for keeping track of the support for 32bit EL0.
> 
> Tested-by: Yury Norov <ynorov@caviumnetworks.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  arch/arm64/include/asm/cpufeature.h |    8 +++++++-
>  arch/arm64/kernel/cpufeature.c      |    9 +++++++++
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 7f64285..ca8fb4b 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -35,8 +35,9 @@
>  #define ARM64_ALT_PAN_NOT_UAO			10
>  #define ARM64_HAS_VIRT_HOST_EXTN		11
>  #define ARM64_WORKAROUND_CAVIUM_27456		12
> +#define ARM64_HAS_32BIT_EL0			13
>  
> -#define ARM64_NCAPS				13
> +#define ARM64_NCAPS				14
>  
>  #ifndef __ASSEMBLY__
>  
> @@ -192,6 +193,11 @@ static inline bool cpu_supports_mixed_endian_el0(void)
>  	return id_aa64mmfr0_mixed_endian_el0(read_cpuid(ID_AA64MMFR0_EL1));
>  }
>  
> +static inline bool system_supports_32bit_el0(void)
> +{
> +	return cpus_have_cap(ARM64_HAS_32BIT_EL0);
> +}
> +
>  static inline bool system_supports_mixed_endian_el0(void)
>  {
>  	return id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1));
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index cfc0cfd..739314b 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -733,6 +733,15 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
>  		.capability = ARM64_HAS_VIRT_HOST_EXTN,
>  		.matches = runs_at_el2,
>  	},
> +	{
> +		.desc = "32bit EL0 Support",

Nit: missing hyphen (32-bit).

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, mark.rutland@arm.com,
	marc.zyngier@arm.com, ynorov@caviumnetworks.com
Subject: Re: [PATCH v3 5/7] arm64: cpufeature: Track 32bit EL0 support
Date: Thu, 14 Apr 2016 17:43:06 +0100	[thread overview]
Message-ID: <20160414164305.GH4584@arm.com> (raw)
In-Reply-To: <1459445255-15653-6-git-send-email-suzuki.poulose@arm.com>

On Thu, Mar 31, 2016 at 06:27:33PM +0100, Suzuki K Poulose wrote:
> Add cpu_hwcap bit for keeping track of the support for 32bit EL0.
> 
> Tested-by: Yury Norov <ynorov@caviumnetworks.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  arch/arm64/include/asm/cpufeature.h |    8 +++++++-
>  arch/arm64/kernel/cpufeature.c      |    9 +++++++++
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 7f64285..ca8fb4b 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -35,8 +35,9 @@
>  #define ARM64_ALT_PAN_NOT_UAO			10
>  #define ARM64_HAS_VIRT_HOST_EXTN		11
>  #define ARM64_WORKAROUND_CAVIUM_27456		12
> +#define ARM64_HAS_32BIT_EL0			13
>  
> -#define ARM64_NCAPS				13
> +#define ARM64_NCAPS				14
>  
>  #ifndef __ASSEMBLY__
>  
> @@ -192,6 +193,11 @@ static inline bool cpu_supports_mixed_endian_el0(void)
>  	return id_aa64mmfr0_mixed_endian_el0(read_cpuid(ID_AA64MMFR0_EL1));
>  }
>  
> +static inline bool system_supports_32bit_el0(void)
> +{
> +	return cpus_have_cap(ARM64_HAS_32BIT_EL0);
> +}
> +
>  static inline bool system_supports_mixed_endian_el0(void)
>  {
>  	return id_aa64mmfr0_mixed_endian_el0(read_system_reg(SYS_ID_AA64MMFR0_EL1));
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index cfc0cfd..739314b 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -733,6 +733,15 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
>  		.capability = ARM64_HAS_VIRT_HOST_EXTN,
>  		.matches = runs_at_el2,
>  	},
> +	{
> +		.desc = "32bit EL0 Support",

Nit: missing hyphen (32-bit).

Will

  reply	other threads:[~2016-04-14 16:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 17:27 [PATCH v3 0/7] arm64: Support for systems without AArch32 state Suzuki K Poulose
2016-03-31 17:27 ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 1/7] arm64: hwcaps: Cleanup naming Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 2/7] arm64: HWCAP: Split COMPAT HWCAP table entries Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 3/7] arm64: Add helpers for detecting AArch32 support at EL0 Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-04-14 16:39   ` Will Deacon
2016-04-14 16:39     ` Will Deacon
2016-04-14 16:46     ` Suzuki K Poulose
2016-04-14 16:46       ` Suzuki K Poulose
2016-04-14 16:47       ` Will Deacon
2016-04-14 16:47         ` Will Deacon
2016-03-31 17:27 ` [PATCH v3 4/7] arm64: cpufeature: Check availability of AArch32 Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 5/7] arm64: cpufeature: Track 32bit EL0 support Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-04-14 16:43   ` Will Deacon [this message]
2016-04-14 16:43     ` Will Deacon
2016-04-14 16:50     ` Suzuki K Poulose
2016-04-14 16:50       ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 6/7] arm64: Add a wrapper for personality() syscall Suzuki K Poulose
2016-03-31 17:27   ` Suzuki K Poulose
2016-04-14 16:44   ` Will Deacon
2016-04-14 16:44     ` Will Deacon
2016-04-14 16:47     ` Suzuki K Poulose
2016-04-14 16:47       ` Suzuki K Poulose
2016-03-31 17:27 ` [PATCH v3 7/7] arm64: compat: Check for AArch32 state Suzuki K Poulose
2016-03-31 17:27   ` 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=20160414164305.GH4584@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.