[PATCH] LoongArch: Select ARCH_HAS_CURRENT_STACK_POINTER in Kconfig

Huacai Chen posted 1 patch 1 year, 11 months ago
arch/loongarch/Kconfig | 1 +
1 file changed, 1 insertion(+)
[PATCH] LoongArch: Select ARCH_HAS_CURRENT_STACK_POINTER in Kconfig
Posted by Huacai Chen 1 year, 11 months ago
LoongArch has implemented the current_stack_pointer macro, so select
ARCH_HAS_CURRENT_STACK_POINTER in Kconfig. This will let it be used in
non-arch places (like HARDENED_USERCOPY).

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 arch/loongarch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index f90949aa7cda..277d00acd581 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -15,6 +15,7 @@ config LOONGARCH
 	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
 	select ARCH_HAS_ACPI_TABLE_UPGRADE	if ACPI
 	select ARCH_HAS_CPU_FINALIZE_INIT
+	select ARCH_HAS_CURRENT_STACK_POINTER
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_KCOV
 	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
-- 
2.43.0
Re: [PATCH] LoongArch: Select ARCH_HAS_CURRENT_STACK_POINTER in Kconfig
Posted by Guo Ren 1 year, 10 months ago
On Fri, Mar 15, 2024 at 10:45 AM Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> LoongArch has implemented the current_stack_pointer macro, so select
> ARCH_HAS_CURRENT_STACK_POINTER in Kconfig. This will let it be used in
> non-arch places (like HARDENED_USERCOPY).
>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  arch/loongarch/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index f90949aa7cda..277d00acd581 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -15,6 +15,7 @@ config LOONGARCH
>         select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
>         select ARCH_HAS_ACPI_TABLE_UPGRADE      if ACPI
>         select ARCH_HAS_CPU_FINALIZE_INIT
> +       select ARCH_HAS_CURRENT_STACK_POINTER
>         select ARCH_HAS_FORTIFY_SOURCE
>         select ARCH_HAS_KCOV
>         select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
> --
> 2.43.0
>
Yep, you forgot that.

Reviewed-by: Guo Ren <guoren@kernel.org>

-- 
Best Regards
 Guo Ren