From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BE73CCF9F0 for ; Thu, 30 Oct 2025 10:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=883oU2kJUTwZRjo+VbtCDPTLtHxzaR93xafwwKoRpx0=; b=C9vMLg+kPkgooxLVAfsdxffXuo bfqN3BQ6CrnwJklFJIQM2j/mDn4b/tzfajOqx8oGUFgr3HV83xY42BXomAd4Psif1dFsdX1NqRhdE t3d+sMTmMDfRrVn/Rf+OuqRHaGGbYbqMPPEA1KX71bhsLIj9yz9jea6N1JO0wdCqbpVd1/R31Xbyy MyUzr67TBh7lSZCN+ctSvT7cwDZqKjoPplFIus5KJN3p7u6FAjC7xrBAPu5FopQb/40qCXwD9oJgB qfuImMt5ms/hLEM4iN63V0iiUbyADJEE/b0/JwZHMufJPOZB3bStRs0f23D7WgubHF56xPLaoxqlg MBbmz7EA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEPyK-00000003zol-189I; Thu, 30 Oct 2025 10:33:36 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEPyI-00000003zoF-0hIS for linux-arm-kernel@lists.infradead.org; Thu, 30 Oct 2025 10:33:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 038D443391; Thu, 30 Oct 2025 10:33:33 +0000 (UTC) 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251030_033334_263290_45231E34 X-CRM114-Status: GOOD ( 25.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.