Message ID | 20240529133446.28446-13-Jonathan.Cameron@huawei.com |
---|---|
State | Accepted |
Commit | 2488444274c70038eb6b686cba5f1ce48ebb9cdd |
Headers | show
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 C38F617BAF; Wed, 29 May 2024 13:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716990062; cv=none; b=oTOqrdivD/vtxkLsQDpCK90jRl19OfvQqPf5hnaEbJouMP3TQ6+ccly+LNcxcqjJxmckKsHpXQAFSt1s0Vw48YVVjBm+7n17X/Tlb+06mY+6JC99TlihlPS9FNcWyHz7oUNOWMhTCiFaRMMRFkunZfHrz7ukRj7k3yJdbF23rMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716990062; c=relaxed/simple; bh=HRhhejitLik28OgzlcVBvJkb8ZtOvIVvfPv96DprgD8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=byAze06mzPoeX46ov2Ktjssjmw5AoFv0W+VXj4Q6XOTDOBTIC+Vyr76GmwKTZ99w80uNBj3SBEUYLyHi+dcqNSxpCPsiJaL3ncMFcS5byLcBi0KtgoVI9OQ1T/k7irGP7l7phxir5XSzdC+DC2kOmj8LpluxqKWmkUpDPRRLkQk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Vq9Qh6LRGz6J6m1; Wed, 29 May 2024 21:36:44 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 0F0C5140DDB; Wed, 29 May 2024 21:40:59 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 29 May 2024 14:40:58 +0100 From: Jonathan Cameron <Jonathan.Cameron@huawei.com> To: Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, <linux-acpi@vger.kernel.org>, <linux-arch@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-pm@vger.kernel.org> CC: Mark Rutland <mark.rutland@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Peter Zijlstra <peterz@infradead.org>, <loongarch@lists.linux.dev>, <x86@kernel.org>, Russell King <linux@armlinux.org.uk>, "Rafael J . Wysocki" <rafael@kernel.org>, Miguel Luis <miguel.luis@oracle.com>, James Morse <james.morse@arm.com>, Salil Mehta <salil.mehta@huawei.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, Hanjun Guo <guohanjun@huawei.com>, Gavin Shan <gshan@redhat.com>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, <linuxarm@huawei.com>, <justin.he@arm.com>, <jianyong.wu@arm.com> Subject: [PATCH v10 12/19] arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry Date: Wed, 29 May 2024 14:34:39 +0100 Message-ID: <20240529133446.28446-13-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529133446.28446-1-Jonathan.Cameron@huawei.com> References: <20240529133446.28446-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: <linux-pm.vger.kernel.org> List-Subscribe: <mailto:linux-pm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) |
Series |
ACPI/arm64: add support for virtual cpu hotplug
|
expand
|
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index bc9a6656fc0c..a407f9cd549e 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -124,7 +124,8 @@ static inline int get_cpu_for_acpi_id(u32 uid) int cpu; for (cpu = 0; cpu < nr_cpu_ids; cpu++) - if (uid == get_acpi_id_for_cpu(cpu)) + if (acpi_cpu_get_madt_gicc(cpu) && + uid == get_acpi_id_for_cpu(cpu)) return cpu; return -EINVAL;