Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1213184rwb; Fri, 28 Jul 2023 06:28:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHKlbGKHHqyknyO4sVatYzwpny7DPNULiUZaHGxUHEpVgqQPnvSM3VPONaHZQm/BGTJEHse X-Received: by 2002:a17:90a:17a1:b0:268:1bbb:8600 with SMTP id q30-20020a17090a17a100b002681bbb8600mr1242303pja.40.1690550911312; Fri, 28 Jul 2023 06:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690550911; cv=none; d=google.com; s=arc-20160816; b=HYW25w4O3Wvv7v5wzMAw8iVCvCvwehNFayGYQC83pXEgaEH24Vsmoa6SaEHXuosne9 DhX4pKFxBLH6udA6Y5/4C7+4JRl8Ma+bYNH4swiC3J6i1+TsN0dynwkFydnIBjWYdzzQ zvUcBjBYtMQ3jKdhKl9wuWMvddBUDzXx6tkh//hq83qelqQob/t1e1m8RW5lHgduWZf9 u0Cl9Ekiq9sBbWwcD5DMTZ6eYAdRVGkIxbsdpqfw7yvrPJn8vGY9HfoNCnPn1mHdZVk5 wKHCY67T8NGvSbt6eypJHEBHV1mpS6QY9zvOdW6qnMh1zULMpyyT3a7K1ug3t11rTTCJ /fAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=5gVNK3rCq4noBF0xg9HsQLWamUWdjKHKucBFvU6ybvE=; fh=y/slnYrqOPbByUK75sFPvq3cYp2SbZKM1q7UWSqjNrY=; b=1KQZRwKLTSewr68jqPPkkFLlbA3v0RFwOE3o0mDNYmMj520ByCf1EzYMEj1/b7Xw4q LxR7bwu4X8a1UtX7JauqkWTub0xQ4SMSutyZ2eGENv3gpOZSkmLPuhfMvOmy0KDR8RsE ha6+Q3Am55HQ1703HRfCZvq6LooArVej689bE/NEmmxuZEvSaN5bNZhSYTOYzzOFAK39 w1une/m91iMrOFZ5nbkmtSR1yua63cVHqOtyjrP6+1uQO5KqjaqZkcjs8+oCqSuMUTaM ztzBmxBH7WVsb7MDfZRDt9Umo+ePs4XIXv6+Vii3IfLiNUXowopJp/GwdUalrDBy3arB E74Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=G2xt2VMQ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lt6-20020a17090b354600b002563db5c4b0si4447125pjb.184.2023.07.28.06.28.18; Fri, 28 Jul 2023 06:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=G2xt2VMQ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234529AbjG1MOE (ORCPT + 99 others); Fri, 28 Jul 2023 08:14:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236053AbjG1MNX (ORCPT ); Fri, 28 Jul 2023 08:13:23 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83F63C29; Fri, 28 Jul 2023 05:13:05 -0700 (PDT) Message-ID: <20230728120930.617454900@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690546384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=5gVNK3rCq4noBF0xg9HsQLWamUWdjKHKucBFvU6ybvE=; b=G2xt2VMQ0POlA92nedDC+wu1TLMwvF68Xl6/B0JqQ001JqNPuPvQe7iJuLNQ/l5TNyo6bs KZhHwDYIdT1vr9BD4voWtUWuqEbZnjtKSh9JMC1MazsiwrXZlawWVaT+JWffgsnlOcJ/Lr bBY6sETe22ClCa0KXAFufp1hE3KM+BAISyalVByMB368H16IfhBzVoAq/t4nr1W01C0nSC z0F8AwGuN/i1F1LjD6YZ0yuWxlJ9rjxXyjtyxLaOz2VGZRYvh/K0/5fij1CAsclvF4oo7W 8xMFamlpue6kPqSjXw/8WmBJ6X9HBM/IgZmyEyFIeUgjoORRYFnVEsXVx2yvvg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690546384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=5gVNK3rCq4noBF0xg9HsQLWamUWdjKHKucBFvU6ybvE=; b=QG238KyZZUyzVmtipu84Nj0/Jegu+8qNBqa2QpsmaNZEQIx29D0ntPxP0CO0Gzd42F6QYP 4G4SB4vTFr5F1kCw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , "James E.J. Bottomley" , Dick Kennedy , James Smart , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Guenter Roeck , linux-hwmon@vger.kernel.org, Jean Delvare , Huang Rui , Juergen Gross , Steve Wahl , Mike Travis , Dimitri Sivanich , Russ Anderson Subject: [patch v2 17/38] x86/apic: Use u32 for wakeup_secondary_cpu[_64]() References: <20230728105650.565799744@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Jul 2023 14:13:03 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org APIC IDs are used with random data types u16, u32, int, unsigned int, unsigned long. Make it all consistently use u32 because that reflects the hardware register width. Signed-off-by: Thomas Gleixner --- arch/x86/hyperv/hv_vtl.c | 2 +- arch/x86/include/asm/apic.h | 8 ++++---- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/apic_numachip.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/kernel/sev.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) --- a/arch/x86/hyperv/hv_vtl.c +++ b/arch/x86/hyperv/hv_vtl.c @@ -192,7 +192,7 @@ static int hv_vtl_apicid_to_vp_id(u32 ap return ret; } -static int hv_vtl_wakeup_secondary_cpu(int apicid, unsigned long start_eip) +static int hv_vtl_wakeup_secondary_cpu(u32 apicid, unsigned long start_eip) { int vp_id; --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -302,9 +302,9 @@ struct apic { u32 (*set_apic_id)(u32 apicid); /* wakeup_secondary_cpu */ - int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip); + int (*wakeup_secondary_cpu)(u32 apicid, unsigned long start_eip); /* wakeup secondary CPU using 64-bit wakeup point */ - int (*wakeup_secondary_cpu_64)(int apicid, unsigned long start_eip); + int (*wakeup_secondary_cpu_64)(u32 apicid, unsigned long start_eip); char *name; }; @@ -322,8 +322,8 @@ struct apic_override { void (*send_IPI_self)(int vector); u64 (*icr_read)(void); void (*icr_write)(u32 low, u32 high); - int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip); - int (*wakeup_secondary_cpu_64)(int apicid, unsigned long start_eip); + int (*wakeup_secondary_cpu)(u32 apicid, unsigned long start_eip); + int (*wakeup_secondary_cpu_64)(u32 apicid, unsigned long start_eip); }; /* --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -358,7 +358,7 @@ acpi_parse_lapic_nmi(union acpi_subtable } #ifdef CONFIG_X86_64 -static int acpi_wakeup_cpu(int apicid, unsigned long start_ip) +static int acpi_wakeup_cpu(u32 apicid, unsigned long start_ip) { /* * Remap mailbox memory only for the first call to acpi_wakeup_cpu(). --- a/arch/x86/kernel/apic/apic_noop.c +++ b/arch/x86/kernel/apic/apic_noop.c @@ -27,7 +27,7 @@ static void noop_send_IPI_allbutself(int static void noop_send_IPI_all(int vector) { } static void noop_send_IPI_self(int vector) { } static void noop_apic_icr_write(u32 low, u32 id) { } -static int noop_wakeup_secondary_cpu(int apicid, unsigned long start_eip) { return -1; } +static int noop_wakeup_secondary_cpu(u32 apicid, unsigned long start_eip) { return -1; } static u64 noop_apic_icr_read(void) { return 0; } static u32 noop_phys_pkg_id(u32 cpuid_apic, int index_msb) { return 0; } static u32 noop_get_apic_id(u32 apicid) { return 0; } --- a/arch/x86/kernel/apic/apic_numachip.c +++ b/arch/x86/kernel/apic/apic_numachip.c @@ -71,7 +71,7 @@ static void numachip2_apic_icr_write(int numachip2_write32_lcsr(NUMACHIP2_APIC_ICR, (apicid << 12) | val); } -static int numachip_wakeup_secondary(int phys_apicid, unsigned long start_rip) +static int numachip_wakeup_secondary(u32 phys_apicid, unsigned long start_rip) { numachip_apic_icr_write(phys_apicid, APIC_DM_INIT); numachip_apic_icr_write(phys_apicid, APIC_DM_STARTUP | --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -702,7 +702,7 @@ static __init void build_uv_gr_table(voi } } -static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip) +static int uv_wakeup_secondary(u32 phys_apicid, unsigned long start_rip) { unsigned long val; int pnode; --- a/arch/x86/kernel/sev.c +++ b/arch/x86/kernel/sev.c @@ -940,7 +940,7 @@ static void snp_cleanup_vmsa(struct sev_ free_page((unsigned long)vmsa); } -static int wakeup_cpu_via_vmgexit(int apic_id, unsigned long start_ip) +static int wakeup_cpu_via_vmgexit(u32 apic_id, unsigned long start_ip) { struct sev_es_save_area *cur_vmsa, *vmsa; struct ghcb_state state;