From patchwork Wed Mar 9 02:07:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12774659 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 871E6C433EF for ; Wed, 9 Mar 2022 02:09:47 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gg9JBQMgCNqQEuFK1+2x9EBFuaWPKGPF/oegriruBEk=; b=HbU/582uC0jQ2u 8xEU3QPhjo7gy+xJEjbxQ5PdK/rwR6bDYnWKNfaWk0B0m6zTuoTE3y/6Pu+CIr8niPH6rEVWg4cG6 LtUIdSiYLXLMx++k6BYcmhesQ9I2zX8R7GibP1K0gVBAQ7ecEx1ie0F+SgAD0H5C8AjSU/8y/JJW6 W/xpOK9yacEr2KDVj4IeoIkm8+n4TEx+U5N9VqNKprxy1X2EYrmxA4tb2ZF9QLJCqaYRtkoP/cPfL iu+xticr9GNeiDwYz9fvpdC4x2r/U5OGlbwImZMYncwtWb9ZMGU3kFvND49yktZ2E6exKIkD4Muqz yIXH8Q2+/ikmnmOUIU7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRlkf-006t92-2j; Wed, 09 Mar 2022 02:08:33 +0000 Received: from mail-dm6nam12on20714.outbound.protection.outlook.com ([2a01:111:f400:fe59::714] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRlkX-006t7r-Nc for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 02:08:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ilb3yPaEy6chdDrqJJPkqEFpP5jX8YTw7N3cNuuuZ8g+b8cykE1X6gYBHxsuRkuRMH1EWnTzBlI9ZmlQkYhP/947v1qaq4j9s0RHNQUeF1XAUUx2vXTZC2srZ02iTCZKipC/EK1NqFnWn8S2HFgSkUwd4Q08Hg9mASB3RRC16RxSi/22+ZM/AP8CibiPJoLIYU7SfUBxIUnYbjAqzsccqu6TXD9QLIndNgmxpUrs8Z3vu95FrSkPIq85v1LYpUwMge1ddQz5ioPKsZ9inBboP+Lx2ogGP7vJBG7Tz6GvN89fLI/GOERPflcsWdYJNBKOY6HtMt/kk1EoeUu8ItU2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O/pNR25m76J3ou5e/I866l8x3mpHuJyr6k15clz2jZE=; b=mzo/afNq0DXN39vGdR0Cl7fTZuaW8aZWL3xzm3Ep7jouiGjwH2XiS81526ITE32qW5GziBU0eVX9IrvDnSs8Nr2E0+UTyJjlxmuisxGHmXCzwP7K3lCfc4UZCUEvi8nM7xV5mMf4bKCSW4Xe5Q7Wg80Odk0wireNhlvtfVVUmxOIXAH0ZxAu6eK2V77NnLkibXNGLC8U3y1PZAoGou/ubrQi3jPVpnwildblmGXtdEaUgaQw+pU5XDDY55JKFFiQJbRiKzxIDP1HTleBqMy5LnWvWnTzQ0/jD8j3eQWzR1Wv67/KQXaO09a5gKxsY//czPm9kGopEbfI6YrjuQNqhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O/pNR25m76J3ou5e/I866l8x3mpHuJyr6k15clz2jZE=; b=kbgUXEBHoIKauT9N17qPPewaLVC8yFnV2X+sz7XhCahskbQf1XaWvdmYVGEUcBDq1glAC6BiZDhAihSdgapao9W9DJZMudg716kq/sACe4FGhy47H1xWBZ77it1MV2ed/RU94TTuY4l+pebo5LQro9aqfjZ6KhzEODgj2B0HTtg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by SN6PR01MB4288.prod.exchangelabs.com (2603:10b6:805:af::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.17; Wed, 9 Mar 2022 02:08:21 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243%4]) with mapi id 15.20.5038.017; Wed, 9 Mar 2022 02:08:21 +0000 From: Ilkka Koskinen To: lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org, linux@armlinux.org.uk Cc: lenb@kernel.org, robert.moore@intel.com, james.morse@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com, scott@os.amperecomputing.com, darren@os.amperecomputing.com Subject: [PATCH v6 1/2] ACPI: tables: Add AGDI to the list of known table signatures Date: Tue, 8 Mar 2022 18:07:49 -0800 Message-Id: <20220309020750.65399-2-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220309020750.65399-1-ilkka@os.amperecomputing.com> References: <20220309020750.65399-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH0PR03CA0423.namprd03.prod.outlook.com (2603:10b6:610:10e::6) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0a09ad5-1188-4e6c-fa80-08da0171af01 X-MS-TrafficTypeDiagnostic: SN6PR01MB4288:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DYF5WABay46v2UziBnNndC3Wfq2zxykvYxkPw5O5Ec3R+h6V8mjFeNWCm4SLBcoauvgGj8pJVK5Hex6q+6qh1hv/+XfbvlXPTOFzcDUx2R0MgmpcG78Dx9mi6PLDOKwRwxSk1G3nxZ5LuVc3rgjXQ+wI4DICfbyA/pxFviLkDGZ0+k3M00ya4iykz2UFALIvhBKaBCko8zP+TLPyWPPXhWD+FrYHnJ4diY58K1Pkc7+xpcVGvyQ0sUytvWMEcGoSZOU8SCKgs2nSGvV9ouu2CABdTshYnqTqZL82QrVaamVbaXopm9g/TXfKzT9nEcaLztyqJqiFbDJPpacEvx1ti4d77kGN2wdHK1gR2EQtSMFI19ZsML7Vd2Obnz3jaSYlZTHv7kylIiNrlQYzmIiynyeOzbi5ZUgaYxmKO0PQLgfh01de/JJE0eRhqR5Z6xV0R6rwhN33dlDVew1SSeoTq0XxP3htJG18877RclKkVtEi2pncciv79032c4hDFoXADBA/RXP25k40GSXM0IKsJkEQkmtyJNUKsZVf+1PWWSP+/iTvUks7hT1YBWwsps6/u/yyJne6kBAYzlMSzdewvRnPcsKPXhmPtdnI3zFvu6noYyRAYLQR0U+wYMVrqCrzqWGlf0jqsIq/ud2Zxm+SivcWC/zOqY0uIBo1+Bs2I+yWsYo0i+2PUZO2JuRSOWhf0UdDQVxswoue9AOx10KEzw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR0102MB3590.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66946007)(316002)(86362001)(66556008)(66476007)(6666004)(4326008)(5660300002)(83380400001)(8676002)(6486002)(38350700002)(26005)(1076003)(2616005)(186003)(7416002)(8936002)(38100700002)(4744005)(107886003)(52116002)(6506007)(508600001)(6512007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iuoZFZBv/DUQedeNchK9s4NbvcDHp3I4WvnH4WegHTksMAcXnIbpb3S/DJCFdW9X9L7rbw7iJW2Fx1UWCirLtOmlZumHhr9mbtJ9WS0PgLav59n/RYytHHsIVnEQ3dLZqgPHHZ4Cfrxr2J+ARc0TQC2tK9wmDr21v0vX/jnWo+T4+a1OduIYuAdUEnHb40cYDE+z7mPr2uXWqzCTNSRiejeN5wL8iIl2wOsFA4eUuI20T7V8+4zA3sI0xGCVyiMV4lA/2JmyoNLbTgzkjII9K/I40dMYQ/kBmnYZwXElO2JrN3aN7Hq++dKzb5nHB0UzOWkesptYfCDI1jy/MtUeri9u2gM7Gj3TuiWmk00Ypydyz75RSJ1wALIuH8PjKRSOyyS9sUoC25NKRGbXui9jMSxIqikpKXAQiXMtztJwRcQvZ3+sEvamMUz+NnjdwRxdIXAP2PqVogAgQe7bSuMFl5jvxDRV05+ztlTEEl1/SMoWgUyh8MVS4GJoaMjlw1tKBAXm7f78CFeWlS2tI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qwyHWR7EvLZeSmkusVd7n98zlEauGvrKcIhSbY5xbWyHHa7DWTPJZ3ko5CK1ls+BPTn+Hj/3gcT3TG+/Ye/HdkiLFrTDDg6DVZ8eYHjMcWhgtMZh6xn27M3GjCxNsddb8Dn8gPj1AA== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0a09ad5-1188-4e6c-fa80-08da0171af01 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2022 02:08:20.9639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6yHYlOAJOls8TJh6hKstU9+nJZvHY72Wvt5iDQ0uZc5JiyRqVBIsO/OrKV6etMePfCd/suQG6b8ekGyNXkBdXBVwyCrTkOmxQ0w6bMcsOT1AcDkkeXO+VufVB8ePFNat X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR01MB4288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_180825_800898_7844CD81 X-CRM114-Status: GOOD ( 10.59 ) 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 Add AGDI to the list of known ACPI table signatures to allow the kernel to recognize it when upgrading tables via initrd. Signed-off-by: Ilkka Koskinen Reviewed-by: Russell King (Oracle) --- drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 369eb998c3d1..ceee808f7f2a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -545,7 +545,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = { ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT, ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT, - ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT }; + ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI }; #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header) From patchwork Wed Mar 9 02:07:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12774660 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 7B842C433EF for ; Wed, 9 Mar 2022 02:10:03 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xlGF3xQbzf3L+y4YllWSu4ZLiGCNLU0RND6FNaget9Y=; b=NbsMid4hDLcxvT eT2mQAmzEucflouQergmTq50BZjbvw0UP/jrys8n/Znrkfuzx7nxOtB0GsIVfJE4K1cqbefwq83v7 +oeO4KNThrdo3X9Fchcrv08wekJ4LMxMK1DFwXm3SllrM+7KcAlj92I14GYO2UmzA+dVxBWr92IZc iqPa1YMgluv5Rn9UAVoYzoX773dmTubv1G0fb5XRjrTZeBt8aH0DjfY31e9HMz7SUqy/kkojm0+W9 7Ag9FRkDuJVtqBjV4TOfbVOTWb4KaO8vTiLrKeS/evlrZxci3lnRXkhfNI5vFPRHj6xVeymUhymHR GnWCEdv7KHMnOEaZENXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRlkq-006tBs-Ao; Wed, 09 Mar 2022 02:08:44 +0000 Received: from mail-dm6nam12on20719.outbound.protection.outlook.com ([2a01:111:f400:fe59::719] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRlkc-006t8a-Um for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 02:08:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HG5JClYVJK51ttrLE/ADQbB5MzOv3/Ja1QYWTOuY6guMZf/BB8rBznl305ez328DsYjOcIuF0XVwSWyr4Fn9h4SE+EGfTNH+NsK1vLo+aDr0pI4P/Bwje2zvcVBXaqw1z7xUSxGVYbf0D2z7W7RKZUSYDIBmxHU8VtlEj58uMhCXFVHZtcoqeziSDBvQ7nVkmiuXbQqTOQ99boT+YgwgURcuINiTSBGsODwG24TZNLvBaLJvYYVGVd+MlJnlSCHzzA/C9kakepTjrnq5KH5yVQAO8f7aC/1fFmzsJE7dNZWft4NP6Kodea/myOg/G2y6pbgvgQiI8fII+mZDF2JGMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KSIG8xyyG+EsYuBd/Yx9mjvz8c9I9RBO94R5frPgdEI=; b=Q5Pv1wY7TuXPDK64akBXHm6BaHAAi1tq3jHygHnL55NDE7XMhSoyGr5qe9qEm/aVryQa1whzpmvXYdlp+rr8G7lrmShCiSSjNuRLXco1R90i+7qmQjxsedWVRd6jrO6Ic4cxiTZBxXEHH1kXJrR7jmtPL1Otrgrh3SipyDhJiu9a68d/ssc8GrpkNO9rmnbCRL1UbkW/Mc2VC6x7ygI/YsJhV7USQCf7pDbADNQ3al/1xMuFvd2KCF7wCq8C4hEkd+zV40DjKXvnLfOnsHr/oJutvlmwqfRCNlNFbbEbAdCkEVawZLXkTFtc5TTargx0F3yKxWeMPpZ4xmWTU//ErQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KSIG8xyyG+EsYuBd/Yx9mjvz8c9I9RBO94R5frPgdEI=; b=LJqF/+EIdRie9o0W4RTK0E6CSVyEPIvFcdFxD+3iFoaddj/dlwhuKpIGaAfyJVUh3m2RAIQsK+PzjE8Pt2geNZmtl19sEiXfJTxeB845+18g4O6wibn641GztfG3MXK/Z0yNnfThUG86l5HYWCpGrT7eqr4VphKeGLUmuBQo5MM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by SN6PR01MB4288.prod.exchangelabs.com (2603:10b6:805:af::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.17; Wed, 9 Mar 2022 02:08:27 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::181b:1522:26bc:c243%4]) with mapi id 15.20.5038.017; Wed, 9 Mar 2022 02:08:27 +0000 From: Ilkka Koskinen To: lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rafael@kernel.org, linux@armlinux.org.uk Cc: lenb@kernel.org, robert.moore@intel.com, james.morse@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com, scott@os.amperecomputing.com, darren@os.amperecomputing.com Subject: [PATCH v6 2/2] ACPI: AGDI: Add driver for Arm Generic Diagnostic Dump and Reset device Date: Tue, 8 Mar 2022 18:07:50 -0800 Message-Id: <20220309020750.65399-3-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220309020750.65399-1-ilkka@os.amperecomputing.com> References: <20220309020750.65399-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CH0PR03CA0423.namprd03.prod.outlook.com (2603:10b6:610:10e::6) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 398f6a29-7c67-491d-83e2-08da0171b2c7 X-MS-TrafficTypeDiagnostic: SN6PR01MB4288:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hpqksOmwqGzoL2y5FE4hVullZd23sDUpz3amesXv1lqwAD+xBsWZ2O5J54owji2ImHrC2EEPh7pfmLVJIck1tlWejPokibCDPSVbPDxWZHX9WzwRjjBLbtJAkMDVRGuERrbyyD81+8eOGy5v4hJ53c6pc9DaimjlwQdM6OHBfkRl1PvvFKtrlT1jmG5pSIa5167yEcL9aRoiw6O38R2qtDLphg+A1vqNDoVhs0S8IV3Z9X8qs1V6KF/ThuqvOGjfbvnc9Ye/JEmcG5f8+jV797hrCU0rw3xRVeePLUvgd+N1M+3L18gQIQnPlDanDviELAdsSIbCrbBA9/Sp0/EVE4afOx9q54LtNSUuUfelqrtTdMJjQpH2IW4ElrjkFmSl8sNxm7bZ2HMp684BvMBTyhcRmj9wDFbUXQEMFzIA4z8U87mJji6+44QWNjWqM7l/2aXGtTeH2wktEdWL89fS5bcYw4IGbo9yAF3xww2OQJ0HCSfjYlapsXtgFJ8QvFtzVhIC8/892xLWHFfMyc5Y/oO+AR8RIjKVKpDGzP9sZjCMFtX7TNZAOmRhbHRcKKad4QUVdl0Xutwj5M6lctwiaG5ZxRp0bCQ8GTAJqlIdDafONrax9abCw9JqdpU51vsVConQ+5tK3PwYSNRmqiLc7FqsqIo4MeRGKmeMNIa2s4FJ0jZtdf+2a+rmFzK94ozG5j2u3enWUDS8LoBt24TIM/ZJJEZPgg3tNzdVDg38wukLlUlHO4Mqm7ivKBxNxNsNIBex3SfI6YyTc7sflVhBSIMUR6LcwOS3bDeI8uFdcuVB7oCvCDz1Ln+AM4gCoj19 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR0102MB3590.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66946007)(316002)(86362001)(66556008)(66476007)(6666004)(4326008)(5660300002)(966005)(83380400001)(8676002)(6486002)(38350700002)(26005)(1076003)(2616005)(186003)(7416002)(8936002)(38100700002)(107886003)(52116002)(6506007)(508600001)(6512007)(2906002)(41533002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-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/H9jsuPGNF9Ww0ZKf3qkUL3YyyFoUW0YjsED3K8vr2chhJFXOuCl1EbOtuBPfc//tKMBpaRhNgN9zFwhhMVJwNyzNSvS0S+BtoqsN3OQZJm2GsSuEBQiZmYyooGGFQlfiAoIx8BAn5+DjZS9M7mwblAh46Gucy2vst51bpC02/KXQUUk9pzUruACrlFvxdrpPyH7+dKnyYJL8mPG6dloiWQAsei/cvSNKiRc6kyaxP8c3ojKmSCSOfE+XKH7NBCIMj9zP3FVUMoD8JdEK6bdvP+UJ+StfbgPAzFP0jseBAWiOsYdx+1VTFuFRN8UZAP30po/0Ykp5CHAL3dF+rwFQFr6Myl+Ovm3kTn6J4IgAANouE02w34nACf9mg79CN1/b8ht36hrJ/4OX73eVi0VgL8vINN2sn/QVymYzklbfwvCI6r0ODq+AWMTQp4IVXxO0Z3g5QZAG4ngZfdwTXhDf7tLjhT1qAo/9NkjcA1j2r4u8iX+iIt+vzi6O5vFRW6RkB68Tr6++Y0RxQHK5ty0Q4UXucwBaZnPS/NHYIFTadWjwikXKQe4Nknp7N6MP69GqXhRu5uoRHa+BcZ2ImU9929QlATj8HtBGbpppZUvC0ioFe1KsBBZzq7hj7Ff0iUqqexPXtigk40UavnTsKaLQciU21qaO5kFrgPT7QK6mIYIBcBwHmseyUrDCM1i/xQ== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 398f6a29-7c67-491d-83e2-08da0171b2c7 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2022 02:08:27.2604 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xV/BFOr//P0o2ppSgdJY6+gExUM+PonXbuetTT87AsZm55glJAEWR3VWi95Op18OtsK1fMB+VvbP4Ga6a0MPHukyf9dqGxiF/UfemZQsvKCFv9midNQmiPQkWMy3lExv X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR01MB4288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_180831_023605_50B8418D X-CRM114-Status: GOOD ( 23.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ACPI for Arm Components 1.1 Platform Design Document v1.1 [0] specifices Arm Generic Diagnostic Device Interface (AGDI). It allows an admin to issue diagnostic dump and reset via an SDEI event or an interrupt. This patch implements SDEI path. [0] https://developer.arm.com/documentation/den0093/latest/ Signed-off-by: Ilkka Koskinen Reviewed-by: Russell King (Oracle) Acked-by: Lorenzo Pieralisi --- drivers/acpi/arm64/Kconfig | 10 ++++ drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/agdi.c | 116 ++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 + include/linux/acpi_agdi.h | 13 ++++ 5 files changed, 142 insertions(+) create mode 100644 drivers/acpi/arm64/agdi.c create mode 100644 include/linux/acpi_agdi.h diff --git a/drivers/acpi/arm64/Kconfig b/drivers/acpi/arm64/Kconfig index 6dba187f4f2e..d4a72835f328 100644 --- a/drivers/acpi/arm64/Kconfig +++ b/drivers/acpi/arm64/Kconfig @@ -8,3 +8,13 @@ config ACPI_IORT config ACPI_GTDT bool + +config ACPI_AGDI + bool "Arm Generic Diagnostic Dump and Reset Device Interface" + depends on ARM_SDE_INTERFACE + help + Arm Generic Diagnostic Dump and Reset Device Interface (AGDI) is + a standard that enables issuing a non-maskable diagnostic dump and + reset command. + + If set, the kernel parses AGDI table and listens for the command. diff --git a/drivers/acpi/arm64/Makefile b/drivers/acpi/arm64/Makefile index 66acbe77f46e..7b9e4045659d 100644 --- a/drivers/acpi/arm64/Makefile +++ b/drivers/acpi/arm64/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_ACPI_AGDI) += agdi.o obj-$(CONFIG_ACPI_IORT) += iort.o obj-$(CONFIG_ACPI_GTDT) += gtdt.o obj-y += dma.o diff --git a/drivers/acpi/arm64/agdi.c b/drivers/acpi/arm64/agdi.c new file mode 100644 index 000000000000..4df337d545b7 --- /dev/null +++ b/drivers/acpi/arm64/agdi.c @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * This file implements handling of + * Arm Generic Diagnostic Dump and Reset Interface table (AGDI) + * + * Copyright (c) 2022, Ampere Computing LLC + */ + +#define pr_fmt(fmt) "ACPI: AGDI: " fmt + +#include +#include +#include +#include +#include + +struct agdi_data { + int sdei_event; +}; + +static int agdi_sdei_handler(u32 sdei_event, struct pt_regs *regs, void *arg) +{ + nmi_panic(regs, "Arm Generic Diagnostic Dump and Reset SDEI event issued"); + return 0; +} + +static int agdi_sdei_probe(struct platform_device *pdev, + struct agdi_data *adata) +{ + int err; + + err = sdei_event_register(adata->sdei_event, agdi_sdei_handler, pdev); + if (err) { + dev_err(&pdev->dev, "Failed to register for SDEI event %d", + adata->sdei_event); + return err; + } + + err = sdei_event_enable(adata->sdei_event); + if (err) { + sdei_event_unregister(adata->sdei_event); + dev_err(&pdev->dev, "Failed to enable event %d\n", + adata->sdei_event); + return err; + } + + return 0; +} + +static int agdi_probe(struct platform_device *pdev) +{ + struct agdi_data *adata = dev_get_platdata(&pdev->dev); + + if (!adata) + return -EINVAL; + + return agdi_sdei_probe(pdev, adata); +} + +static int agdi_remove(struct platform_device *pdev) +{ + struct agdi_data *adata = dev_get_platdata(&pdev->dev); + int err, i; + + err = sdei_event_disable(adata->sdei_event); + if (err) + return err; + + for (i = 0; i < 3; i++) { + err = sdei_event_unregister(adata->sdei_event); + if (err != -EINPROGRESS) + break; + + schedule(); + } + + return err; +} + +static struct platform_driver agdi_driver = { + .driver = { + .name = "agdi", + }, + .probe = agdi_probe, + .remove = agdi_remove, +}; + +void __init acpi_agdi_init(void) +{ + struct acpi_table_agdi *agdi_table; + struct agdi_data pdata; + struct platform_device *pdev; + acpi_status status; + + status = acpi_get_table(ACPI_SIG_AGDI, 0, + (struct acpi_table_header **) &agdi_table); + if (ACPI_FAILURE(status)) + return; + + if (agdi_table->flags & ACPI_AGDI_SIGNALING_MODE) { + pr_warn("Interrupt signaling is not supported"); + goto err_put_table; + } + + pdata.sdei_event = agdi_table->sdei_event; + + pdev = platform_device_register_data(NULL, "agdi", 0, &pdata, sizeof(pdata)); + if (IS_ERR(pdev)) + goto err_put_table; + + if (platform_driver_register(&agdi_driver)) + platform_device_unregister(pdev); + +err_put_table: + acpi_put_table((struct acpi_table_header *)agdi_table); +} diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index eaa511fc9c66..87b93f4df0cf 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -26,6 +26,7 @@ #include #include #endif +#include #include #include #include @@ -1386,6 +1387,7 @@ static int __init acpi_init(void) acpi_debugger_init(); acpi_setup_sb_notify_handler(); acpi_viot_init(); + acpi_agdi_init(); return 0; } diff --git a/include/linux/acpi_agdi.h b/include/linux/acpi_agdi.h new file mode 100644 index 000000000000..f477f0b452fa --- /dev/null +++ b/include/linux/acpi_agdi.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ACPI_AGDI_H__ +#define __ACPI_AGDI_H__ + +#include + +#ifdef CONFIG_ACPI_AGDI +void __init acpi_agdi_init(void); +#else +static inline void acpi_agdi_init(void) {} +#endif +#endif /* __ACPI_AGDI_H__ */