From patchwork Thu Oct 23 15:53:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 39384 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05E1C24022 for ; Thu, 23 Oct 2014 15:56:46 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf762252lbg.9 for ; Thu, 23 Oct 2014 08:56:45 -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=GNeeCgLH1SoeQSPV2kmNSzMF8B+cq5YmmKwj+XlS+PU=; b=W0OlQFVEBraS5OYyKxvtO2tXQyvTh3a4KIIOGngvwfmFxQwgRNETy4NWjcnDxyHSWV AWFQeK/C6cj9bBKWYs9bHAqJP7zYNmfAD0tb8C7WCr45zlR8Xxnw5XlS1nD0L6P1j4Ri 7CHjyla1zpTpPujTl+ji5nqD/by0U01wSqUjKVjksNKwBHKk3/IjfmUcgjN0ITM1wX0h yrn2yQkeiEEjB1tAdvHZhMPZ4zemMI9BcqglkZIbQGLbKU/mF/BKqdrscLujJgcoXYhZ oCnTHkOoe3Y+eZjouZWBr5HyVsJfJwBkWFrPvKKYFwCXOekpZM7NIrFO7z07qjn1PpCD npgw== X-Gm-Message-State: ALoCoQnNN/5q7lvLo7QUYr+h7sYhku9pt82anIoo6NlqsDkyq5vdubbpt1vzVvzecIaw9nwk8gAd X-Received: by 10.112.26.82 with SMTP id j18mr674471lbg.16.1414079805783; Thu, 23 Oct 2014 08:56:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.132 with SMTP id ei4ls346859lad.109.gmail; Thu, 23 Oct 2014 08:56:45 -0700 (PDT) X-Received: by 10.112.125.106 with SMTP id mp10mr6240865lbb.50.1414079805595; Thu, 23 Oct 2014 08:56:45 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id kq1si3285921lac.31.2014.10.23.08.56.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 08:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id s18so1139432lam.9 for ; Thu, 23 Oct 2014 08:56:45 -0700 (PDT) X-Received: by 10.152.6.228 with SMTP id e4mr6012261laa.71.1414079805503; Thu, 23 Oct 2014 08:56:45 -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 c5csp279967lbz; Thu, 23 Oct 2014 08:56:44 -0700 (PDT) X-Received: by 10.68.201.9 with SMTP id jw9mr4562451pbc.140.1414079803934; Thu, 23 Oct 2014 08:56:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ah2si1915841pbc.137.2014.10.23.08.56.42 for ; Thu, 23 Oct 2014 08:56:43 -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 S1756085AbaJWP4j (ORCPT + 28 others); Thu, 23 Oct 2014 11:56:39 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:49967 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755470AbaJWPyW (ORCPT ); Thu, 23 Oct 2014 11:54:22 -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 1750820147; Thu, 23 Oct 2014 23:54:18 +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, 23 Oct 2014 23:54:11 +0800 From: Yingjoe Chen To: Rob Herring , Jiang Liu , Marc Zyngier , Matthias Brugger , CC: Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Thomas Gleixner , Jason Cooper , Benjamin Herrenschmidt , Yingjoe Chen , Grant Likely , Hans de Goede , Boris BREZILLON , , , , Olof Johansson , Arnd Bergmann , , , , , , Subject: [PATCH v4 3/7] genirq: Add more helper functions to support stacked irq_chip Date: Thu, 23 Oct 2014 23:53:11 +0800 Message-ID: <1414079595-26129-4-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1414079595-26129-1-git-send-email-yingjoe.chen@mediatek.com> References: <1414079595-26129-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.50 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 07abf5a..071b1e8 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -437,6 +437,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 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)