Subject: Re: Announce: DEC AlphaServer 8400 is coming
To: Michael L.Hitch <mhitch@lightning.msu.montana.edu>
From: Jason Thorpe <thorpej@shagadelic.org>
List: port-alpha
Date: 07/27/2005 16:16:04
On Jul 27, 2005, at 10:33 AM, Michael L. Hitch wrote:
> On Wed, 27 Jul 2005, Jason Thorpe wrote:
>
>
>>> to November 28 sources to get rid of the free extent problems. I
>>> think
>>> I've narrowed that problem down to a change Jason made.
>>>
>>
>> Oof... what change?
>>
>
> Version 1.29 of alpha/common/sgmap_typedep.c. It increments seg
> everytime through the loop, but may not always load that segment. I'm
> testing a change where seg is incremented only when is loads the
> segment.
> If that works on my CS20, I'm going to see if it helps on the ES40.
D'oh! I guess the patch looks something like this:
Index: alpha/common/sgmap_typedep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/common/sgmap_typedep.c,v
retrieving revision 1.29
diff -u -p -r1.29 sgmap_typedep.c
--- alpha/common/sgmap_typedep.c 28 Nov 2004 17:34:45
-0000 1.29
+++ alpha/common/sgmap_typedep.c 27 Jul 2005 23:15:34 -0000
@@ -272,11 +272,12 @@ __C(SGMAP_TYPE,_load_mbuf)(bus_dma_tag_t
seg = 0;
error = 0;
- for (m = m0; m != NULL && error == 0; m = m->m_next, seg++) {
+ for (m = m0; m != NULL && error == 0; m = m->m_next) {
if (m->m_len == 0)
continue;
error = __C(SGMAP_TYPE,_load_buffer)(t, map,
m->m_data, m->m_len, NULL, flags, seg, sgmap);
+ seg++;
}
alpha_mb();
I bet I made that same mistake in a bunch of other bus_dma back-ends,
too.
-- thorpej