[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/setup: add missing headers



commit 7a0eb50170f428b1dd8f255fb4a3dc5a281d0c03
Author:     Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
AuthorDate: Mon Aug 14 09:59:30 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Aug 14 09:59:30 2023 +0200

    x86/setup: add missing headers
    
    The missing headers declare variables 'xen_cpuidle' and 'use_invpcid'
    that are then defined inside the file.
    This is undesirable and also violates MISRA C:2012 Rule 8.4.
    Adding suitable "#include"s resolves the issue.
    
    The type of the variable 'xen_cpuidle' also changes according to
    s/s8/int8_t/.
    
    Fixes: 3eab82196b02 ("x86: PIT broadcast to fix local APIC timer stop issue 
for Deep C state")
    Fixes: 63dc135aeaf9 ("x86: invpcid support")
    Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/setup.c      | 4 +++-
 xen/include/xen/cpuidle.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 80ae973d64..2bfc1fd00f 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -47,10 +47,12 @@
 #include <asm/mach-generic/mach_apic.h> /* for generic_apic_probe */
 #include <asm/setup.h>
 #include <xen/cpu.h>
+#include <xen/cpuidle.h>
 #include <asm/nmi.h>
 #include <asm/alternative.h>
 #include <asm/mc146818rtc.h>
 #include <asm/cpu-policy.h>
+#include <asm/invpcid.h>
 #include <asm/spec_ctrl.h>
 #include <asm/guest.h>
 #include <asm/microcode.h>
@@ -88,7 +90,7 @@ boolean_param("noapic", skip_ioapic_setup);
 
 /* **** Linux config option: propagated to domain0. */
 /* xen_cpuidle: xen control cstate. */
-s8 __read_mostly xen_cpuidle = -1;
+int8_t __read_mostly xen_cpuidle = -1;
 boolean_param("cpuidle", xen_cpuidle);
 
 #ifndef NDEBUG
diff --git a/xen/include/xen/cpuidle.h b/xen/include/xen/cpuidle.h
index 521a8deb04..705d0c1135 100644
--- a/xen/include/xen/cpuidle.h
+++ b/xen/include/xen/cpuidle.h
@@ -86,7 +86,7 @@ struct cpuidle_governor
     void (*reflect)         (struct acpi_processor_power *dev);
 };
 
-extern s8 xen_cpuidle;
+extern int8_t xen_cpuidle;
 extern struct cpuidle_governor *cpuidle_current_governor;
 
 bool cpuidle_using_deep_cstate(void);
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.