Re: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 2, 2019 at 8:03 AM Tao Xu <tao3.xu@xxxxxxxxx> wrote:
>
> In chapter 5.2.27.5, Table 5-147: Field "Cache Attributes" of
> ACPI 6.3 spec: 0 is "None", 1 is "Direct Mapped", 2 is "Complex Cache
> Indexing" for Cache Associativity; 0 is "None", 1 is "Write Back",
> 2 is "Write Through" for Write Policy.

Well, I'm not sure what the connection between the above statement,
which is correct AFAICS, and the changes made by the patch is.

Is that the *_OTHER symbol names are confusing or something deeper?

> Signed-off-by: Tao Xu <tao3.xu@xxxxxxxxx>
> ---
>  drivers/acpi/numa/hmat.c | 4 ++--
>  include/linux/node.h     | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
> index 2c32cfb72370..719d0279563d 100644
> --- a/drivers/acpi/numa/hmat.c
> +++ b/drivers/acpi/numa/hmat.c
> @@ -383,7 +383,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header,
>                 break;
>         case ACPI_HMAT_CA_NONE:
>         default:
> -               tcache->cache_attrs.indexing = NODE_CACHE_OTHER;
> +               tcache->cache_attrs.indexing = NODE_CACHE_NONE;
>                 break;
>         }
>
> @@ -396,7 +396,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header,
>                 break;
>         case ACPI_HMAT_CP_NONE:
>         default:
> -               tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_OTHER;
> +               tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_NONE;
>                 break;
>         }
>         list_add_tail(&tcache->node, &target->caches);
> diff --git a/include/linux/node.h b/include/linux/node.h
> index 4866f32a02d8..6dbd764d09ce 100644
> --- a/include/linux/node.h
> +++ b/include/linux/node.h
> @@ -36,15 +36,15 @@ struct node_hmem_attrs {
>  };
>
>  enum cache_indexing {
> +       NODE_CACHE_NONE,
>         NODE_CACHE_DIRECT_MAP,
>         NODE_CACHE_INDEXED,
> -       NODE_CACHE_OTHER,
>  };
>
>  enum cache_write_policy {
> +       NODE_CACHE_WRITE_NONE,
>         NODE_CACHE_WRITE_BACK,
>         NODE_CACHE_WRITE_THROUGH,
> -       NODE_CACHE_WRITE_OTHER,
>  };
>
>  /**



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux