Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp177604rdh; Tue, 13 Feb 2024 13:14:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6K8d+kRKHT83UFDY03EncrDy9/COYkLlf57CZSY2wYzPsl3MJzLVDVZfB3rZkbXSZpF9aSGDjCU26kYkOJ8UI7KinzoiuGWVrCGhoYA== X-Google-Smtp-Source: AGHT+IHFRE2eYLYT9WCcHHmwbDEg0bjEO7WzsUJopPMynCjBT6RV1DTumuPYgSWCDTwb4KVOXiF3 X-Received: by 2002:a05:620a:471e:b0:785:c9a3:ca4c with SMTP id bs30-20020a05620a471e00b00785c9a3ca4cmr1103305qkb.56.1707858866575; Tue, 13 Feb 2024 13:14:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858866; cv=pass; d=google.com; s=arc-20160816; b=EJCSKLJ6CHfHgtiTSzzYYFbxq0IyvWxS7W3nuaNz1K0DIHnziGm5YjkEHtwW0rE7Hb t0YhF2aBxjmjx7zJvU4FyRfsAFZItSHZ7vugXJnO5fFyydzcVAvB9ZjSsB8XJpkdJLMt IqiKODlenXyfo8FnZk+Ees4etUd8t5xZpGbmspyASsIAMb7wfEBPRw1LoArQyF8Tax94 vRI52uByKlTqgVxO4LBg88jTHXB5PZYW6onCEUq7glXgIJL4U54sxbqLRxJzchvcr3f4 DOnOLqMjitP/0Mh9vDKthctfpPrV2K5MiUGtvQeFVBe+IPBPdWeuWJvsoRIcsSxXd/2i Edeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=qpOqg8wHgWldzZv4rvX2WggJPz3SVoiC9O3+E9lyex8=; fh=VCrGnB5lcOHJ+1XzCyMPFS48CdQXMDCOhpg8lBIei+g=; b=wy13ivHEqU2++sO4bxGhF1llfEuu9xjHw+9gOevc4geo89WXYCd7YzK6dLpxxHgALr Q3Zz2FcE3+W6pM64njs4WriMYmGYEfXbAhdQ8CJT5BCDB8IGAZDhwrW6fWkOG534xMD+ zudd8/Nghgusdm6/UnQBlv9MVbZ4W12ZoHqv9C6WcNPcPC0T6ppoUcz/DlkE/wfxZqd6 IemYrkjYYPWX2H2HpTNyDWfEnzCpF030mNULaEF1yt2iVKyZ0/kLp+GGxcKMWQk/eVuI LPJfm7jRGalu4eS265qkK0djaYbra0gtEZ3gEgJS7qZaGHz0LGnHE9rsGY1Vqpj6di5b mXrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="K/e274NZ"; 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-64284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCU3hsWZcFHiMpQD03yK/yHFIVCVRKbgfg2ygjBM0HapaoK2mMLHE/9AfQbqwf1mf0Z06lUWhoyGWRyg9Y34rWwaGIoXpP6TJPEfn/NkkA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o15-20020a05620a110f00b00786f0d7488fsi3762854qkk.87.2024.02.13.13.14.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:14:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="K/e274NZ"; 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-64284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64284-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 54E151C2311B for ; Tue, 13 Feb 2024 21:14:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88638627E7; Tue, 13 Feb 2024 21:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="K/e274NZ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="75KGno8n" 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 4DCD778B67 for ; Tue, 13 Feb 2024 21:05:24 +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=1707858325; cv=none; b=EWWMyrW4mulmO/+l9wTjzD/wb5Dhx4/24StSGId1rg/kMEIIBo/Nzn6UQcN3NZkSmKYZY9Txx2zqv7bR9bNdxwz33juF4h24EmH5OY1f0W5gpN+SHc6OJKukCAOkENGIgMAuMMkiHgzs8btO5Fab20JCnjIXnAt1AYhjrB2MYV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858325; c=relaxed/simple; bh=jcnrKQ8bGa1cI8YUc48EGSYADKgqOdIYaLgH8rg4ccM=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=sH2RkhPQXN0qlPUrkBU5b9bI2NpGeDiDyk4NjUFDq7fUGslbjUYRp59zbZjPYk/C7dj7L9UAGOAgrDV+qHs+Q1KsztdQlXgwO4eldyLAaY6KbcYxkY1OOJGuKM+fpqdrrjeFAy9m//4QRlsIvKWN3CSaRuOCkbsK7dGXr4gLwjQ= 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=K/e274NZ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=75KGno8n; 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 Message-ID: <20240212154640.177504138@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858322; 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=qpOqg8wHgWldzZv4rvX2WggJPz3SVoiC9O3+E9lyex8=; b=K/e274NZbDcRp4r1Y7Wy/RBSt6CiOsSqWdb47mBRlxNqEdvzxhbt3RnXj7qe0FZHN9cGBX oTeqHthR0sc4nEOF4jxxUgVhmd/ROeMc0HFWMLA44hmTGbeRb67DHyQ4ZZoEOwYtbwRAHH geFrx+Qy49AocvOIO3sAQfS8wTvedyEeG9lG1sYEzRbdApSvAxZgBndyFFDA3advQBVGlD c26MGoFU0ju1GChH0Ja3hvv6NMHl7M48r3/3dr/2/Ho17rMbrLjakUkWkdyxLSPFLtrGUU GEEvv4dbn3Y20Xo5cOAKQvXv9vU8UYg0nQWcPKHS6uMfZhT+gviBwSRjbeKeyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858322; 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=qpOqg8wHgWldzZv4rvX2WggJPz3SVoiC9O3+E9lyex8=; b=75KGno8nXfqDJKSNNZgy8X4Blr6YUpxPmpWrsBfhYqvtXNGPXRcYaUifTgOiKKdppKlleb rxykisF84IaPjzBQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" , Andy Shevchenko , Wei Liu Subject: [patch V3 22/22] x86/apic: Use a proper define for invalid ACPI CPU ID References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:05:21 +0100 (CET) From: Thomas Gleixner 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 --- 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(-) --- --- 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(voi 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; --- 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); --- 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(unsign */ 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;