From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF5C8C11D04 for ; Thu, 20 Feb 2020 12:04:01 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91BC420722 for ; Thu, 20 Feb 2020 12:04:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="qk6UDVK2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91BC420722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48NYCg3TkYzDqWS for ; Thu, 20 Feb 2020 23:03:59 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48NXxg0bFMzDqGh for ; Thu, 20 Feb 2020 22:51:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=qk6UDVK2; dkim-atps=neutral Received: by ozlabs.org (Postfix) id 48NXxf6MKSz9sR4; Thu, 20 Feb 2020 22:51:50 +1100 (AEDT) Received: by ozlabs.org (Postfix, from userid 1034) id 48NXxf4qptz9sSH; Thu, 20 Feb 2020 22:51:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1582199510; bh=+KZ5UNDD8klt0PNfIkxXpIjC4PXkIYNkPckrNNn5GXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qk6UDVK2AoE7k7ukk1YLMCz0/RsLhcwvociG6zVaR5VClj9ao3jWvbHn4NpMjOMsN 2Nhqe5MwTrtPPgMEjFcDOZYdVjCpJaYvBx8y62rHdZ3Q1texYNcmkpN6kzRZuZ53+e ODI/ztYS3GKjZ3GylqleTYcnU4ldP20XcbwdUkNhHRM68RHtd9+TW4qDtrqmUCoWv9 XCF3U1arj5DPmVnNiFOqMwankzodSYhzrnDdXUQh7JPpCNFWnjFMmfSQNB3DCN7/Ou 76OZGUm5sNarZQFuvdCenuHveo/dtC7HPb1+O0CsGn37gqOxYM9YNGtUcBiSIvM8Ze 8HcqBRY4Ud3AA== From: Michael Ellerman To: linuxppc-dev@ozlabs.org Subject: [PATCH v3 5/5] powerpc/irq: Use current_stack_pointer in do_IRQ() Date: Thu, 20 Feb 2020 22:51:41 +1100 Message-Id: <20200220115141.2707-5-mpe@ellerman.id.au> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200220115141.2707-1-mpe@ellerman.id.au> References: <20200220115141.2707-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Christophe Leroy Until commit 7306e83ccf5c ("powerpc: Don't use CURRENT_THREAD_INFO to find the stack"), the current stack base address was obtained by calling current_thread_info(). That inline function was simply masking out the value of r1. In that commit, it was changed to using current_stack_pointer() (since renamed current_stack_frame()), which is a heavier function as it is an outline assembly function which cannot be inlined and which reads the content of the stack at 0(r1). Convert to using current_stack_pointer for geting r1 and masking out its value to obtain the base address of the stack pointer as before. Fixes: 7306e83ccf5c ("powerpc: Don't use CURRENT_THREAD_INFO to find the stack") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a37e699e7ab897742c07b6838a08af33bc9217e3.1579849665.git.christophe.leroy@c-s.fr --- arch/powerpc/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 46d5852fb00a..1bed18b7229e 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -648,7 +648,7 @@ void do_IRQ(struct pt_regs *regs) void *cursp, *irqsp, *sirqsp; /* Switch to the irq stack to handle this */ - cursp = (void *)(current_stack_frame() & ~(THREAD_SIZE - 1)); + cursp = (void *)(current_stack_pointer & ~(THREAD_SIZE - 1)); irqsp = hardirq_ctx[raw_smp_processor_id()]; sirqsp = softirq_ctx[raw_smp_processor_id()]; -- 2.21.1 v3: s/get_sp()/current_stack_pointer/