Re: Linux IA32 microcode driver

Tigran Aivazian (tigran@veritas.com)
Sun, 23 Dec 2001 09:34:39 +0000 (GMT)


Hi Chris,

Yes, you are missing something, but it is not obvious. It is described in
my article in LJ of last February.

Basically, the design of microcode driver takes advantage of devfs when it
is available but works fine without it when it is not available. This is
so that we can store an extra bit of information in a field not present in
device nodes but present in regular files. What is this field? File size.

So, your patch is not to be applied. Instead, if you want to, fix the
microcode_ctl startup script to not check if /dev/cpu/microcode is a
character device node. It's a bug. Simon, I thought you fixed it, no?

Regards,
Tigran

On Sat, 22 Dec 2001, Chris Rankin wrote:

> Hi,
>
> Am I missing something rather obvious, or is the /dev/cpu/microcode
> device being mis-created under devfs with Linux 2.4.x? I have enclosed
> a patch to ensure that the character device really *is* a character
> device.
>
> Cheers,
> Chris
>
> --- linux-2.4.17/arch/i386/kernel/microcode.c.orig Sat Dec 22 12:37:07 2001
> +++ linux-2.4.17/arch/i386/kernel/microcode.c Sat Dec 22 12:43:10 2001
> @@ -125,7 +125,7 @@
> MICROCODE_MINOR);
>
> devfs_handle = devfs_register(NULL, "cpu/microcode",
> - DEVFS_FL_DEFAULT, 0, 0, S_IFREG | S_IRUSR | S_IWUSR,
> + DEVFS_FL_DEFAULT, 0, 0, S_IFCHR | S_IRUSR | S_IWUSR,
> &microcode_fops, NULL);
> if (devfs_handle == NULL && error) {
> printk(KERN_ERR "microcode: failed to devfs_register()\n");
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/