Re: [patches] [PATCH] [17/58] i386: Add L3 cache support to AMD CPUID4 emulation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Herrmann
Date: Friday, July 20, 2007 - 10:15 am

I think, Joachim's patch (sent to patches@x86-64.org on June 14) should
be added as well. I have attached his patch below.


Regards,

Andreas

-- 
Operating | AMD Saxony Limited Liability Company & Co. KG,
  System  | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 Research | Register Court Dresden: HRA 4896, General Partner authorized
  Center  | to represent: AMD Saxony LLC (Wilmington, Delaware, US)
  (OSRC)  | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
--

This will allow the size field to be reported for all values instead of a 
handful and also fills the shard_cpu_map with meaning full value.

Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Index: kernel/arch/i386/kernel/cpu/intel_cacheinfo.c
===================================================================
--- kernel.orig/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ kernel/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -224,12 +224,7 @@ static void __cpuinit amd_cpuid4(int lea
 		assoc = l3.assoc;
 		line_size = l3.line_size;
 		lines_per_tag = l3.lines_per_tag;
-		switch (l3.size_encoded) {
-		case 4:  size_in_kb = 2 * 1024; break;
-		case 8:  size_in_kb = 4 * 1024; break;
-		case 12: size_in_kb = 6 * 1024; break;
-		default: size_in_kb = 0; break;
-		}
+		size_in_kb = l3.size_encoded * 512;
 		break;
 	default:
 		return;
@@ -238,7 +233,10 @@ static void __cpuinit amd_cpuid4(int lea
 	eax->split.is_self_initializing = 1;
 	eax->split.type = types[leaf];
 	eax->split.level = levels[leaf];
-	eax->split.num_threads_sharing = 0;
+	if (leaf == 3)
+		eax->split.num_threads_sharing = current_cpu_data.x86_max_cores - 1;
+	else
+		eax->split.num_threads_sharing = 0;
 	eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1;
 
 

_______________________________________________
patches mailing list
patches@x86-64.org
https://www.x86-64.org/mailman/listinfo/patches






-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [0/58] First batch of x86 patches for .23, Andi Kleen, (Thu Jul 19, 2:54 am)
[PATCH] [14/58] x86_64: Add on_cpu_single, Andi Kleen, (Thu Jul 19, 2:54 am)
[PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Thu Jul 19, 2:54 am)
[PATCH] [20/58] x86: Always probe the NMI watchdog, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [23/58] i386: remove pit_interrupt_hook, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [25/58] x86_64: use generic cmos update, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [26/58] x86_64: Use generic xtime init, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [28/58] x86_64: Fix APIC typo, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [29/58] x86_64: fiuxp pt_reqs leftovers, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [30/58] x86: share hpet.h with i386, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [34/58] x86_64: ia32entry adjustments, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [39/58] i386: minor nx handling adjustment, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [40/58] i386: remapped_pgdat_init() static, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [42/58] i386: timer_irq_works() static again, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [43/58] x86_64: Quicklist support for x86_64, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [48/58] x86_64: O_EXCL on /dev/mcelog, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [51/58] i386: fix machine rebooting, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [53/58] x86: PM_TRACE support, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [55/58] i386: add reference to the arguments, Andi Kleen, (Thu Jul 19, 2:55 am)
[PATCH] [58/58] x86: remove support for the Rise CPU, Andi Kleen, (Thu Jul 19, 2:55 am)
Re: [PATCH] [33/58] x86_64: Avoid too many remote cpu refe ..., Christoph Hellwig, (Thu Jul 19, 3:21 am)
Re: [PATCH] [14/58] x86_64: Add on_cpu_single, Satyam Sharma, (Thu Jul 19, 4:09 am)
Re: [PATCH] [14/58] x86_64: Add on_cpu_single, Andi Kleen, (Thu Jul 19, 5:07 am)
Re: [PATCH] [34/58] x86_64: ia32entry adjustments, Jeff Garzik, (Thu Jul 19, 7:46 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Daniel Walker, (Thu Jul 19, 9:51 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Thu Jul 19, 10:13 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Daniel Walker, (Thu Jul 19, 10:15 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Thu Jul 19, 10:22 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Daniel Walker, (Thu Jul 19, 10:31 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Thu Jul 19, 10:38 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Daniel Walker, (Thu Jul 19, 10:43 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Daniel Walker, (Thu Jul 19, 11:00 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Thu Jul 19, 11:00 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Mathieu Desnoyers, (Thu Jul 19, 8:11 pm)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Mathieu Desnoyers, (Thu Jul 19, 8:47 pm)
Re: [PATCH] [15/58] i386: Rewrite sched_clock (cmpxchg8b), Mathieu Desnoyers, (Thu Jul 19, 9:18 pm)
Re: [PATCH] [15/58] i386: Rewrite sched_clock (cmpxchg8b), Mathieu Desnoyers, (Thu Jul 19, 10:47 pm)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Fri Jul 20, 1:27 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Mathieu Desnoyers, (Fri Jul 20, 7:12 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Mathieu Desnoyers, (Fri Jul 20, 7:39 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Andi Kleen, (Fri Jul 20, 8:14 am)
Re: [PATCH] [15/58] i386: Rewrite sched_clock, Mathieu Desnoyers, (Fri Jul 20, 8:22 am)
[PATCH] 80386 and 80486 cmpxchg64 and cmpxchg64_local fallback, Mathieu Desnoyers, (Fri Jul 20, 9:49 am)
Re: [patches] [PATCH] [17/58] i386: Add L3 cache support t ..., Andreas Herrmann, (Fri Jul 20, 10:00 am)
Re: [patches] [PATCH] [17/58] i386: Add L3 cache support t ..., Andreas Herrmann, (Fri Jul 20, 10:15 am)
Re: [PATCH] [34/58] x86_64: ia32entry adjustments, Jan Beulich, (Mon Aug 6, 3:43 am)