[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hM7d+B9WgxiFKJS3_C1D_wrvnU8kT+85yFLSc_X+ToNA@mail.gmail.com>
Date: Thu, 19 Mar 2020 10:30:17 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>,
X86 ML <x86@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] ACPI: NUMA: Add 'nohmat' option
On Wed, Mar 18, 2020 at 6:39 PM Dan Williams <dan.j.williams@...el.com> wrote:
>
> On Wed, Mar 18, 2020 at 1:24 AM Rafael J. Wysocki <rafael@...nel.org> wrote:
> >
> > On Wed, Mar 18, 2020 at 1:09 AM Dan Williams <dan.j.williams@...el.com> wrote:
> > >
> > > On Mon, Mar 2, 2020 at 2:36 PM Dan Williams <dan.j.williams@...el.com> wrote:
> > > >
> > > > Disable parsing of the HMAT for debug, to workaround broken platform
> > > > instances, or cases where it is otherwise not wanted.
> > >
> > > Rafael, any heartburn with this change to the numa= option?
> > >
> > > ...as I look at this I realize I failed to also update
> > > Documentation/x86/x86_64/boot-options.rst, will fix.
> >
> > Thanks!
> >
> > Apart from this just a minor nit below.
> >
> > > >
> > > > Cc: x86@...nel.org
> > > > Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> > > > Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> > > > Cc: Andy Lutomirski <luto@...nel.org>
> > > > Cc: Peter Zijlstra <peterz@...radead.org>
> > > > Cc: Thomas Gleixner <tglx@...utronix.de>
> > > > Cc: Ingo Molnar <mingo@...hat.com>
> > > > Cc: Borislav Petkov <bp@...en8.de>
> > > > Cc: "H. Peter Anvin" <hpa@...or.com>
> > > > Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> > > > ---
> > > > arch/x86/mm/numa.c | 4 ++++
> > > > drivers/acpi/numa/hmat.c | 3 ++-
> > > > include/acpi/acpi_numa.h | 1 +
> > > > 3 files changed, 7 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> > > > index 59ba008504dc..22de2e2610c1 100644
> > > > --- a/arch/x86/mm/numa.c
> > > > +++ b/arch/x86/mm/numa.c
> > > > @@ -44,6 +44,10 @@ static __init int numa_setup(char *opt)
> > > > #ifdef CONFIG_ACPI_NUMA
> > > > if (!strncmp(opt, "noacpi", 6))
> > > > acpi_numa = -1;
> > > > +#ifdef CONFIG_ACPI_HMAT
> > > > + if (!strncmp(opt, "nohmat", 6))
> > > > + hmat_disable = 1;
> > > > +#endif
> >
> > I wonder if IS_ENABLED() would work here?
>
> I took a look. hmat_disable, acpi_numa, and numa_emu_cmdline() are in
> other compilation units. I could wrap writing those variables with
> helper functions, and change numa_emu_cmdline(), to compile away when
> their respective configuration options are not present.
>
> Should we do that in general to have a touch point to report "you
> specified an option that is invalid for your current kernel
> configuration"? I'm happy to do that as a follow-on if you think it's
> worthwhile.
Yes, please.
Powered by blists - more mailing lists