From patchwork Wed Oct 29 10:00:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 39737 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ABE3224046 for ; Wed, 29 Oct 2014 10:08:02 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf1468622lab.11 for ; Wed, 29 Oct 2014 03:08:01 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=dZN31Mus8Ww/XUImljt4JfeVWua++u74SW4i48Fe154=; b=KRP9szd9Hiq7PFyu7FH27Q02XkD+0uF02XslnJKadmaOZRpSrpQYes8ssXIl04+TNe iGlThPT2zNTDG4mkGJ3pM8p+wCMepQLVqMjR8ytPVo1tW1RG8XZaCQwMzFlm5kReGy78 dpAv4XLKj1tjCi9edPQ5kzKAgzFIdObWIixj+XXa6QlEIbthfXyvifqO4T07IwrBF3sV vzpeb1G/3t0NAfYRDDolySL+IYAn7TltkqbxhvV6XWc7oGiRkCD3/H40J2n8otTLs0Gk zzghxgzLQKnnQSjUM4WXdTMkKR+qeLzzELY+7EwiIK7zuuR0TtCiRf7a1gR/swxOYNYk hWww== X-Gm-Message-State: ALoCoQmci+3JO3j3M6DFFbxr7HW4HuFEqoxk0q+24UVXgcYgOQF/udsHkSyvb1bitBijAeqoUjn2 X-Received: by 10.112.147.131 with SMTP id tk3mr1621994lbb.2.1414577281121; Wed, 29 Oct 2014 03:08:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.5 with SMTP id f5ls169943lah.62.gmail; Wed, 29 Oct 2014 03:08:00 -0700 (PDT) X-Received: by 10.152.25.200 with SMTP id e8mr10157375lag.28.1414577280953; Wed, 29 Oct 2014 03:08:00 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id p6si6455238lap.91.2014.10.29.03.08.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id ge10so2237917lab.16 for ; Wed, 29 Oct 2014 03:08:00 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr10073931laz.27.1414577280567; Wed, 29 Oct 2014 03:08:00 -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 c5csp629559lbz; Wed, 29 Oct 2014 03:07:59 -0700 (PDT) X-Received: by 10.70.51.195 with SMTP id m3mr9450057pdo.27.1414577278808; Wed, 29 Oct 2014 03:07:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si3641376pdo.118.2014.10.29.03.07.58 for ; Wed, 29 Oct 2014 03:07:58 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbaJ2KHk (ORCPT + 26 others); Wed, 29 Oct 2014 06:07:40 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:58741 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932137AbaJ2KHf (ORCPT ); Wed, 29 Oct 2014 06:07:35 -0400 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 448849764; Wed, 29 Oct 2014 18:07:30 +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; Wed, 29 Oct 2014 18:07:28 +0800 From: Yingjoe Chen To: Matthias Brugger , Thomas Gleixner , Jiang Liu , Marc Zyngier , CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Jason Cooper , Benjamin Herrenschmidt , Yingjoe Chen , Grant Likely , Boris BREZILLON , , , , , , , , , , Sascha Hauer , Olof Johansson , Arnd Bergmann Subject: [PATCH v5 2/6] genirq: Add more helper functions to support stacked irq_chip Date: Wed, 29 Oct 2014 18:00:20 +0800 Message-ID: <1414576824-16143-3-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1414576824-16143-1-git-send-email-yingjoe.chen@mediatek.com> References: <1414576824-16143-1-git-send-email-yingjoe.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.43 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add more helper function for stacked irq_chip to just call parent's function. Signed-off-by: Yingjoe Chen --- include/linux/irq.h | 6 ++++++ kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 0adcbbb..ff0a89c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -445,6 +445,12 @@ 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 12f3e72..fe53575 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -858,6 +858,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)