diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-17 11:55:57 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-17 11:55:57 -0700 |
commit | 74392592bbf7e93ef383588e21aea0c1450d6f12 (patch) | |
tree | 086981f9ef51d57a34fbc5fde8095652877cf739 /arch/powerpc/platforms/cell/ras.c | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6 (diff) | |
parent | Fix caller information for warn_slowpath_null (diff) | |
download | linux-dev-74392592bbf7e93ef383588e21aea0c1450d6f12.tar.xz linux-dev-74392592bbf7e93ef383588e21aea0c1450d6f12.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'arch/powerpc/platforms/cell/ras.c')
-rw-r--r-- | arch/powerpc/platforms/cell/ras.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 5f961c464cc4..296b5268754e 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c @@ -122,12 +122,23 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order) area->nid = nid; area->order = order; - area->pages = alloc_pages_node(area->nid, GFP_KERNEL, area->order); + area->pages = alloc_pages_node(area->nid, GFP_KERNEL | GFP_THISNODE, + area->order); - if (!area->pages) + if (!area->pages) { + printk(KERN_WARNING "%s: no page on node %d\n", + __func__, area->nid); goto out_free_area; + } - addr = __pa(page_address(area->pages)); + /* + * We move the ptcal area to the middle of the allocated + * page, in order to avoid prefetches in memcpy and similar + * functions stepping on it. + */ + addr = __pa(page_address(area->pages)) + (PAGE_SIZE >> 1); + printk(KERN_DEBUG "%s: enabling PTCAL on node %d address=0x%016lx\n", + __func__, area->nid, addr); ret = -EIO; if (rtas_call(ptcal_start_tok, 3, 1, NULL, area->nid, |