linux_dsm_epyc7002/arch/x86/kernel/cpu/mcheck
Andy Lutomirski 375074cc73 x86: Clean up cr4 manipulation
CR4 manipulation was split, seemingly at random, between direct
(write_cr4) and using a helper (set/clear_in_cr4).  Unfortunately,
the set_in_cr4 and clear_in_cr4 helpers also poke at the boot code,
which only a small subset of users actually wanted.

This patch replaces all cr4 access in functions that don't leave cr4
exactly the way they found it with new helpers cr4_set_bits,
cr4_clear_bits, and cr4_set_bits_and_update_boot.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Vince Weaver <vince@deater.net>
Cc: "hillf.zj" <hillf.zj@alibaba-inc.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/495a10bdc9e67016b8fd3945700d46cfd5c12c2f.1414190806.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-02-04 12:10:41 +01:00
..
Makefile ACPI, APEI, Generic Hardware Error Source memory error support 2010-05-19 22:41:16 -04:00
mce_amd.c x86, MCE, AMD: Assign interrupt handler only when bank supports it 2014-11-01 11:28:23 +01:00
mce_intel.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
mce-apei.c ACPI, APEI, GHES: Do not report only correctable errors with SCI 2013-12-21 13:31:06 +01:00
mce-inject.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
mce-internal.h x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error 2014-11-19 10:55:43 -08:00
mce-severity.c x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error 2014-11-19 10:55:43 -08:00
mce.c x86: Clean up cr4 manipulation 2015-02-04 12:10:41 +01:00
p5.c x86: Clean up cr4 manipulation 2015-02-04 12:10:41 +01:00
therm_throt.c x86/mce: Avoid showing repetitive message from intel_init_thermal() 2014-09-19 12:56:05 +02:00
threshold.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
winchip.c x86: Clean up cr4 manipulation 2015-02-04 12:10:41 +01:00