From: Mark Rutland <mark.rutland@arm.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, catalin.marinas@arm.com, joro@8bytes.org,
jean-philippe@linaro.org, iommu@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, joey.gouly@arm.com,
ryan.roberts@arm.com, broonie@kernel.org
Subject: Re: [PATCH 2/2] arm64: cpufeature: Add GCS to cpucap_is_possible()
Date: Thu, 5 Dec 2024 14:23:35 +0000 [thread overview]
Message-ID: <Z1G3Z9C9efBkVKjR@J2N7QTR9R3> (raw)
In-Reply-To: <416c7369fcdce4ebb2a8f12daae234507be27e38.1733406275.git.robin.murphy@arm.com>
On Thu, Dec 05, 2024 at 01:48:10PM +0000, Robin Murphy wrote:
> Since system_supports_gcs() ends up referring to cpucap_is_possible(),
> teach the latter about GCS for consistency with similar features.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Looking around, we should probably do the same for HAFT.
Mark.
> ---
> arch/arm64/include/asm/cpucaps.h | 2 ++
> arch/arm64/include/asm/cpufeature.h | 3 +--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h
> index 201a46efd918..cbbf70e0f204 100644
> --- a/arch/arm64/include/asm/cpucaps.h
> +++ b/arch/arm64/include/asm/cpucaps.h
> @@ -44,6 +44,8 @@ cpucap_is_possible(const unsigned int cap)
> return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
> case ARM64_HAS_S1POE:
> return IS_ENABLED(CONFIG_ARM64_POE);
> + case ARM64_HAS_GCS:
> + return IS_ENABLED(CONFIG_ARM64_GCS);
> case ARM64_UNMAP_KERNEL_AT_EL0:
> return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
> case ARM64_WORKAROUND_843419:
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index b64e49bd9d10..8b4e5a3cd24c 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -847,8 +847,7 @@ static inline bool system_supports_poe(void)
>
> static inline bool system_supports_gcs(void)
> {
> - return IS_ENABLED(CONFIG_ARM64_GCS) &&
> - alternative_has_cap_unlikely(ARM64_HAS_GCS);
> + return alternative_has_cap_unlikely(ARM64_HAS_GCS);
> }
>
> static inline bool system_supports_haft(void)
> --
> 2.39.2.101.g768bb238c484.dirty
>
next prev parent reply other threads:[~2024-12-05 14:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 13:48 [PATCH 1/2] iommu/arm-smmu-v3: Document SVA interaction with new pagetable features Robin Murphy
2024-12-05 13:48 ` [PATCH 2/2] arm64: cpufeature: Add GCS to cpucap_is_possible() Robin Murphy
2024-12-05 14:23 ` Mark Rutland [this message]
2024-12-05 15:04 ` Mark Brown
2024-12-05 15:25 ` Catalin Marinas
2024-12-05 15:55 ` Robin Murphy
2024-12-05 15:40 ` Mark Rutland
2024-12-05 15:52 ` Mark Brown
2024-12-05 18:14 ` [PATCH 1/2] iommu/arm-smmu-v3: Document SVA interaction with new pagetable features Jean-Philippe Brucker
2024-12-06 12:03 ` Robin Murphy
2024-12-05 18:23 ` (subset) " Catalin Marinas
2024-12-10 0:17 ` Will Deacon
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=Z1G3Z9C9efBkVKjR@J2N7QTR9R3 \
--to=mark.rutland@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=joey.gouly@arm.com \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
--cc=ryan.roberts@arm.com \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox