This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ppc32 dl-machine.c


> Back in July, Anton Blanchard reported a bug in dl-machine.c
> (__elf_machine_runtime_setup) asserting that the loader must "icbi"
> (Instruction Cache Block Invalidate) the entire PLT range after it is
> initialized. 
> 
> http://sources.redhat.com/ml/libc-alpha/2002-07/msg00166.html
> 
> Anton and Geoff Keating debated this back and forth for a while but I believe
> the conclusion was that this is required based on the rationale in:
> 
> http://sources.redhat.com/ml/libc-alpha/2002-07/msg00180.html
> 
> I believe the discussion ended with Geoff expecting a patch from Anton.
> But on examination of the the current CVS it seems Anton forgot. I discussed
> this with Anton and offered to create the patch myself which is attached. 

Looks good, except we should have a sync between dcbst and icbi. This
patch applies on top of the last.

Anton

--- 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);
+
       PPC_ISYNC;
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]