From patchwork Thu Oct 9 14:29:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 38519 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B66D9202E7 for ; Thu, 9 Oct 2014 14:32:21 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id b6sf958571lbj.7 for ; Thu, 09 Oct 2014 07:32:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=FmXnYdDhnxAcLp0bfkRUFhmis9GPxGG+itMG7Iiy3dg=; b=GBI0gGzkwzH/D/jEKWqpH1ShnA3jEwIil8RuSyLET4WNG266F9SRF1XppmizTSLhEa MQ42mSiU7FILZTe4epKPmTAMXfq3c8lJAydQjH34cLvpBJIm5okZEjuOXOoW+s9cSGty STIzvGaoXrgy+f+xM9MDv0cxrCjPieqdZeEIsGFNUJzUf15MyXigDqUHcF3/COBUXuoP w6/uVfd1HOPsEjaLKc35I/xj54LUm6/WnXFLxBTSK2ckBoAKN9H0Sy7HTMpMHmpCgnBu Hx7sgmR2s6pOFtVJbm/GUicjJVOgpSQaswF4AoQ9A2Kyn6eeexVDvJwhYM9X7i0NJ4EA I9aw== X-Gm-Message-State: ALoCoQmrwoHT9LfugE7hOnq3QEpI5uP/1CcaidK7BynxMS73vzs+wjbhFcyKZimzFjGaXXDfh222 X-Received: by 10.180.221.236 with SMTP id qh12mr5689591wic.4.1412865140039; Thu, 09 Oct 2014 07:32:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.1 with SMTP id u1ls189098laj.29.gmail; Thu, 09 Oct 2014 07:32:19 -0700 (PDT) X-Received: by 10.152.5.130 with SMTP id s2mr17636364las.0.1412865139877; Thu, 09 Oct 2014 07:32:19 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx.google.com with ESMTPS id oh2si4505686lbb.107.2014.10.09.07.32.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Oct 2014 07:32:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so1307511lab.26 for ; Thu, 09 Oct 2014 07:32:19 -0700 (PDT) X-Received: by 10.112.62.200 with SMTP id a8mr17858799lbs.34.1412865136718; Thu, 09 Oct 2014 07:32:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp259148lbz; Thu, 9 Oct 2014 07:32:15 -0700 (PDT) X-Received: by 10.60.81.40 with SMTP id w8mr23753359oex.53.1412865135101; Thu, 09 Oct 2014 07:32:15 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id fh10si4027370oeb.105.2014.10.09.07.32.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Oct 2014 07:32:15 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcEji-0004Ih-EW; Thu, 09 Oct 2014 14:30:34 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcEje-0004Dh-49 for linux-arm-kernel@lists.infradead.org; Thu, 09 Oct 2014 14:30:31 +0000 X-Listener-Flag: 11101 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 400378353; Thu, 09 Oct 2014 22:30:07 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Thu, 9 Oct 2014 22:30:04 +0800 From: Joe.C To: , Rob Herring , Thomas Gleixner , Jiang Liu , Marc Zyngier , Mark Rutland Subject: [PATCH v3 2/7] genirq: Add more helper functions to support stacked irq_chip Date: Thu, 9 Oct 2014 22:29:35 +0800 Message-ID: <1412864980-20273-3-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1412864980-20273-1-git-send-email-yingjoe.chen@mediatek.com> References: <1412864980-20273-1-git-send-email-yingjoe.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141009_073030_390215_584F924D X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Benjamin Herrenschmidt , Sricharan R , Florian Fainelli , Russell King , yingjoe.chen@gmail.com, yh.chen@mediatek.com, nathan.chung@mediatek.com, Grant Likely , "Joe.C" , Arnd Bergmann , devicetree@vger.kernel.org, Jason Cooper , Pawel Moll , Matt Porter , Marc Carino , Matthias Brugger , eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, hc.yen@mediatek.com, linux-kernel@vger.kernel.org, Santosh Shilimkar , Sascha Hauer , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: yingjoe.chen@mediatek.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: "Joe.C" Add more helper function for stacked irq_chip to just call parent's function. Signed-off-by: Joe.C --- include/linux/irq.h | 5 +++++ kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 07abf5a..6159256 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -437,6 +437,11 @@ extern void handle_nested_irq(unsigned int irq); #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY extern void irq_chip_ack_parent(struct irq_data *data); +extern void irq_chip_mask_parent(struct irq_data *data); +extern void irq_chip_unmask_parent(struct irq_data *data); +extern void irq_chip_eoi_parent(struct irq_data *data); +extern int irq_chip_set_affinity_parent(struct irq_data *data, + const struct cpumask *dest, bool force); extern int irq_chip_retrigger_hierarchy(struct irq_data *data); #endif diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 58ed9ed..0ecc270 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -829,6 +829,34 @@ void irq_chip_ack_parent(struct irq_data *data) data->chip->irq_ack(data); } +void irq_chip_mask_parent(struct irq_data *data) +{ + data = data->parent_data; + data->chip->irq_mask(data); +} + +void irq_chip_unmask_parent(struct irq_data *data) +{ + data = data->parent_data; + data->chip->irq_unmask(data); +} + +void irq_chip_eoi_parent(struct irq_data *data) +{ + data = data->parent_data; + data->chip->irq_eoi(data); +} + +int irq_chip_set_affinity_parent(struct irq_data *data, + const struct cpumask *dest, bool force) +{ + data = data->parent_data; + if (data->chip->irq_set_affinity) + return data->chip->irq_set_affinity(data, dest, force); + + return -ENOSYS; +} + int irq_chip_retrigger_hierarchy(struct irq_data *data) { for (data = data->parent_data; data; data = data->parent_data)