Subject: Re: lint issues with larger caches
To: John Klos <>
From: David Laight <>
List: tech-toolchain
Date: 09/22/2005 08:00:42
On Wed, Sep 21, 2005 at 05:14:58PM -0700, John Klos wrote:
> Hello,
> A while ago, I reported problems using NetBSD 2's on a 7457 G4 
> which has 512k of CPU speed L2 cache. The problem was that the source tree 
> built lint kept randying on signal 11. For other reasons, I switched back 
> to the 7455 (256k of L2), and still saw the same problem, but with much 
> less frequency.
> My previous email regarding this:
> Now that I have a local system where I am testing a 7447a CPU (which also 
> has 512k of CPU speed L2), I played with this a little, and it seems that 
> the problem goes away completely when lint is compiled with -O0.
> Would anyone object to me committing the following change to 
> src/usr.bin/xlint?
> ># PowerPC processors with large and fast L2 caches (such as the
> ># 7447 and 7457) have problems with lint unless compiled with -O0.
> >.if ${MACHINE_ARCH} == "powerpc"
> >CPPFLAGS+=    -O0
> >.endif

That is extrememly unlikely to be a real solution to any problem.
Likely possibilities:

1) There is an undefined variable somewhere, -O0 changes the code size
   and makes it go away.

2) The compiler is generating an illegal sequence of instructions
   (and maybe making use of a computed value too early).
   This could easily affect any program.

3) The cache hardware on the processor is broken.

4) The NetBSD cpu support isn't right

If (1) then other architectures might be affected.
If (2), (3) or (4) then other programs will be affected.
So a lot of analysis needs to be done to determine the exact failure.


David Laight: