Skip to content

Commit

Permalink
[POWERPC] PS3: Map SPU regions as non-guarded
Browse files Browse the repository at this point in the history
Use ioremap_flags() to map SPU regions as non-guarded.
Change the use of _ioremap() to ioremap_flags().

CC: Arnd Bergmann <arnd.bergmann@de.ibm.com>
CC: Masato Noguchi <Masato.Noguchi@jp.sony.com>
CC: Takao Shinohara <shin@sm.sony.co.jp>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Geoff Levand authored and Paul Mackerras committed Jun 28, 2007
1 parent 1322810 commit 53f7c54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/ps3/htab.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void __init ps3_map_htab(void)

result = lv1_map_htab(0, &htab_addr);

htab = (struct hash_pte *)__ioremap(htab_addr, htab_size,
htab = (__force struct hash_pte *)ioremap_flags(htab_addr, htab_size,
pgprot_val(PAGE_READONLY_X));

DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__,
Expand Down
13 changes: 9 additions & 4 deletions arch/powerpc/platforms/ps3/spu.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,18 @@ static int __init setup_areas(struct spu *spu)
{
struct table {char* name; unsigned long addr; unsigned long size;};

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

spu->local_store = ioremap(spu->local_store_phys, LS_SIZE);
spu->local_store = (__force void *)ioremap_flags(spu->local_store_phys,
LS_SIZE, _PAGE_NO_CACHE);

if (!spu->local_store) {
pr_debug("%s:%d: ioremap local_store failed\n",
__func__, __LINE__);
Expand All @@ -199,13 +202,15 @@ static int __init setup_areas(struct spu *spu)

spu->problem = ioremap(spu->problem_phys,
sizeof(struct spu_problem));

if (!spu->problem) {
pr_debug("%s:%d: ioremap problem failed\n", __func__, __LINE__);
goto fail_ioremap;
}

spu->priv2 = ioremap(spu_pdata(spu)->priv2_addr,
sizeof(struct spu_priv2));

if (!spu->priv2) {
pr_debug("%s:%d: ioremap priv2 failed\n", __func__, __LINE__);
goto fail_ioremap;
Expand Down

0 comments on commit 53f7c54

Please sign in to comment.