diff options
author | David S. Miller <davem@davemloft.net> | 2006-06-22 03:01:56 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 02:15:21 -0400 |
commit | c2a5a46be4a1c682e18e29e67785126b7610b14d (patch) | |
tree | b9101fa7547c9c5d86ff550e6398a8cf7c2f283a /include | |
parent | 486ad10a7e1b2bb61ea9e48c4d9510f50cd74fc5 (diff) |
[SPARC64]: Fix for Niagara memory corruption.
On some sun4v systems, after netboot the ethernet controller and it's
DMA mappings can be left active. The net result is that the kernel
can end up using memory the ethernet controller will continue to DMA
into, resulting in corruption.
To deal with this, we are more careful about importing IOMMU
translations which OBP has left in the IO-TLB. If the mapping maps
into an area the firmware claimed was free and available memory for
the kernel to use, we demap instead of import that IOMMU entry.
This is going to cause the network chip to take a PCI master abort on
the next DMA it attempts, if it has been left going like this. All
tests show that this is handled properly by the PCI layer and the e1000
drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/pgtable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 4e218814bb3c..03f5bc9b6bec 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -756,6 +756,8 @@ extern unsigned long *sparc64_valid_addr_bitmap; | |||
756 | #define kern_addr_valid(addr) \ | 756 | #define kern_addr_valid(addr) \ |
757 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) | 757 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) |
758 | 758 | ||
759 | extern int page_in_phys_avail(unsigned long paddr); | ||
760 | |||
759 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 761 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
760 | unsigned long pfn, | 762 | unsigned long pfn, |
761 | unsigned long size, pgprot_t prot); | 763 | unsigned long size, pgprot_t prot); |