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 B0C65CD68ED for ; Tue, 10 Oct 2023 07:17:17 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iDZgMLwVwY/EM1tkReq2a4nhFBB6Uq67QDP90QDaoew=; b=GivdFA0lQgMHgaL313Gw+VP9fR DzE+TirxQWS87MtTEw+i3SJeot5yZ1n4RENyDgCgLcFnNQD52Pq8l3Un/osgSpk/JC2m8zcToSMJg o4XnRIRhEcCOZh+84058ef1er+3POraoIrQkVkbt/4fu2fsrq+DuoPPbW0mHX9B19jSJNZ/UA1CdU hP5e6nMHg7IUe3lU29HhgKgqm5G8n7S40bJfAhLai14Y7fAcJ+wL9wp4v3BQJzbjNGRLUYC7fbQNV bsZ+gggdOTJxJu4FYjBve/KxIjCMrz5YRRWRM5gNaBC01ni2LJMQ5d3msVh9oT5y1wjv8oIBP2oW2 9V+eZojA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq6yx-00CgRO-00; Tue, 10 Oct 2023 07:16:43 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq6yt-00CgQn-1d for linux-arm-kernel@lists.infradead.org; Tue, 10 Oct 2023 07:16:41 +0000 Received: from dggpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S4Rw36FlyzrSw2; Tue, 10 Oct 2023 15:13:55 +0800 (CST) Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 10 Oct 2023 15:16:28 +0800 Subject: Re: [PATCH v2] ACPI: bus: Consolidate all arm specific initialisation into acpi_arm_init() To: Sudeep Holla , D Scott Phillips CC: , , Lorenzo Pieralisi , "Rafael J . Wysocki" , "Rafael J . Wysocki" , Robin Murphy References: <20230606093531.2746732-1-sudeep.holla@arm.com> <867cnzqojo.fsf@scott-ph-mail.amperecomputing.com> <00dd9623-a131-53ed-5e73-1eccd626d2d7@huawei.com> <20231009130545.kpebuas3optwt2ks@bogus> From: Hanjun Guo Message-ID: Date: Tue, 10 Oct 2023 15:16:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20231009130545.kpebuas3optwt2ks@bogus> Content-Language: en-GB X-Originating-IP: [10.174.178.247] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_001639_885878_B3131708 X-CRM114-Status: GOOD ( 22.39 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2023/10/9 21:05, Sudeep Holla wrote: > 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 ? I will prepare a patch for it. Thanks Hanjun _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel