From patchwork Tue Feb 15 03:55:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12746485 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 D79B1C433EF for ; Tue, 15 Feb 2022 03:58:13 +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: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:In-Reply-To:References: List-Owner; bh=u+nm4PSa9CEHsT4LJWg/IyylLlzK8+dZGATP0bIOmu8=; b=IFd5swFKbaj6hy BjgApYqFcm/dAY+LRHOnlG3+4hvLYx3uwsHFrgQOYVQWDRiigODhtPIxkdu2EzSVzKHd0tQ1Loyf4 Q3KDQpuDRk5OicWVUJ8C+JJE5yNed6wV98A0TeCCbT9yZdirg10mtuVNxu2i3O0WTyKGv08KD2KxG PEGPjItAurkGnPWsJqLaVLL/50vZbkfrWDjepiANpnJ2839zEqAyf/x8oz7gIji4eZizw9a/G4s2n u8fFcb5cxHuc6L9ePdFgNkksf/q9rg8z1A4rs+P9WbFc3CUpz1nTj/A7GFjMOTGdesTKC6QlkVRli 3EU6M1rxB5IF/1co7W5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJoxA-0007LW-LM; Tue, 15 Feb 2022 03:56:37 +0000 Received: from mail-dm6nam10on20713.outbound.protection.outlook.com ([2a01:111:f400:7e88::713] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJox6-0007KG-6K for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 03:56:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KO6CuQp8kXbSrUbFTfIq5/xT2NvbHyY6Hl4AEAKctbjBmZaGn7VJMZ9Sqpkd6MEWRnCw8TpJN2Eb9RnTP6NGQAkPwSCRdqw3CVZ45itQcpiwIVEsLygfyt/yYyEJvfyaJTSu1w8gPU+EFX7Lj9IKhzfPe0htiCBL89EzeKeoE5YhlM/wRpBYR7EEr4lpnxMXmx23i5XcX/Ua9uQ6G4EbVX79DboGjfz69Cn8m42vtin8BZLZj+lJBRR6EpieXeqhpuCPnd+F8rGLMjmLG7wD6ralf7/Ri+MahcaIVw4wm2E+uf70+iGRzABwS12Aiy7ZpRdwhAaEdGFFNeHVWydxbg== 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=YVInIhwsscueiXSpjbEosuxAawEoAtAVlvTLj+e1fwQ=; b=lliu+ImmM5h32zu7tox2pLsmlmKM90mZOElT3N1U8J6A0+d5VHMpn+ov4HvDJjhrGhetYsWQ6885FbTzf4vDLejofduHK7TZbfdVFh5NeLfdl+ezi7l4QWmM2k/4M5Ktum9zVMdYtVU+pVllvfZuQDJQR+5KlmPMLN5DS2/ajoGDDbtbSf/h5VEtM+0xU1y50HJcecA8Shftb5PsT9wg/OFVv9ONCi7i0i9ewY+Y/7xb0NvO2HpPaCr5ahSdzplT8ZuDnQtEza12isVaB/b8fO64Malvnmx5i4HgjIkVZk8GluVlzetHEiqv8pi4kqPzaDM5VyjIIluDQljhMcl3Xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=YVInIhwsscueiXSpjbEosuxAawEoAtAVlvTLj+e1fwQ=; b=bEy7bysdCX6tP7Rbow/TpSDwc91av9ttmPm0kfzrQvCZQXKY7wwszNRAhfgJIlSILr8PSZlSxhLYIxva08nSfL2myekJzjawGT1pKSlqWt90wVVOvrinLirswuCJynZHKegMVf2n7S1LZFWKHX80cAssVKIJ4eAunHemk+/ut/k= 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 CO6PR01MB7500.prod.exchangelabs.com (2603:10b6:303:147::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Tue, 15 Feb 2022 03:56:25 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::e085:6acb:773c:c3e7]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::e085:6acb:773c:c3e7%3]) with mapi id 15.20.4975.018; Tue, 15 Feb 2022 03:56:25 +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, 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, james.morse@arm.com Subject: [PATCH v5 0/2] ACPI: Arm Generic Diagnostic Dump and Reset device Date: Mon, 14 Feb 2022 19:55:51 -0800 Message-Id: <20220215035553.102315-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: CH2PR05CA0061.namprd05.prod.outlook.com (2603:10b6:610:38::38) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69dc72d0-9d60-443c-a3d0-08d9f0372319 X-MS-TrafficTypeDiagnostic: CO6PR01MB7500:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aO1Cp3X7ZVP5G5g/UgtrjlDG3iRKgqn1r5tRONrjzgRkULmFNyVrgDiJ3lolCwPJVVcu5FDn03UXJmMzGV2R1yIjSZOoRYxi/TEhKgJBXvkxLdMg5iEiVzPIQJRQna5mgxWKLBgacdETr5XHwvDnjfEe6FubizFC/MUcsbHNkyR0BHu/lp0iVBxHRGkzVZtZOjnuYj0jPLwYvqsECitn5eOUNa/y8PedzAchSaglUut4zzLNlzQGFzd8Q7tLevD0wC2eDO79sCYiEh5LKue5//jARYT6HIqd+5JLq6LJ5dh2GABk/XSoRs8AAc5dgjS3IzHuhyqUPuusl4DLo64JpvTmeZQSFLvQRS1Rz43+ka/DiM09rQo4rMQCrKZGZWPZxhX1MqSBLOQpc9M1nkrqpj0NA4nmLtLVghT0KAKWq9MfszAzN7XXzZz6YUSqICV0xjnch0lo36E69PmFJi/1bYOA6Gep/ZAGGKpu5krOBbna+6ynChV/woZZ/jmTURYNR7dh7pJ3PkLrnIswvK1vdRZqxF/AGvXtTG0Lt2BNJRbejNk9ED/1/sVLWQc+Yb5B48/bQ8Up3fVidTlSLh9/UxEzY3gfY2Z+SIhBNSNaisUVB9wqg78ZDhVHd8gq9U5Kb+y6khr4gmKLZDpjHR+51SVW2sR9JJYFZg1SIS5U/CoWHD9kNaLPzwzJg7M/xuHkPkxKyWUr82FCDZ6lMcWYlcP9bbpAO4VwhDQdDrVH+njv4XmNA7NPvoj2GF1E+cJ/0b9n/oEA5RgIoTpjEbxyYuxOn/b8vs7RHd1dt6D1GdH/WrUJRpA4lLByy2FFoe8S 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)(26005)(8676002)(66946007)(4326008)(66556008)(66476007)(2616005)(316002)(1076003)(2906002)(38350700002)(38100700002)(86362001)(6512007)(5660300002)(7416002)(83380400001)(8936002)(6666004)(6486002)(508600001)(6506007)(966005)(186003)(52116002)(41533002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 11/rG5jueeYdPwa1XXPoHY3tRT0PbpXNlAhE4uaLJyeYghGPddCV3zPbc+yCZNR/lehg9BcKgkRJKHTgHAZVRiEHbv9aRdp1EC/bA2PYukgjo7L8Xgjxsutb3NJtohnPGe/IG8rB0LQGSfVfRIPfy9w9IEXADIP16eo2PgMP7QNEGqofhos+457WdxHvHAXNRKBaPthgI1qwbRpudvA5cFWVOAdR+PiyxK0c0GHsNueY47OabZBPHgSOqoB0EbqF5SL7UNIL/sLxKZZA5MukWXeZFa947nNsnx2NwEZFe2W1UFnppQMvPawkfoA89RFxFhLHKZYiTu/codB2L6BrXUa1YYrzRihpBhs/KSs312Ch3H3KGJ6MQn5MBhk2irCTfMrk8wBXfx/knnlgIUcl6GdthL4lp4sG9d5Q+XtdN7g2BAGjb+dZLm8EzQVq2+KI2gC2Ezld5Nh+GShQyQRV5xUM3Ns3bAiobTM9DaJF7/XAz82AZ9vxKUoLY7x1BX4DDpB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Psw06zK/6N52c3zfjtKCbMC5PYREiUYCkMKTiU3Bq55Ha7JFcoagHU/WAdntGm9d+qJc1d4qkizWNKET8RJaGVJDbwC9qS9BPJkMKWftbUVtBzTdC7Apxf7aC6YvzxPrUxXztRUnb+BZgaU3EDhemHHcaG6vFheg== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69dc72d0-9d60-443c-a3d0-08d9f0372319 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 03:56:25.7385 (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: hBl/VcvG0hzP7iS/+nufRhAPyLPmkRJPnW4s8/VYg5qlrKOGR1tcSPllgdTF42nSee0fXW2eET+OU7vvL7M6BltWQ0gfg/YKyncFS5fvLIlu0E1PQDzeWwNEq8Z4ttVq X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR01MB7500 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_195632_332855_ED9BC300 X-CRM114-Status: GOOD ( 13.86 ) 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 Arm Generic Diagnostic Dump and Reset device enables a maintainer to request OS to perform a diagnostic dump and reset a system via SDEI event or an interrupt. This patchset adds support for the SDEI path. I do have a patch to enable the interrupt path as well but I'm holding it back since AGDI table is missing interrupt configuration fields (trigger type etc.). The recently published specification is available at https://developer.arm.com/documentation/den0093/latest The patchset was tested on Ampere Altra/Mt. Jade. The patchset applies on top of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm bleeding-edge (9db71e8e3027) From v1: * Moved pdata to the stack and dropped unnecessary kzalloc() in agdi_init() * Changed the ACPICA patch upstreaming order comment in the paragraph above From v2: * The first patch was split. The most of it was merged to ACPICA project at first and later ported to linux-acpi (fd919e37cb15914c6fe13e13d530a4f732407c6d). The rest are in the first patch. From v3: Fixed: * Moved header files in alphabetical order and removed unnecessary ones From v4: * Platform device/driver stuff removed * acpi_agdi_init() call moved from device_initcall to acpi_init() * Slightly modified Kconfig text to keep checkpatch happy Ilkka Koskinen (2): ACPI: tables: Add AGDI to the list of known table signatures ACPI: AGDI: Add support for Arm Generic Diagnostic Dump and Reset device drivers/acpi/arm64/Kconfig | 10 +++++++ drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/agdi.c | 52 +++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 ++ drivers/acpi/tables.c | 2 +- include/linux/acpi_agdi.h | 13 ++++++++++ 6 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 drivers/acpi/arm64/agdi.c create mode 100644 include/linux/acpi_agdi.h