lkml.org 
[lkml]   [2012]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 36/50] ACPI: Store SRAT table revision
    Date
    From: Kurt Garloff <kurt@garloff.de>

    In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
    32bits for these. The new fields were reserved before.
    According to the ACPI spec, the OS must disregrard reserved fields.
    In order to know whether or not, we must know what version the SRAT
    table has.

    This patch stores the SRAT table revision for later consumption
    by arch specific __init functions.

    Signed-off-by: Kurt Garloff <kurt@garloff.de>
    Signed-off-by: Len Brown <len.brown@intel.com>
    ---
    drivers/acpi/numa.c | 6 ++++++
    include/acpi/acpi_numa.h | 1 +
    2 files changed, 7 insertions(+), 0 deletions(-)

    diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
    index 3b5c318..e56f3be 100644
    --- a/drivers/acpi/numa.c
    +++ b/drivers/acpi/numa.c
    @@ -45,6 +45,8 @@ static int pxm_to_node_map[MAX_PXM_DOMAINS]
    static int node_to_pxm_map[MAX_NUMNODES]
    = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };

    +unsigned char acpi_srat_revision __initdata;
    +
    int pxm_to_node(int pxm)
    {
    if (pxm < 0)
    @@ -255,9 +257,13 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header,

    static int __init acpi_parse_srat(struct acpi_table_header *table)
    {
    + struct acpi_table_srat *srat;
    if (!table)
    return -EINVAL;

    + srat = (struct acpi_table_srat *)table;
    + acpi_srat_revision = srat->header.revision;
    +
    /* Real work done in acpi_table_parse_srat below. */

    return 0;
    diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
    index 1739726..451823c 100644
    --- a/include/acpi/acpi_numa.h
    +++ b/include/acpi/acpi_numa.h
    @@ -15,6 +15,7 @@ extern int pxm_to_node(int);
    extern int node_to_pxm(int);
    extern void __acpi_map_pxm_to_node(int, int);
    extern int acpi_map_pxm_to_node(int);
    +extern unsigned char acpi_srat_revision;

    #endif /* CONFIG_ACPI_NUMA */
    #endif /* __ACP_NUMA_H */
    --
    1.7.9.rc1


    \
     
     \ /
      Last update: 2012-01-17 13:29    [W:0.031 / U:0.096 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site