diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-09-24 00:28:46 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-09-24 00:28:46 +0000 |
commit | 2a5e536b9ea8f6632dbd73f3f2eb68f659c6167a (patch) | |
tree | a953c2548b98de3a4f5be4f4f51e151c8b19991a /sys/powerpc/booke | |
parent | 8a7a2f39244f98f8839c9c1e09019643baba7b8a (diff) | |
download | FreeBSD-src-2a5e536b9ea8f6632dbd73f3f2eb68f659c6167a.zip FreeBSD-src-2a5e536b9ea8f6632dbd73f3f2eb68f659c6167a.tar.gz |
Allow the cacheline size on PowerPC to be set at runtime. This is essential for
supporting 64-bit CPUs, which often have 128-byte cache lines instead of the
standard 32.
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r-- | sys/powerpc/booke/machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/powerpc/booke/machdep.c b/sys/powerpc/booke/machdep.c index 4e9141e..218127d 100644 --- a/sys/powerpc/booke/machdep.c +++ b/sys/powerpc/booke/machdep.c @@ -171,9 +171,10 @@ struct bootinfo *bootinfo; char machine[] = "powerpc"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); -static int cacheline_size = CACHELINESIZE; +int cacheline_size = 32; + SYSCTL_INT(_machdep, CPU_CACHELINE, cacheline_size, - CTLFLAG_RD, &cacheline_size, 0, ""); + CTLFLAG_RD, &cacheline_size, 0, ""); static void cpu_e500_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); |