From patchwork Mon Aug 29 14:29:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1108322 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7TEVB9x031558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 29 Aug 2011 14:31:32 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qy2rN-00021C-5u; Mon, 29 Aug 2011 14:30:45 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qy2rM-0002ku-Nb; Mon, 29 Aug 2011 14:30:44 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qy2rH-0002kc-Br for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2011 14:30:42 +0000 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7TEUSLs012350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Aug 2011 09:30:29 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7TEUS2N005566; Mon, 29 Aug 2011 09:30:28 -0500 (CDT) Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7TEUSs0008600; Mon, 29 Aug 2011 09:30:28 -0500 (CDT) Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Mon, 29 Aug 2011 09:30:28 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7TEUSO6016966; Mon, 29 Aug 2011 09:30:28 -0500 Received: from localhost (lta0393540.apr.dhcp.ti.com [172.24.136.137]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p7TEUQ001204; Mon, 29 Aug 2011 09:30:26 -0500 (CDT) From: Venkatraman S To: Subject: [RFC PATCH] arm: fiq: convert enable/disable_fiq to inline functions Date: Mon, 29 Aug 2011 19:59:37 +0530 Message-ID: <1314628177-3193-1-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110829_103039_536712_A1E0A264 X-CRM114-Status: GOOD ( 15.31 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.94.94.40 listed in list.dnswl.org] -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: nicolas.pitre@linaro.org, rmk+kernel@arm.linux.org.uk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 29 Aug 2011 14:31:32 +0000 (UTC) FIQ_START is an platform specific constant used in the implementation of enable_fiq and disable_fiq. Converting then to inline functions enables different architectures which use the FIQ module to exist in a single zImage with different values of FIQ_START. Signed-off-by: Venkatraman S --- arch/arm/include/asm/fiq.h | 13 +++++++++++-- arch/arm/kernel/fiq.c | 11 ----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h index d493d0b..e84a8cc 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h @@ -17,6 +17,7 @@ #define __ASM_FIQ_H #include +#include struct fiq_handler { struct fiq_handler *next; @@ -36,8 +37,16 @@ struct fiq_handler { extern int claim_fiq(struct fiq_handler *f); 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); + +static inline void enable_fiq(int fiq) +{ + enable_irq(fiq + FIQ_START); +} + +static inline void disable_fiq(int fiq) +{ + disable_irq(fiq + FIQ_START); +} /* 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 4c164ec..49e5355 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -122,23 +122,12 @@ void release_fiq(struct fiq_handler *f) while (current_fiq->fiq_op(current_fiq->dev_id, 0)); } -void enable_fiq(int fiq) -{ - enable_irq(fiq + FIQ_START); -} - -void disable_fiq(int fiq) -{ - disable_irq(fiq + FIQ_START); -} EXPORT_SYMBOL(set_fiq_handler); EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ EXPORT_SYMBOL(claim_fiq); EXPORT_SYMBOL(release_fiq); -EXPORT_SYMBOL(enable_fiq); -EXPORT_SYMBOL(disable_fiq); void __init init_FIQ(void) {