Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp514818yba; Sun, 31 Mar 2019 05:37:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwil5K1xClP2F8OM7ZXmq2spy2eMncqp/gtIux+lMVvUoYVLOKTtzpX3AXWBb/L+vWp4kQ/ X-Received: by 2002:aa7:864a:: with SMTP id a10mr59260533pfo.181.1554035835730; Sun, 31 Mar 2019 05:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554035835; cv=none; d=google.com; s=arc-20160816; b=J6LmKoglFk0OSTGuTzk6srtW6dIoRl4arW8D8SsUMz0aFWSQtAZ9JkFMKWEaU3gwqd vMz7YwTvWNMY6jrGv+eUdqkQ6OHYVVJyMKSAqEAwTs/Az1b7CxgGmfD/ieAjjrQOG7eH 0RaKCsU8sjgyHMNi7rFthaC4qn+kgWy0xyBVQGZpHmKFvxtXzcsZVjUgMzikCd1FA8NG NUsVXFUh3gDWeXNkl+qYrSL4EXBELK/wWEesK6TmxEMzg0fi/qSaXPPI7T7OajcTBoKO zwZqh698hcwZeyOBw5cwh0NkcJat6lhKlXpW4aNBSMyNRSzk++cqIUG40qJ//bWkv7lC 0DOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=q0g7/L6Mk+kz0ZZ51WeqH5kQRFucRKUZKixxtnoztbA=; b=OSpYIWlSu++73Ah+/Z8GEZx95XO10ecE2ugOFQZxcHIn56asR5cwHt7hzVfMI7aJEd jD0NbDoBCvAeRQCQsKe3CgFTW6qtmn+qVhn5BzUDPM3mOSJeA/T87+7MhelClOKYNSvm +GiNIqQFUxAmkMlZLS0fB0NI9GR2IxsjqBZa10K6F8o9VYOBovJJ7JyRpEZk2A/dA/XP CoHhiZY/7AwwL1xsP9nAW1EbG3IX/KY4W2YE0pcVoksjk3IopApdf4qG7ltl0pMnymBy LnZ2nNWyfX8DHxksUb7hPyhBW1wq11wdshGFDsYw6kPZJg0MlkUGaeYQNNTA0jkqMNHI H3pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=B96YOzA5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si2302175plq.135.2019.03.31.05.37.00; Sun, 31 Mar 2019 05:37:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=B96YOzA5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731256AbfCaMf7 (ORCPT + 99 others); Sun, 31 Mar 2019 08:35:59 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:41078 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726975AbfCaMf6 (ORCPT ); Sun, 31 Mar 2019 08:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1554035758; x=1585571758; h=from:to:cc:subject:date:message-id:mime-version; bh=q0g7/L6Mk+kz0ZZ51WeqH5kQRFucRKUZKixxtnoztbA=; b=B96YOzA5HSZiiWs+1u2Ss4i3/FSPL5YdGJdTTVq/edfdOLaoceRSaXw6 sm+dyEPr1MLsn/t7Ou0iDqDN5ZxFchZTflLLnN38ZJR0abfQKM5H4Tu6C //LCot3Vig+O79vSiPKQP9Q+3DXN9NgWBzekgFjoxM0Cp0HJfATfM6qnv E=; X-IronPort-AV: E=Sophos;i="5.60,292,1549929600"; d="scan'208";a="668330398" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-e7be2041.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Mar 2019 12:35:57 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-e7be2041.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id x2VCZrFu111365 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 31 Mar 2019 12:35:56 GMT Received: from EX13D19EUB003.ant.amazon.com (10.43.166.69) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 31 Mar 2019 12:35:55 +0000 Received: from ub6d44c9ce3e25c.ant.amazon.com (10.43.161.164) by EX13D19EUB003.ant.amazon.com (10.43.166.69) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 31 Mar 2019 12:35:46 +0000 From: Hanna Hawa To: , , , , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH 5/7] ACPI / irq: Add GSI IRQ domain getter function Date: Sun, 31 Mar 2019 15:35:31 +0300 Message-ID: <1554035733-11827-1-git-send-email-hhhawa@amazon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.164] X-ClientProxiedBy: EX13D20UWC002.ant.amazon.com (10.43.162.163) To EX13D19EUB003.ant.amazon.com (10.43.166.69) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add GSI IRQ domain getter function (acpi_get_gsi_domain_id), for IRQ drivers that use ACPI and need the IRQ parent domain to register their irq-chip device. Signed-off-by: Hanna Hawa Co-developed-by: Vladimir Aerov Signed-off-by: Vladimir Aerov --- drivers/acpi/irq.c | 13 +++++++++++++ include/linux/acpi.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c index 7c352cb..efc57b1 100644 --- a/drivers/acpi/irq.c +++ b/drivers/acpi/irq.c @@ -295,3 +295,16 @@ void __init acpi_set_irq_model(enum acpi_irq_model_id model, acpi_irq_model = model; acpi_gsi_domain_id = fwnode; } + +/** + * acpi_get_gsi_domain_id - getter for the GSI irqdomain information + * + * return: + * @fwnode: return the irq_domain identifier for mapping and looking up + * GSI interrupts + */ +struct fwnode_handle *acpi_get_gsi_domain_id(void) +{ + return acpi_gsi_domain_id; +} +EXPORT_SYMBOL_GPL(acpi_get_gsi_domain_id); diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 87715f2..642c2e2 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -322,6 +322,7 @@ int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); void acpi_set_irq_model(enum acpi_irq_model_id model, struct fwnode_handle *fwnode); +struct fwnode_handle *acpi_get_gsi_domain_id(void); #ifdef CONFIG_X86_IO_APIC extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity); -- 2.7.4