[PATCH] ppc32 dl-machine.c
Segher Boessenkool
segher@koffie.nl
Wed Sep 25 16:04:00 GMT 2002
Anton Blanchard wrote:
> Looks good, except we should have a sync between dcbst and icbi. This
> patch applies on top of the last.
>
You need a sync between icbi and isync, too. See for example the MPC7410
user manual, 2.3.4.3.4.
Even this won't work on all (multiprocessor) machines; dcbf or similar is
necessary there. Oh, and I don't want to think about the races when
the kernel decides to schedule in the middle of this sequence, and the
next time this process is run, it runs on a different cpu...
Cheers,
Segher
> --- glibc-2.2.94/sysdeps/powerpc/powerpc32/dl-machine.c.sm 2002-09-25 09:51:57.000000000 +1000
> +++ glibc-2.2.94/sysdeps/powerpc/powerpc32/dl-machine.c 2002-09-25 10:01:05.000000000 +1000
> @@ -324,13 +324,15 @@
>
> size_modified = lazy ? rel_offset_words : 6;
> for (i = 0; i < size_modified; i += words_per_line)
> - {
> - PPC_DCBST (plt + i);
> - PPC_ICBI (plt + i);
> - }
> + PPC_DCBST (plt + i);
> PPC_DCBST (plt + size_modified - 1);
> +
> PPC_SYNC;
> +
> + for (i = 0; i < size_modified; i += words_per_line)
> + PPC_ICBI (plt + i);
> PPC_ICBI (plt + size_modified - 1);
> +
The extra PPC_SYNC; goes here
> PPC_ISYNC;
> }
>
More information about the Libc-alpha
mailing list