Re: [tip:x86/cpu] x86, cpu: RDC doesn't have CPUID, which is what c_ident is

Previous thread: [PATCH RESEND again] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() by Axel Lin on Monday, August 9, 2010 - 2:01 am. (2 messages)

Next thread: [PATCH] serial: Add CONSOLE_POLL support for uartlite by Michal Simek on Monday, August 9, 2010 - 3:07 am. (3 messages)
From: bifferos
Date: Monday, August 9, 2010 - 2:33 am

The quick fix for this is:

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 490dac6..06a2dac 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -497,6 +497,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
               if (!cpu_devs[i])
                       break;

+               if (!cpu_devs[i]->c_ident[0])
+                       continue;
+
               if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
                   (cpu_devs[i]->c_ident[1] &&
                    !strcmp(v, cpu_devs[i]->c_ident[1]))) {


however, Peter's requirement to remove c_ident renders my patch 
somewhat less useful back on RDC.  /proc/cpuinfo then lists the 
vendor as 'RDC' (an improvement over not applying the patch) and 
the model name as '486' (also an improvement), but for some 
reason the variants in my case statement then no longer make it 
through to /proc/info.  I don't think this is a big deal, and I
still think the patch is worth applying with this change.

regards,
Mark




      
--

From: H. Peter Anvin
Date: Monday, August 9, 2010 - 1:15 pm

Well, as I said, the generic code probably needs to change somewhat to
print that stuff.

	-hpa
--

Previous thread: [PATCH RESEND again] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() by Axel Lin on Monday, August 9, 2010 - 2:01 am. (2 messages)

Next thread: [PATCH] serial: Add CONSOLE_POLL support for uartlite by Michal Simek on Monday, August 9, 2010 - 3:07 am. (3 messages)