x86/Intel: Expose cpuid_faulting_enabled so it can be used elsewhere

While we're here, use bool instead of bool_t.

Signed-off-by: Kyle Huey <khuey@kylehuey.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Kyle Huey authored and Andrew Cooper committed 2016-10-20 15:27:55 +01:00
1 parent 8b4664265b
commit 70c95ecd5c
2 files changed
+8 -4

No files matched your search

+5 -4
View File
@@ -18,7 +18,7 @@
#define select_idle_routine(x) ((void)0)
static bool_t __init probe_intel_cpuid_faulting(void)
static bool __init probe_intel_cpuid_faulting(void)
{
uint64_t x;
@@ -32,10 +32,11 @@ static bool_t __init probe_intel_cpuid_faulting(void)
return 1;
}
static void set_cpuid_faulting(bool_t enable)
DEFINE_PER_CPU(bool, cpuid_faulting_enabled);
static void set_cpuid_faulting(bool enable)
{
static DEFINE_PER_CPU(bool_t, cpuid_faulting_enabled);
bool_t *this_enabled = &this_cpu(cpuid_faulting_enabled);
bool *this_enabled = &this_cpu(cpuid_faulting_enabled);
uint32_t hi, lo;
ASSERT(cpu_has_cpuid_faulting);
+3
View File
@@ -64,6 +64,9 @@ DECLARE_PER_CPU(struct cpuidmasks, cpuidmasks);
/* Default masking MSR values, calculated at boot. */
extern struct cpuidmasks cpuidmask_defaults;
/* Whether or not cpuid faulting is available for the current domain. */
DECLARE_PER_CPU(bool, cpuid_faulting_enabled);
#endif /* __ASSEMBLY__ */
#endif /* !__X86_CPUID_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.