[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201112231416.09954.trenn@suse.de>
Date: Fri, 23 Dec 2011 14:16:09 +0100
From: Thomas Renninger <trenn@...e.de>
To: Andi Kleen <andi@...stfloor.org>, Andi Kleen <ak@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, davej@...hat.com,
kay.sievers@...y.org, axboe@...nel.dk, herbert@...dor.apana.org.au,
ying.huang@...el.com, lenb@...nel.org, gregkh@...e.de
Subject: Re: [PATCH 1/8] Add driver auto probing for x86 features v2
Hi,
for info:
On Tuesday, December 20, 2011 12:46:27 AM Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists