From 27480d2955a873f3f75d361021792ff34c8889c5 Mon Sep 17 00:00:00 2001 From: Gerhard Stenzel Date: Wed, 13 May 2009 05:50:46 +0000 Subject: [PATCH] --- yaml --- r: 144989 b: refs/heads/master c: 37cd8ed90fc5b11941110d2d0cea6807f86d4787 h: refs/heads/master i: 144987: 92ad7fafbb9687901dedd06b85c7ba5c55903d21 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/ras.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6fbd982b319e..2698123dd4d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 49a849652513235a244dfbf5e58c54f796bd1148 +refs/heads/master: 37cd8ed90fc5b11941110d2d0cea6807f86d4787 diff --git a/trunk/arch/powerpc/platforms/cell/ras.c b/trunk/arch/powerpc/platforms/cell/ras.c index 5f961c464cc4..296b5268754e 100644 --- a/trunk/arch/powerpc/platforms/cell/ras.c +++ b/trunk/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,