Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86649
b: refs/heads/master
c: edf441f
h: refs/heads/master
i:
  86647: cc32409
v: v3
  • Loading branch information
Michael Ellerman authored and Arnd Bergmann committed Mar 3, 2008
1 parent ac71a81 commit b6479e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 08e024272e529076663e5b4dc8eeecd4131f8a48
refs/heads/master: edf441fb80f9d7a962c298e8da94c8c64802fffa
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/platforms/cell/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,6 @@ static void cell_iommu_setup_page_tables(struct cbe_iommu *iommu,
iommu->ptab = page_address(page);
memset(iommu->ptab, 0, ptab_size);

/* allocate a bogus page for the end of each mapping */
page = alloc_pages_node(iommu->nid, GFP_KERNEL, 0);
BUG_ON(!page);
iommu->pad_page = page_address(page);
clear_page(iommu->pad_page);

/* number of pages needed for a page table */
n_pte_pages = (pages_per_segment *
sizeof(unsigned long)) >> IOMMU_PAGE_SHIFT;
Expand Down Expand Up @@ -463,6 +457,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
unsigned long pte_offset)
{
struct iommu_window *window;
struct page *page;
u32 ioid;

ioid = cell_iommu_get_ioid(np);
Expand Down Expand Up @@ -501,6 +496,11 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
* This code also assumes that we have a window that starts at 0,
* which is the case on all spider based blades.
*/
page = alloc_pages_node(iommu->nid, GFP_KERNEL, 0);
BUG_ON(!page);
iommu->pad_page = page_address(page);
clear_page(iommu->pad_page);

__set_bit(0, window->table.it_map);
tce_build_cell(&window->table, window->table.it_offset, 1,
(unsigned long)iommu->pad_page, DMA_TO_DEVICE);
Expand Down

0 comments on commit b6479e7

Please sign in to comment.