WSL2-Linux-Kernel/arch/x86/kernel/cpu/mcheck
Luck, Tony 66f5ddf30a x86/mce: Make mce_chrdev_ops 'static const'
Arjan would like to make struct file_operations const, but
mce-inject directly writes to the mce_chrdev_ops to install its
write handler. In an ideal world mce-inject would have its own
character device, but we have a sizable legacy of test scripts
that hardwire "/dev/mcelog", so it would be painful to switch to
a separate device now. Instead, this patch switches to a stub
function in the mce code, with a registration helper that
mce-inject can call when it is loaded.

Note that this would also allow for a sane process to allow
mce-inject to be unloaded again (with an unregister function,
and appropriate module_{get,put}() calls), but that is left for
potential future patches.

Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/4eb2e1971326651a3b@agluck-desktop.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-11-08 16:17:11 +01:00
..
Makefile ACPI, APEI, Generic Hardware Error Source memory error support 2010-05-19 22:41:16 -04:00
mce-apei.c x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
mce-inject.c x86/mce: Make mce_chrdev_ops 'static const' 2011-11-08 16:17:11 +01:00
mce-internal.h ACPI, APEI, Use ERST for persistent storage of MCE 2010-05-19 22:41:40 -04:00
mce-severity.c x86, mce, severity: Clean up trivial coding style problems 2011-06-16 12:10:07 +02:00
mce.c x86/mce: Make mce_chrdev_ops 'static const' 2011-11-08 16:17:11 +01:00
mce_amd.c x86, mce: Use mce_sysdev_ prefix to group functions 2011-06-16 12:10:16 +02:00
mce_intel.c locking, x86: mce: Annotate cmci_discover_lock as raw 2011-09-13 11:12:09 +02:00
p5.c x86, mce: make mce_disabled boolean 2009-06-16 16:56:07 -07:00
therm_throt.c x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:35 -04:00
threshold.c x86, mce: enable MCE_INTEL for 32bit new MCE 2009-05-28 09:24:13 -07:00
winchip.c x86, mce: unify mce.h 2009-06-16 16:56:07 -07:00