Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109140
b: refs/heads/master
c: b470277
h: refs/heads/master
v: v3
  • Loading branch information
Masakazu Mokuno authored and Paul Mackerras committed Aug 26, 2008
1 parent 79b3d13 commit 8efa700
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cfeb74e93cf3549b7fa67ffe407192da625c777
refs/heads/master: b47027795a22fe61f93de6010c120f26273fc693
18 changes: 14 additions & 4 deletions trunk/arch/powerpc/platforms/ps3/spu.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,24 @@ static void spu_unmap(struct spu *spu)
iounmap(spu_pdata(spu)->shadow);
}

/**
* setup_areas - Map the spu regions into the address space.
*
* The current HV requires the spu shadow regs to be mapped with the
* PTE page protection bits set as read-only (PP=3). This implementation
* uses the low level __ioremap() to bypass the page protection settings
* inforced by ioremap_flags() to get the needed PTE bits set for the
* shadow regs.
*/

static int __init setup_areas(struct spu *spu)
{
struct table {char* name; unsigned long addr; unsigned long size;};
static const unsigned long shadow_flags = _PAGE_NO_CACHE | 3;

spu_pdata(spu)->shadow = ioremap_flags(spu_pdata(spu)->shadow_addr,
sizeof(struct spe_shadow),
pgprot_val(PAGE_READONLY) |
_PAGE_NO_CACHE);
spu_pdata(spu)->shadow = __ioremap(spu_pdata(spu)->shadow_addr,
sizeof(struct spe_shadow),
shadow_flags);
if (!spu_pdata(spu)->shadow) {
pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__);
goto fail_ioremap;
Expand Down

0 comments on commit 8efa700

Please sign in to comment.