From eaabd4d88f172aa5489d9f5b733a516a2f65f8ae Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Tue, 8 Apr 2008 13:20:45 -0300 Subject: [PATCH] --- yaml --- r: 91017 b: refs/heads/master c: 9f9ab46d557c32b9cad49c31d094d659ec3b59c0 h: refs/heads/master i: 91015: 57e11b570d8bf9f6e88db79380cf75be3e9bc3c2 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/pci-nommu_64.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9356c6fcfb9f..2bdbc2b1ae8a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d5df63f48a67400a26eba15624aa883897a4f4d1 +refs/heads/master: 9f9ab46d557c32b9cad49c31d094d659ec3b59c0 diff --git a/trunk/arch/x86/kernel/pci-nommu_64.c b/trunk/arch/x86/kernel/pci-nommu_64.c index 90a7c40aa989..a4e8ccfae4cb 100644 --- a/trunk/arch/x86/kernel/pci-nommu_64.c +++ b/trunk/arch/x86/kernel/pci-nommu_64.c @@ -67,9 +67,21 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, return nents; } +/* Make sure we keep the same behaviour */ +static int nommu_mapping_error(dma_addr_t dma_addr) +{ +#ifdef CONFIG_X86_32 + return 0; +#else + return (dma_addr == bad_dma_address); +#endif +} + + const struct dma_mapping_ops nommu_dma_ops = { .map_single = nommu_map_single, .map_sg = nommu_map_sg, + .mapping_error = nommu_mapping_error, .is_phys = 1, };