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 2/3] Resend: x86-64: Handle SRAT v1 and v2 consistently
    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.

    x86-64 was rather inconsistent prior to this patch; it used 8 bits
    for the pxm field in cpu_affinity, but 32 bits in mem_affinity.
    This patch makes it consistent: Either use 8 bits consistently (SRAT
    rev 1 or lower) or 32 bits (SRAT rev 2 or higher).

    This is patch 2/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 32bit PXM fields (x86-64)
    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.

    x86-64 was rather inconsistent prior to this patch; it used 8 bits
    for the pxm field in cpu_affinity, but 32 bits in mem_affinity.
    This patch makes it consistent: Either use 8 bits consistently (SRAT
    rev 1 or lower) or 32 bits (SRAT rev 2 or higher).

    This is patch 2/3.

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

    diff -r a28eb89d1fe1 arch/x86/mm/srat_64.c
    --- a/arch/x86/mm/srat_64.c Tue Jul 14 02:00:45 2009 +0000
    +++ b/arch/x86/mm/srat_64.c Tue Jul 14 16:44:35 2009 +0200
    @@ -154,6 +154,8 @@
    if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
    return;
    pxm = pa->proximity_domain_lo;
    + if (acpi_srat_revision >= 2)
    + pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
    node = setup_node(pxm);
    if (node < 0) {
    printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
    @@ -255,6 +257,8 @@
    start = ma->base_address;
    end = start + ma->length;
    pxm = ma->proximity_domain;
    + if (acpi_srat_revision <= 1)
    + pxm &= 0xff;
    node = setup_node(pxm);
    if (node < 0) {
    printk(KERN_ERR "SRAT: Too many proximity domains.\n");
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2009-07-14 19:01    [W:0.026 / U:0.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site