From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 50C182E4257; Thu, 30 Oct 2025 10:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761820413; cv=none; b=NSkDwi02YxAzBQ1EOMNLohCUoBfEz5k3fluMwwnt/fctf3rZs7gtJX3bcOkjE+eXpEVX5J+OscSYTcLz503y32TsraNToL+CHyL/MOgRzvFN4IhLBwtsphGhnO7qRhH3MsSitjY0cRiuIGot1DfoQmQzZq9xShTvzmf0MPbp5mc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761820413; c=relaxed/simple; bh=4vlTcUHnlIGUCSTolMoyH6GKsNTaPDWCyxiVix+mu18=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=OqZakQV4rUCkJp5YomUBNUgIwONRCDEddOywvOiUk4ziW38I0k7vZ4u7Oo9plon9Iii8LVB2Ma58UvM98NRMgmmdEvDMgFhURqZzyT3N5RILrTdY/rzHIAq83z9pgS5meckG9hEFhmFe5iJcCWpuihLCxVOx1hn65Q/KC719Uy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Tw3cpasq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tw3cpasq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBA30C4CEF1; Thu, 30 Oct 2025 10:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761820412; bh=4vlTcUHnlIGUCSTolMoyH6GKsNTaPDWCyxiVix+mu18=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Tw3cpasqLEIBjik6KTPCMSZe3NvREh1EFnQ9RuYMkBx1FyzNNaUS0EozRXUx8JGBu mmbgSK/yxIIQGCRwmVlbjRSt0eJ5xJ1HoMQdNF8IP38xDJNzfbR7FU3zyMAy4UnbeG tj8+/P6rRxGrlGBDmUEY4QLxO6NSY4uc8LH/ivMzfXRcLltZsblFMAMNWzwMSfQI70 P2xQHZZW+6Zoch+poBjJyQ2rU5p6ESngaCutGzWoJ/ghxULWww2x1ulO0N35UcvSAo U93OANVkOT1/T23Lpm9MRtOTEJG0qgiq0gOGQ3gpB0VROIgLSxHF/q2UBhlyRBzi2W TjqKcLaS0QRUw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vEPyE-00000000wgf-1s4g; Thu, 30 Oct 2025 10:33:30 +0000 Date: Thu, 30 Oct 2025 10:33:29 +0000 Message-ID: <86v7jwvfuu.wl-maz@kernel.org> From: Marc Zyngier To: Pavan Kondeti Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Mark Rutland Subject: Re: [PATCH 1/4] ACPI: GTDT: Generate platform devices for MMIO timers In-Reply-To: <1eafe745-068b-4c15-a3d0-14e7222970fd@quicinc.com> References: <20250807160243.1970533-1-maz@kernel.org> <20250807160243.1970533-2-maz@kernel.org> <1eafe745-068b-4c15-a3d0-14e7222970fd@quicinc.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pavan.kondeti@oss.qualcomm.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 30 Oct 2025 08:10:31 +0000, Pavan Kondeti wrote: > > On Thu, Aug 07, 2025 at 05:02:40PM +0100, Marc Zyngier wrote: > > In preparation for the MMIO timer support code becoming an actual > > driver, mimic what is done for the SBSA watchdog and expose > > a synthetic device for each MMIO timer block. > > > > Signed-off-by: Marc Zyngier > > --- > > drivers/acpi/arm64/gtdt.c | 29 +++++++++++++++++++++++++---- > > 1 file changed, 25 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c > > index 70f8290b659de..fd995a1d3d248 100644 > > --- a/drivers/acpi/arm64/gtdt.c > > +++ b/drivers/acpi/arm64/gtdt.c > > @@ -388,11 +388,11 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd, > > return 0; > > } > > > > -static int __init gtdt_sbsa_gwdt_init(void) > > +static int __init gtdt_platform_timer_init(void) > > { > > void *platform_timer; > > struct acpi_table_header *table; > > - int ret, timer_count, gwdt_count = 0; > > + int ret, timer_count, gwdt_count = 0, mmio_timer_count = 0; > > > > if (acpi_disabled) > > return 0; > > @@ -414,20 +414,41 @@ static int __init gtdt_sbsa_gwdt_init(void) > > goto out_put_gtdt; > > > > for_each_platform_timer(platform_timer) { > > + ret = 0; > > + > > if (is_non_secure_watchdog(platform_timer)) { > > ret = gtdt_import_sbsa_gwdt(platform_timer, gwdt_count); > > if (ret) > > - break; > > + continue; > > gwdt_count++; > > + } else if (is_timer_block(platform_timer)) { > > + struct arch_timer_mem atm = {}; > > + struct platform_device *pdev; > > + > > + ret = gtdt_parse_timer_block(platform_timer, &atm); > > + if (ret) > > + continue; > > + > > + pdev = platform_device_register_data(NULL, "gtdt-arm-mmio-timer", > > + gwdt_count, &atm, > > + sizeof(atm)); > > Did you mean to pass `mmio_timer_count` as the `id` argument to > platform_device_register_data()? I did. Clearly a brain fart. And looking at this again, there are additional cleanups that can be applied. I'll spin something shortly. Thanks, M. -- Without deviation from the norm, progress is not possible.