diff options
| author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 20:25:34 +0200 |
|---|---|---|
| committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 20:25:34 +0200 |
| commit | e4b636366c00738b9609cda307014d71b1225b7f (patch) | |
| tree | 760b67b3624eda62e943e48ce93635c30a5b47bf /arch/powerpc/platforms/cell/ras.c | |
| parent | b9ed7252d219c1c663944bf03846eabb515dbe75 (diff) | |
| parent | 279e677faa775ad16e75c32e1bf4a37f8158bc61 (diff) | |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/block/hd.c
drivers/block/mg_disk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
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, |
