|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] types: replace remaining uses of s8
commit bfcb0abb191f75775081b74755c71c52ac06f994
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Sep 2 11:57:22 2024 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 2 11:57:22 2024 +0200
types: replace remaining uses of s8
... and move the type itself to linux-compat.h.
While doing so,
- convert __read_mostly to __ro_after_init for respective variables
having their type changed (for acpi_numa add the attribute anew),
- in cpuid_hypervisor_leaves() drop a cast altogether,
- switch an adjacent struct arch_irq_desc field to bool.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/apic.c | 2 +-
xen/arch/x86/cpu/amd.c | 2 +-
xen/arch/x86/e820.c | 2 +-
xen/arch/x86/hvm/quirks.c | 2 +-
xen/arch/x86/hvm/vmx/vmcs.c | 2 +-
xen/arch/x86/include/asm/acpi.h | 2 +-
xen/arch/x86/include/asm/amd.h | 2 +-
xen/arch/x86/include/asm/hvm/hvm.h | 2 +-
xen/arch/x86/include/asm/irq.h | 4 ++--
xen/arch/x86/mm.c | 2 +-
xen/arch/x86/msi.c | 2 +-
xen/arch/x86/numa.c | 2 +-
xen/arch/x86/oprofile/op_model_athlon.c | 2 +-
xen/arch/x86/setup.c | 4 ++--
xen/arch/x86/traps.c | 2 +-
xen/include/acpi/cpufreq/cpufreq.h | 2 +-
xen/include/xen/linux-compat.h | 2 +-
xen/include/xen/types.h | 1 -
18 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 7869c30e83..e077bf7edc 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -71,7 +71,7 @@ static struct {
/*
* Knob to control our willingness to enable the local APIC.
*/
-static s8 __initdata enable_local_apic; /* -1=force-disable, +1=force-enable */
+static int8_t __initdata enable_local_apic; /* -1=force-disable,
+1=force-enable */
/*
* Debug level
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index ab92333673..903be14af4 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -46,7 +46,7 @@ static unsigned int __initdata opt_cpuid_mask_thermal_ecx =
~0u;
integer_param("cpuid_mask_thermal_ecx", opt_cpuid_mask_thermal_ecx);
/* 1 = allow, 0 = don't allow guest creation, -1 = don't allow boot */
-s8 __read_mostly opt_allow_unsafe;
+int8_t __ro_after_init opt_allow_unsafe;
boolean_param("allow_unsafe", opt_allow_unsafe);
/* Signal whether the ACPI C1E quirk is required. */
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index 3726823e88..e052e84de7 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -27,7 +27,7 @@ static unsigned long long __initdata opt_availmem;
size_param("availmem", opt_availmem);
/* opt_nomtrr_check: Don't clip ram to highest cacheable MTRR. */
-static s8 __initdata e820_mtrr_clip = -1;
+static int8_t __initdata e820_mtrr_clip = -1;
boolean_param("e820-mtrr-clip", e820_mtrr_clip);
/* opt_e820_verbose: Be verbose about clipping, the original e820, &c */
diff --git a/xen/arch/x86/hvm/quirks.c b/xen/arch/x86/hvm/quirks.c
index 09face0c51..9202f5a47f 100644
--- a/xen/arch/x86/hvm/quirks.c
+++ b/xen/arch/x86/hvm/quirks.c
@@ -11,7 +11,7 @@
#include <xen/param.h>
#include <asm/hvm/support.h>
-s8 __read_mostly hvm_port80_allowed = -1;
+int8_t __ro_after_init hvm_port80_allowed = -1;
boolean_param("hvm_port80", hvm_port80_allowed);
static int __init cf_check dmi_hvm_deny_port80(const struct dmi_system_id *id)
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 5787110a56..147e998371 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -59,7 +59,7 @@ static unsigned int __ro_after_init vm_notify_window;
integer_param("vm-notify-window", vm_notify_window);
static bool __read_mostly opt_ept_pml = true;
-static s8 __read_mostly opt_ept_ad = -1;
+static int8_t __ro_after_init opt_ept_ad = -1;
int8_t __read_mostly opt_ept_exec_sp = -1;
static int __init cf_check parse_ept_param(const char *s)
diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acpi.h
index 48b1d69946..3c47b216d0 100644
--- a/xen/arch/x86/include/asm/acpi.h
+++ b/xen/arch/x86/include/asm/acpi.h
@@ -100,7 +100,7 @@ extern unsigned long acpi_wakeup_address;
#define ARCH_HAS_POWER_INIT 1
-extern s8 acpi_numa;
+extern int8_t acpi_numa;
extern struct acpi_sleep_info acpi_sinfo;
#define acpi_video_flags bootsym(video_flags)
diff --git a/xen/arch/x86/include/asm/amd.h b/xen/arch/x86/include/asm/amd.h
index fa4e0fc766..9c9599a622 100644
--- a/xen/arch/x86/include/asm/amd.h
+++ b/xen/arch/x86/include/asm/amd.h
@@ -160,7 +160,7 @@
struct cpuinfo_x86;
int cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, int osvw_id, ...);
-extern s8 opt_allow_unsafe;
+extern int8_t opt_allow_unsafe;
void fam10h_check_enable_mmcfg(void);
void check_enable_amd_mmconf_dmi(void);
diff --git a/xen/arch/x86/include/asm/hvm/hvm.h
b/xen/arch/x86/include/asm/hvm/hvm.h
index d5aaa5b710..dd7d4872b5 100644
--- a/xen/arch/x86/include/asm/hvm/hvm.h
+++ b/xen/arch/x86/include/asm/hvm/hvm.h
@@ -241,7 +241,7 @@ struct hvm_function_table {
extern struct hvm_function_table hvm_funcs;
extern bool hvm_enabled;
-extern s8 hvm_port80_allowed;
+extern int8_t hvm_port80_allowed;
extern const struct hvm_function_table *start_svm(void);
extern const struct hvm_function_table *start_vmx(void);
diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h
index 5f445299be..5a8352a21e 100644
--- a/xen/arch/x86/include/asm/irq.h
+++ b/xen/arch/x86/include/asm/irq.h
@@ -80,8 +80,8 @@ struct arch_irq_desc {
cpumask_var_t pending_mask;
vmask_t *used_vectors;
unsigned move_cleanup_count;
- u8 move_in_progress : 1;
- s8 used;
+ bool move_in_progress : 1;
+ int8_t used;
/*
* Weak reference to domain having permission over this IRQ (which can
* be different from the domain actually having the IRQ assigned)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 4148c65657..608583a113 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -170,7 +170,7 @@ static uint32_t __ro_after_init base_disallow_mask;
is_pv_domain(d)) ? \
L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS))
-static s8 __read_mostly opt_mmio_relax;
+static int8_t __ro_after_init opt_mmio_relax;
static int __init cf_check parse_mmio_relax(const char *s)
{
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 0c97fbb3fc..ff2e3d8687 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -35,7 +35,7 @@
#include <xsm/xsm.h>
#include <xen/vpci.h>
-static s8 __read_mostly use_msi = -1;
+static int8_t __ro_after_init use_msi = -1;
boolean_param("msi", use_msi);
static void __pci_disable_msix(struct msi_desc *entry);
diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index 4b0b297c7e..3f2fe54874 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -25,7 +25,7 @@ nodeid_t apicid_to_node[MAX_LOCAL_APIC] = {
[0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
};
-s8 acpi_numa = 0;
+int8_t __ro_after_init acpi_numa = 0;
int __init arch_numa_setup(const char *opt)
{
diff --git a/xen/arch/x86/oprofile/op_model_athlon.c
b/xen/arch/x86/oprofile/op_model_athlon.c
index 782fa606ee..bf897a4b63 100644
--- a/xen/arch/x86/oprofile/op_model_athlon.c
+++ b/xen/arch/x86/oprofile/op_model_athlon.c
@@ -157,7 +157,7 @@ static inline u64 op_amd_randomize_ibs_op(u64 val)
* IbsOpMaxCnt must fit in the range from 0x0081 to
* 0xff80.
*/
- val += (s8)(random >> 4);
+ val += (int8_t)(random >> 4);
else
val |= (u64)(random & IBS_RANDOM_MASK) << 32;
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c2e0082a30..cd69198326 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -164,7 +164,7 @@ unsigned long __read_mostly mmu_cr4_features =
XEN_MINIMAL_CR4;
/* smep: Enable/disable Supervisor Mode Execution Protection */
#define SMEP_HVM_ONLY (-2)
-static s8 __initdata opt_smep = -1;
+static int8_t __initdata opt_smep = -1;
/*
* Initial domain place holder. Needs to be global so it can be created in
@@ -201,7 +201,7 @@ custom_param("smep", parse_smep_param);
/* smap: Enable/disable Supervisor Mode Access Prevention */
#define SMAP_HVM_ONLY (-2)
-static s8 __initdata opt_smap = -1;
+static int8_t __initdata opt_smap = -1;
static int __init cf_check parse_smap_param(const char *s)
{
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index b796c2f7df..708136f625 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1116,7 +1116,7 @@ void cpuid_hypervisor_leaves(const struct vcpu *v,
uint32_t leaf,
res->a = offset;
res->b = offset >> 32;
res->c = d->arch.vtsc_to_ns.mul_frac;
- res->d = (s8)d->arch.vtsc_to_ns.shift;
+ res->d = d->arch.vtsc_to_ns.shift;
break;
}
diff --git a/xen/include/acpi/cpufreq/cpufreq.h
b/xen/include/acpi/cpufreq/cpufreq.h
index b6cff825ce..3f1b05a02e 100644
--- a/xen/include/acpi/cpufreq/cpufreq.h
+++ b/xen/include/acpi/cpufreq/cpufreq.h
@@ -79,7 +79,7 @@ struct cpufreq_policy {
bool resume; /* flag for cpufreq 1st run
* S3 wakeup, hotplug cpu, etc */
- s8 turbo; /* tristate flag: 0 for unsupported
+ int8_t turbo; /* tristate flag: 0 for unsupported
* -1 for disable, 1 for enabled
* See CPUFREQ_TURBO_* below for defines */
};
diff --git a/xen/include/xen/linux-compat.h b/xen/include/xen/linux-compat.h
index b289dfd894..1491894feb 100644
--- a/xen/include/xen/linux-compat.h
+++ b/xen/include/xen/linux-compat.h
@@ -11,7 +11,7 @@
#include <xen/types.h>
-typedef int8_t __s8;
+typedef int8_t s8, __s8;
typedef uint8_t __u8;
typedef int16_t __s16;
typedef int32_t __s32;
diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 449947b353..542dbaf63c 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -5,7 +5,6 @@
#include <xen/stdint.h>
/* Linux inherited types which are being phased out */
-typedef int8_t s8;
typedef uint8_t u8;
typedef int16_t s16;
typedef uint16_t u16, __u16;
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |