diff options
-rw-r--r-- | arch/x86/kernel/pci-nommu_64.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-nommu_64.c b/arch/x86/kernel/pci-nommu_64.c index 90a7c40aa989..a4e8ccfae4cb 100644 --- a/arch/x86/kernel/pci-nommu_64.c +++ b/arch/x86/kernel/pci-nommu_64.c | |||
@@ -67,9 +67,21 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, | |||
67 | return nents; | 67 | return nents; |
68 | } | 68 | } |
69 | 69 | ||
70 | /* Make sure we keep the same behaviour */ | ||
71 | static int nommu_mapping_error(dma_addr_t dma_addr) | ||
72 | { | ||
73 | #ifdef CONFIG_X86_32 | ||
74 | return 0; | ||
75 | #else | ||
76 | return (dma_addr == bad_dma_address); | ||
77 | #endif | ||
78 | } | ||
79 | |||
80 | |||
70 | const struct dma_mapping_ops nommu_dma_ops = { | 81 | const struct dma_mapping_ops nommu_dma_ops = { |
71 | .map_single = nommu_map_single, | 82 | .map_single = nommu_map_single, |
72 | .map_sg = nommu_map_sg, | 83 | .map_sg = nommu_map_sg, |
84 | .mapping_error = nommu_mapping_error, | ||
73 | .is_phys = 1, | 85 | .is_phys = 1, |
74 | }; | 86 | }; |
75 | 87 | ||