Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2824680rda; Wed, 25 Oct 2023 13:27:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwhuXwD+pOOTjL3nbD+Qb+I5j+qUgjr+VNP3dXzCEEdaNGgc5sM+412izsNq+HXGmOA9e2 X-Received: by 2002:a05:690c:ed6:b0:5a7:b10c:4772 with SMTP id cs22-20020a05690c0ed600b005a7b10c4772mr22555174ywb.19.1698265659332; Wed, 25 Oct 2023 13:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698265659; cv=none; d=google.com; s=arc-20160816; b=hJ9rZO0OL6xcEpH9whRXJ5m9jlBnBTIclERgcf7y4Mq7JpMCQ2xSNX2CsqmuJ//5Dh HlsmVCH932DXzQCsgyHFvrCSZks5kwGmgQJyIv71jU1iRRAK6Q5yPk/7SYwBUF05ZD7R dh2X6QBtl9ycqeta3W/YZ0XIfH2+ACoLSJ7YbWCwLTJHQa/9WIPBvVuBwo1A1n0N/0Ya b4EWAXwkqQxpHM0ifx4cJLe8jFaePuDep5oyTAk4rdd2uVmbiLAVNW3FxvApzPEAVE95 pllzsE0FMclTL4FY9486RqisTDzK/WY8LSlsyCkxyDrUmtN9ElebGaoIy+snGoQL0Fqb Vzzw== 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=VwZ9IOYC0gRC/owt7RZ2EBdGuffYJiDuVuQ5+XRLwVw=; fh=/fEAwM0ftwV2z3MN/iSYq1lv8IFPZ2fY8Kg8RoFcxjU=; b=0PijKfDlOVW0tUDy4PEKxnWfMb0KOKjaJgRh3U+XXxFwyj6oeTe6NkMaHTO2mctmgs OUVCkN/XflAac8T6UsVPYsRsM/zcyHHTC5+uLVqv9d4+1r5fUze9qn6z4GgIFAl/Tu/P HUqLFBrXezI8sMVPL6v2fHEHmpi043DNfS84YavEnXqpvQvyN6FdefyKFSDDs9uDriDc Vh+qltMg7BmJpmB4vt894unmnHTwI0vt/cn/05feMdzqhh3XJhJGDkkQCbCROkAucOIX bgRvmFWeA3uJpO0oCOL2O/dw7ueOkvOFqxREpne1XiMpFB6cT8ZtY66818EbTx/t0WAM FjZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="gni9otB/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p21-20020a0de615000000b0059f74568d4asi12141660ywe.226.2023.10.25.13.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="gni9otB/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1EAD480295CF; Wed, 25 Oct 2023 13:27:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235108AbjJYU1R (ORCPT + 99 others); Wed, 25 Oct 2023 16:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343747AbjJYU0h (ORCPT ); Wed, 25 Oct 2023 16:26:37 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2760D1BEA for ; Wed, 25 Oct 2023 13:25:54 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6b36e1fcee9so130422b3a.3 for ; 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=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=VwZ9IOYC0gRC/owt7RZ2EBdGuffYJiDuVuQ5+XRLwVw=; b=gni9otB/RxqkdQcBtDhkGtxYXI1WhO6/nBa5LuP10/nNencAljOkoEGMmIzHInY/ky oDlR4aIa6BOWPeVwvMeutGJ5V6ffVJCjq9yAVxUgQJ2NWKDBS7IHFKiQ+l6fFBvSh15A mZC/WjARqRxm2wTMlRiEvP5OHITXIqMDoeYIdAubOwiSoJbWpW6qqgDG3R3ijHPWgG3l RZ7TnvwKTmJTwhe02+58gFnl2LR1WgjHj440rGe69OikbaJsYYesrFvKharIMMus1Hog QqV5S9f6vTbimWXy/i5vLDf/0GQKcbKhCidzew7Kz1qBK6XcaGk99AbAHyc/PlHte0Xp EzEg== 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=eBWvE420c6c8QG4Cd4k2vme4j6DjYZ0aqHLwMEEaunIfFg3fqHMeAz5+xSjy65xEL8 IpGgJHZml1T7STdIYckmh2Zc7kpWC0g8zZN0LQp6BSOAlLBVwzjITTBvgk9Ly2XiZwOy 6QFh7xYOqkOnk5vcXB6zgGkIzu823S/7wWD9MqvLgmBrvn4G4uszp8/satEC6WMpnxr7 nyKWAMT0pSucM2X6SIDqL3Ep2nwZwoPTMoyJesj4cV+5DDSkd5hDsXP5W+v1gJnK/5yo djnNmn2tI51hm3Tsky8rkg9q0S2x+OXJiKkt/ztpjVGlvrD04mi9vph2n/f1VbRWoX7H 9CMg== X-Gm-Message-State: AOJu0Yw4/0YiUeDBmfVcje2UwgvzhSIyqI/ia/yBn/tALSkiRoz5SuXi mMc0QngFXPIBH2fFhLCtneIlLw== 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 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 , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Conor Dooley , Andrew Jones , Atish Kumar Patra , Haibo Xu , Sunil V L 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 13:27:36 -0700 (PDT) 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 --- drivers/irqchip/irq-riscv-intc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- 2.39.2