NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/38722: usr.sbin/cpuctl should share cache definitions with kernel code
>Number: 38722
>Category: kern
>Synopsis: usr.sbin/cpuctl should share cache definitions with kernel code
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 21 13:30:01 +0000 2008
>Originator: Paul Goyette
>Release: NetBSD 4.99.62
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------
>Environment:
System: NetBSD quicky.whooppee.com 4.99.62 NetBSD 4.99.62 (QUICKY (ASUS M2N32
WS) 2008-05-14 13:20:42) #1: Wed May 14 06:25:08 PDT 2008
paul%speedy.whooppee.com@localhost:/build/obj/amd64/sys/arch/amd64/compile/QUICKY
amd64
Architecture: x86_64
Machine: amd64
>Description:
Duplication of cache information in the kernel and usr.sbin/cpuctl
leads to significant difficulties in synchronizing changes.
>How-To-Repeat:
>Fix:
At a minimum, the following patch to src/sys/arch/x86/include/cacheinfo.h
should be made to allow us to share the definitions. Further changes are
still required to permit sharing of the tables created in both the kernel
and cpuctl, but this is a start. After making these changes, we need to
#include <sys/cacheinfo.h> in src/usr/sbin/cpuctl/arch/i386.c and remove
the duplicated definitions.
Index: cacheinfo.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/include/cacheinfo.h,v
retrieving revision 1.6
diff -u -p -r1.6 cacheinfo.h
--- cacheinfo.h 11 May 2008 21:19:17 -0000 1.6
+++ cacheinfo.h 21 May 2008 13:22:17 -0000
@@ -9,6 +9,9 @@ struct x86_cache_info {
uint8_t cai_associativity;
u_int cai_totalsize; /* #entries for TLB, bytes for cache */
u_int cai_linesize; /* or page size for TLB */
+#ifndef _KERNEL
+ const char *cai_string;
+#endif
};
#define CAI_ITLB 0 /* Instruction TLB (4K pages) */
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index