From patchwork Wed Mar 9 02:07:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 12774658 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 5B980C433EF for ; Wed, 9 Mar 2022 02:09:42 +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=6Av/JS+S8evK9NFdG6PlkFuNUPUWxxj9DL/PUk6eb1g=; b=IEb3TGHSIWs4q2 15zfaHE6/EHiGY5Lu6SdhM16Ew522y98oxqXF4X7xlvDVZGr//YV5EmI5nvxkp3S+I3/z1pGU85rf EiDHxcU1QCrigJSfyQLTRfkxVNYNjJZ6Zn2I2oSxNvDMJRBPzxwv3+klxV+0cR8HDU1zYXaj2sV32 p9DxPDOvL7owkY263zwXk+Td9E91zvcH6GNxjrPypLrwfsD8Qk3XRukg1VENNjrkuDQI8hugAFPzr ywac7Tt/pKOiszzXbcj4gvGqy9es0QMDct1UQJPntSn5emraIVGON8TPjWmzfzSkXd2e1CmmZRu26 UKcvx3RCAhVpjGClvmuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRlkV-006t76-4v; Wed, 09 Mar 2022 02:08:23 +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 1nRlkR-006t6D-Bh for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 02:08:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oXgFZbLNk0A9BRpno5PcNtNtHfP20yhoVd5ZFQ9slp1NMLWVO2DzuTXcm5EpK0W0jVjaJjAm06PRh5kjW1mIG33C5VUV915oJErJlcbC6ExgHomHLLFYAa5h1DB6ZklQBQ7+n/v/xruIWvk4MZbBKlobI0TZvfQzS75l4oC/Z6yhBK2ijgjUHfI4fLJnstHStgBwnHFNIaUp++CDxZD97tiBpzEmkiQ3Sx27xA/CRuqh3Z8RliHtW0p5oSUT3CZeMX0qiBsCuszWv7Q9Z6Hs4ITDpR4cgh5K9lJ/CI4fciUCNwLulacUV5E3SH5fTZDaEOYDwcrN9kh5eMFkF4w33w== 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=7/eI83A137BslZ5/tE9NA/TkPfEflyn/2tT+Q8K+aGI=; b=jsIBxzAFknfJ39t+EUHq0mj6y+iacsqObi9AK0HNMwKez3wr93MedZ/QcJ6mfh3CRV84YxOQDkEYc9fdY4DMCTHVTlfB6GpDC1750ht2qn//+dY0BYUyShDN9o8C0s06YlxuflwvfHDdICreBBtSnzo4wlpOakXaa56h1xue5dyDe4FKKp0HBVEHy2vtTnGlGx2Quo2N5RUe78ANUrjm0IMGsNYwSUIjKNwJcBfEGMqyQ1sInFEWi/AVtP8dXhr2ogMuzXLsYTBCIaGj4wpF9HDWmJxB7WpzwgdATmiBXNJ+S+kDY0fU0qDXG4tZjqLzWH6xgATFpP3t8BjniI+7hA== 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=7/eI83A137BslZ5/tE9NA/TkPfEflyn/2tT+Q8K+aGI=; b=cdd4N9wELln4eeQN35NtIMqBEInLPjEqDOr3BiWdyKnzXHaMvo4RdhFJBTQalAdvOn93fEG+/4DBFqkSeri2kRxgkpjIjTxfqLmPp2lniKQIcw7uTMFdofGaJyhcaIxBrI2QmBAIyXi07AU+fYQrxV45k0ke8xJcKiOU+fhua6k= 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:11 +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:10 +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 0/2] ACPI: Arm Generic Diagnostic Dump and Reset device Date: Tue, 8 Mar 2022 18:07:48 -0800 Message-Id: <20220309020750.65399-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 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: efc77cbf-a958-4672-c03d-08da0171a8b8 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: bliehxzrId7ENcWhbW1CMeHbgC3Pv4OEhjZ7sf4bODvCwgIkaJtxEQHXH3nEirVePlZt23ivgTTXo0BnslIbOK+wY4lWw7Y3JKoxB0sWBl3W6SVtsJ4D7WjW3h7ffo5qEyqNv1nOeQabhwsYxs0XCfeChLAj14/hq9mtScq//2J2ROUq9G6KzRfnk6odT0294wyXKvnYF4+SUZJU+orpa+b1odTi+eAm4bzYesaux0+8lPJ6MObubXwBm0Hx5INR9fakxa/4KXsH8+eOCTe9ZWpLh/keXCJiyUGYqVbtnazX2Wv+AclgVwIWGm5By+oLSxuwM4xdDM6AcjCI5nOYMFnNbJ4p6Iz9z+eI+Py6Okbws5UlqGp0iTM8WcGaUrBEMxcP2XrXCO2RGJWm8PeokYW62PQ6zoEW8dg4yjpIlNgR3vRrrIU/ku1BJ9o+BEFPQSLxxTfLAu12bnN2zfp4L9X6n/ExN3bpEFtPoftsXFexKPqiK2NQ2tb1oIKcTdJKFp+Ofne4NT0xOuSCCyiDlZC+EQv0T440UoZNfARiGbMNwyunQ5mzgzYiKw0EGyoBqxfdrHrvuZpV/JHbptOUiqo9YSnPJIfwIxXzTqyKWHyYU06Okkud5stizCgQPNhjWEbGbhvIx0dHfSEu5HTDBomtV7w6Ne0zyx8BvaQhN2KY4ahaPrTggnqiLYnxAxbytNjp8PLkoQjcY3YRf1wI/s1aNwNV5MUNjOJ3oBZLFBEtNUNc5S0upQM5c+boW/g7X7TpGf69daIlI7Om96ElqoiryTq65C6r91hyuYj9j0z0Xcvi9HFlQHxEtwQwwOk0 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-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: x266wc7r/pOOIBMsZ/MzihpetHJtqERjGHYbV/8Tlut1mQIaB142ZLC0Y5oowBicK2JDIP5QQenN7gV0LD2fdEvBhAaLrzdn/Qu3DUvbzYlVJ+koPMIzUWS/wITbg6xzJayI4o2b1tl6K/K6sTxsCGqbryYDasK2kY5for9hyJai0C+KVao2D6e85VegLfoOsMESYVblh8CoKfd2JGEMLz7NHt9e5onvJFhUkeKr+jAk02zKduHIXoHxVmYe0fiowI457cjbFYtiyJddpfJTqHTSgapRBzzD5S3IQyowdvOPfrJQcYf83YRBnGSf8468NubzpW/d9H5d4q/0mwqxMk1e0GxzRk6rn3qSlAS4anaV8KrK7IwdNaGzJtHK3Q70hrpAnhAXlzpMRUK/o9+xjBDu9rpAovQ6MMlIzKwW6tecoQbvnOCq3QZJpQfcxh63p7oCMGMRvMATYPhw9bDeYpRJ2C/9EosN2BLPhqkSOK2fzSst4difF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Sf7+HgGpiCI9O0Owi8E4srbXCpLI4UX3uwGA02QikvWsjuW9NWu2M35CzQ411MNGn9mr90yVCrMu8S3qxAOUDUeTv/0tkdpWI/tT8281W/ueJ5dnNr2xFRUeoK4ShLc85b5VTcIMFkI0ZhE35Hh8YfA9SxOMuu9aAxqse4fcDhkAQg== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: efc77cbf-a958-4672-c03d-08da0171a8b8 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:10.9020 (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: C9pTC3c5a9htw3GX5R3KLNlIplGnlVIlcOxCxzgd3l6p+IPQdCOupP4H66OG7+bA8Jj1KAf4YpbeyaW8iCesQPIPOjQuBv4OSCl65UNBobV2KH5CMUyIj/E65oAGaivG X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR01MB4288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_180819_473887_15F34236 X-CRM114-Status: GOOD ( 14.36 ) 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 (dd54258fbf6c) Requires commit 27e932a31496 ("ACPI: APEI: rename ghes_init() with an "acpi_" prefix") 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 From v5: * Brought back platform device/driver * Fixed remove() function Ilkka Koskinen (2): ACPI: tables: Add AGDI to the list of known table signatures ACPI: AGDI: Add driver for Arm Generic Diagnostic Dump and Reset device drivers/acpi/arm64/Kconfig | 10 ++++ drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/agdi.c | 116 ++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 + drivers/acpi/tables.c | 2 +- include/linux/acpi_agdi.h | 13 ++++ 6 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 drivers/acpi/arm64/agdi.c create mode 100644 include/linux/acpi_agdi.h