All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix for HyperSPARC DMA errors
@ 2004-11-10  3:18 Bob Breuer
  2004-11-10  3:30 ` William Lee Irwin III
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Bob Breuer @ 2004-11-10  3:18 UTC (permalink / raw)
  To: sparclinux

I found a solution for the HyperSPARC DMA problems in 2.6.  This allows
my SS20 with HyperSPARCs to boot to single user.  It's not efficient,
but I hope it points out whats needed for a proper fix.  Seems that the
iotlb entries need to flushed to ram or uncached since the iommu changes
between 2.5.60 and 2.5.70.

The second part seems to be needed to allow consistent sbus dma mappings
to be cached on HyperSPARC.  I have also tested this change on 2.4.27
with no noticeable difference.  Can anyone prove if it helps or hurts?

Bob


--- linux-2.6.9/arch/sparc/mm/iommu.c.orig	2004-10-18 16:55:29.000000000 -0500
+++ linux-2.6.9/arch/sparc/mm/iommu.c	2004-11-07 17:25:24.000000000 -0600
@@ -173,6 +173,7 @@ static u32 iommu_get_one(struct page *pa
  	}

  	iommu_viking_flush_iotlb(iopte0, npages);
+	flush_cache_all(); // hack to fix dma errors with hypersparc

  	return busa0;
  }
--- linux-2.6.9/arch/sparc/mm/srmmu.c.orig	2004-10-18 16:54:32.000000000 -0500
+++ linux-2.6.9/arch/sparc/mm/srmmu.c	2004-11-07 13:15:57.000000000 -0600
@@ -1463,6 +1463,7 @@ static void __init poke_hypersparc(void)
  static void __init init_hypersparc(void)
  {
  	srmmu_name = "ROSS HyperSparc";
+	srmmu_modtype = HyperSparc;

  	init_vac_layout();



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix for HyperSPARC DMA errors
  2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
@ 2004-11-10  3:30 ` William Lee Irwin III
  2004-11-10  4:55 ` David S. Miller
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: William Lee Irwin III @ 2004-11-10  3:30 UTC (permalink / raw)
  To: sparclinux

On Tue, Nov 09, 2004 at 09:18:56PM -0600, Bob Breuer wrote:
> I found a solution for the HyperSPARC DMA problems in 2.6.  This allows
> my SS20 with HyperSPARCs to boot to single user.  It's not efficient,
> but I hope it points out whats needed for a proper fix.  Seems that the
> iotlb entries need to flushed to ram or uncached since the iommu changes
> between 2.5.60 and 2.5.70.
> The second part seems to be needed to allow consistent sbus dma mappings
> to be cached on HyperSPARC.  I have also tested this change on 2.4.27
> with no noticeable difference.  Can anyone prove if it helps or hurts?

I'll take this for a spin on one of my SS20's. I've had no success
debugging this myself, and am astounded at how small your solution is.


-- wli

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix for HyperSPARC DMA errors
  2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
  2004-11-10  3:30 ` William Lee Irwin III
@ 2004-11-10  4:55 ` David S. Miller
  2004-11-10  5:23 ` William Lee Irwin III
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2004-11-10  4:55 UTC (permalink / raw)
  To: sparclinux

On Tue, 9 Nov 2004 19:30:10 -0800
William Lee Irwin III <wli@holomorphy.com> wrote:

> I'll take this for a spin on one of my SS20's. I've had no success
> debugging this myself, and am astounded at how small your solution is.

In particular, not setting srmmu_modtype is a pretty clear
error :-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix for HyperSPARC DMA errors
  2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
  2004-11-10  3:30 ` William Lee Irwin III
  2004-11-10  4:55 ` David S. Miller
@ 2004-11-10  5:23 ` William Lee Irwin III
  2004-11-10  5:30 ` David S. Miller
  2004-11-10  5:59 ` Bob Breuer
  4 siblings, 0 replies; 6+ messages in thread
From: William Lee Irwin III @ 2004-11-10  5:23 UTC (permalink / raw)
  To: sparclinux

On Tue, 9 Nov 2004 19:30:10 -0800 William Lee Irwin III wrote:
>> I'll take this for a spin on one of my SS20's. I've had no success
>> debugging this myself, and am astounded at how small your solution is.

On Tue, Nov 09, 2004 at 08:55:32PM -0800, David S. Miller wrote:
> In particular, not setting srmmu_modtype is a pretty clear
> error :-)

You're right, this wants to be merged soon.

Bob, how do you feel about your arch/sparc/mm/iommu.c flush_cache_all()
hack? Would you prefer to have that in mainline for the time being, or
would you rather wait until you devise a better solution?


-- wli

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix for HyperSPARC DMA errors
  2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
                   ` (2 preceding siblings ...)
  2004-11-10  5:23 ` William Lee Irwin III
@ 2004-11-10  5:30 ` David S. Miller
  2004-11-10  5:59 ` Bob Breuer
  4 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2004-11-10  5:30 UTC (permalink / raw)
  To: sparclinux

On Tue, 9 Nov 2004 21:23:29 -0800
William Lee Irwin III <wli@holomorphy.com> wrote:

> Bob, how do you feel about your arch/sparc/mm/iommu.c flush_cache_all()
> hack? Would you prefer to have that in mainline for the time being, or
> would you rather wait until you devise a better solution?

I think even this part of Bob's patch should just go in.
At worst it will slow things down for people, and it will
fix real bugs for people.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fix for HyperSPARC DMA errors
  2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
                   ` (3 preceding siblings ...)
  2004-11-10  5:30 ` David S. Miller
@ 2004-11-10  5:59 ` Bob Breuer
  4 siblings, 0 replies; 6+ messages in thread
From: Bob Breuer @ 2004-11-10  5:59 UTC (permalink / raw)
  To: sparclinux

Should probably test for hypersparc so it doesn't slow down the non-hypersparcs.

BTW, I had tried __flush_page_to_ram as used in iommu_map_dma_area, but that
didn't work.  Might flush_cache_range or something similar work?

David S. Miller wrote:
> On Tue, 9 Nov 2004 21:23:29 -0800
> William Lee Irwin III <wli@holomorphy.com> wrote:
> 
> 
>>Bob, how do you feel about your arch/sparc/mm/iommu.c flush_cache_all()
>>hack? Would you prefer to have that in mainline for the time being, or
>>would you rather wait until you devise a better solution?
> 
> 
> I think even this part of Bob's patch should just go in.
> At worst it will slow things down for people, and it will
> fix real bugs for people.
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-10  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10  3:18 Fix for HyperSPARC DMA errors Bob Breuer
2004-11-10  3:30 ` William Lee Irwin III
2004-11-10  4:55 ` David S. Miller
2004-11-10  5:23 ` William Lee Irwin III
2004-11-10  5:30 ` David S. Miller
2004-11-10  5:59 ` Bob Breuer

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.