From patchwork Thu Jun 19 10:38:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 32198 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 86F54203F4 for ; Thu, 19 Jun 2014 10:38:51 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf4591452ykq.0 for ; Thu, 19 Jun 2014 03:38:51 -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=CxKwvlHXd/DYvDX6gwmW6ST+WW/Zr1XWwhjmoikSFdI=; b=dqpmyc220HrtY8aP7zTXmtyrU4npzPA6RBqRm+zJa4PRiIo+7AVVK21iHqYtJatAtF luSLIaQ06itqixxQj0HuUSdRMHelBhpH2dskSx6/LX85Q0tjNFms2CAlDtudANMqXj/z LykJlgHjOwBoDMn1pNOnuNg6eoNole5kzSjwbJTPooHoEk/7EEpW+IySwLDN/O1X1Qiv f2Jxv74lsPeZdMxM+PTP8g29ZMyUlzQgiQW8eD5oqmZ77QanYPXZ0TvvIAs7SqfgbcRq kY3nOGyhw7b5OK8z3j3Z3yYvqgevPUxtTuygmQNKqymkEinkW6e7uEE7kdNMBMVQHimP JdSw== X-Gm-Message-State: ALoCoQlSWa9WQ/lrell2bCLOaDB/H8DXR9nt8rZQgUiZeh2hukVTiRjnkMTVNIqRL97q2fmMFnZR X-Received: by 10.236.93.238 with SMTP id l74mr1674349yhf.29.1403174331356; Thu, 19 Jun 2014 03:38:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.244 with SMTP id u107ls490989qge.52.gmail; Thu, 19 Jun 2014 03:38:51 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr3367643vcy.8.1403174331283; Thu, 19 Jun 2014 03:38:51 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id p3si2178442vcz.34.2014.06.19.03.38.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 03:38:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jz11so2092139veb.31 for ; Thu, 19 Jun 2014 03:38:51 -0700 (PDT) X-Received: by 10.52.118.99 with SMTP id kl3mr2840780vdb.18.1403174331203; Thu, 19 Jun 2014 03:38:51 -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.221.54.6 with SMTP id vs6csp351984vcb; Thu, 19 Jun 2014 03:38:50 -0700 (PDT) X-Received: by 10.194.92.176 with SMTP id cn16mr4059737wjb.43.1403174330170; Thu, 19 Jun 2014 03:38:50 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id lx10si6716221wjb.12.2014.06.19.03.38.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 03:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.48 as permitted sender) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id n12so2044230wgh.31 for ; Thu, 19 Jun 2014 03:38:49 -0700 (PDT) X-Received: by 10.180.189.234 with SMTP id gl10mr5354317wic.56.1403174329761; Thu, 19 Jun 2014 03:38:49 -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 hi2sm7881147wjb.29.2014.06.19.03.38.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jun 2014 03:38:49 -0700 (PDT) From: Daniel Thompson To: Jason Wessel Cc: Daniel Thompson , kgdb-bugreport@lists.sourceforge.net, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, 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 , kernel@stlinux.com, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, Fabio Estevam Subject: [PATCH v4 02/13] arm: fiq: Allow EOI to be communicated to the intc Date: Thu, 19 Jun 2014 11:38:12 +0100 Message-Id: <1403174303-25456-3-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403174303-25456-1-git-send-email-daniel.thompson@linaro.org> References: <1401961994-18033-1-git-send-email-daniel.thompson@linaro.org> <1403174303-25456-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.172 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 provide any API to perform this. This patch provides this API, implemented by adding a callback to the fiq_chip structure. Signed-off-by: Daniel Thompson Cc: Russell King Cc: Fabio Estevam Cc: Nicolas Pitre --- arch/arm/include/asm/fiq.h | 6 ++++++ arch/arm/kernel/fiq.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h index a7806ef..e5d9458 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h @@ -21,6 +21,11 @@ struct fiq_chip { void (*fiq_enable)(struct irq_data *data); void (*fiq_disable)(struct irq_data *data); + + /* .fiq_eoi() will be called from the FIQ handler. For this + * reason it must not use spin locks (or any other locks). + */ + void (*fiq_eoi)(struct irq_data *data); }; struct fiq_handler { @@ -43,6 +48,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); extern bool has_fiq(int fiq); extern void fiq_register_mapping(int irq, struct fiq_chip *chip); diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 567f8fd..edde332 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -183,6 +183,15 @@ void disable_fiq(int fiq) disable_irq(fiq + fiq_start); } +void eoi_fiq(int fiq) +{ + struct fiq_data *data = lookup_fiq_data(fiq); + + if (data && data->fiq_chip->fiq_eoi) + data->fiq_chip->fiq_eoi(data->irq_data); +} +EXPORT_SYMBOL(eoi_fiq); + bool has_fiq(int fiq) { struct fiq_data *data = lookup_fiq_data(fiq);