From nobody Sat Jun 13 23:45:00 2026 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 7C7DC30D3F4; Sat, 13 Jun 2026 14:33:14 +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=1781361202; cv=none; b=V9P3e940MqgcWgaWwfkbFeyKFfNWzMchqeG6bPVErEBVn4xFKl35zvK4ZKeo4xfybgPqoU2VFqjeJF6De42Hj3SFDLgx8lUVdPb0VMR5OZLzO2uq5On/qzASA/RX/c8whBJ2upEj4Ybpo/jtnmXjEW6/PBNSZ0C+6kRpBuKMjMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781361202; c=relaxed/simple; bh=R43s23mDaMrqNpt/mM/fuP8pQoXxnJtOUr4yQmharGg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=sxwmj3mIDE8aU0/0SeaBygs35QMkttXHRQXGWjNk+4kOEtJMrAhhF8tfrPqjS8iDZXp/0YDOWHBcM/tzyDAmvUj3jNU8EDgE8w8iGTzYP/iTY3/Oa4o6K3Nd2u2WsMDc41lNQ7NGmaXviwYdLrWZ3i5k+8vkiYHBx0v8Y/QO0hM= 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=Ce1iGEkN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XP5yGjWm; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ce1iGEkN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XP5yGjWm" Date: Sat, 13 Jun 2026 14:33:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1781361192; 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=Gt5RTWzt6qZXs/XbWy1ZXRDchU8oOeGRU8ee5Gz81+8=; b=Ce1iGEkNpK5liV4z83SiZUjqS97OD5ChcxNR36K6JOjCaao714rQEAEj7+r6uKuBxVIM5q b/Y+LNsi1UhwfrI4Z5B/zQd2xKME27hDQRMnDVCUqQhpawr7Awsa/LAvcsERTQsqGvnBvp bFNsZr0vDnYGLNbMLSRgiVgL8uRm/VjKnqTCP7w3/lwQLXHQSWu3Eaxdx3l5XIUr378j0P eUMonuVq6YDgFL5qrpa72+YtCRlgMy29FZHUOGBmc1n3/NhjFTlJOjS/rIHO6ThwnCtu7D Vc2AI7qQafqb4VunI08BDNu/w/pUqoL7Csh53p9ku44rvqnZgRmJEqRmBVIP9Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1781361192; 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=Gt5RTWzt6qZXs/XbWy1ZXRDchU8oOeGRU8ee5Gz81+8=; b=XP5yGjWmGQxc+fwYHQ7NfANW0rzzZgpYcQKYXR0SFOpTfZ5t7cbqNB8IcN0J8tQgAVdhKK U6AS7cTwOefOdaCQ== From: "tip-bot2 for Marc Zyngier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/clocksource] ACPI: GTDT: Parse information related to the EL2 virtual timer Cc: Marc Zyngier , Daniel Lezcano , Sudeep Holla , Hanjun Guo , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260523140242.586031-3-maz@kernel.org> References: <20260523140242.586031-3-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178136119126.1650852.6218664858166221268.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: quoted-printable The following commit has been merged into the timers/clocksource branch of = tip: Commit-ID: fe15af3e75298533056ce73f8e66cd3da31f2b4a Gitweb: https://git.kernel.org/tip/fe15af3e75298533056ce73f8e66cd3da= 31f2b4a Author: Marc Zyngier AuthorDate: Sat, 23 May 2026 15:02:27 +01:00 Committer: Daniel Lezcano CommitterDate: Wed, 03 Jun 2026 09:52:55 +02:00 ACPI: GTDT: Parse information related to the EL2 virtual timer Now that we have a way to identify GTDTv3, allow the information related to the EL2 virtual timer to be retrieved by the interface used by the architected timer driver. Signed-off-by: Marc Zyngier Signed-off-by: Daniel Lezcano Reviewed-by: Sudeep Holla Reviewed-by: Hanjun Guo Link: https://patch.msgid.link/20260523140242.586031-3-maz@kernel.org --- drivers/acpi/arm64/gtdt.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c index 950d5ef..00158c8 100644 --- a/drivers/acpi/arm64/gtdt.c +++ b/drivers/acpi/arm64/gtdt.c @@ -41,6 +41,14 @@ struct gtdt_v3 { =20 static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata; =20 +static __init struct acpi_gtdt_el2 *gtdt_to_el2_vtimer(struct acpi_table_g= tdt *gtdt) +{ + if (gtdt->header.revision < 3) + return NULL; + + return &container_of(gtdt, struct gtdt_v3, gtdt_v2)->el2_vtimer; +} + static __init bool platform_timer_valid(void *platform_timer) { struct acpi_gtdt_header *gh =3D platform_timer; @@ -112,6 +120,7 @@ static int __init map_gt_gsi(u32 interrupt, u32 flags) int __init acpi_gtdt_map_ppi(int type) { struct acpi_table_gtdt *gtdt =3D acpi_gtdt_desc.gtdt; + struct acpi_gtdt_el2 *el2_vtimer =3D gtdt_to_el2_vtimer(gtdt); =20 switch (type) { case ARCH_TIMER_PHYS_NONSECURE_PPI: @@ -124,6 +133,12 @@ int __init acpi_gtdt_map_ppi(int type) case ARCH_TIMER_HYP_PPI: return map_gt_gsi(gtdt->non_secure_el2_interrupt, gtdt->non_secure_el2_flags); + case ARCH_TIMER_HYP_VIRT_PPI: + if (el2_vtimer && el2_vtimer->virtual_el2_timer_gsiv) + return map_gt_gsi(el2_vtimer->virtual_el2_timer_gsiv, + el2_vtimer->virtual_el2_timer_flags); + + return 0; default: pr_err("Failed to map timer interrupt: invalid type.\n"); } @@ -141,6 +156,7 @@ int __init acpi_gtdt_map_ppi(int type) bool __init acpi_gtdt_c3stop(int type) { struct acpi_table_gtdt *gtdt =3D acpi_gtdt_desc.gtdt; + struct acpi_gtdt_el2 *el2_vtimer =3D gtdt_to_el2_vtimer(gtdt); =20 switch (type) { case ARCH_TIMER_PHYS_NONSECURE_PPI: @@ -152,6 +168,10 @@ bool __init acpi_gtdt_c3stop(int type) case ARCH_TIMER_HYP_PPI: return !(gtdt->non_secure_el2_flags & ACPI_GTDT_ALWAYS_ON); =20 + case ARCH_TIMER_HYP_VIRT_PPI: + return el2_vtimer && el2_vtimer->virtual_el2_timer_gsiv && + !(el2_vtimer->virtual_el2_timer_flags & ACPI_GTDT_ALWAYS_ON); + default: pr_err("Failed to get c3stop info: invalid type.\n"); }