Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114651
b: refs/heads/master
c: 8aa2659
h: refs/heads/master
i:
  114649: 58f9d48
  114647: d2fe768
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Oct 13, 2008
1 parent b6bbb26 commit 1cba234
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 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: 1263965f298af611d4992165242202eb194db1c1
refs/heads/master: 8aa2659009714cf5f9ffe7f3e16ccfa8ff0e0d61
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ static unsigned long get_dma_direct_offset(struct device *dev)
void *dma_direct_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
void *ret;
#ifdef CONFIG_NOT_COHERENT_CACHE
return __dma_alloc_coherent(size, dma_handle, flag);
ret = __dma_alloc_coherent(size, dma_handle, flag);
if (ret == NULL)
return NULL;
*dma_handle += get_dma_direct_offset(dev);
return ret;
#else
struct page *page;
void *ret;
int node = dev_to_node(dev);

/* ignore region specifiers */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/lib/dma-noncoherent.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp)
/*
* Set the "dma handle"
*/
*handle = page_to_bus(page);
*handle = page_to_phys(page);

do {
BUG_ON(!pte_none(*pte));
Expand Down

0 comments on commit 1cba234

Please sign in to comment.