* [PATCH] sparc32: fix iommu_flush_iotlb end address
@ 2006-06-20 4:08 Bob Breuer
2006-06-20 7:41 ` David Miller
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Bob Breuer @ 2006-06-20 4:08 UTC (permalink / raw)
To: sparclinux
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
Fix the calculation of the end address when flushing iotlb entries to
ram. This bug has been a cause of esp dma errors, and it affects
HyperSPARC systems much worse than SuperSPARC systems.
Signed-off-by: Bob Breuer <breuerr@mc.net>
---
Just in case it's not obvious from the patch as to how the dma was
broken: Each dma mapping sets up iopte entries for the iommu, and the
iommu only looks in main memory for the iopte entries. If there is a
group of iopte entries that are smaller than a page in size, but
straddle a page boundary, the broken code would fail to flush the last
page to ram.
Bob
[-- Attachment #2: sparc32-fix-flush_iotlb_end.patch.txt --]
[-- Type: text/plain, Size: 490 bytes --]
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 77840c8..7215849 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -144,8 +144,9 @@ static void iommu_flush_iotlb(iopte_t *i
unsigned long start;
unsigned long end;
- start = (unsigned long)iopte & PAGE_MASK;
+ start = (unsigned long)iopte;
end = PAGE_ALIGN(start + niopte*sizeof(iopte_t));
+ start &= PAGE_MASK;
if (viking_mxcc_present) {
while(start < end) {
viking_mxcc_flush_page(start);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] sparc32: fix iommu_flush_iotlb end address
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
@ 2006-06-20 7:41 ` David Miller
2006-06-23 10:41 ` Martin Habets
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2006-06-20 7:41 UTC (permalink / raw)
To: sparclinux
From: Bob Breuer <breuerr@mc.net>
Date: Mon, 19 Jun 2006 23:08:59 -0500
> Fix the calculation of the end address when flushing iotlb entries to
> ram. This bug has been a cause of esp dma errors, and it affects
> HyperSPARC systems much worse than SuperSPARC systems.
>
> Signed-off-by: Bob Breuer <breuerr@mc.net>
Good catch, that bug would explain a lot.
Applied, and I'll toss this to -stable too.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sparc32: fix iommu_flush_iotlb end address
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
2006-06-20 7:41 ` David Miller
@ 2006-06-23 10:41 ` Martin Habets
2006-06-23 11:48 ` BERTRAND Joël
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Martin Habets @ 2006-06-23 10:41 UTC (permalink / raw)
To: sparclinux
Hi Bob,
On Mon, Jun 19, 2006 at 11:08:59PM -0500, Bob Breuer wrote:
> Fix the calculation of the end address when flushing iotlb entries to
> ram. This bug has been a cause of esp dma errors, and it affects
> HyperSPARC systems much worse than SuperSPARC systems.
Thanks for this patch! I was going cross-eyed trying to figure this
out. I have updated kernel bug 6344 with this info. Can no longer reproduce
any esp dma errors.
Thanks,
--
Martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sparc32: fix iommu_flush_iotlb end address
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
2006-06-20 7:41 ` David Miller
2006-06-23 10:41 ` Martin Habets
@ 2006-06-23 11:48 ` BERTRAND Joël
2006-06-23 16:40 ` Bob Breuer
2006-06-26 12:01 ` BERTRAND Joël
4 siblings, 0 replies; 6+ messages in thread
From: BERTRAND Joël @ 2006-06-23 11:48 UTC (permalink / raw)
To: sparclinux
Martin Habets a écrit :
> Hi Bob,
>
> On Mon, Jun 19, 2006 at 11:08:59PM -0500, Bob Breuer wrote:
>
>>Fix the calculation of the end address when flushing iotlb entries to
>>ram. This bug has been a cause of esp dma errors, and it affects
>>HyperSPARC systems much worse than SuperSPARC systems.
>
>
> Thanks for this patch! I was going cross-eyed trying to figure this
> out. I have updated kernel bug 6344 with this info. Can no longer reproduce
> any esp dma errors.
Thanks for this patch. I shall test it in smp configuration. Do you
know the release of the official kernel that supports sparc32 smp mode ?
I have tested the 2.6.17.1 kernel without success (ot doesn't build due
to a undefined symbol...).
Regards,
JKB
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sparc32: fix iommu_flush_iotlb end address
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
` (2 preceding siblings ...)
2006-06-23 11:48 ` BERTRAND Joël
@ 2006-06-23 16:40 ` Bob Breuer
2006-06-26 12:01 ` BERTRAND Joël
4 siblings, 0 replies; 6+ messages in thread
From: Bob Breuer @ 2006-06-23 16:40 UTC (permalink / raw)
To: sparclinux
BERTRAND Joël wrote:
> Thanks for this patch. I shall test it in smp configuration. Do you
> know the release of the official kernel that supports sparc32 smp mode ?
> I have tested the 2.6.17.1 kernel without success (ot doesn't build due
> to a undefined symbol...).
For sparc32 smp without extra patches, 2.6.17.X won't work. You will
need at least 2.6.17-git2 or newer.
Bob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sparc32: fix iommu_flush_iotlb end address
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
` (3 preceding siblings ...)
2006-06-23 16:40 ` Bob Breuer
@ 2006-06-26 12:01 ` BERTRAND Joël
4 siblings, 0 replies; 6+ messages in thread
From: BERTRAND Joël @ 2006-06-26 12:01 UTC (permalink / raw)
To: sparclinux
Hello,
I have build a 2.6.17-git7. It can boot with init=/bin/bash but if I
try to boot with init=2 (debian system), kernel craches when it tries to
mount local filesystem (watchdog reset or dead lock).
Configuration : 448 MB, 2*SM71, CG14, raid1.
I will try a -git10...
Regards,
JKB
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-26 12:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 4:08 [PATCH] sparc32: fix iommu_flush_iotlb end address Bob Breuer
2006-06-20 7:41 ` David Miller
2006-06-23 10:41 ` Martin Habets
2006-06-23 11:48 ` BERTRAND Joël
2006-06-23 16:40 ` Bob Breuer
2006-06-26 12:01 ` BERTRAND Joël
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.