This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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 ppc] memset to 0 is broken on PPC405/440/464


On Fri, Sep 21, 2012 at 1:15 PM, Jason Gunthorpe
<jgunthorpe@obsidianresearch.com> wrote:
> On Fri, Sep 21, 2012 at 01:07:01PM -0500, Ryan S. Arnold wrote:
>
>> Thanks for the patch.  The quick and dirty way to fix this for both
>> architectures is to copy the original file to
>> <...>/powerpc32/476/memset.S and then provide your version as you've
>> shown.  The result of this is that other 4** series processors
>> (besides 476) will end up using the 32-byte cache-line size code.
>
> Do you want me to send you a diff like that?

In general, any patch to fix this should make sure that functionality
doesn't regress for the platforms where it currently works.

If you have FSF copyright assignment on file, please do submit the full patch.

If you don't have FSF copyright assignment then I can do the copy to
ports/sysdeps/powerpc/powerpc32/476/ for you and apply your fix on top
of it.

>> The method used to eliminate redundant code, is to do what is found in
>> the non-ports 'a2' version of memcpy.S
>> (sysdeps/powerpc/powerpc32/a2/memcpy.S).  It attempts to detect
>
> Yes, I saw that, though I admit I'm unclear about the purpose of the
> 405 specific code when the generic code already seems to be fairly
> optimized?

The optimization was originally developed for the 476 processor and we
were asked to make it available to other 4xx processors, so we put it
in the 405 directory.   It wasn't obvious that there was an issue
until some time last year, but no-one had taken the time (until you)
to find the reason.  Having no earlier 4xx hardware, we weren't able
to test the performance differences of the code.

Ryan


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