Message ID | 20231025202344.581132-19-sunilvl@ventanamicro.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 1EFC1C07545 for <linux-arm-kernel@archiver.kernel.org>; Wed, 25 Oct 2023 20:27:15 +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=HoZFVadAi1xJ50a4eZBg4bjIkLHnxjXs+2AUxc5rrEY=; b=VsC7Dlfxz+eoiX BccNamch3RCBGzwCAu+OYHnsTFoi0o65iol9Nwzazf8MqdSLvnN4fUAluWyj4u9upvmLOQ0rToTTG iIkIGwv/bLqu1sTfIertjGDUkLl8GgDmVf7Pz8P0Rg+x1PS5mn2OPNuAdiK4PsQT1uqFWiqG7Chfz QWAEmO4vOcG7LBjH6qSYzpVDZady/xiE8ggFyhDegQcvqlKU6T4X8eYcNvT0/0q+b055n0LLAH9MF mW6mAScniR96enzM/Rn3/uWTVU3WqUKT5d53Lazfb7mhft65iZx/5yUAt5rS/Hqn1jll2JSIz9MYE eMi3xfkV2jltJur2KT2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvkSk-00D4Pt-0k; Wed, 25 Oct 2023 20:26:46 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvkRu-00D3f4-1m for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 20:25:55 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-68fb85afef4so141903b3a.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 25 Oct 2023 13:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698265553; x=1698870353; darn=lists.infradead.org; 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=VwZ9IOYC0gRC/owt7RZ2EBdGuffYJiDuVuQ5+XRLwVw=; b=A29Lsk3Dp8yvUaiPTCI8GGv+26UDURKHfeDy9faoLLTuL1QiAhXtKJSAC7LUWAFQH5 XUCyInZ8jJonQILzi/18Q7PnVYMqV784Hl+kXh2pyJ5kVzOF4iDWdRQgcEJn/2s3mD52 geAKhMyobGBglWpSL0eLQSI1nkptJxfDEHdGj1ujT9boFq43af0KfRORlsoob3lAuqwz 999sijuNJxZGv76uuHxZqj8io7U3b2hnCXWwsAsaJ0YEUWDuMqnLWr/gWbnckym9OLse I7DGb2orm/d1SLi5v4oRK8tzVSIs4DR3gxJUWeMFaeakASyfkCa2bqZcwuj9/kA94DkK viAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698265553; x=1698870353; 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=VwZ9IOYC0gRC/owt7RZ2EBdGuffYJiDuVuQ5+XRLwVw=; b=W9j4Y/4CWoW2+7jnIOnv9hw/Tn5qz+XPUADAgo1MS7HNZGDZa+hndbrNN+5Oqqa346 2e/lScx6YYxog3Lszig1vzPXK9W/uBPevggJfTaSsJChHYukUYIfeDT4OSqiF65M6fkH 6edHkU5nwykncKY+tTv1LTKcj5rTJ/w1jLS9Eqs5iydVhSCwtvqFC6m4ZCu+tkEP6CCT v7cEvQi5mfXEW0MlKHFHSLJz8jr20iX2ufc1wEBb7FyVmbx93Bs0SwPIUut6vVqo5pRG UxjS67XNYpD9U0w88OXkiO71CgiR2HtrwZkuyv4EU3vZwBxZTMovq8XiySF7/X4Mk4R9 EgDQ== X-Gm-Message-State: AOJu0YxvL53UoDGq51opFbDismM+OOcibd6XyN3U2Pql2R7n2ogoo3R8 feW2vM3VsbIuh8aQSK37RBQcnRAoYiSzsS9aYbPo0A== X-Google-Smtp-Source: AGHT+IHkn2z1G+Hl0DvKFF4S04ijeypy9mwQD0HYMK+syY66BONzs/0zW1LpSVQhK3aml5xBfnLnBg== X-Received: by 2002:a05:6a00:17a1:b0:6be:265:1bf6 with SMTP id s33-20020a056a0017a100b006be02651bf6mr14834736pfg.32.1698265553494; Wed, 25 Oct 2023 13:25:53 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id y3-20020aa79423000000b006b84ed9371esm10079590pfo.177.2023.10.25.13.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:25:53 -0700 (PDT) From: Sunil V L <sunilvl@ventanamicro.com> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Anup Patel <anup@brainfault.org>, Thomas Gleixner <tglx@linutronix.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Conor Dooley <conor.dooley@microchip.com>, Andrew Jones <ajones@ventanamicro.com>, Atish Kumar Patra <atishp@rivosinc.com>, Haibo Xu <haibo1.xu@intel.com>, Sunil V L <sunilvl@ventanamicro.com> Subject: [RFC PATCH v2 18/21] irqchip: riscv-intc: Set ACPI irqmodel Date: Thu, 26 Oct 2023 01:53:41 +0530 Message-Id: <20231025202344.581132-19-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231025202344.581132-1-sunilvl@ventanamicro.com> References: <20231025202344.581132-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_132554_595125_2D00F78D X-CRM114-Status: GOOD ( 12.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
RISC-V: ACPI: Add external interrupt controller support
|
expand
|
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index f3aaecde12dd..627723d72b01 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -273,6 +273,17 @@ int acpi_get_imsic_mmio_info(u32 index, struct resource *res) return 0; } +static struct fwnode_handle *riscv_get_gsi_domain_id(u32 gsi) +{ + struct fwnode_handle *gsi_fwnode = NULL; + + gsi_fwnode = aplic_get_gsi_domain_id(gsi); + if (!gsi_fwnode) + gsi_fwnode = plic_get_gsi_domain_id(gsi); + + return gsi_fwnode; +} + static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header, const unsigned long end) { @@ -318,6 +329,7 @@ static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header, * unsupported. Once IMSIC is probed, MSI support will be set. */ pci_no_msi(); + acpi_set_irq_model(ACPI_IRQ_MODEL_RINTC, riscv_get_gsi_domain_id); return 0; }
INTC being the root interrupt controller, set the ACPI irqmodel with callback function to get the GSI domain id. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> --- drivers/irqchip/irq-riscv-intc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)