From patchwork Tue Apr 15 08:28:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 28396 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7F41A2036A for ; Tue, 15 Apr 2014 08:28:29 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf49948489oag.1 for ; Tue, 15 Apr 2014 01:28:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=D60g10+zkUinIp3AowzH+LGT6ly19xG7NZgDUgD0FWc=; b=HAP1ezZ7Ek7AS4ZwiK6c8aPaCg8HGVAQyFOp5yC6RCKl7C187/OjNNmXrzAgK8a+9/ 3yeA3xoLDaj+n8BjMKgPectsjnWq+TRen2Sdi1hDlBPX4uYk3LBUs/0o5yO7XSeEWcZm mId5MoshNYaV9EWiwBjWA79zz6Axew+FEvYQ0MPEtpAlHsfUvsUlIOMHUCxNCw7wPGEM 0v2Zn+ZCmAE4b68KSPZoOylgQeBjpRi+YZ4FjnhQIfY1V7WOv/KaEDPWD24As59gphdG Ewppm5EdUFhexWUve9o7xpW+U50nA7GHCxnxlL0iaS62L7A4fUBlD4gLU6NHPHgry5wP dxVw== X-Gm-Message-State: ALoCoQkA/CGlAPGqpY7cYBIIf42Ghkt4X4lTeTZ+NEPMGMG56tsCb+uAlF/AbS0JksnwHFrtMSzv X-Received: by 10.42.123.66 with SMTP id q2mr196327icr.16.1397550509094; Tue, 15 Apr 2014 01:28:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.70 with SMTP id n64ls28938qga.19.gmail; Tue, 15 Apr 2014 01:28:28 -0700 (PDT) X-Received: by 10.220.147.16 with SMTP id j16mr236635vcv.14.1397550508930; Tue, 15 Apr 2014 01:28:28 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id f17si3278184vcq.93.2014.04.15.01.28.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 01:28:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so8601494veb.6 for ; Tue, 15 Apr 2014 01:28:28 -0700 (PDT) X-Received: by 10.58.90.99 with SMTP id bv3mr230115veb.34.1397550508815; Tue, 15 Apr 2014 01:28:28 -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.220.221.72 with SMTP id ib8csp212492vcb; Tue, 15 Apr 2014 01:28:28 -0700 (PDT) X-Received: by 10.68.227.4 with SMTP id rw4mr481344pbc.3.1397550507971; Tue, 15 Apr 2014 01:28:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id et3si10355705pbc.248.2014.04.15.01.28.26; Tue, 15 Apr 2014 01:28:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbaDOI2Q (ORCPT + 26 others); Tue, 15 Apr 2014 04:28:16 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:45624 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbaDOI2O (ORCPT ); Tue, 15 Apr 2014 04:28:14 -0400 Received: by mail-wi0-f179.google.com with SMTP id z2so5250596wiv.12 for ; Tue, 15 Apr 2014 01:28:13 -0700 (PDT) X-Received: by 10.194.57.77 with SMTP id g13mr479352wjq.42.1397550493287; Tue, 15 Apr 2014 01:28:13 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id be3sm28705504wjc.5.2014.04.15.01.28.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Apr 2014 01:28:12 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, Thomas Gleixner Cc: Linus Walleij Subject: [PATCH] irqchip: vic: properly chain the cascaded IRQs Date: Tue, 15 Apr 2014 10:28:04 +0200 Message-Id: <1397550484-7119-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.0 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: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , We are flagging the parent IRQ as chained, then we must also make sure to call the chained_irq_[enter|exit] functions for things to work smoothly. Cc: Thomas Gleixner Signed-off-by: Linus Walleij --- Hi Thomas, please pick this fix for v3.15-rc:s if it's OK. --- drivers/irqchip/irq-vic.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index 37dab0b472cd..7d35287f9e90 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -228,12 +229,17 @@ static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) static void vic_handle_irq_cascaded(unsigned int irq, struct irq_desc *desc) { u32 stat, hwirq; + struct irq_chip *host_chip = irq_desc_get_chip(desc); struct vic_device *vic = irq_desc_get_handler_data(desc); + chained_irq_enter(host_chip, desc); + while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) { hwirq = ffs(stat) - 1; generic_handle_irq(irq_find_mapping(vic->domain, hwirq)); } + + chained_irq_exit(host_chip, desc); } /*