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 00B8BE95A91 for ; Mon, 9 Oct 2023 13:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=10UK4+tpOio4KlI0naaL72Equh0HW+ImtaFS4mbvFzw=; b=z0RTfJkD+H1P55 WYzpA5e5Br38GIlWg8LziKfDB5xGRBnTE+f75SO1bHJDfSzwokqQEDk1rI0ZBdWCrDuh+gR+4JFMm /a5k2ah2T0xQQKMNRt1ANq742QxGpIBxeRxTMaic9MTtHSghAxZ9KshhxdILt73sM9BO1bikMemXk BmrVG1OdQnzM5SrjqrrtlelYxETfIcStdyM4qQR0YYJqQYvxeKGZL7aJZeqGuZNE5oKQNg84S7/K4 TXLJpeR48nQCmXDFXcIqEUG+Gse8fqEHOmDphw5nDxs8vS5OoLrqmjNIdld7U/tFlifV4Yf1g5qqJ JxO0BjM6yvhoAdmY33cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qppxL-00Akzo-38; Mon, 09 Oct 2023 13:05:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qppxJ-00AkzJ-0w for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2023 13:05:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 679F71FB; Mon, 9 Oct 2023 06:06:29 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7A3A3F762; Mon, 9 Oct 2023 06:05:47 -0700 (PDT) Date: Mon, 9 Oct 2023 14:05:45 +0100 From: Sudeep Holla To: Hanjun Guo , D Scott Phillips Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lorenzo Pieralisi , "Rafael J . Wysocki" , "Rafael J . Wysocki" , Robin Murphy Subject: Re: [PATCH v2] ACPI: bus: Consolidate all arm specific initialisation into acpi_arm_init() Message-ID: <20231009130545.kpebuas3optwt2ks@bogus> References: <20230606093531.2746732-1-sudeep.holla@arm.com> <867cnzqojo.fsf@scott-ph-mail.amperecomputing.com> <00dd9623-a131-53ed-5e73-1eccd626d2d7@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <00dd9623-a131-53ed-5e73-1eccd626d2d7@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_060553_423580_11FA6B06 X-CRM114-Status: GOOD ( 26.25 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 09, 2023 at 08:29:49PM +0800, Hanjun Guo wrote: > On 2023/10/7 8:11, D Scott Phillips wrote: > > Sudeep Holla writes: > > > > > Move all of the ARM-specific initialization into one function namely > > > acpi_arm_init(), so it is not necessary to modify/update bus.c every > > > time a new piece of it is added. > > > > > > Cc: Lorenzo Pieralisi > > > Cc: Rafael J. Wysocki > > > Suggested-by: Rafael J. Wysocki > > > Reviewed-by: Robin Murphy > > > Reviewed-by: Hanjun Guo > > > Link: https://lore.kernel.org/r/CAJZ5v0iBZRZmV_oU+VurqxnVMbFN_ttqrL=cLh0sUH+=u0PYsw@mail.gmail.com > > > Signed-off-by: Sudeep Holla > > > --- > > > drivers/acpi/arm64/Makefile | 2 +- > > > drivers/acpi/arm64/agdi.c | 2 +- > > > drivers/acpi/arm64/apmt.c | 2 +- > > > drivers/acpi/arm64/init.c | 13 +++++++++++++ > > > drivers/acpi/arm64/init.h | 6 ++++++ > > > drivers/acpi/arm64/iort.c | 1 + > > > drivers/acpi/bus.c | 7 +------ > > > include/linux/acpi.h | 6 ++++++ > > > include/linux/acpi_agdi.h | 13 ------------- > > > include/linux/acpi_apmt.h | 19 ------------------- > > > include/linux/acpi_iort.h | 2 -- > > > 11 files changed, 30 insertions(+), 43 deletions(-) > > > create mode 100644 drivers/acpi/arm64/init.c > > > create mode 100644 drivers/acpi/arm64/init.h > > > delete mode 100644 include/linux/acpi_agdi.h > > > delete mode 100644 include/linux/acpi_apmt.h [...] > > > @@ -1408,7 +1405,7 @@ static int __init acpi_init(void) > > > acpi_init_ffh(); > > > > > > pci_mmcfg_late_init(); > > > - acpi_iort_init(); > > > + acpi_arm_init(); > > > acpi_viot_early_init(); > > > acpi_hest_init(); > > > acpi_ghes_init(); > > > @@ -1420,8 +1417,6 @@ static int __init acpi_init(void) > > > acpi_debugger_init(); > > > acpi_setup_sb_notify_handler(); > > > acpi_viot_init(); > > > - acpi_agdi_init(); > > > - acpi_apmt_init(); > > > > Hi Sudeep, this moves acpi_agdi_init() before acpi_ghes_init(). > > sdei initialization currently happens from ghes_init, so agdi devices > > using SDEI can no longer probe: > > > > | [ 0.515864] sdei: Failed to create event 1073741825: -5 > > | [ 0.515866] agdi agdi.0: Failed to register for SDEI event 1073741825 > > | [ 0.515867] agdi: probe of agdi.0 failed with error -5 > > | ... > > | [ 0.516022] sdei: SDEIv1.0 (0x0) detected in firmware. > Sorry for that. > How about just move acpi_arm_init() to the place of after > acpi_ghes_init()? > Yes that could work but I am not comfortable with such play around with the ordering. I don't have better alternative as well :( so I am OK with the proposal. We had all sorts of issues with initcalls in the past but I understand this one is not as bad as that, I am just cautious. > I checked the functions in acpi_arm_init(), there are no other > dependencies except sdei_init(). > Fair enough. Anyways, for now Hanjun's suggestion should work. Can either one of you write a patch and post ? Or you use want me to do that ? -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel