From patchwork Wed May 14 15:58:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 30170 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39B9D20446 for ; Wed, 14 May 2014 15:59:28 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf9850530pab.1 for ; Wed, 14 May 2014 08:59:27 -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:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=hYEZfOdrOUFVyowuoCtLwlEWz7ADlXaeOr/SpZlrXkA=; b=Wd3x3CwKRn6wfrKFqOE6NiD5xHjsf5IT4oA9sFv1qJO4Z0nwjWkUah2kkfg1ggxCGX avwgm/pRWFuc6uHO+scogbPSt0n6QdQ87ID9xePFX34NlESoA/dzHA6Pu3csY6FFz55b QtHM7gb/weADdxFTAoZQkDa0K/DC7oBiDKmMOxKiNPCCb30+YYvDFtN3Uiud20KshTBu yE1wWabCfbxoK2D0PTgUTm2Ir4e2FAZNzb88xGE08cCGJQwsTRfAlxpamP69toFYtCNe ZFjwVn9MlINgOj+Nb3ckcFDaFtD0P6O4c9pVxsGMIDIYHPuGJKapbsAedwroQRFZwd4Y xWkg== X-Gm-Message-State: ALoCoQkdxqo+hem7P6aB40VR7FfCYoBtPKbvmn9Ffp/z14WeyaMgZmvA/92zUG2vjGzJeYVkFH2y X-Received: by 10.66.122.70 with SMTP id lq6mr10587191pab.47.1400083167566; Wed, 14 May 2014 08:59:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.35 with SMTP id d32ls2531350qga.87.gmail; Wed, 14 May 2014 08:59:27 -0700 (PDT) X-Received: by 10.58.94.135 with SMTP id dc7mr428365veb.66.1400083167451; Wed, 14 May 2014 08:59:27 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id t4si398572vcz.58.2014.05.14.08.59.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 08:59:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id sa20so2630366veb.41 for ; Wed, 14 May 2014 08:59:27 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr71827vec.80.1400083167389; Wed, 14 May 2014 08:59:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp251758vcb; Wed, 14 May 2014 08:59:26 -0700 (PDT) X-Received: by 10.194.120.68 with SMTP id la4mr3811426wjb.40.1400083166509; Wed, 14 May 2014 08:59:26 -0700 (PDT) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx.google.com with ESMTPS id hn5si852245wjc.44.2014.05.14.08.59.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 08:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.46 as permitted sender) client-ip=74.125.82.46; Received: by mail-wg0-f46.google.com with SMTP id n12so2162894wgh.5 for ; Wed, 14 May 2014 08:59:25 -0700 (PDT) X-Received: by 10.180.11.137 with SMTP id q9mr4182668wib.13.1400083165886; Wed, 14 May 2014 08:59:25 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id dn4sm4687808wib.18.2014.05.14.08.59.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 May 2014 08:59:25 -0700 (PDT) From: Daniel Thompson To: Jason Wessel , kgdb-bugreport@lists.sourceforge.net Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, Daniel Thompson , linux-kernel@vger.kernel.org, John Stultz , Anton Vorontsov , Colin Cross , Dirk Behme , kernel-team@android.com, Russell King , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , "David A. Long" , Nicolas Pitre , Catalin Marinas , Frederic Weisbecker , Linus Walleij , Christoffer Dall , linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, devicetree@vger.kernel.org, linux-serial@vger.kernel.org Subject: [RFC 1/8] arm: fiq: Allow EOI to be communicated to the intc Date: Wed, 14 May 2014 16:58:38 +0100 Message-Id: <1400083125-1464-2-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400083125-1464-1-git-send-email-daniel.thompson@linaro.org> References: <1400083125-1464-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Modern ARM systems require an EOI to be sent to the interrupt controller on completion of both IRQ and FIQ. The FIQ code currently does not permit this requiring nasty register poke hacks from the FIQ handler. This patch provides a simple interface for C based handlers to complete a FIQ. Signed-off-by: Daniel Thompson --- arch/arm/include/asm/fiq.h | 1 + arch/arm/kernel/fiq.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h index d493d0b..5a2a9b9 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h @@ -38,6 +38,7 @@ extern void release_fiq(struct fiq_handler *f); extern void set_fiq_handler(void *start, unsigned int length); extern void enable_fiq(int fiq); extern void disable_fiq(int fiq); +extern void eoi_fiq(int fiq); /* helpers defined in fiqasm.S: */ extern void __set_fiq_regs(unsigned long const *regs); diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 918875d..defbe85 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -139,6 +140,15 @@ void disable_fiq(int fiq) disable_irq(fiq + fiq_start); } +void eoi_fiq(int fiq) +{ + struct irq_data *irq_data = irq_get_irq_data(fiq + fiq_start); + struct irq_chip *chip = irq_data_get_irq_chip(irq_data); + + if (chip->irq_eoi) + chip->irq_eoi(irq_data); +} + EXPORT_SYMBOL(set_fiq_handler); EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ @@ -146,6 +156,7 @@ EXPORT_SYMBOL(claim_fiq); EXPORT_SYMBOL(release_fiq); EXPORT_SYMBOL(enable_fiq); EXPORT_SYMBOL(disable_fiq); +EXPORT_SYMBOL(eoi_fiq); void __init init_FIQ(int start) {