Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1523342imu; Sat, 12 Jan 2019 01:58:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN5WXEuJKqeWvNWyD4v8fjZqE11o2gVYMJVlah6zaR7ZrJ7geYkYWXkhFYOOhPgiC6uXCwz8 X-Received: by 2002:a62:42d4:: with SMTP id h81mr17940941pfd.259.1547287094470; Sat, 12 Jan 2019 01:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547287094; cv=none; d=google.com; s=arc-20160816; b=qjUYstG+/k5EscuBlXuGVCUHjEsyzeuFcaT4RfYHF66Ry3pc/rnUP1BTS7C+nf7lcU gzoCjJaPLCg3dFY0w0vQEHWwy6Pz5M0hpiTMthlhXphkj0/PcuixZuwTHy9XlIPEMAX8 3akLo+AtADc2ho8+7rs8A+l6SuOxl7P7aEp0nmPUamtNSyutXwXP9ABTzGui+0fnhGkd eKMiybuvTwqvfMrsv+MM66CXhQkGP7WjhAH+EJKom4U3J17D7a9UaZtNEGHQ37tziRG7 K81/OV5bNMNTr2Ujk1gqkunBGejvlN8Jz+Yb7jV81DdnKV59otNAjMC1aozvPPqyFwvD Zw6w== 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=/OnhIuu543dB5jMOsXSXdaX1R61efNj8g217u70Y+HU=; b=yBDOik87R67EkDvPFo6G0psUDeoRMn+NRo3pthfVXb8+z0IHwuPlFvrRD2tbctou6c 3h5bA6HUfh4J4IkgAxVn7wHqhWz1yoRpOYWNBvO+es+6Ul9umcWml/azfwLgwax6yiGg 8ffK7XeuOK9OYTfiMwO/QqDURbp+J705RR9urEPEshHRfjbWf3leQ2Mae2H6cxfJJuBV IKzJKUsZiCYrbDIscAHcmEz4U9UXLaMOc4sQ1Rj9G45Sozy+cdYmOO5w8yTorO1RXLnk afsrw/aFGUENF6EHiQifS6ViGT5KWoLWG4r/0vQAJtjd4nT4Sp7nHZxUsoj9OZNbRqDH G8FQ== 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 z2si5969104pgs.267.2019.01.12.01.57.59; Sat, 12 Jan 2019 01:58:14 -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 S1726547AbfALJz5 (ORCPT + 99 others); Sat, 12 Jan 2019 04:55:57 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:33873 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbfALJzy (ORCPT ); Sat, 12 Jan 2019 04:55:54 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43cFVG4w8Fz9vCJC; Sat, 12 Jan 2019 10:55:50 +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 m37iJdrXZr8W; Sat, 12 Jan 2019 10:55:50 +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 43cFVG4Rp4z9vCJ7; Sat, 12 Jan 2019 10:55:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 798D08B77F; Sat, 12 Jan 2019 10:55:53 +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 IawgIlqyfz7y; Sat, 12 Jan 2019 10:55:53 +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 449638B74C; Sat, 12 Jan 2019 10:55:53 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 042F87183D; Sat, 12 Jan 2019 09:55:53 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v13 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: Sat, 12 Jan 2019 09:55:53 +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 2db1c5f7d141..daa361fc6a24 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -716,19 +716,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