lkml.org 
[lkml]   [2011]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/8] Add driver auto probing for x86 features v2
Date
Hi,

for info:

On Tuesday, December 20, 2011 12:46:27 AM Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Old patchkit, resurrect due to popular demand.
...
> + n = snprintf(buf, size, "x86cpu:vendor:%04x:family:%04x:model:%04x:feature:",
this must be uppercase hex values (%04X)
...
> + if (boot_cpu_has(i)) {
> + n = snprintf(buf, size, ",%04x", i);
same here.
Looks like a string compare is happening and in
scripts/mod/file2alias.c
sizeof(field) == 2 ? "%04X"
is used and the modalias added to the driver and showing up
in /lib/modules/*/modales.alias is uppercase.

...
> + }
> + *buf++ = ',';
> + *buf++ = '\n';
this must be:
+ *buf++ = '\0';
otherwise one can hit:
WARNING: at lib/kobject_uevent.c:362 add_uevent_var+0xf2/0x100()
add_uevent_var: buffer size too small
Hm, then /sys/devices/system/cpu/modalias has not a newline.
Using kzalloc in arch_cpu_uevent() should be the nicest way
to address this.

Now things work much better, hope that's all.
I just send out a new patchset (with cpuid vs cpu kobject broken out
in a separate patch for better backporting).

Thomas


\
 
 \ /
  Last update: 2011-12-23 14:19    [W:0.029 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site