Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp316059yba; Sat, 20 Apr 2019 03:14:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJNCMQjMIK2ZsxSMJGIBIkF/mK9pueokp86C9q78UgIMCjJtNd5YqdVAbliB6cfqGi3qsZ X-Received: by 2002:a62:e816:: with SMTP id c22mr9290040pfi.54.1555755263506; Sat, 20 Apr 2019 03:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555755263; cv=none; d=google.com; s=arc-20160816; b=PKEa6yTZIgRQ9gvyc8VzQ1nYVOZp6HghmMukgbPtLbXmLzcRFFr0Nm+F1YHWwHsxhB ZQh8m7GdeTmy9JdQGLD6jjMThPW1XkztckQY/cN5/WWkD+Eo3anluosjRs/Tq0I7zH8W wIShoS/mOebqWKA6ULwLZuhpDz92ueWG6TXaXvcJWcI4bLFFbCMupxbdHHT0c2Scl2IX oT0ZATb6VWKk+b8OTHHVLajlzGETFyj3a2lB8akju11AfK0X44N4zx9kZY87D6VUzOFv 8OtcjXqmwlGxjq3vbKpCDq2+XJ1tl+qMUB2DUwmkBHMmTXvqlhLcIaV01DzCFhwQfdmG +RnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hYgQZLwdVEu2Jv9X+FiwCNP4RJj9SEUYOWe2S7VOsQQ=; b=CaPzaLmH3DeESyCp117TquctmeFN3RL0LazbDiUnH9q/lCP++gvZn1SCggPrbotSsD wxFYqAR0cy2C8XnbyODn2UvhU4HYV3TQz7NxcWWp9vfvLyAgX8deExW0HVGYoeWqS/jV PG/j9wz5pBa6QgxquYQCjUZUDhE8r2y8/GrGW16PKmVK0S92hU9HmHI74I1RVRXQpndb 3/ypVX5086NmX0Q1ujKzLxDZXHnBdKnWbkvhc4HB1Cm7rZ6VyEzLWUVfIalehCZLHfXd 5henPqcPAVHrWyEPG2XLrFbE4/3DVMWSbp5KFkC8tquEPnrnPWqQU1qxaaEKKVwce+Cx H7XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Cgx3VHoj; 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=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si8038023pfr.146.2019.04.20.03.13.33; Sat, 20 Apr 2019 03:14:23 -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=@ti.com header.s=ti-com-17Q1 header.b=Cgx3VHoj; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbfDTKLW (ORCPT + 99 others); Sat, 20 Apr 2019 06:11:22 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:54570 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727922AbfDTKLV (ORCPT ); Sat, 20 Apr 2019 06:11:21 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3KAAnTE023748; Sat, 20 Apr 2019 05:10:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1555755050; bh=hYgQZLwdVEu2Jv9X+FiwCNP4RJj9SEUYOWe2S7VOsQQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Cgx3VHoj8I3P+lTgbzydTWRpjYvj7rDKTjoDP4LSuS2AFo5FUXzbs0KoUubP+upIQ /CmNWiZoFnU34l9nBclhfo2HpHG/vFtYCO2Dy4wDzANdH2GquTJOA/2DrRSkjpP9RR E5Z9cU8w3yF9txZUeCOaVwOd7Ajhf62Z/wML4AYk= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3KAAnUt097487 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 20 Apr 2019 05:10:49 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Sat, 20 Apr 2019 05:10:49 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Sat, 20 Apr 2019 05:10:49 -0500 Received: from uda0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3KAAHZv070234; Sat, 20 Apr 2019 05:10:45 -0500 From: Lokesh Vutla To: Marc Zyngier , Santosh Shilimkar , Rob Herring , Nishanth Menon , , CC: Linux ARM Mailing List , , Tero Kristo , Sekhar Nori , Tony Lindgren , , Peter Ujfalusi , Grygorii Strashko , Lokesh Vutla , Device Tree Mailing List Subject: [PATCH v7 06/14] genirq: Introduce irq_chip_{request,release}_resource_parent() apis Date: Sat, 20 Apr 2019 15:39:42 +0530 Message-ID: <20190420100950.7997-7-lokeshvutla@ti.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190420100950.7997-1-lokeshvutla@ti.com> References: <20190420100950.7997-1-lokeshvutla@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce irq_chip_{request,release}_resource_parent() apis so that these can be used in hierarchical irqchips. Signed-off-by: Lokesh Vutla --- Changes since v6: - New patch include/linux/irq.h | 2 ++ kernel/irq/chip.c | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 7ae8de5ad0f2..fb301cf29148 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -625,6 +625,8 @@ extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on); extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, void *vcpu_info); extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type); +extern int irq_chip_request_resources_parent(struct irq_data *data); +extern void irq_chip_release_resources_parent(struct irq_data *data); #endif /* Handling of unhandled and spurious interrupts: */ diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 51128bea3846..29d6c7d070b4 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1459,6 +1459,33 @@ int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on) return -ENOSYS; } EXPORT_SYMBOL_GPL(irq_chip_set_wake_parent); + +/** + * irq_chip_request_resources_parent - Request resources on the parent interrupt + * @data: Pointer to interrupt specific data + */ +int irq_chip_request_resources_parent(struct irq_data *data) +{ + data = data->parent_data; + + if (data->chip->irq_request_resources) + return data->chip->irq_request_resources(data); + + return -ENOSYS; +} +EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent); + +/** + * irq_chip_release_resources_parent - Release resources on the parent interrupt + * @data: Pointer to interrupt specific data + */ +void irq_chip_release_resources_parent(struct irq_data *data) +{ + data = data->parent_data; + if (data->chip->irq_release_resources) + data->chip->irq_release_resources(data); +} +EXPORT_SYMBOL_GPL(irq_chip_release_resources_parent); #endif /** -- 2.21.0