Subject: Re: build aborts in regress/lib/libpthread/sem
To: Christian Groessler <cpg@aladdin.de>
From: Pat Wendorf <mlist@beholder.homeunix.net>
List: port-dreamcast
Date: 02/12/2003 12:05:20
Hey Christian,

Has this been committed to the cvs, or should I just apply this patch to =
my=20
local g2_bus_mem.c?

On February 11, 2003 06:48 pm, Christian Groessler wrote:
> Hi,
>
> On 02/09/2003 01:01:44 PM EST Pat Wendorf wrote:
> >On February 8, 2003 08:17 pm, Christian Groessler wrote:
> >> Hmm, this doesn't happen here. All I get is a message
> >>
> >> "WARNING: mclpool limit reached; increase NMBCLUSTERS"
> >>
> >> The DC still works.
> >>
> >> On which system did you run the ping?
> >>
> >> regards,
> >> chris
> >
> >If I run the ping from the dreamcast, pinging any other machine it wil=
l do
> >that.  My cvs source was updated about a week ago, has there been majo=
r
> >changes since?  I know I already have the mbe0 patch you guys did, as =
the
> > nfs boot is now very stable.
>
> I didn't try to run the ping on the dreamcast, I thought pinging at it
> will give the problem.
>
> I can reproduce it here, I don't even need the -f parameter, a
> "ping -s 8192 host" is sufficient.
>
> With the following change the reboot doesn't happen for me:
>
> ---------------------
> Index: g2bus_bus_mem.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file:
> /net/swamp/zeug/netbsd-rsync/main/src/sys/arch/dreamcast/dev/g2/g2bus_b=
us_m
>em.c,v retrieving revision 1.6
> diff -u -p -r1.6 g2bus_bus_mem.c
> --- g2bus_bus_mem.c=092002/12/27 11:34:05=091.6
> +++ g2bus_bus_mem.c=092003/02/11 23:21:06
> @@ -417,11 +417,16 @@ g2bus_sparse_bus_mem_write_multi_1(void
>      bus_size_t off, const u_int8_t *addr, bus_size_t len)
>  {
>  =09__volatile u_int8_t *baddr =3D (u_int8_t *)(sh + (off * 4));
> +=09u_int8_t data;
>
> -=09G2_LOCK;
> +=09/*G2_LOCK;*/
>
> -=09while (len--)
> -=09=09*baddr =3D *addr++;
> +=09while (len--) {
> +=09=09data =3D *addr++;
> +=09=09G2_LOCK;
> +=09=09*baddr =3D data;
> +=09=09G2_UNLOCK;
> +=09}
>
> -=09G2_UNLOCK;
> +=09/*G2_UNLOCK;*/
>  }
> ---------------------
>
> This might be a more general problem of the g2 bus space routines:
> The G2_LOCK macro seems to disable exceptions. But what happens if the
> page addressed by *addr is not available, and the exception is needed?
>
> Or what else would explain, that above change fixes the problem?
>
> regards,
> chris