Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1464140pxb; Fri, 21 Jan 2022 19:55:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvxg4Nrn2sHjxtHik8KK1BQp61JBzLRyAy0+bUVEe359iMXK3l26cRNuKMvB5AHy7PDsRK X-Received: by 2002:a63:8bc4:: with SMTP id j187mr5055906pge.163.1642823710390; Fri, 21 Jan 2022 19:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642823710; cv=none; d=google.com; s=arc-20160816; b=bO6SGNe3C9qebXOjJdT/+DCD1QGbLm5XnfvhcGomZJeME5zJI+jdzS2WB86FgnZlir oNnuejsbbuvOAaOVayby35TpVFn7sPZasZ5uI96B1qNGTfGBOAR6p+amuWvEAh8Yesuh aC4G+dn698Wusa6AXKqj6BdO+rDK167os4EG0KTYDVwqiWl757RKMSVMVZ2CbK+uT7Hg AhSUIJonB++3k8y+nAh56kZITfxNLkC/Hy1u3xEAahctkYxeHrTTaweT2pKnmjNCQSSR /ZtCQZEgLvhxzNkrcLW8aXVyFfanISJAFWZtPRzQ3oA3Q1e3uF5/iVs4jMlgRsmTNcns f6jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=iSeiev+L7+0b7ydhZ+uKPn/qBsgFel/UZhyh9jEn9Bg=; b=fp5LwSA8HmsYtDn2nIyDN+Lf1YV2RUTe3WCmKmI8jKrQH2aVWJxKqDciJIw0ezF71B 9NdVgWW2pYlYeW4j9aB55mwNpmGL6CVuUdG5lW3jTJ0ouyMOHTE1WfghDc5OqGk34pKt 8JorHgejz1QRcqmVc8b0TrOmfCIJo7rcOH1hRDcF7ilMmReeM6/w+dsDUTzVxxKcsgfz wXU0hFOAynjWOVOPXK7oY/e06nXPCMFOjku/dqGXhb3xkth+FeHgG9uPXgnDOaC1PuXs TjsLoMW8mNJLwwGALxLU7cX7a3EW8WnzzHyEp1AQDMuSA917BLXsYQ6glKqVKp+1FcxG 0uNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uHTdVgBy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pj10si1947460pjb.125.2022.01.21.19.54.58; Fri, 21 Jan 2022 19:55:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uHTdVgBy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbiAUTqN (ORCPT + 99 others); Fri, 21 Jan 2022 14:46:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiAUTqM (ORCPT ); Fri, 21 Jan 2022 14:46:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25F67C06173B; Fri, 21 Jan 2022 11:46:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BAFB7B820D9; Fri, 21 Jan 2022 19:46:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 407D7C340E1; Fri, 21 Jan 2022 19:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642794369; bh=s8CFfVkEFgCYwCsZ61/HoZHTy/2PzVbQ2BSmTJdrEdI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=uHTdVgBy9ezeNTbMzWmnwiE6TI3L/I6fJoGLt3SRePP0x9NdGjgSkMNUVS+C7n8QY qkWdTdB85ezcr5jWrn7/T4hj+B+dvoz+VCZC9yTXSTbKsOkQC8Z20ucKjx/Im8u6q4 QWwOOSkatByCFnRPQqqYJLiiUwygpgY4zl3LB/ndV8hnPtJ5use8gf3nThTNv7CCrY Dq9GuN6EXV4+CgaeoZ4UqGd71T9tDIdXF9pQ/qWyWyZwCRWPjrwu6lDCBANIy8yV7B Dk6r369J3f01rlNvnZINN93F5fdDna0T31skPTlNyRTaNXRoTyo1PRUkAM8/5fLwQR TYAMEcskIrt3Q== Date: Fri, 21 Jan 2022 13:46:07 -0600 From: Bjorn Helgaas To: Shuai Xue Cc: rafael@kernel.org, bp@alien8.de, tony.luck@intel.com, james.morse@arm.com, lenb@kernel.org, rjw@rjwysocki.net, bhelgaas@google.com, zhangliguang@linux.alibaba.com, zhuo.song@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v6] ACPI: explicit init HEST, SDEI and GHES in apci_init Message-ID: <20220121194607.GA1146355@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4c34906a-244e-3956-0ca7-7131b268cf60@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 11:43:25AM +0800, Shuai Xue wrote: > 在 2022/1/21 AM12:22, Bjorn Helgaas 写道: > > On Thu, Jan 20, 2022 at 01:05:22PM +0800, Shuai Xue wrote: > >> From commit e147133a42cb ("ACPI / APEI: Make hest.c manage the estatus > >> memory pool") was merged, ghes_init() relies on acpi_hest_init() to manage > >> the estatus memory pool. On the other hand, ghes_init() relies on > >> sdei_init() to detect the SDEI version and (un)register events. The > >> dependencies are as follows: > >> > >> ghes_init() => acpi_hest_init() => acpi_bus_init() => acpi_init() > >> ghes_init() => sdei_init() > >> > >> HEST is not PCI-specific and initcall ordering is implicit and not > >> well-defined within a level. > >> > >> Based on above, remove acpi_hest_init() from acpi_pci_root_init() and > >> convert ghes_init() and sdei_init() from initcalls to explicit calls in the > >> following order: > >> > >> acpi_hest_init() > >> sdei_init() > >> ghes_init() > >> --- a/drivers/acpi/bus.c > >> +++ b/drivers/acpi/bus.c > >> @@ -30,6 +30,7 @@ > >> #include > >> #include > >> #include > >> +#include > > > > This "arm" looks a little out of place in this supposedly arch-generic > > code. Not really a new thing with this patch, since this #include > > already appears in drivers/acpi/apei/ghes.c. Maybe it's unavoidable. > > Yep, should we move sdei_init() into the beginning of ghes_init()? > ... > > Software Delegated Exception Interface (|SDEI|) is an Arm specification for > > Non-secure world to register handlers with firmware to receive notifications > > about system events. > > LINK: https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/components/sdei.rst > > I think SDEI is not a ACPI Specification but Arm specification so we should > not rename sdei_init() with an "acpi_" prefix. If we move sdei_init() into > ghes_init(), and rename ghes_init() to acpi_ghes_init(), then all looks > fine? What's your opinion, Bjorn? Makes sense to me, especially since drivers/acpi/apei/ghes.c already includes linux/arm_sdei.h. This is Rafael's area. Bjorn