2024-01-31 02:27:53

by Haibo Xu

[permalink] [raw]
Subject: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

Enable ACPI based NUMA for RISCV in Kconfig.

Signed-off-by: Haibo Xu <[email protected]>
---
arch/riscv/Kconfig | 1 +
drivers/acpi/numa/Kconfig | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index bffbd869a068..e586ab959f34 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -438,6 +438,7 @@ config NUMA
select HAVE_SETUP_PER_CPU_AREA
select NEED_PER_CPU_EMBED_FIRST_CHUNK
select NEED_PER_CPU_PAGE_FIRST_CHUNK
+ select ACPI_NUMA if ACPI
select OF_NUMA
select USE_PERCPU_NUMA_NODE_ID
help
diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
index 849c2bd820b9..525297c44250 100644
--- a/drivers/acpi/numa/Kconfig
+++ b/drivers/acpi/numa/Kconfig
@@ -2,7 +2,7 @@
config ACPI_NUMA
bool "NUMA support"
depends on NUMA
- depends on (X86 || ARM64 || LOONGARCH)
+ depends on (X86 || ARM64 || LOONGARCH || RISCV)
default y if ARM64

config ACPI_HMAT
--
2.34.1



2024-01-31 09:41:58

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

On Wed, Jan 31, 2024, at 03:32, Haibo Xu wrote:
> diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
> index 849c2bd820b9..525297c44250 100644
> --- a/drivers/acpi/numa/Kconfig
> +++ b/drivers/acpi/numa/Kconfig
> @@ -2,7 +2,7 @@
> config ACPI_NUMA
> bool "NUMA support"
> depends on NUMA
> - depends on (X86 || ARM64 || LOONGARCH)
> + depends on (X86 || ARM64 || LOONGARCH || RISCV)

The dependency is no longer needed now since these are
the four architectures that support ACPI now that IA64
is gone.

All of them also 'select ACPI_NUMA' by default, though on
x86 this can still be disabled by manually turning off
CONFIG_X86_64_ACPI_NUMA. I suspect we don't actually ever
want to turn it off on x86 either, so I guess the Kconfig
option can just be removed entirely.

Arnd

2024-02-01 03:21:11

by Haibo Xu

[permalink] [raw]
Subject: Re: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

On Wed, Jan 31, 2024 at 5:33 PM Arnd Bergmann <[email protected]> wrote:
>
> On Wed, Jan 31, 2024, at 03:32, Haibo Xu wrote:
> > diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
> > index 849c2bd820b9..525297c44250 100644
> > --- a/drivers/acpi/numa/Kconfig
> > +++ b/drivers/acpi/numa/Kconfig
> > @@ -2,7 +2,7 @@
> > config ACPI_NUMA
> > bool "NUMA support"
> > depends on NUMA
> > - depends on (X86 || ARM64 || LOONGARCH)
> > + depends on (X86 || ARM64 || LOONGARCH || RISCV)
>
> The dependency is no longer needed now since these are
> the four architectures that support ACPI now that IA64
> is gone.
>
> All of them also 'select ACPI_NUMA' by default, though on
> x86 this can still be disabled by manually turning off
> CONFIG_X86_64_ACPI_NUMA. I suspect we don't actually ever
> want to turn it off on x86 either, so I guess the Kconfig
> option can just be removed entirely.
>

Good catch! Will revert the change in the next version.

To remove the dependency entirely, I think we need a separate patch for it.
What's your opinion?

Regards,
Haibo

> Arnd

2024-02-01 10:08:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

On Thu, Feb 1, 2024, at 03:58, Haibo Xu wrote:
> On Wed, Jan 31, 2024 at 5:33 PM Arnd Bergmann <[email protected]> wrote:
>>
>> On Wed, Jan 31, 2024, at 03:32, Haibo Xu wrote:
>> > diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
>> > index 849c2bd820b9..525297c44250 100644
>> > --- a/drivers/acpi/numa/Kconfig
>> > +++ b/drivers/acpi/numa/Kconfig
>> > @@ -2,7 +2,7 @@
>> > config ACPI_NUMA
>> > bool "NUMA support"
>> > depends on NUMA
>> > - depends on (X86 || ARM64 || LOONGARCH)
>> > + depends on (X86 || ARM64 || LOONGARCH || RISCV)
>>
>> The dependency is no longer needed now since these are
>> the four architectures that support ACPI now that IA64
>> is gone.
>>
>> All of them also 'select ACPI_NUMA' by default, though on
>> x86 this can still be disabled by manually turning off
>> CONFIG_X86_64_ACPI_NUMA. I suspect we don't actually ever
>> want to turn it off on x86 either, so I guess the Kconfig
>> option can just be removed entirely.
>>
>
> Good catch! Will revert the change in the next version.
>
> To remove the dependency entirely, I think we need a separate patch for it.
> What's your opinion?

Agreed, that last bit would need to be acked by the x86
maintainers then, as it only affects them in practice.

Arnd

2024-03-05 05:26:55

by Sunil V L

[permalink] [raw]
Subject: Re: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

On Wed, Jan 31, 2024 at 10:32:01AM +0800, Haibo Xu wrote:
> Enable ACPI based NUMA for RISCV in Kconfig.
>
> Signed-off-by: Haibo Xu <[email protected]>
> ---
> arch/riscv/Kconfig | 1 +
> drivers/acpi/numa/Kconfig | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index bffbd869a068..e586ab959f34 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -438,6 +438,7 @@ config NUMA
> select HAVE_SETUP_PER_CPU_AREA
> select NEED_PER_CPU_EMBED_FIRST_CHUNK
> select NEED_PER_CPU_PAGE_FIRST_CHUNK
> + select ACPI_NUMA if ACPI
> select OF_NUMA
> select USE_PERCPU_NUMA_NODE_ID
> help
> diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
> index 849c2bd820b9..525297c44250 100644
> --- a/drivers/acpi/numa/Kconfig
> +++ b/drivers/acpi/numa/Kconfig
> @@ -2,7 +2,7 @@
> config ACPI_NUMA
> bool "NUMA support"
> depends on NUMA
> - depends on (X86 || ARM64 || LOONGARCH)
> + depends on (X86 || ARM64 || LOONGARCH || RISCV)
Is it possible to remove this if IA64 is removed now?

Thanks,
Sunil
> default y if ARM64
>
> config ACPI_HMAT
> --
> 2.34.1
>

2024-03-05 08:32:42

by Haibo Xu

[permalink] [raw]
Subject: Re: [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA

On Tue, Mar 5, 2024 at 1:26 PM Sunil V L <[email protected]> wrote:
>
> On Wed, Jan 31, 2024 at 10:32:01AM +0800, Haibo Xu wrote:
> > Enable ACPI based NUMA for RISCV in Kconfig.
> >
> > Signed-off-by: Haibo Xu <[email protected]>
> > ---
> > arch/riscv/Kconfig | 1 +
> > drivers/acpi/numa/Kconfig | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > index bffbd869a068..e586ab959f34 100644
> > --- a/arch/riscv/Kconfig
> > +++ b/arch/riscv/Kconfig
> > @@ -438,6 +438,7 @@ config NUMA
> > select HAVE_SETUP_PER_CPU_AREA
> > select NEED_PER_CPU_EMBED_FIRST_CHUNK
> > select NEED_PER_CPU_PAGE_FIRST_CHUNK
> > + select ACPI_NUMA if ACPI
> > select OF_NUMA
> > select USE_PERCPU_NUMA_NODE_ID
> > help
> > diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig
> > index 849c2bd820b9..525297c44250 100644
> > --- a/drivers/acpi/numa/Kconfig
> > +++ b/drivers/acpi/numa/Kconfig
> > @@ -2,7 +2,7 @@
> > config ACPI_NUMA
> > bool "NUMA support"
> > depends on NUMA
> > - depends on (X86 || ARM64 || LOONGARCH)
> > + depends on (X86 || ARM64 || LOONGARCH || RISCV)
> Is it possible to remove this if IA64 is removed now?
>

Yes. Arnd also suggest removing this totally.
Will update it in v2.

> Thanks,
> Sunil
> > default y if ARM64
> >
> > config ACPI_HMAT
> > --
> > 2.34.1
> >