From patchwork Wed Jan 27 19:32:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: adharmap@codeaurora.org X-Patchwork-Id: 75512 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0RJYPFF001412 for ; Wed, 27 Jan 2010 19:34:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755976Ab0A0Tdq (ORCPT ); Wed, 27 Jan 2010 14:33:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754556Ab0A0Tcj (ORCPT ); Wed, 27 Jan 2010 14:32:39 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:12510 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754346Ab0A0Tcg (ORCPT ); Wed, 27 Jan 2010 14:32:36 -0500 X-IronPort-AV: E=McAfee;i="5400,1158,5874"; a="32894957" Received: from pdmz-ns-mip.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.10]) by wolverine02.qualcomm.com with ESMTP/TLS/ADH-AES256-SHA; 27 Jan 2010 11:32:35 -0800 Received: from localhost.localdomain (pdmz-snip-v218.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 164E710004D1; Wed, 27 Jan 2010 11:33:16 -0800 (PST) From: adharmap@codeaurora.org To: linux-arm-kernel@lists.infradead.org Cc: Russell King , Ingo Molnar , Catalin Marinas , Yinghai Lu , Tony Lindgren , Santosh Shilimkar , Kevin Hilman , Kalle Valo , Jean Pihet , Linus Walleij , Colin Tuckley , Philby John , Srinidhi Kasagar , Alessandro Rubini , Andrea Gallo , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Abhijeet Dharmapurikar Subject: [PATCH 2/5] gic: add callback for mask_ack Date: Wed, 27 Jan 2010 11:32:26 -0800 Message-Id: <1264620749-24527-3-git-send-email-adharmap@codeaurora.org> X-Mailer: git-send-email 1.5.6.3 In-Reply-To: <1264620749-24527-1-git-send-email-adharmap@codeaurora.org> References: <1264620749-24527-1-git-send-email-adharmap@codeaurora.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index e763c4c..00172c4 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -108,6 +108,15 @@ static void gic_unmask_irq(unsigned int irq) spin_unlock(&irq_controller_lock); } +static void gic_mask_ack_irq(unsigned int irq) +{ + u32 mask = 1 << (irq % 32); + spin_lock(&irq_controller_lock); + writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4); + writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); + spin_unlock(&irq_controller_lock); +} + #ifdef CONFIG_SMP static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) { @@ -160,6 +169,7 @@ static struct irq_chip gic_chip = { .name = "GIC", .ack = gic_ack_irq, .mask = gic_mask_irq, + .mask_ack = gic_mask_ack_irq, .unmask = gic_unmask_irq, #ifdef CONFIG_SMP .set_affinity = gic_set_cpu,