Subject: Re: bzero.S and assym.h (Re: CVS commit: syssrc/sys/lib/libkern/arch/powerpc)
To: None <,>
From: None <>
List: port-powerpc
Date: 12/02/2001 20:17:44
|   The libkern variant (really the same routine with some _KERNEL
| ifdefs) tries to extract the CACHELINESIZE definition from
| powerpc/cpu.h, since the aforementioned sysctl does (in powerpc/
| powerpc_machdep.c):
| > return sysctl_rdint(oldp, oldlenp, newp, CACHELINESIZE);

That needs to be changed too.  The cache line size is not
necessarily fixed.

|   I figured that since the sysctl does nothing else than just
| returning that value, it would be OK to use it too. I was not
| aware that stuff outside the kernel use libkern too.
|   So I am soliciting ideas and/or fixes to the problems mentioned
| here:
|   - dependency on assym.h
|   - use of libkern by non-kernel (but with no working sysctl either,
|     eg. bootloader)
|   - how to actually and correctly get at the cache line size
|     in kernel (do we have to have that dynamic too? if so, I
|     fear the infrastructure for that is not in yet place, see 
|     the snipped above for the sysctl).

Yes, the in-kernel cache line size needs to be dynamic.