Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91011
b: refs/heads/master
c: c786df0
h: refs/heads/master
i:
  91009: a995f8d
  91007: dbd86ed
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 19, 2008
1 parent 0ba2c29 commit 9b1cc60
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 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: 7c18341665917b493fa40eeb3c7ff6c1a5ac47db
refs/heads/master: c786df08f6df2833e34e78cee5ef62558e3b5346
7 changes: 7 additions & 0 deletions trunk/arch/x86/kernel/pci-base_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ static int pci32_dma_map_sg(struct device *dev, struct scatterlist *sglist,
return nents;
}

/* Make sure we keep the same behaviour */
static int pci32_map_error(dma_addr_t dma_addr)
{
return 0;
}

static const struct dma_mapping_ops pci32_dma_ops = {
.map_single = pci32_map_single,
.unmap_single = NULL,
Expand All @@ -41,6 +47,7 @@ static const struct dma_mapping_ops pci32_dma_ops = {
.sync_single_range_for_device = NULL,
.sync_sg_for_cpu = NULL,
.sync_sg_for_device = NULL,
.mapping_error = pci32_map_error,
};

const struct dma_mapping_ops *dma_ops = &pci32_dma_ops;
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/asm-x86/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ struct dma_mapping_ops {

extern const struct dma_mapping_ops *dma_ops;

static inline int dma_mapping_error(dma_addr_t dma_addr)
{
if (dma_ops->mapping_error)
return dma_ops->mapping_error(dma_addr);

return (dma_addr == bad_dma_address);
}

#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)

Expand Down
6 changes: 0 additions & 6 deletions trunk/include/asm-x86/dma-mapping_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
#include <asm/io.h>
#include <asm/bug.h>

static inline int
dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}

extern int forbid_dac;

static inline int
Expand Down
8 changes: 0 additions & 8 deletions trunk/include/asm-x86/dma-mapping_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@

extern int iommu_merge;

static inline int dma_mapping_error(dma_addr_t dma_addr)
{
if (dma_ops->mapping_error)
return dma_ops->mapping_error(dma_addr);

return (dma_addr == bad_dma_address);
}

/* same for gart, swiotlb, and nommu */
static inline int dma_get_cache_alignment(void)
{
Expand Down

0 comments on commit 9b1cc60

Please sign in to comment.