Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp80033rdb; Tue, 19 Dec 2023 09:52:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZE9a78Wr0MJ+nq0MRwWmMtm+xk2YHFzBijcHNl1cgXt4fvzQaUCOwyRxLjHGJvKeZV7EJ X-Received: by 2002:a17:906:2c47:b0:a1e:842d:ccd5 with SMTP id f7-20020a1709062c4700b00a1e842dccd5mr1523121ejh.48.1703008378228; Tue, 19 Dec 2023 09:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703008378; cv=none; d=google.com; s=arc-20160816; b=aTLhBD931Bq0EFUBE21dafBCTWWnDcWKO/Kv/hwdSOi1VG8PkpRxBK6lZehSzDuLee 5s3E7JBwSDJoJWOqZLDhwxyQyFmtiMp6LxMfhsWPoE4cpcD6vjzNCwqlWId89wmcHjo7 KTgKEjmzT/fM5UTz/Fba4knC8pybAyE6B3bcc4jbVOUOin/vyx9sixMI9bdOLTkqDNj7 ojzm3kCAjUohAaJxJddqEEXIirymB+rFe/hEmCAoSSQ4TCFlgFufbZnA7PBROR6wIJI2 YlWzrBcoO8xyuM8JcqD0c/HgK2U0EPA72iDJtM0nOEpdn1ZJjfl6hu043m6V5+qge67o Bsng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eiwIpb7xuTq5TPRrwpmxnXk+wGzqHEHNo03fDZVsc7I=; fh=G3MkS2cP7FkeH+7kxy0LRzNpJgfwnUWZciURRBohxGI=; b=GhCEo8wRjeOXSDsOTnIvW0Ns8PC0kAn+kT2npwdm6JWpilNeTSD1IegtH59nLTjEE+ J2+v1sT6DGTe8jXN5OKTeVVaDoX17WD64IFiY7WoIuGfVWV/u1ceGzE/VC3N8iMs8uUM K7TC6zA/q1uieXHSlISuQq6Miv0EPC2qhe7s30f096O5/dAkWEfttaUcfaZx3s6iaIpq kfTNydlBBVlk9FXR/AQOWhY4NWk/26Y+L/B7PYRWcKvIBElcdEQdwWux7+p6wCLAX0cs cq30Vncu5QJM65OgoR15geH0Kc9m3ILLOd5KWQG3WP5yjoKTVuII4orjIkKNb+MmbOQ1 W+ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=DPqUhByv; spf=pass (google.com: domain of linux-kernel+bounces-5729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5729-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r8-20020a1709067fc800b00a23533b5639si2181708ejs.967.2023.12.19.09.52.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:52:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=DPqUhByv; spf=pass (google.com: domain of linux-kernel+bounces-5729-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5729-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 64B031F25A2D for ; Tue, 19 Dec 2023 17:52:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 211AA41769; Tue, 19 Dec 2023 17:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="DPqUhByv" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BA3F41866 for ; Tue, 19 Dec 2023 17:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d3aa0321b5so25339755ad.2 for ; Tue, 19 Dec 2023 09:47:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1703008031; x=1703612831; darn=vger.kernel.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=eiwIpb7xuTq5TPRrwpmxnXk+wGzqHEHNo03fDZVsc7I=; b=DPqUhByvHwkhPIztuIP+ZkaooDYqBqXQkKL9bf42J6TH0G1MXLHdqk5g0NW5syJiNM MZZd+3qXcrhq1fMCi4D2HFR7ILvl5r7WPtOAVrJ1XeUMuVTaXCGsosOYAkPQ4VsFDt3/ ecQgO5vNjNjNYZCnSBbCE30J5gY7ZRXN0yU4U3y6BeDIN9EX/8vdw56vpHfxc/gGoDJB drtKNkS+8hLJN1RsP2Csm0LxiRMt3RzIXHZll+pEdfG0Oh99/8XIQ1zNwVvNEbIcBViE LaOJ5B0futn1P3DRy9v3FNmiTemwsppADdCfXj0nLpx01zYxoaM0EeBEvbMQkS/NUkN5 wnDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703008031; x=1703612831; 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=eiwIpb7xuTq5TPRrwpmxnXk+wGzqHEHNo03fDZVsc7I=; b=vzTDyX7gV+9Pj9spQ9FU5sRLP4zi1N75XaMKLf/t/QOLXgnPwoq+TfhHCNgKZMdnrv OdzSxuEC4NPVXS9FycHqBXy01u/xtDv5lTltZQCu/mDGG8XSnyqQkM68a+jt+pUCeC6a rbyuOzc31uRs3D0bTdqCsf4vrTHwWMWJRTPcKATx+Jy3Sq7ORRTxPmhNctsZnt+WvEJX e9XdA65qbBssfFIvP0vFGWZDLvH69HO0LgEomtWVb2Vp38sXB2G2Um57ZL+9K+TXSMJY qSVvIopWHs3VwnRtlJfGITVooqLUbs8Vmgzj6jFl32VWf0YRtc5qXJTss3ddSEDWXGOX +wlw== X-Gm-Message-State: AOJu0YxSdh7+vyQSJpnAYjlnPPVEpkg+T2MCiU1U+utcgw39fHY3AAwz o/joeuyIhlp0BxJTxlu3mWbDCA== X-Received: by 2002:a17:902:ec85:b0:1d3:ab39:abe2 with SMTP id x5-20020a170902ec8500b001d3ab39abe2mr5002223plg.14.1703008030730; Tue, 19 Dec 2023 09:47:10 -0800 (PST) Received: from sunil-pc.Dlink ([106.51.188.200]) by smtp.gmail.com with ESMTPSA id n16-20020a170903111000b001d3320f6143sm14453015plh.269.2023.12.19.09.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:47:10 -0800 (PST) From: Sunil V L 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 Cc: Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Anup Patel , Thomas Gleixner , Bjorn Helgaas , Haibo Xu , Conor Dooley , Andrew Jones , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Marc Zyngier , Sunil V L Subject: [RFC PATCH v3 17/17] irqchip: riscv-intc: Set ACPI irqmodel Date: Tue, 19 Dec 2023 23:15:26 +0530 Message-Id: <20231219174526.2235150-18-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231219174526.2235150-1-sunilvl@ventanamicro.com> References: <20231219174526.2235150-1-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- arch/riscv/include/asm/irq.h | 13 +------------ drivers/irqchip/irq-riscv-intc.c | 1 + 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 7b14f3ebe242..9c2bdf4bd880 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -22,18 +22,7 @@ #define APLIC_PLIC_ID(x) ((x) >> 24) #define IDC_CONTEXT_ID(x) ((x) & 0x0000ffff) -#ifdef CONFIG_RISCV_APLIC -struct fwnode_handle *aplic_get_gsi_domain_id(u32 gsi); -#else -static inline struct fwnode_handle *aplic_get_gsi_domain_id(u32 gsi) { return NULL; } -#endif - -#ifdef CONFIG_SIFIVE_PLIC -struct fwnode_handle *plic_get_gsi_domain_id(u32 gsi); -#else -static inline struct fwnode_handle *plic_get_gsi_domain_id(u32 gsi) { return NULL; } -#endif - +struct fwnode_handle *ext_entc_get_gsi_domain_id(u32 gsi); int __init acpi_get_intc_index_hartid(u32 index, unsigned long *hartid); int acpi_get_ext_intc_parent_hartid(u8 id, u32 idx, unsigned long *hartid); void acpi_get_plic_nr_contexts(u8 id, int *nr_contexts); diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index 24bbc5bfc30f..bddfe47df27b 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -311,6 +311,7 @@ static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header, return rc; } + acpi_set_irq_model(ACPI_IRQ_MODEL_RINTC, ext_entc_get_gsi_domain_id); return 0; } -- 2.39.2