lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 3/3] Resend: Consider SRAT rev on ia64
    Hi,

    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 disregard reserved fields.

    ia64 did handle the PXM fields almost consistently, but depending on
    sgi's sn2 platform. This patch leaves the sn2 logic in, but does also
    use 16/32 bits for PXM if the SRAT has rev 2 or higher.

    The patch also adds __init to the two pxm accessor functions, as they
    access __initdata now and are called from an __init function only anyway.

    Note that the code only uses 16 bits for the PXM field in the processor
    proximity field; the patch does not address this as 16 bits are more than
    enough.

    This is patch 3/3.

    Signed-off-by: Kurt Garloff <garloff@suse.de>
    --
    Kurt Garloff, VP OPS Partner Engineering -- Novell Inc.
    From: Kurt Garloff <garloff@suse.de>
    Subject: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
    References: bnc#503038

    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 disregard reserved fields.

    ia64 did handle the PXM fields almost consistently, but depending on
    sgi's sn2 platform. This patch leaves the sn2 logic in, but does also
    use 16/32 bits for PXM if the SRAT has rev 2 or higher.

    The patch also adds __init to the two pxm accessor functions, as they
    access __initdata now and are called from an __init function only anyway.

    Note that the code only uses 16 bits for the PXM field in the processor
    proximity field; the patch does not address this as 16 bits are more than
    enough.

    This is patch 3/3.

    Signed-off-by: Kurt Garloff <garloff@suse.de>

    diff -r a28eb89d1fe1 arch/ia64/kernel/acpi.c
    --- a/arch/ia64/kernel/acpi.c Tue Jul 14 02:00:45 2009 +0000
    +++ b/arch/ia64/kernel/acpi.c Tue Jul 14 16:44:35 2009 +0200
    @@ -456,22 +456,24 @@
    static struct acpi_table_slit __initdata *slit_table;
    cpumask_t early_cpu_possible_map = CPU_MASK_NONE;

    -static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
    +static int __init
    +get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
    {
    int pxm;

    pxm = pa->proximity_domain_lo;
    - if (ia64_platform_is("sn2"))
    + if (ia64_platform_is("sn2") || acpi_srat_revision >= 2)
    pxm += pa->proximity_domain_hi[0] << 8;
    return pxm;
    }

    -static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
    +static int __init
    +get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
    {
    int pxm;

    pxm = ma->proximity_domain;
    - if (!ia64_platform_is("sn2"))
    + if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1)
    pxm &= 0xff;

    return pxm;[unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2009-07-14 19:01    [W:0.024 / U:30.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site