diff options
author | Dave Jones <davej@redhat.com> | 2011-02-22 19:02:12 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-02-22 19:02:12 -0500 |
commit | ab32379ad4bea08d75f4094797c81cd0094c4735 (patch) | |
tree | 87c6f1a21193100d7ac7f6fc00777104a78948ac | |
parent | b5629dcb903d5d48c38572b6a024336b34aeb98b (diff) |
gather topology info per-cpu
-rw-r--r-- | Intel/topology.c | 6 | ||||
-rw-r--r-- | topology.c | 11 | ||||
-rw-r--r-- | x86info.c | 1 | ||||
-rw-r--r-- | x86info.h | 2 |
4 files changed, 12 insertions, 8 deletions
diff --git a/Intel/topology.c b/Intel/topology.c index c6f5eb0..a4222fa 100644 --- a/Intel/topology.c +++ b/Intel/topology.c @@ -124,9 +124,9 @@ void get_intel_topology(struct cpudata *cpu) if (debug == 1) { if ((cpu->x86_max_cores * cpu->num_siblings) > 1) { printf("%s:\n", __func__); - printf("Siblings: %d\n", cpu->num_siblings); - printf("Physical Processor ID: %d\n", cpu->phys_proc_id); - printf("Processor Core ID: %d\n", cpu->cpu_core_id); + printf("\tSiblings: %d\n", cpu->num_siblings); + printf("\tPhysical Processor ID: %d\n", cpu->phys_proc_id); + printf("\tProcessor Core ID: %d\n", cpu->cpu_core_id); } } out: @@ -23,6 +23,12 @@ static char * corenum(int num) } } +void get_topology(struct cpudata *cpu) +{ + if (cpu->vendor == VENDOR_INTEL) + get_intel_topology(cpu); +} + void display_topology(struct cpudata *head) { struct cpudata *cpu; @@ -33,12 +39,9 @@ void display_topology(struct cpudata *head) int num_sockets = 0; /* For now, we only support topology parsing on Intel. */ - if (head->vendor == VENDOR_INTEL) - get_intel_topology(head); - else + if (head->vendor != VENDOR_INTEL) return; - if (debug == 1) { cpu = head; printf("cpu->phys_proc_id: "); @@ -154,6 +154,7 @@ static void fill_in_cpu_info(struct cpudata *cpu) get_cpu_info_basics(cpu); /* get vendor,family,model,stepping */ get_feature_flags(cpu); identify(cpu); + get_topology(cpu); } @@ -173,9 +173,9 @@ void decode_connector(enum connector type); void show_benchmarks(struct cpudata *cpu); void decode_serial_number(struct cpudata *cpu); +void get_topology(struct cpudata *head); void display_topology(struct cpudata *head); void get_intel_topology(struct cpudata *cpu); -void show_intel_topology(struct cpudata *cpu); void decode_AMD_cacheinfo(struct cpudata *cpu); |