Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88093
b: refs/heads/master
c: c143d43
h: refs/heads/master
i:
  88091: a6bd43f
v: v3
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Apr 2, 2008
1 parent 43fbb9f commit 5962765
Show file tree
Hide file tree
Showing 4 changed files with 14 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: 39d4c922b596633da86878b1a5cc881785b8e5fa
refs/heads/master: c143d43aa3149b83e4b40624a27aa2b18638afec
8 changes: 5 additions & 3 deletions trunk/arch/alpha/kernel/pci_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,13 @@ EXPORT_SYMBOL(pci_unmap_page);
else DMA_ADDRP is undefined. */

void *
pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
__pci_alloc_consistent(struct pci_dev *pdev, size_t size,
dma_addr_t *dma_addrp, gfp_t gfp)
{
void *cpu_addr;
long order = get_order(size);
gfp_t gfp = GFP_ATOMIC;

gfp &= ~GFP_DMA;

try_again:
cpu_addr = (void *)__get_free_pages(gfp, order);
Expand Down Expand Up @@ -458,7 +460,7 @@ pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)

return cpu_addr;
}
EXPORT_SYMBOL(pci_alloc_consistent);
EXPORT_SYMBOL(__pci_alloc_consistent);

/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must
be values that were returned from pci_alloc_consistent. SIZE must
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-alpha/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define dma_unmap_single(dev, addr, size, dir) \
pci_unmap_single(alpha_gendev_to_pci(dev), addr, size, dir)
#define dma_alloc_coherent(dev, size, addr, gfp) \
pci_alloc_consistent(alpha_gendev_to_pci(dev), size, addr)
__pci_alloc_consistent(alpha_gendev_to_pci(dev), size, addr, gfp)
#define dma_free_coherent(dev, size, va, addr) \
pci_free_consistent(alpha_gendev_to_pci(dev), size, va, addr)
#define dma_map_page(dev, page, off, size, dir) \
Expand Down
8 changes: 7 additions & 1 deletion trunk/include/asm-alpha/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ extern inline void pcibios_penalize_isa_irq(int irq, int active)
successful and sets *DMA_ADDRP to the pci side dma address as well,
else DMA_ADDRP is undefined. */

extern void *pci_alloc_consistent(struct pci_dev *, size_t, dma_addr_t *);
extern void *__pci_alloc_consistent(struct pci_dev *, size_t,
dma_addr_t *, gfp_t);
static inline void *
pci_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma)
{
return __pci_alloc_consistent(dev, size, dma, GFP_ATOMIC);
}

/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must
be values that were returned from pci_alloc_consistent. SIZE must
Expand Down

0 comments on commit 5962765

Please sign in to comment.