From patchwork Mon Oct 26 00:10:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 7484391 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C9722BEEA4 for ; Mon, 26 Oct 2015 00:17:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5DF32070A for ; Mon, 26 Oct 2015 00:17:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C01420675 for ; Mon, 26 Oct 2015 00:17:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZqVRp-0004bA-81; Mon, 26 Oct 2015 00:15:37 +0000 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZqVRl-0004Uq-Na for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2015 00:15:34 +0000 Received: by qgeo38 with SMTP id o38so108376547qge.0 for ; Sun, 25 Oct 2015 17:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur_com_ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=/aKTGWjHAEJAkeZRD8b97CsifPRsBn1eNed1AuqXQhQ=; b=sFMsA2hTK9mvmBO/nbHmis+RQQusX7p2XgIQ7OxuaMhgfPdlsMlAangdiPTuCYhPg/ EGcx+P4KDg6nvjG6O+8Svtw9a6f1IPOvK3y3wKzsn6wEQ9J7fbnAGo2rmbV8vbcRWdHF aBa2OZAMYB1txGRMRNuqHKPMednkaVxJMifMytKYkEvv9M3CYGyETojQC5jBU0C92er6 OVG9sl+yqDSlSLTYF2tzjbBLoqPJC42all7qTo7qUBWHod9qplRDPTNlBKLdMt6jPC6E qJe3pMPfMcbeNWxOnQwbjy0a+WWC9hDYKcW291R8xA6hOWzXEi8xhPhe0XKw6nMKA42w eW4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/aKTGWjHAEJAkeZRD8b97CsifPRsBn1eNed1AuqXQhQ=; b=lTbwoHhvW7dn4Pv0mJwJqOF38rgENiTCVyHnmjShXKgO84SYbT/FyYH6q9SheT1rBL w36+wnXZo5jNZpA8m6+hiOCd22/sDrkpJHc3KZb9LCQNb+DbyHJtY8yKiT5wedjfuak9 C4gNK+vt9A9gKu5Y02mM2gqRBnO3bqlbBF/e3Q1h8wbamJetGljdvEv4Fwh02vsph9rk x2ba+vrffBclEKthNCcPeE75ESNs4fPRSrWsJ0QP1Y0ku/Q5FtatZR14FqsQ1dojZmyK LPgDj5GmWQwEtMcyhhZObxfRI2K8uNc5snIqgU0/WeO6CvyJEKWdmdHSaaqfMjucG/hT NuNQ== X-Gm-Message-State: ALoCoQlkMUy5ZV8IAU4UWGyCXnDSPtsvl74nmQJzUByPS1Xhfbb6zqBDSwhqE3w6Cv6jKZk4ScQi X-Received: by 10.140.98.72 with SMTP id n66mr2871496qge.102.1445818512090; Sun, 25 Oct 2015 17:15:12 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id w18sm11377154qgw.1.2015.10.25.17.15.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Oct 2015 17:15:11 -0700 (PDT) From: Ezequiel Garcia To: , Russell King , u.kleine-koenig@pengutronix.de Subject: [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler Date: Sun, 25 Oct 2015 21:10:52 -0300 Message-Id: <1445818252-13175-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.5.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151025_171534_070029_B1D0CEAA X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joachim Eastwood , mcoquelin.stm32@gmail.com, stefan@agner.ch, Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PendSV handler calls v7m_exception_entry which disables IRQs. Therefore, since IRQs are already disabled, the PendSV handler can return using ret_to_user_from_irq. Signed-off-by: Ezequiel Garcia Acked-by: Uwe Kleine-König --- Tested on a NXP LPC43xx platform. arch/arm/kernel/entry-v7m.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S index b6c8bb9315e7..907534f97053 100644 --- a/arch/arm/kernel/entry-v7m.S +++ b/arch/arm/kernel/entry-v7m.S @@ -88,7 +88,7 @@ __pendsv_entry: @ execute the pending work, including reschedule get_thread_info tsk mov why, #0 - b ret_to_user + b ret_to_user_from_irq ENDPROC(__pendsv_entry) /*