mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Fwd: [PATCH] drivers/acpi/numa.c: Add localities checking code against proximity domains to slit_valid()
       [not found] ` <CABawtvMM8JeVbnRZagdogzdOVDoPaE6eAFPR3QPTEbuwOfLBsQ@mail.gmail.com>
@ 2012-04-20  2:38   ` Kurt Garloff
  0 siblings, 0 replies; only message in thread
From: Kurt Garloff @ 2012-04-20  2:38 UTC (permalink / raw)
  To: ethan zhao, len.brown; +Cc: linux-kernel

Ethan,





ethan zhao <ethan.kernel@gmail.com> schrieb:

> Some buggy BIOS/ACPI will set different number to SLIT localities and
> SRAT proximity domains,
>  That will make NUMA configuration invalid and kernel will output
> information like following
> 
> NUMA:Warning:invalid distance parameter, from=-1 to=-1 distance=83
> 
> This patch adds some checking code to slit_valid() function in order
> to check the SLIT localities
> count against SRAT proximity domains number and give clear information
> about ACPI bug.
> 
> Signed-off-by: ethan.zhao <ethan.kernel@gmail.com>
> ---
>  drivers/acpi/numa.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
> index e56f3be..55c8a8e 100644
> --- a/drivers/acpi/numa.c
> +++ b/drivers/acpi/numa.c
> @@ -161,6 +161,13 @@ static __init int slit_valid(struct
> acpi_table_slit
> *slit)
>  {
>         int i, j;
>         int d = slit->locality_count;
> +       int pxd = nodes_weight(nodes_found_map);
> +       if (pxd != d) {
> +               printk(KERN_INFO "ACPI: BIOS bug! SLIT localities
> count %d
> doesn't equal SRAT proximity domains number %d\n",
> +                       d , pxd);
> +               return 0;
> +       }
> +
>         for (i = 0; i < d; i++) {
>                 for (j = 0; j < d; j++)  {
>                         u8 val = slit->entry[d*i + j];
> --
> 1.7.1

Patch looks good to me. When I first saw it I was wondering whether that should be controlled via some quirk entry. But probably it can't trigger if everything is correct so that it's probably unneeded complexity. Someone with more intimate knowledge of ACPI should confirm  that and this should be good to go.


Cheers, 

-- 
Kurt Garloff <Kurt@Garloff.de>  [Köln/ Greven]
(Sent from Android phone with K-9 Mail.)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-20  2:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CABawtvMOtG3tsscoOD4P7VH-v8PWJL=JaoOoTwvzRi=aigvEdA@mail.gmail.com>
     [not found] ` <CABawtvMM8JeVbnRZagdogzdOVDoPaE6eAFPR3QPTEbuwOfLBsQ@mail.gmail.com>
2012-04-20  2:38   ` Fwd: [PATCH] drivers/acpi/numa.c: Add localities checking code against proximity domains to slit_valid() Kurt Garloff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®