From patchwork Thu Nov 13 15:37:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 40776 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D3A81240ED for ; Thu, 13 Nov 2014 15:37:42 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf882430wgg.11 for ; Thu, 13 Nov 2014 07:37:42 -0800 (PST) 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=cxWv2cFfK67Z0prSnQlTZWUi/ulDBNlhbQJr9LAkL4M=; b=YZZqv39PHkEvQCoS5Bhnf+OvcU3Y8JxQCC1XuAFy0Qb1gGR9byUfODpYKoo4AHog44 GGR6tZdgAJhdqbxK8/6ZJ7sy5xOE2/Ff9j0GU7jRlQRCgPCflDL469u9fdWHzRfN37oe ymWcvQRAJrVfBkBd+dGj7KyBcgvjomNOub7mHDUlTY08GC9xUVvwlwh1hz1xbbChpwlS YrcAr4TDwFpV7ZkTbQB+F3yM9/S3ysJk/+6HbowhA1efaL0WYpmaU7zYObUb8roktI99 RSAMqqKBltsX7xFzZhy/X2j21BbTFYLSSR2gN0aeR9qPRVVFXDxvwT44WA+kU6tneK3c a8RA== X-Gm-Message-State: ALoCoQlyl41pxS6UV1uiHix4HwRw5tG1bSMLuwmV7VoVMdRPdj00r+rUMIoIeUAmZezkiZE6SXhn X-Received: by 10.180.19.226 with SMTP id i2mr8125240wie.5.1415893062099; Thu, 13 Nov 2014 07:37:42 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.165 with SMTP id an5ls872043lac.92.gmail; Thu, 13 Nov 2014 07:37:41 -0800 (PST) X-Received: by 10.152.25.168 with SMTP id d8mr3110202lag.41.1415893061614; Thu, 13 Nov 2014 07:37:41 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id bn10si38767883lbc.108.2014.11.13.07.37.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 07:37:41 -0800 (PST) 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 hs14so7264040lab.9 for ; Thu, 13 Nov 2014 07:37:41 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr3070502laa.71.1415893061295; Thu, 13 Nov 2014 07:37:41 -0800 (PST) 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.184.201 with SMTP id ew9csp607509lbc; Thu, 13 Nov 2014 07:37:40 -0800 (PST) X-Received: by 10.66.156.168 with SMTP id wf8mr3386184pab.43.1415893058882; Thu, 13 Nov 2014 07:37:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yn7si25955352pab.122.2014.11.13.07.37.38 for ; Thu, 13 Nov 2014 07:37:38 -0800 (PST) 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 S1754113AbaKMPhe (ORCPT + 26 others); Thu, 13 Nov 2014 10:37:34 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:46353 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753973AbaKMPha (ORCPT ); Thu, 13 Nov 2014 10:37:30 -0500 X-Listener-Flag: 11101 Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2143992161; Thu, 13 Nov 2014 23:37:26 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Thu, 13 Nov 2014 23:37:24 +0800 From: Yingjoe Chen To: Thomas Gleixner , Jiang Liu , Marc Zyngier CC: Rob Herring , Pawel Moll , Mark Rutland , Matthias Brugger , Russell King , Jason Cooper , Yingjoe Chen , Grant Likely , Boris BREZILLON , , , , Bjorn Helgaas , Yijing Wang , , , , , , , Sascha Hauer Subject: [PATCH v6 2/6] genirq: Add more helper functions to support stacked irq_chip Date: Thu, 13 Nov 2014 23:37:05 +0800 Message-ID: <1415893029-2971-3-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1415893029-2971-1-git-send-email-yingjoe.chen@mediatek.com> References: <1415893029-2971-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 d88a28a..aa0703b 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -452,6 +452,12 @@ extern void handle_nested_irq(unsigned int irq); extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg); #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 8f362db..7abdef5 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)