Skip to content

Commit b5f9a11

Browse files
ingomolnaropsiff
authored andcommitted
x86/apic, x86/hyperv: Use u32 in hv_snp_boot_ap() too
mainline inclusion from mainline-v6.7-rc1 category: bugfix The data type for APIC IDs was standardized to 'u32' in the following recent commit: db4a408 ("x86/apic: Use u32 for wakeup_secondary_cpu[_64]()") Which changed the function arguments type signature of the apic->wakeup_secondary_cpu() APIC driver function. Propagate this to hv_snp_boot_ap() as well, which also addresses a 'assignment from incompatible pointer type' build warning that triggers under the -Werror=incompatible-pointer-types GCC warning. Fixes: db4a408 ("x86/apic: Use u32 for wakeup_secondary_cpu[_64]()") Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230814085113.233274223@linutronix.de (cherry picked from commit 92fe9bb) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent a2a5f16 commit b5f9a11

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/hyperv/ivm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa)
288288
free_page((unsigned long)vmsa);
289289
}
290290

291-
int hv_snp_boot_ap(int cpu, unsigned long start_ip)
291+
int hv_snp_boot_ap(u32 cpu, unsigned long start_ip)
292292
{
293293
struct sev_es_save_area *vmsa = (struct sev_es_save_area *)
294294
__get_free_page(GFP_KERNEL | __GFP_ZERO);

arch/x86/include/asm/mshyperv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ int hv_unmap_ioapic_interrupt(int ioapic_id, struct hv_interrupt_entry *entry);
275275
#ifdef CONFIG_AMD_MEM_ENCRYPT
276276
bool hv_ghcb_negotiate_protocol(void);
277277
void __noreturn hv_ghcb_terminate(unsigned int set, unsigned int reason);
278-
int hv_snp_boot_ap(int cpu, unsigned long start_ip);
278+
int hv_snp_boot_ap(u32 cpu, unsigned long start_ip);
279279
#else
280280
static inline bool hv_ghcb_negotiate_protocol(void) { return false; }
281281
static inline void hv_ghcb_terminate(unsigned int set, unsigned int reason) {}
282-
static inline int hv_snp_boot_ap(int cpu, unsigned long start_ip) { return 0; }
282+
static inline int hv_snp_boot_ap(u32 cpu, unsigned long start_ip) { return 0; }
283283
#endif
284284

285285
#if defined(CONFIG_AMD_MEM_ENCRYPT) || defined(CONFIG_INTEL_TDX_GUEST)

0 commit comments

Comments
 (0)