Skip to content

Commit 92fe9bb

Browse files
author
Ingo Molnar
committed
x86/apic, x86/hyperv: Use u32 in hv_snp_boot_ap() too
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
1 parent 48525fd commit 92fe9bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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
@@ -276,11 +276,11 @@ int hv_unmap_ioapic_interrupt(int ioapic_id, struct hv_interrupt_entry *entry);
276276
#ifdef CONFIG_AMD_MEM_ENCRYPT
277277
bool hv_ghcb_negotiate_protocol(void);
278278
void __noreturn hv_ghcb_terminate(unsigned int set, unsigned int reason);
279-
int hv_snp_boot_ap(int cpu, unsigned long start_ip);
279+
int hv_snp_boot_ap(u32 cpu, unsigned long start_ip);
280280
#else
281281
static inline bool hv_ghcb_negotiate_protocol(void) { return false; }
282282
static inline void hv_ghcb_terminate(unsigned int set, unsigned int reason) {}
283-
static inline int hv_snp_boot_ap(int cpu, unsigned long start_ip) { return 0; }
283+
static inline int hv_snp_boot_ap(u32 cpu, unsigned long start_ip) { return 0; }
284284
#endif
285285

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

0 commit comments

Comments
 (0)