Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp268340ybl; Thu, 23 Jan 2020 23:24:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyXC1KLhkmCWAHDNWNvVHeJt+o/JxXuX4W9OM+1Cb75b3LtTJKndNa5PhWhItURMo6XVbhC X-Received: by 2002:aca:d484:: with SMTP id l126mr1152019oig.114.1579850642941; Thu, 23 Jan 2020 23:24:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579850642; cv=none; d=google.com; s=arc-20160816; b=FI6HpSjEljFR0smYkUVP+NhRDcqCTRHG05aGABGXKfG4L7BNvzq8wUirz6LS/3K6RG mnQMrlCbruaB33rws95awdZ9/h8BtCG2rludAAhibYdjWw2pCjFrvebeezLobPvf2W7F AiOp9DWWOvJT084/a2U2dVxuncUdc3WjDy3mYlzxJ+AWnzmU9IiJjakd8VjL5IfwAM6K 7VsgvV00oD4A5U4jflctVT+B3oykEU5FkiYf+Trx+XU8EYfd3XEw2hRd8MXfu5bLkF2l aTZ2DJrhaixNiXHPaRiiktBcT/8LgjCuTWHgiY5uP/zmS3A02WgCy0IqJpkXN6PRwCZw 6TXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=7sNJkXXrrR2l09m78IGdGM/V65gmCVpuHAJKsu4TK5w=; b=PMGUZdjxtrn04Znx+8GiOXo+209YCfg9wgnKQM3yAy1xt6vAM9uK4k/vTIEIAEFQpw 3tcyAXcqWNoNxJje+nsd8TWeAPL6NFHZg2DbA2n3jOTLjfFDCpau7kD7N4SaGsTBySla 5DfzuufW0vGTO5aKs6C9vxlhpI2+IGn32ThgPFzA7CeiVs7CnwEGsgLqCe/gR9dwsRa1 9smVgc90tshXKwjF99DEjflT03aXY8YpHkWkpmmgMlgd0tDilwtDZreVGGVtgfJABX4s 5tSsGHj/iF4+qGQDyU6gMo2BfnpkfqGGXj0/WN3q+vTn3Hvc0BO7GE9X2h58aDEI+B7m AHdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="nY/E0H35"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si2378238otq.96.2020.01.23.23.23.47; Thu, 23 Jan 2020 23:24:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="nY/E0H35"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730129AbgAXHH5 (ORCPT + 99 others); Fri, 24 Jan 2020 02:07:57 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:46469 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729893AbgAXHHz (ORCPT ); Fri, 24 Jan 2020 02:07:55 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 483qwT5mPvz9tyWd; Fri, 24 Jan 2020 08:07:53 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=nY/E0H35; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id eb61aV3emSk8; Fri, 24 Jan 2020 08:07:53 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 483qwT4Ztzz9tyWM; Fri, 24 Jan 2020 08:07:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1579849673; bh=7sNJkXXrrR2l09m78IGdGM/V65gmCVpuHAJKsu4TK5w=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=nY/E0H35e3j5q9kSynJCW29VBxKp+r5I9zaCY22ZI888zStCb3Q8KEG/YAZEdRZNN wdX+EXlvUaL0hsWJGo68tFZ/txIHYTc9SaGqgmm7tUcRRkFV8HRrhc0Q/wb8RAvwDX cWeZMmWYP0D+YXz5Bgw2xBfR5IQjxErEwdKTzn2s= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8572A8B83D; Fri, 24 Jan 2020 08:07:54 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id qUFsSM37Df73; Fri, 24 Jan 2020 08:07:54 +0100 (CET) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.111]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 64F658B768; Fri, 24 Jan 2020 08:07:54 +0100 (CET) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 6358E6379C; Fri, 24 Jan 2020 07:07:54 +0000 (UTC) Message-Id: In-Reply-To: <435e0030e942507766cbef5bc95f906262d2ccf2.1579849665.git.christophe.leroy@c-s.fr> References: <435e0030e942507766cbef5bc95f906262d2ccf2.1579849665.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v2 3/3] powerpc/irq: don't use current_stack_pointer() in do_IRQ() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 24 Jan 2020 07:07:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(), which is an heavier function as it is an outline assembly function which cannot be inlined and which reads the content of the stack at 0(r1) Revert to just using get_sp() for geting r1 and masking out its value to obtain the base address of the stack pointer as before. Signed-off-by: Christophe Leroy Fixes: 7306e83ccf5c ("powerpc: Don't use CURRENT_THREAD_INFO to find the stack") --- v2: New in this series. Using get_sp() --- 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 9333e115418f..193c2b64ce37 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -647,7 +647,7 @@ void do_IRQ(struct pt_regs *regs) void *cursp, *irqsp, *sirqsp; /* Switch to the irq stack to handle this */ - cursp = (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); + cursp = (void *)(get_sp() & ~(THREAD_SIZE - 1)); irqsp = hardirq_ctx[raw_smp_processor_id()]; sirqsp = softirq_ctx[raw_smp_processor_id()]; -- 2.25.0