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 74A17CD80DD for ; Tue, 10 Oct 2023 14:11: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=iVizaCYkttDi23jeojcZGwzGI2T78OOJKhu1bf9BRWQ=; b=UY1GCBylLx6Q/K ToOeMsYdItIisjQ/0DP2rWLM6sp59RyJOxKTrMs/JUi63LoT7iIOdrtu8s/fZ5tzcRmMxZpObxgMF /wHp/MH8F89yAU3ccHXvzidACc+ODcEe01R44vTrzoBCMW8Jtg3Ygi5TruoGS0HIa/M/CJlzKwK4t aEfkMzFcrkRhGJVgnQdmDqprebJzlglk4leqp2r9DS8DP0tdLaAtUNMac7cEgAKRe57EaRrGdXLQa OzUCez3rxwh1GhZCl9bbhpDRMo177H4FBIQH6BNPs7dSV0zIqMu3N5uH3i29e9IMQFBemTqupfnFs ylppJpK+4LbCzuQ6lR6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqDRv-00DWu2-18; Tue, 10 Oct 2023 14:11:03 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqDRs-00DWsr-2C for linux-arm-kernel@lists.infradead.org; Tue, 10 Oct 2023 14:11:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so55872955e9.0 for ; Tue, 10 Oct 2023 07:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696947046; x=1697551846; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9e9qPLTB7aTb33k8UbCxTMNueWeOwcIlIcYVdpYZ3cI=; b=iJq5vH+D/KaDDVOYidHgJIbhR7Jeh6HOMIJj1w4acig52CZpe8wVr4o9l6FpVYWz3q NW+1wmzSMkVsKEDyI6uzPZuvHLihdFApDufj7ti6Rvbq+FmXDP9H6z1YOURK4wU2N1R0 e4F9ldZLaNFTcqF1LwHaZyA0egNLHf+perBdc6eztDDpIG/TslpAwobUMzqlvf6EBCeY jOxmSdZLdcbyIh3S4HX6z7TEFmxIdbcqkVP/2Km+3XSuXyFnkIxuhiA/w4vF20KH97+Y qaGhYqjZfrxv6uvf2hUrWggbTvVEuMaUiAYV6WV/K70lrtd3amJ4qSmQL5poOyBgiJoq kYrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696947046; x=1697551846; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9e9qPLTB7aTb33k8UbCxTMNueWeOwcIlIcYVdpYZ3cI=; b=pixU1uaSS3eGaYQzWAIv8zm0KQ+gffzE8xNFkifQ6tC1vAmAQN9GmDiieS4rd8ejUW ZhxqKNJll84TjTo4k94JFoQSzply2AgzsLOQqFNjlvPocRfTIsjQfjrofCttBxb6u/Ck gF6XQjJGe6wDI1CPOnOunAIzEQg0IPZmWEJGPAdZtEPlRVCKjC370f8IMBTuFqlkveXU pbkK3pLYXTbSKG0v+/fMOao6jmQcJySydHUGeraLQrL9rhvCC6jyqSdpCwzt4Aj/wM4u ULtZUXSHQBIMymaeXVzolnUwtfk6fAw+jj6lKSDNp1kwrtFH75FVsUy3J9x0/q1/Dw4h /gUA== X-Gm-Message-State: AOJu0YzE7H/nBxvoTkWRWdgpwWpbkjotqAIv57RAwFeuG1V9IJh7ef9d tGUr+SOAluT5PxUg9rWk+rrVnA== X-Google-Smtp-Source: AGHT+IF64TnPs4jd+aNGnYlkrrYVkn+PA9w557txyTj+b9RkiQXDiaHv59LSHcuO7lnyVAUeR6HMwA== X-Received: by 2002:a05:600c:1c10:b0:407:5adc:4497 with SMTP id j16-20020a05600c1c1000b004075adc4497mr785100wms.9.1696947046314; Tue, 10 Oct 2023 07:10:46 -0700 (PDT) Received: from myrica ([2a02:c7c:7290:b00:fd32:2b31:6755:400c]) by smtp.gmail.com with ESMTPSA id p20-20020a1c7414000000b0040651505684sm14275256wmc.29.2023.10.10.07.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:10:45 -0700 (PDT) Date: Tue, 10 Oct 2023 15:10:52 +0100 From: Jean-Philippe Brucker To: Robin Murphy Cc: Sudeep Holla , Hanjun Guo , Lorenzo Pieralisi , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, D Scott Phillips Subject: Re: [PATCH] ACPI: bus: Move acpi_arm_init() to the place of after acpi_ghes_init() Message-ID: <20231010141052.GB2902909@myrica> References: <20231010082123.4167603-1-guohanjun@huawei.com> <20231010085012.qkntexfsph333sif@bogus> <717a0880-1bc4-461f-bd42-c522d653b3ea@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <717a0880-1bc4-461f-bd42-c522d653b3ea@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_071100_744675_72B6AA29 X-CRM114-Status: GOOD ( 33.97 ) 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 Tue, Oct 10, 2023 at 10:30:56AM +0100, Robin Murphy wrote: > On 2023-10-10 09:50, Sudeep Holla wrote: > > On Tue, Oct 10, 2023 at 04:21:23PM +0800, Hanjun Guo wrote: > > > acpi_agdi_init() in acpi_arm_init() will register a SDEI event, so > > > it needs the SDEI subsystem to be initialized (which is done in > > > acpi_ghes_init()) before the AGDI driver probing. > > > > > > In commit fcea0ccf4fd7 ("ACPI: bus: Consolidate all arm specific > > > initialisation into acpi_arm_init()"), the acpi_agdi_init() was > > > called before acpi_ghes_init() and it causes following failure: > > > > > > | [ 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. > > > > > > Fix it by moving acpi_arm_init() to the place of after > > > acpi_ghes_init(). > > > > > > Fixes: fcea0ccf4fd7 ("ACPI: bus: Consolidate all arm specific initialisation into acpi_arm_init()") > > > Reported-by: D Scott Phillips > > > Signed-off-by: Hanjun Guo > > > --- > > > > > > I did a test on a ARM server and I didn't see regressions, but > > > I don't have a AGDI table firmware, so Scott please give a > > > test to see if it fixes your issue. > > > > > > drivers/acpi/bus.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c > > > index f41dda2d3493..a4aa53b7e2bb 100644 > > > --- a/drivers/acpi/bus.c > > > +++ b/drivers/acpi/bus.c > > > @@ -1410,10 +1410,10 @@ static int __init acpi_init(void) > > > acpi_init_ffh(); > > > > > > pci_mmcfg_late_init(); > > > - acpi_arm_init(); > > > acpi_viot_early_init(); > > > acpi_hest_init(); > > > acpi_ghes_init(); > > > + acpi_arm_init(); > > > > I am fine with the change, but just wanted to check with Robin/Jean-Philippe > > if there are any dependency on IORT initialisation for VIOT ? IIUC IORT was > > always initialised before VIOT but that changes after this change. > > They should be independent, and typically we'd only expect to see one or the > other anyway (although strictly a VMM *could* provide virtio-iommu for some > devices while also emulating an SMMU for others if it really really wanted > to). IORT also describes the GIC ITS topology, so QEMU (and likely cloud-hypervisor) do present both tables to a guest. But I don't think the order matters in any case, and QEMU still boots fine with this patch. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel