From patchwork Thu Feb 16 18:20:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 58183 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp456634wrn; Thu, 16 Feb 2023 10:22:41 -0800 (PST) X-Google-Smtp-Source: AK7set+UVDA5CQ7/hnMfneOBjTQiWwXL4DclUUU09A7fP1sSH/0OLMEYljhGhW9PCF3eNOS/WWY7 X-Received: by 2002:a17:90b:4a8a:b0:233:bc73:a926 with SMTP id lp10-20020a17090b4a8a00b00233bc73a926mr8052355pjb.20.1676571761642; Thu, 16 Feb 2023 10:22:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676571761; cv=none; d=google.com; s=arc-20160816; b=A9y+HZvJo5omOLAKSDEjgybafm7aWzXucyn3jQ8JrojpBPXE95NNwXBVLDee58iSas ZGM3YZ5Be27USAMLQe9AO7Mh9IdEDPcWWFNsuTjqwuhkj4ZbrzGBtKxglG3HxYQbRI6U kx67WpaxnEZ5/zv96dF/zPgsrKwLf9Dc/3X40GuZRUVjiZxHAQ052K+Z0k/3767Et6xm vN/3YgCAngALcr/X4KfSPv76zZTBb4+Zesj6jJXX34lC1gWpEG/h+AS658RhkWsYp3if kRDgqYwt3HeotqNQKTZVNECFD3tsmLUyCZoIw4ipWWemZgJJJAotYfAA+PEkr8AfKSf+ 7M4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3T/9WMqfcgE40kVyTz05I09P0F9v/Zdvsnucdf4/Z5g=; b=RbgNewcxCF6qo+KthSEWxY7pfaM/9W7zDw2+HEQPw3YGKYq74Bu6P422+ohRfMppBW BDl52Udi1h9x0reavrOtHpjd5cvaHzLkfphMkZPnK2cXZaTGHNgDIzEUDXu38zBUqoGz KEFBK+7AL1eAE4Awkv/C3i/DV5Mub2t7vVo9ey7rOGWduq+YfWapwr2tBsmwohpkO62l YKQWVVbpeUwfrJ3Bs7DrjGws1Y5PXZRXLpq0COppps3ijuCJJ32yyjf22lHuM+J0OtZZ U2eiBEXxLe//gDeDLJtEH9MzoNLWtyxOAqXAC4fIVy61RdJrbFtk1K0QCBYZ4TZ7NF3n suzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=MBRj07iU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a17090a284600b002341bdd031fsi5335069pjf.69.2023.02.16.10.22.29; Thu, 16 Feb 2023 10:22:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=MBRj07iU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbjBPSVN (ORCPT + 99 others); Thu, 16 Feb 2023 13:21:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjBPSVL (ORCPT ); Thu, 16 Feb 2023 13:21:11 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 103BA3A08A for ; Thu, 16 Feb 2023 10:21:02 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id pg6-20020a17090b1e0600b002349579949aso2560245pjb.5 for ; Thu, 16 Feb 2023 10:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3T/9WMqfcgE40kVyTz05I09P0F9v/Zdvsnucdf4/Z5g=; b=MBRj07iUrgHWwP/PL9m6AtLW+qb8U18eyO6/36bns9c6UoAOz2OzMnR2e4Cdh6Kv4c 5U3H0CPnIrADmR9yLkbugn1hcLCwwqX07zxNNUuoWIr+c6fZODCF7wT2aZuT+AzlLvOa Q1ROw/0yRUOXRLx+2eqd2dsbqX+/BhpdhlpB5hqPlV9ELFw9Sc/nDaT/FlGczY596ewa V3OBgDoq6t1w7RJfsd72MzeoWGcwoO9R7yCsPe0OdQTxO/2T1f/tTd9iv2nhXTZPKIzc 3dZUhwf3Fr6ueWe9wpMBUEMC2rqOMV0kbLLOHPkBfH84LyRg+JVQuMaOop0ElzXAP9ut jG5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3T/9WMqfcgE40kVyTz05I09P0F9v/Zdvsnucdf4/Z5g=; b=KRI2i9jtzyDb79vPuRFxsrtg9TkWnARm4dQeUWh2c1nteHDfhO3+eBMyawzhZ4g689 SovKFWwZalCYRDiSXdb8YjGjms6FZ+4wps0sNhWRSXDaGX/TmgYdzCETYluk8jmQwMVU xgnd4Rrs/579+/2YVaqXbfAvHdefS8cMewKGr5jtyWEmtTDblT9yCw03TOHoh70kQklg oNKd56V5GAVjS+vA15AilfMNAF2FFGFZppzOWdx1N/kPbjDAb7CNJxUy/+DVryk1xE4t CLwxCOXpJjONmDvdlbU2DcW7jmlNr7Vrv5XFTy/H3kw8WkqEzXPMkincGV/id5hxnClg FWuA== X-Gm-Message-State: AO0yUKXvyTnYrJqOUNm2+yePimsNvH1NWOBuI8qm5IuCbpL0FSrFyfj6 9VJddMIxl+MLS5qoaQNKmwRb+A== X-Received: by 2002:a05:6a20:8f07:b0:bc:7bdd:551b with SMTP id b7-20020a056a208f0700b000bc7bdd551bmr9022499pzk.45.1676571661568; Thu, 16 Feb 2023 10:21:01 -0800 (PST) Received: from kerodi.Dlink ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id n21-20020a637215000000b004dff15fc121sm1517574pgc.36.2023.02.16.10.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 10:21:01 -0800 (PST) From: Sunil V L To: Palmer Dabbelt , Albert Ou , Paul Walmsley , "Rafael J . Wysocki" , Len Brown , Thomas Gleixner , Marc Zyngier , Jonathan Corbet Cc: linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley , Andrew Jones , Anup Patel , Atish Patra , Sunil V L , Robert Moore , acpica-devel@lists.linuxfoundation.org, "Rafael J . Wysocki" Subject: [PATCH V2 02/21] ACPICA: MADT: Add RISC-V INTC interrupt controller Date: Thu, 16 Feb 2023 23:50:24 +0530 Message-Id: <20230216182043.1946553-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216182043.1946553-1-sunilvl@ventanamicro.com> References: <20230216182043.1946553-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758012911447027943?= X-GMAIL-MSGID: =?utf-8?q?1758012911447027943?= The ECR to add RISC-V INTC interrupt controller is approved by the UEFI forum and will be available in the next revision of the ACPI specification. This patch is not yet merged in ACPICA but a PR is raised. ACPICA PR: https://github.com/acpica/acpica/pull/804 Reference: Mantis ID: 2348 Cc: Robert Moore Cc: acpica-devel@lists.linuxfoundation.org Signed-off-by: Sunil V L Acked-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index b2973dbe37ee..abb700d246df 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -891,7 +891,8 @@ enum acpi_madt_type { ACPI_MADT_TYPE_MSI_PIC = 21, ACPI_MADT_TYPE_BIO_PIC = 22, ACPI_MADT_TYPE_LPC_PIC = 23, - ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */ + ACPI_MADT_TYPE_RINTC = 24, + ACPI_MADT_TYPE_RESERVED = 25, /* 25 to 0x7F are reserved */ ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */ }; @@ -1250,6 +1251,24 @@ enum acpi_madt_lpc_pic_version { ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ }; +/* 24: RISC-V INTC */ +struct acpi_madt_rintc { + struct acpi_subtable_header header; + u8 version; + u8 reserved; + u32 flags; + u64 hart_id; + u32 uid; /* ACPI processor UID */ +}; + +/* Values for RISC-V INTC Version field above */ + +enum acpi_madt_rintc_version { + ACPI_MADT_RINTC_VERSION_NONE = 0, + ACPI_MADT_RINTC_VERSION_V1 = 1, + ACPI_MADT_RINTC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + /* 80: OEM data */ struct acpi_madt_oem_data {