Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3316577imu; Sun, 9 Dec 2018 23:20:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WxLKhdwOnrdWw+LLkHfbsTeCrjkAL7ccRe7SZTnK1vRKiDtn0N0tuCnro7Ec8lHHw7+uoP X-Received: by 2002:a17:902:2ac3:: with SMTP id j61mr11124666plb.185.1544426418080; Sun, 09 Dec 2018 23:20:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544426418; cv=none; d=google.com; s=arc-20160816; b=qTx7qaUKuP2CfMN0VM3y12pQmqnjYbtyOauKw9mdkbkrYA9b0mxluRTQuyW2Hp6F27 UKYZEez4KSyl7DtNkV6sACBZ5iBLX3Po/k3uq5VDsyV/n3417uRlzVdAqnO71KaNfAyf SpRtidUYJG6lBSw26OFYnZBPRT/OdReqIuoUP+zm0JUphgHOutNKW8JZJ7T9L7P5u50e iwDNq7aErcBTlciIP1xnEIpUIXLAkFIl4Usqc25yx9oTE1LJKEBYGx0RTUsMZw829ka6 xgLE6oNbBVrjk5hemOvzYud2fODBRxigHYfoLwDnpi7wzC2Yeo3at+lRiP5Ls7VNSJ4H /PIQ== 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; bh=lrmKwYRqFA8nbey09OtXRJNbZJLBNWWHtSwiVBj6JM4=; b=quIwNEINGNyok+EqzdbuU7fEHbcJSqzJW3BkgQzYqFmDG9m28NIXqfvIYbJ42plJNw ZhPbzVUGt9fz2pxEssiqGQivjf/0PVjEGIDr+Axvun9lvDmdJBET8mAYQ/teVEN/ku4d IhXs0Yztm3W7ovXQVIjhrPHmspc1ZXqUwHagQvG5e12yd0oEptKuR5XfTLcmpoS1kilx F3DNnp8XF/kaOhML3g3D+LdQdCzULPoIT0BBVBWjlF4FM23RxJbrcCrv/OGDqYd9BNIr hYu0CsDWHZ7afOPdoYlP1CJtkFXUJxVOmADJ2EZ1Bk3a3cUF38+BnvN8Lf4JqtF1Voum KEGg== ARC-Authentication-Results: i=1; mx.google.com; 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 n184si8492955pgn.95.2018.12.09.23.20.03; Sun, 09 Dec 2018 23:20:18 -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; 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 S1726752AbeLJHTK (ORCPT + 99 others); Mon, 10 Dec 2018 02:19:10 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:43728 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbeLJHTE (ORCPT ); Mon, 10 Dec 2018 02:19:04 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43CvZZ4GXKz9v6LS; Mon, 10 Dec 2018 08:19:02 +0100 (CET) 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 OjLUA-Lz-D94; Mon, 10 Dec 2018 08:19:02 +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 43CvZZ3jQ9z9v6Kp; Mon, 10 Dec 2018 08:19:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E4FFA8B79A; Mon, 10 Dec 2018 08:19:02 +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 b2grhkRJnspd; Mon, 10 Dec 2018 08:19:02 +0100 (CET) Received: from po14163vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D01528B74C; Mon, 10 Dec 2018 08:19:02 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id AE49D716E9; Mon, 10 Dec 2018 07:19:02 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v11 9/9] powerpc: clean stack pointers naming To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 10 Dec 2018 07:19:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some stack pointers used to also be thread_info pointers and were called tp. Now that they are only stack pointers, rename them sp. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/irq.c | 17 +++++++---------- arch/powerpc/kernel/setup_64.c | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 62cfccf4af89..754f0efc507b 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -659,21 +659,21 @@ void __do_irq(struct pt_regs *regs) void do_IRQ(struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); - void *curtp, *irqtp, *sirqtp; + void *cursp, *irqsp, *sirqsp; /* Switch to the irq stack to handle this */ - curtp = (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); - irqtp = hardirq_ctx[raw_smp_processor_id()]; - sirqtp = softirq_ctx[raw_smp_processor_id()]; + cursp = (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); + irqsp = hardirq_ctx[raw_smp_processor_id()]; + sirqsp = softirq_ctx[raw_smp_processor_id()]; /* Already there ? */ - if (unlikely(curtp == irqtp || curtp == sirqtp)) { + if (unlikely(cursp == irqsp || cursp == sirqsp)) { __do_irq(regs); set_irq_regs(old_regs); return; } /* Switch stack and call */ - call_do_irq(regs, irqtp); + call_do_irq(regs, irqsp); set_irq_regs(old_regs); } @@ -732,10 +732,7 @@ void irq_ctx_init(void) void do_softirq_own_stack(void) { - void *irqtp; - - irqtp = softirq_ctx[smp_processor_id()]; - call_do_softirq(irqtp); + call_do_softirq(softirq_ctx[smp_processor_id()]); } irq_hw_number_t virq_to_hw(unsigned int virq) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 0b227d0891ec..49765ccbc8c0 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -718,22 +718,22 @@ void __init emergency_stack_init(void) limit = min(ppc64_bolted_size(), ppc64_rma_size); for_each_possible_cpu(i) { - void *ti; + void *sp; - ti = alloc_stack(limit, i); - memset(ti, 0, THREAD_SIZE); - paca_ptrs[i]->emergency_sp = ti + THREAD_SIZE; + sp = alloc_stack(limit, i); + memset(sp, 0, THREAD_SIZE); + paca_ptrs[i]->emergency_sp = sp + THREAD_SIZE; #ifdef CONFIG_PPC_BOOK3S_64 /* emergency stack for NMI exception handling. */ - ti = alloc_stack(limit, i); - memset(ti, 0, THREAD_SIZE); - paca_ptrs[i]->nmi_emergency_sp = ti + THREAD_SIZE; + sp = alloc_stack(limit, i); + memset(sp, 0, THREAD_SIZE); + paca_ptrs[i]->nmi_emergency_sp = sp + THREAD_SIZE; /* emergency stack for machine check exception handling. */ - ti = alloc_stack(limit, i); - memset(ti, 0, THREAD_SIZE); - paca_ptrs[i]->mc_emergency_sp = ti + THREAD_SIZE; + sp = alloc_stack(limit, i); + memset(sp, 0, THREAD_SIZE); + paca_ptrs[i]->mc_emergency_sp = sp + THREAD_SIZE; #endif } } -- 2.13.3