Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1069736imu; Wed, 28 Nov 2018 04:13:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/UOba99O3zCl1NbKsI9IdKXba0MXDhZh9Ntv1GD1uXlBw1A/7V2r0yCJ+y/2WOINAjVDHrp X-Received: by 2002:a17:902:8214:: with SMTP id x20-v6mr35289140pln.224.1543407223726; Wed, 28 Nov 2018 04:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543407223; cv=none; d=google.com; s=arc-20160816; b=kzjF5gX6VdtYeuOcO7CQNcNhPN/77iMsRvyOuMQCrJUkxVvc7UpqObT0nUnyWg1L98 jDXyYLCkbBp6ysrd2m6ANLZxV4kILwu7BQTTpdYmsdave1Rpqvn27dE9Fo8s8miTM3kc iThrWvwVz5irGSYNaTWcEnK2BI5irqT00kufnx6+3e113P0S/4UYO+UwbDCK75E++Wed r9+hxyV+Bz5/e4HA9PRPEWWjDAexCNWDGPFhuU+VGzbcakPcF4xkymN8sXmFGkGtYh49 PtS15wzqYT0kilVwsTx4u45jyy5bI9uLDZfdjQVV5k2457EAzGsdLEpS+QV/9wsOepvV Qr1g== 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=NQP16aAwUZzvHrNIJlOCyMiqmwyHPVp1at6mkHGst+Dx5viLBYLN75ozs+80E3z/Ji E1icDOCyrJuo6F39bWpbgEtxr4DnzUVFL0p5OOxGu0C3OOsfrCo0i1wAZQ5xZzeN1KNj Ytk9qNVotsOWp0UkL69f0HRe/SIf/n1CY1QkV0XGgUoEwoysD1//f2y+jXnCQ18gm0Cb tECAoTB3ohHY8zCmgcGUq2cJND1liZ8dWTnv6p5nj2ZJU/qXlDr9Mq4LnP8u8bharxhb xBYcQdWlcDcmVo8sBEb4od1Wf6CYuEn7Vv/hpX8wPG3EBTEdTirm+LpLscoypxk8GEmu bFaQ== 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 p2si6913749pgr.133.2018.11.28.04.13.28; Wed, 28 Nov 2018 04:13:43 -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 S1728485AbeK1XOL (ORCPT + 99 others); Wed, 28 Nov 2018 18:14:11 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:18667 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727703AbeK1XOK (ORCPT ); Wed, 28 Nov 2018 18:14:10 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 434ffw47rCz9vGlP; Wed, 28 Nov 2018 13:12:40 +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 dHmZxBftJYNs; Wed, 28 Nov 2018 13:12:40 +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 434ffw3fNQz9vGlK; Wed, 28 Nov 2018 13:12:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 985578B869; Wed, 28 Nov 2018 13:12:41 +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 FnCU7BsZZNCl; Wed, 28 Nov 2018 13:12:41 +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 777D28B853; Wed, 28 Nov 2018 13:12:41 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 5580969B13; Wed, 28 Nov 2018 12:12:41 +0000 (UTC) Message-Id: <6f171061dc57c3b670ad70fe42ce14913b3461d3.1543407004.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v10 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: Wed, 28 Nov 2018 12:12:41 +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