powerpc/cell: Extract duplicated IOPTE_* to <asm/iommu.h>
Both arch/powerpc/platforms/cell/iommu.c and arch/powerpc/platforms/ps3/mm.c contain the same Cell IOMMU page table entry definitions. Extract them and move them to <asm/iommu.h>, while adding a CBE_ prefix. This also allows them to be used by drivers. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
ca971ea39f
commit
5c6fc8db76
@@ -24,6 +24,7 @@
|
||||
#include <linux/lmb.h>
|
||||
|
||||
#include <asm/firmware.h>
|
||||
#include <asm/iommu.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/udbg.h>
|
||||
#include <asm/lv1call.h>
|
||||
@@ -1001,7 +1002,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
|
||||
if (len > r->len)
|
||||
len = r->len;
|
||||
result = dma_sb_map_area(r, virt_addr, len, &tmp,
|
||||
IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
|
||||
CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
|
||||
CBE_IOPTE_M);
|
||||
BUG_ON(result);
|
||||
}
|
||||
|
||||
@@ -1014,7 +1016,8 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
|
||||
else
|
||||
len -= map.rm.size - r->offset;
|
||||
result = dma_sb_map_area(r, virt_addr, len, &tmp,
|
||||
IOPTE_PP_W | IOPTE_PP_R | IOPTE_SO_RW | IOPTE_M);
|
||||
CBE_IOPTE_PP_W | CBE_IOPTE_PP_R | CBE_IOPTE_SO_RW |
|
||||
CBE_IOPTE_M);
|
||||
BUG_ON(result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user