From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 955A1C5ACD6 for ; Wed, 18 Mar 2020 08:24:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CF6D20773 for ; Wed, 18 Mar 2020 08:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584519853; bh=Ht469kuWo7IjZVc9alNP9GEoy2tDdgvWDMtW+s/gkCM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=lPcrknkzNxK/c79oFMDR1Qtt/loJOfxrnOszlUWX985gC66aQ3HcgZaJ3/uo90w/m xsXNdPUjWP5Yd8VLs3Sli/Dw5LFSuCWgtUvHiLVlLav4bdom17rkdG+CjYbyGsYNQU TSp8Z4U5ikZCYtOYbgWGFkm42Px5AbWekn7+f/hk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727408AbgCRIYM (ORCPT ); Wed, 18 Mar 2020 04:24:12 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:32864 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgCRIYM (ORCPT ); Wed, 18 Mar 2020 04:24:12 -0400 Received: by mail-ot1-f65.google.com with SMTP id x26so7593854otk.0; Wed, 18 Mar 2020 01:24:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IQ0AIpy6289Hs4+0vUajVZqxzUHEdUAVpK8eg8j+VHE=; b=VpCXkmUMJ9vmCsRMm7NT0Xj8R6wNxNEUEmONuevzauY8IZt0iaDFp4Ar+rTotAJXRD r1meyr6HfWoBaAXmgpHsz6Afkt3lufdid4UAZ1GzvWBDzKxqAAtb87WrYbwvSWL30y4z kYL1ko3XwjOMwrmDnxPH9X5oNuGuBgRS1x5tF7dqu+4LjaksmC50s+2v9BwAXIhIjoST j1tGDSnA2009rL7a7oek+Lro94SiBaYsFtT3JaqM/l68icGF+9RAAv6GXJdHpS4qSWv1 Ndq5u8GfqEiqs47bdc8NX67H/P+1KWlhwtbnB3vv6kge6KoaTB68ijUaUBtAsMUrKOqJ NGug== X-Gm-Message-State: ANhLgQ1Pa1z55vj794HJIaAGAkXOnsZuiDpO/Io7GECI4TrVxk87QMIA FccVBvA5+FKmGCCwyIkuZ2sWMg8+yIceqbHqUbY= X-Google-Smtp-Source: ADFU+vtDUu/ENup+aXfCBKJZoHwE4fbxddOCHcfz5Gp/eR5kvQBbgkz/udoMueN3CldSwYbzXoAKDhG5hexnUlr09kY= X-Received: by 2002:a9d:1d07:: with SMTP id m7mr2678697otm.167.1584519851446; Wed, 18 Mar 2020 01:24:11 -0700 (PDT) MIME-Version: 1.0 References: <158318759687.2216124.4684754859068906007.stgit@dwillia2-desk3.amr.corp.intel.com> <158318760361.2216124.13612198312947463590.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 18 Mar 2020 09:24:00 +0100 Message-ID: Subject: Re: [PATCH 1/5] ACPI: NUMA: Add 'nohmat' option To: Dan Williams Cc: Linux ACPI , X86 ML , "Rafael J. Wysocki" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Ard Biesheuvel , linux-nvdimm , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Mar 18, 2020 at 1:09 AM Dan Williams wrote: > > On Mon, Mar 2, 2020 at 2:36 PM Dan Williams 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@kernel.org > > Cc: "Rafael J. Wysocki" > > Cc: Dave Hansen > > Cc: Andy Lutomirski > > Cc: Peter Zijlstra > > Cc: Thomas Gleixner > > Cc: Ingo Molnar > > Cc: Borislav Petkov > > Cc: "H. Peter Anvin" > > Signed-off-by: Dan Williams > > --- > > 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? > > #endif > > return 0; > > } > > diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c > > index 2c32cfb72370..d3db121e393a 100644 > > --- a/drivers/acpi/numa/hmat.c > > +++ b/drivers/acpi/numa/hmat.c > > @@ -26,6 +26,7 @@ > > #include > > > > static u8 hmat_revision; > > +int hmat_disable __initdata; > > > > static LIST_HEAD(targets); > > static LIST_HEAD(initiators); > > @@ -814,7 +815,7 @@ static __init int hmat_init(void) > > enum acpi_hmat_type i; > > acpi_status status; > > > > - if (srat_disabled()) > > + if (srat_disabled() || hmat_disable) > > return 0; > > > > status = acpi_get_table(ACPI_SIG_SRAT, 0, &tbl); > > diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h > > index fdebcfc6c8df..48ca468e9b61 100644 > > --- a/include/acpi/acpi_numa.h > > +++ b/include/acpi/acpi_numa.h > > @@ -18,6 +18,7 @@ extern int node_to_pxm(int); > > extern int acpi_map_pxm_to_node(int); > > extern unsigned char acpi_srat_revision; > > extern int acpi_numa __initdata; > > +extern int hmat_disable __initdata; > > > > extern void bad_srat(void); > > extern int srat_disabled(void); > >