Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71906
b: refs/heads/master
c: 6f7d998
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Kyle McMartin committed Oct 18, 2007
1 parent 17b8335 commit edef966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: f13cec8447f18cca3a0feb4b83b7ba6fae9e59ae
refs/heads/master: 6f7d998e94ec7b7f08bd0c72fc05343435d7fa93
9 changes: 4 additions & 5 deletions trunk/arch/parisc/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,10 @@ static void *fail_alloc_consistent(struct device *dev, size_t size,
static void *pa11_dma_alloc_noncoherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
void *addr = NULL;
void *addr;

/* rely on kmalloc to be cacheline aligned */
addr = kmalloc(size, flag);
if(addr)
addr = (void *)__get_free_pages(flag, get_order(size));
if (addr)
*dma_handle = (dma_addr_t)virt_to_phys(addr);

return addr;
Expand All @@ -582,7 +581,7 @@ static void *pa11_dma_alloc_noncoherent(struct device *dev, size_t size,
static void pa11_dma_free_noncoherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t iova)
{
kfree(vaddr);
free_pages((unsigned long)vaddr, get_order(size));
return;
}

Expand Down

0 comments on commit edef966

Please sign in to comment.