diff options
author | Dave Jones <davej@redhat.com> | 2008-07-02 18:23:04 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2008-07-02 18:23:04 -0400 |
commit | 110b221a119f56108bbf4cd4f6a28f63290fc5ee (patch) | |
tree | 2c94f27f1d4630f49d4c50f7343459609088a385 | |
parent | c719210577b577e0607a9001b2f9aa3753a12f2c (diff) |
Move cacheinfo display decisions to main() and only output when -a or -c
-rw-r--r-- | AMD/identify.c | 5 | ||||
-rw-r--r-- | Intel/info.c | 4 | ||||
-rw-r--r-- | x86info.c | 9 | ||||
-rw-r--r-- | x86info.h | 3 |
4 files changed, 14 insertions, 7 deletions
diff --git a/AMD/identify.c b/AMD/identify.c index c28a8ee..6301234 100644 --- a/AMD/identify.c +++ b/AMD/identify.c @@ -203,7 +203,7 @@ static void do_l2assoc(unsigned long assoc) printf("%lu-way associative. ", a); } -static void decode_AMD_cacheinfo(struct cpudata *cpu) +void decode_AMD_cacheinfo(struct cpudata *cpu) { unsigned int eax, ebx, ecx, edx; @@ -724,9 +724,6 @@ void display_AMD_info(struct cpudata *cpu) if (show_bluesmoke) decode_athlon_bluesmoke(cpu->number); - if (show_cacheinfo) - decode_AMD_cacheinfo(cpu); - if (show_pm) decode_powernow(cpu); diff --git a/Intel/info.c b/Intel/info.c index 1776268..f2a2367 100644 --- a/Intel/info.c +++ b/Intel/info.c @@ -50,7 +50,7 @@ void display_Intel_info(struct cpudata *cpu) /* Pentium4 and Banias have cpu name. */ if (cpu->family == 0xF || (cpu->family == 6 && cpu->model == 9)) - get_model_name (cpu); + get_model_name(cpu); if (show_msr) { if (cpu->family == 0xf) @@ -59,8 +59,6 @@ void display_Intel_info(struct cpudata *cpu) dump_centrino_MSRs(cpu); } - decode_Intel_caches(cpu, 1); - if (show_eblcr) { if (cpu->family == 6 && cpu->model >= 3) { unsigned long long eblcr; @@ -261,6 +261,15 @@ int main (int argc, char **argv) dumpregs (cpu->number, 0xC0000000, cpu->maxei2); } + if (show_cacheinfo == 1) { + switch (cpu->vendor) { + case VENDOR_INTEL: decode_Intel_caches(cpu, 1); + break; + case VENDOR_AMD: decode_AMD_cacheinfo(cpu); + break; + } + } + if (show_flags == 1) show_feature_flags(cpu); @@ -150,6 +150,9 @@ extern void decode_connector(enum connector type); extern void show_benchmarks(struct cpudata *cpu); extern void decode_serial_number(struct cpudata *cpu); +void decode_AMD_cacheinfo(struct cpudata *cpu); +void decode_Intel_caches(struct cpudata *cpu, int output); + extern int show_bench; extern int show_bios; extern int show_bluesmoke; |