This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] PowerPC - A2 memcpy cache line size initialization
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 25 Jan 2012 11:11:49 -0600
- Subject: Re: [PATCH] PowerPC - A2 memcpy cache line size initialization
- References: <4F1EE37F.firstname.lastname@example.org>
On Tue, Jan 24, 2012 at 10:59 AM, Adhemerval Zanella
> The PPC A2 memcpy implementation relies on a correct __cache_line_size value
> which is currently initialized on '__libc_start_main'
> In some conditions (a dso constructor for instance) the cache line
> size is not yet initialized and calling memset may result in a
> SEGFAULT. This patch checks if the cache line size is initialized
> and if not, uses simple memcpy algorithm without any prefetch (dcbz)
> 2012-01-19 ÂAdhemerval Zanella Â<email@example.com>
> Â Â Â Â* sysdeps/powerpc/powerpc32/a2/memcpy.S: Fix for when cache line size is
> Â Â Â Ânot set.
> Â Â Â Â* sysdeps/powerpc/powerpc64/a2/memcpy.S: Likewise.
We discussed this patch and it covers the case where the loader, in
encountering a zeroed cacheline_size can't make assumptions about what
that cacheline size might be because it could conflict with what's
been set by firmware. In such a case using data-cache-block-zeroing
instructions could overwrite. So this patch, by necessity can't use
Ryan S. Arnold