Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1170183rdb; Fri, 16 Feb 2024 07:22:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU82KlBqvFsculD7/jc/lqULpWnGaAmqd0PZYzb06Vzgl/e8sUasiqdx/4k9t0BV464QSkuXBBc3eN3euzoheOg2yg6Rx5ovuy9ANlT5A== X-Google-Smtp-Source: AGHT+IHsy1Di/IFOR8F4BPgGxPIyGFkF+wMk1OLBeXXW+BhjIWX/BvMu8X5cFF2Ysbpxn3HshSzi X-Received: by 2002:a05:620a:3956:b0:783:c945:f774 with SMTP id qs22-20020a05620a395600b00783c945f774mr6188034qkn.16.1708096957764; Fri, 16 Feb 2024 07:22:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708096957; cv=pass; d=google.com; s=arc-20160816; b=hivo1iYfyg0WAEzH7Aa+Yy20dNL/0xPCMFWlI67bPsfzjsaRtcuH6qreRs7rItPyQH vyV3GLZ9Vs2ybrMCZlRRletbsartng4f3IW76bKKIA6efMEdT671PLjjDCvm61JSjTc3 FggYIowUcET8tCe5Uhy20FnGk1JexZGmTZxH1hH0TL4rjb7FNtzRL3/rL6nLwY0wuvxr /iKNpik7i2ybnnfmTvzGcko6ug+f4qiOQDvaPFe195Rr3ZegWl6pUIKNUGaKn+iRpPDt LPTCFTWFts9LjX03HCGVVZC2hi3iBdb8DQLSFEKyGyBc1I6uNUeGFs/ZNAHIB8edu5qp JMUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=/4J22mhRRPiCEEG8pXqzuGGhJ6KeBwgEkZTDcWzAMqk=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=vmrQ8lmBGy2y83YBqbRnY/N+icFSWRdUTfEBkzutVdXjt1274NAR1RjHtTWWwLDWYE cl1HM9gInKZv/UlQ/inVJMPPbK1J58axzDXs4MGpiuveojKXUsDMCCtQGNCqCMh8RoLD 0R1bB0DfzuIIhQ+frkc/580mulywYKnA7miSdioSMPIkfkbCWu3qb67YjmURIi/VsEtO /FBdKx88UK3IAuldJcjWuL4BkjHl6HwcTppl479qbI7YjzcWvJ3GJsnIo0hogFdxZvpg UFW7lGVkqoUmGXstFZ5YKM4mW6tYEM6CpM/WoNrKf+sPOq9XPvPV0OUdZMulBHB/dox+ NX/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Sjzcg43U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68819-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b16-20020a05620a0cd000b00785d42ba348si88594qkj.155.2024.02.16.07.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:22:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68819-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Sjzcg43U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68819-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7416C1C21095 for ; Fri, 16 Feb 2024 15:22:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9FC514535A; Fri, 16 Feb 2024 15:17:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Sjzcg43U"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ekKHoTQr" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 831C213A88C; Fri, 16 Feb 2024 15:17:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096634; cv=none; b=lnm9puRqsVdWZJ3kBBxSqfv8bpg/ICXokS4EoMFZx/bf2cIn8uHMfM45/bMm8kcCQedOwQzXJs14Tgc022A/1YKgzN/Dy5yHfCV4iUfCkDNCeswgFQUr1nHnYNVGfGwIdAVoXiuAb0AgZQC+YGw1DpZV0W2qLARwzuf6Buo0Eo8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096634; c=relaxed/simple; bh=jWOyp2RH84Aso2hP4IA3ByCgY3cMVQ0jNGNDPNGC+yQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nKHQT65JMxqiYJ8g947KnrkjcNJGuE7fqLpAQimKFAvCkDJcaJk23b932xcdcQyJuVQPPSYENnLNqF9k+w5uP0ENNCGGPwak00EIuReYi+rKhKXrvCbWZpjwC99r8mQ4vlL0sOFyDmbXcfvZRdnXhym8SgKcd82w1SnUnLlANSo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Sjzcg43U; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ekKHoTQr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 16 Feb 2024 15:17:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096631; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/4J22mhRRPiCEEG8pXqzuGGhJ6KeBwgEkZTDcWzAMqk=; b=Sjzcg43U3HdM4TjJAw5sLFEvwAuMK8iz1WEFKry33VtEOA6hgrUVFGgOvuq9tyNC1NGDTl CGwf6rSyTwLQcA7SLNzRea4969HngyG95YTTb+yGECtx151R0YPSc9dvtGWt5w+AmWm8A5 /0ZhMDeQ0fRQRZtRVTLwwkpGu19Nm78dqru9sP5bIOhzMPR0rq11yVNctIs1x5FU1Q5ems FaCspWLCPDfTkk8oV+rECDntuaHVlRLqFOp96oC8PNHsFSDYwv5IkwNGpBuza+hGJVYdVY J+H47KCWGVxXtMeIPkiEeb99q1/ETnDn80PxfHydwj8CadTnqoJZeXpUaysURg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096631; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/4J22mhRRPiCEEG8pXqzuGGhJ6KeBwgEkZTDcWzAMqk=; b=ekKHoTQr15Nd299S/C5duDE6phmdwtQJukVsaq7V3qWV7ctT9l9jFiOGUWcLzyAWUWQCy0 canEGHofUS2NEYDw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/apic: Use a proper define for invalid ACPI CPU ID Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212154640.177504138@linutronix.de> References: <20240212154640.177504138@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809663042.398.18233953458036064393.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: 1a5d0f62d10d5da44c2b6a97b6600dea8a7519fb Gitweb: https://git.kernel.org/tip/1a5d0f62d10d5da44c2b6a97b6600dea8a7519fb Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:05:21 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:41 +01:00 x86/apic: Use a proper define for invalid ACPI CPU ID The ACPI ID for CPUs is preset with U32_MAX which is completely non obvious. Use a proper define for it. Signed-off-by: Thomas Gleixner Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240212154640.177504138@linutronix.de --- arch/x86/include/asm/apic.h | 3 +++ arch/x86/kernel/apic/apic.c | 2 +- arch/x86/xen/enlighten_hvm.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index ba219d6..109f980 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -48,7 +48,10 @@ static inline void x86_32_probe_apic(void) { } extern u32 cpuid_to_apicid[]; +#define CPU_ACPIID_INVALID U32_MAX + #ifdef CONFIG_X86_LOCAL_APIC + extern int apic_verbosity; extern int local_apic_timer_c2_ok; diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 68767a9..fa11e25 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -111,7 +111,7 @@ static inline bool apic_accessible(void) * Map cpu index to physical APIC ID */ DEFINE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_apicid, BAD_APICID); -DEFINE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid, U32_MAX); +DEFINE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid, CPU_ACPIID_INVALID); EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid); EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_acpiid); diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index 3f8c347..99a68fa 100644 --- a/arch/x86/xen/enlighten_hvm.c +++ b/arch/x86/xen/enlighten_hvm.c @@ -168,7 +168,7 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu) */ xen_uninit_lock_cpu(cpu); - if (cpu_acpi_id(cpu) != U32_MAX) + if (cpu_acpi_id(cpu) != CPU_ACPIID_INVALID) per_cpu(xen_vcpu_id, cpu) = cpu_acpi_id(cpu); else per_cpu(xen_vcpu_id, cpu) = cpu;