From patchwork Fri Mar 4 05:40:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12768483 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 A645DC433EF for ; Fri, 4 Mar 2022 05:41:50 +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=qWYpZc91FFvhDKTZSOHJPSaSzVhvS9hFxVLXiE0BvMQ=; b=EZINA+iaqd8KS5 ClGyeAg04hF08+PLjKcY5KFETZiVmO1+/+j3JTV1AOGPkeK23mqm96z/SoDdEYUCcvr7azlAg2yuM XKYNgHMxKBMtKPT1/5OGohRatY8L6rbQjG2RhZBJNqcbdl2Nh4KtvQvbYRaOLRrD7tJWYuNkz47Eu xAlify9/wGwSNgRNfTbTOP9qZGukz2gkyxec0eN2dgoWqIKpItu7ZUUI64pA9F8Bct6ZvBu23Ljfd mU81prvv4v17qnURiaeoTtirqYduhF1D2E4X6Y2sxF7AboHf5TxjIQ5h260Fr/i7pv3jdFV8+LIHP wnyoZH3iq7srmdnpgXGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQ0g0-008YgN-IL; Fri, 04 Mar 2022 05:40:28 +0000 Received: from mail-dm6nam12on2072d.outbound.protection.outlook.com ([2a01:111:f400:fe59::72d] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQ0fx-008YfM-8A for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2022 05:40:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RQfWbWlFyYYZun7c0C9mOAEskZHgHBuoXM5qhobELJN5U7lCHDEONA0n5d7lsHYwZIhNZDfVx8ubBrc4MMx4DDQ6MClM6WW0dGMx78Fwx5kQvyXKOP0n0kP08IClh1+QhgntBmGQMoWcxTywJM4G53bKzsxFaZU7xYFtpuAm7LIoJs3Q43bGi2emuPkJ5hx9lY8yW4jik3G19xiwTXET4H0PUs/PgqcBdEBsmQYfuM4oecSr03M8PtpFx6WwEmYgLGNl0ghDfs+gxiwxn83XgQFTzwhvOtgj9syyP4cWmgcjtl0EB6Dhhx+CH+sO30lQJ3H9QxK0H6nSRJC7A3Z1qg== 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=8Mnt0BVzRyWj/Pd9UarkC1p5dfib/C8yCO0tbyIgLpY=; b=IucVU/g/UYZSJoqvYTXFpYcXtLYFlylrmldB+EGdS1SwvRqaDwT6an9DZHtoAgl/Y9u+5wNXhkQ5BJsp2omeHglSRRTYf+nbOztCCKbyTQD6QVQCSrlZJvz0lx5im6vUdj43bvxEQXQdoKR614xHv+w6I0X9ju8q7j6Wd4n4Ez1QlmnFBUow9WahAX5HJhVMe3LD2MCc4ON1CBIapdfFoklZqJo+xzLeauNbQQBJfApqxfQ0Goe3VhJNxAv/dJj2p6GkxZeI//P/Q3Rl+8hoNTLskahvE4zFr/YgAgHfPcE2cu3MU/ZRlShFrwJm0j7ajicq82nexZ8zE1mmVP44jw== 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=8Mnt0BVzRyWj/Pd9UarkC1p5dfib/C8yCO0tbyIgLpY=; b=ND2/YGeQM6ClWX6vAktInEB7lVvHTWfdrNbTX6p/DusfbJiwG+dliuXc5SStCQ/BLxgjPMPBOuttt06iK6qAyBRsLae1sGXDOJ9CEjnSox8zUQXEXZRshd3BpoeNwh001XwJ+Bhe5+LF99v0WtgoPHlgjdqiitZUO6Mgh2Ggnno= 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 DM6PR01MB5596.prod.exchangelabs.com (2603:10b6:5:156::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Fri, 4 Mar 2022 05:40:20 +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.5017.026; Fri, 4 Mar 2022 05:40:20 +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 v5 RESEND 0/2] ACPI: Arm Generic Diagnostic Dump and Reset device Date: Thu, 3 Mar 2022 21:40:01 -0800 Message-Id: <20220304054003.152319-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: CH0P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:ef::30) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0da64e6f-fdd8-4cc0-a109-08d9fda17835 X-MS-TrafficTypeDiagnostic: DM6PR01MB5596: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: /zlNU426eOQArVMzOAA0z6tjrd05JQjhJUuoEGtOv2ZnvIc1DKAscJQX6U5hyZsZePXFvaiNCj/uJg3ah9YpRTO6RrErtAnb1gBSlhXowwdoDDTKSmhrcgkNnlnhheDjZeCi/nrljC9bVfiaWtv6XnlDbnmLhOLh0hz8xXn3CdYfw31L2vcSGy3X5Y8GjFl2BaGLXKk2bKHXQT+tRcpEFsOw6D5prFQ6N5gDJDjHeKOpk5KUeE3fgvsywtCS+G+1LwENZlSfjd0sdT0rMSFJX6PyXyFDmCJwjoCJNBw9dMpiHFa/jB55FjeyEhSHdYDHccQeEMcRAR7snfeuSrglipbME6cQIQhrjr5Y1OiFy8SwjMneLxf96FE7BwVVU7FtiIlPis/HuoxJOMYXijPqn2mvChybfJj/Y1tlxkzxE8IV/zxHP4Qj93aPP+7MbiaaIOzqmuboo79OdnN3x5HAdZMvguSDP1Pom/pLegfTLyaSB91En/jn7DvCkwYXpfeC/pGIvnQ7U9tVkX8cA6MkBn5Xyh3d8+ecubDhV2A57oFrdzzLdYjMcUVHkasvWHcqtW0wEcqCmzD3b2YnNyvZsOh2x2FBPylaPbasvGXdUBL0JdPFxlfPnYDAe+RPCd5jN0rm80Yq+CrbP/r/h2oEixneG8o4HaCeZo8+Mjm9sU11s/NBmxJqj/2JFiSUxY3uYfse6QPBym1TfQajVcDLQTgkMHmgYTKDyKc55Lin9lpuuXFM9+IVd0A+kvIC0tbuERQst+HuYmnffO3ZtAbKaTBgEmNJe+ztpXVaqwzywWP1T8eylMigV9B0gxv9obHi 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)(6666004)(6506007)(38100700002)(38350700002)(508600001)(2906002)(6486002)(966005)(66946007)(66556008)(4326008)(8676002)(5660300002)(7416002)(8936002)(316002)(66476007)(86362001)(186003)(26005)(83380400001)(6512007)(1076003)(52116002)(2616005)(107886003)(41533002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aAXyXlKm//XG0/BX1k95zzoeJxRyK8wEfVACr+q322F1Q5sVJFDyzx2IHMxxIAgGIzEXKGNHa0cxE2E03ru40cQfBt4aBzztPRG3um+Jkb//CutACw7Sq0n9wl0XoZ+CA87hJZmWXAh1TlRqsUKKwiYrCspv1kNyOqoRlS0w3L4ynvLxPzEfXfWMPBlXETYXKYQD/4Bpda8vvRoLaWIZJ6DRtBgfNiyKgXjt0tUa4ly2AgYP66R3r60FhorZ5w5ssIDDU9fwd6eT8Kjw5SUVXh6xk1nZVjy88+yYGiNl//UKYA3mim9IPkyQhzxv2+Q3ZGvYvJkGcC6Ynpwyz8belwhPE2S5pZbhFVG4+2ARAspzif0AxgP3kTc49/oZW876kM9O0OHLY0olD5DymgRY8f1DBJR8FQEUtVaWddJPhdmj0kH1zT/SmiE4MbQx78J8Q0uaXOg+nFqD5j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wfMHwBDKZldueZrFe8D1223fHjIP9icB/NhgtsbledFIlxNE3fiAdzDu+fVNNR5Ek23YT7bGjntnjuJLImfDmJkSp/4MKOEIQ7++qbhiUC5+SQDd9lzwAOIU+OxKgprcl1Zvn0WNbs1WyRdAsNKe513YaRcRZgjaoX43drqTB1ZuJELpYQqBIWaY3361ETGiEH3hWxvj7CBcuHwV8fM3q/g== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0da64e6f-fdd8-4cc0-a109-08d9fda17835 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2022 05:40:20.1259 (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: lSFZmEKTQASoLRgp1JeeEL21v28PZc+VYuB59rxGvW7KXGWUAzjuNd2vvYStr3S4oMBMK61KmFopngfLB/58i9hAeeqoGpmocKEYAyGA7pKtnj+exqmCfc0rml5CjrzG X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB5596 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220303_214025_310527_EAAB03FA X-CRM114-Status: GOOD ( 15.03 ) 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 Hi Lorenzo, Would you prefer this version, which doesn't have platform device/driver any more? --Ilkka ---- 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) I also tested it works on top of Shuai Xue's new patches in bleeding-edge branch (c6f4ba2d2b9a) 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