[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] powerpc 8xx dcbz problem
- To: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] powerpc 8xx dcbz problem
- From: Steven Munroe <munroesj@xxxxxxxxxx>
- Date: Mon, 04 Jun 2007 10:25:39 -0500
Joseph S. Myers wrote:
> On Mon, 4 Jun 2007, Nathan Sidwell wrote:
>
>
>> The 8xx PowerPC series processors have a problem with the dcbz instruction,
>> which is used in memset calls. They do not correctly indicate the fault
>> address, should a page fault be signaled. The Linux kernel tries to guess,
>> but can guess wrong. In particular we found it consistently guessing wrong
>> for a particular ld.so.1 on the first call to memset.
>>
>> This patch amends the startup code to check for an 8xx processor, and if so,
>> clear a newly created __memset_cache_line_size to prevent dcbz's use.
>>
>> ok?
>>
>
> This is OK for trunk/2.6/2.5 unless Steve Munroe sees anything wrong with
> it.
>
There is no need for a separate __memset_cache_line_size since
__cache_line_size is only used for memset. Also no need to change any
powerpc64 code since this only an issue for 8xx process which are 32-bit
ONLY!. Simply not setting __cache_line_size (init to 0) will disable the
use of dcbz) in the powerpc common code. Or use -with-cpu framework for
override memset.S
So just provide a patch for sysdeps/powerpc/powerpc32/8xx/ to override
memset.S with a version that does not use dcbz. Then use -with-cpu=8xx
for you build. This elliminates the clutter to the base but solves your
chip specific problem!