Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4815120imu; Tue, 8 Jan 2019 06:49:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vCTS4m0RT8snM4DyDy8ebJOunKu7FC+4KYcl4/n2ba6hjZGVrrb13jidBq38KaJBLW35v X-Received: by 2002:a65:610d:: with SMTP id z13mr1781544pgu.427.1546958988386; Tue, 08 Jan 2019 06:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546958988; cv=none; d=google.com; s=arc-20160816; b=GTo4iToeMnl1Dpo+wjUtDNf5+cwRQsFAoIEC82838jGBrDHwjk2mZBggwfrbS9Q2Op BYPLb3Hk+7qhGx+QT0YQfecEmY5zlzAM0bdM1b8o+prdEcXzVKTGHBt0Sey//8ZD7dOl lg3P1ygXF7RksbgVhGjJP7YU6ADFObSlgBGnqfSCq0Qt3QlbdVijyelC0eex36OGl4ms 16grKMUgFmZKfbG0lIZ7qwbNZtuFZxpiEi3pSE4lXpLGY95zazJx/iCYuPih/TBXkAuS CmqOplmLoAtuehjTyO8c/lmDfFbiTHA0wmtuBWVp3uhgBw4kT05qcnKSCoeqcmakqM9p Uv9A== 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=NvknDIR470QNMhxdB7gI3ct5HQUAffXvYH+gSOOCRHA=; b=YmQ5cJVi7+uuk6lBMNv5PRwqOocwkX3nM1ssge8vg4Wru8Hb72ox8xQI1D0d0ZzeAy B55gxuPNdVhhmg2jm4e2FzMgPWyAVYwOsIJ2eXSSvJwesAbPXkj3/LCrC5jOaTIqjADi noET5DN7+NxS0hwE2/yjQnN9vjjFBHA2VU58kZodM3uqttla4WWjlQybgmNZF5GrSbBC 6fbhlgndFiDaOQDL3h74bl6f2ZAzLY/2Olt8MYiaWuwfzD6e8jCI+t/8ARYEltREg1io cwM/W7qlgicEUMh6wCZSseFs0E/k4W2cJUx9hRHfdaF+lQbTTQsrmd/P3t8hLsmPy+LP 3Xgw== 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 2si14765752pgj.104.2019.01.08.06.49.32; Tue, 08 Jan 2019 06:49:48 -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 S1728607AbfAHNnj (ORCPT + 99 others); Tue, 8 Jan 2019 08:43:39 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:7269 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbfAHNna (ORCPT ); Tue, 8 Jan 2019 08:43:30 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43Ytkl0Dvtz9tyMx; Tue, 8 Jan 2019 14:43:27 +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 BAjCPbi1jfZO; Tue, 8 Jan 2019 14:43:26 +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 43Ytkk6s6Nz9tyMv; Tue, 8 Jan 2019 14:43:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 520B58B833; Tue, 8 Jan 2019 14:43:28 +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 WTmu2dCKXou5; Tue, 8 Jan 2019 14:43:28 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 17C978B7DF; Tue, 8 Jan 2019 14:43:28 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id CC1B4717F2; Tue, 8 Jan 2019 13:43:27 +0000 (UTC) Message-Id: <635f311db4c5956ca1e304cb42624ec9dd978907.1546954238.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v12 10/10] powerpc: clean stack pointers naming To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Mike Rapoport Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 8 Jan 2019 13:43:27 +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 | 11 +++-------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 1aef9316345f..983e53b427c0 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); } @@ -695,10 +695,7 @@ void *hardirq_ctx[NR_CPUS] __read_mostly; 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 bc55493ff164..debd8ac3834f 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -709,19 +709,14 @@ void __init emergency_stack_init(void) limit = min(ppc64_bolted_size(), ppc64_rma_size); for_each_possible_cpu(i) { - void *ti; - - ti = alloc_stack(limit, i); - paca_ptrs[i]->emergency_sp = ti + THREAD_SIZE; + paca_ptrs[i]->emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; #ifdef CONFIG_PPC_BOOK3S_64 /* emergency stack for NMI exception handling. */ - ti = alloc_stack(limit, i); - paca_ptrs[i]->nmi_emergency_sp = ti + THREAD_SIZE; + paca_ptrs[i]->nmi_emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; /* emergency stack for machine check exception handling. */ - ti = alloc_stack(limit, i); - paca_ptrs[i]->mc_emergency_sp = ti + THREAD_SIZE; + paca_ptrs[i]->mc_emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; #endif } } -- 2.13.3