lkml.org 
[lkml]   [2008]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 2/4] x86_64: fix dma_alloc_pages v2

    one system with two nodes and two ht links on every node.
    the bios already have _pxm for two links.

    when no ram installed for node1 will have panic.

    reason: the device on second chain will get node = 1 from dev_to_node...via
    pci_acpi_scan_root.
    but node1 doesn't have ram installed.
    in dma_alloc_pages it will pass check with first_node(node_online_map)...
    and will have problem with __alloc_pages in alloc_pages_node.

    this patch will use updated dev_to node, so remove check about fist_node etc

    Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

    Index: linux-2.6/arch/x86/kernel/pci-dma_64.c
    ===================================================================
    --- linux-2.6.orig/arch/x86/kernel/pci-dma_64.c
    +++ linux-2.6/arch/x86/kernel/pci-dma_64.c
    @@ -53,12 +53,6 @@ dma_alloc_pages(struct device *dev, gfp_
    int node;

    node = dev_to_node(dev);
    - if (node == -1)
    - node = numa_node_id();
    -
    - if (node < first_node(node_online_map))
    - node = first_node(node_online_map);
    -
    page = alloc_pages_node(node, gfp, order);
    return page ? page_address(page) : NULL;
    }

    \
     
     \ /
      Last update: 2008-02-20 09:43    [W:0.022 / U:183.892 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site