diff options
author | Michal Marek <mmarek@suse.cz> | 2010-10-12 09:09:06 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-10-12 09:09:06 -0400 |
commit | 239060b93bb30a4ad55f1ecaa512464a035cc5ba (patch) | |
tree | 77f79810e57d4fc24356eca0cd6db463e8994128 /arch/mips/cavium-octeon/dma-octeon.c | |
parent | 1408b15b98635a13bad2e2a50b3c2ae2ccdf625b (diff) | |
parent | e9203c988234aa512bd45ca32b52e21c7bbfc414 (diff) |
Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
We need to revert the temporary hack in 71ebc01, hence the merge.
Diffstat (limited to 'arch/mips/cavium-octeon/dma-octeon.c')
-rw-r--r-- | arch/mips/cavium-octeon/dma-octeon.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/mips/cavium-octeon/dma-octeon.c b/arch/mips/cavium-octeon/dma-octeon.c index be531ec1f206..d22b5a2d64f4 100644 --- a/arch/mips/cavium-octeon/dma-octeon.c +++ b/arch/mips/cavium-octeon/dma-octeon.c | |||
@@ -99,13 +99,16 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void *ptr, size_t size) | |||
99 | panic("dma_map_single: " | 99 | panic("dma_map_single: " |
100 | "Attempt to map illegal memory address 0x%llx\n", | 100 | "Attempt to map illegal memory address 0x%llx\n", |
101 | physical); | 101 | physical); |
102 | else if ((physical + size >= | 102 | else if (physical >= CVMX_PCIE_BAR1_PHYS_BASE && |
103 | (4ull<<30) - (OCTEON_PCI_BAR1_HOLE_SIZE<<20)) | 103 | physical + size < (CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_PHYS_SIZE)) { |
104 | && physical < (4ull<<30)) | 104 | result = physical - CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_RC_BASE; |
105 | pr_warning("dma_map_single: Warning: " | 105 | |
106 | "Mapping memory address that might " | 106 | if (((result+size-1) & dma_mask) != result+size-1) |
107 | "conflict with devices 0x%llx-0x%llx\n", | 107 | panic("dma_map_single: Attempt to map address 0x%llx-0x%llx, which can't be accessed according to the dma mask 0x%llx\n", |
108 | physical, physical+size-1); | 108 | physical, physical+size-1, dma_mask); |
109 | goto done; | ||
110 | } | ||
111 | |||
109 | /* The 2nd 256MB is mapped at 256<<20 instead of 0x410000000 */ | 112 | /* The 2nd 256MB is mapped at 256<<20 instead of 0x410000000 */ |
110 | if ((physical >= 0x410000000ull) && physical < 0x420000000ull) | 113 | if ((physical >= 0x410000000ull) && physical < 0x420000000ull) |
111 | result = physical - 0x400000000ull; | 114 | result = physical - 0x400000000ull; |