From patchwork Mon Oct 27 15:49:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 5162101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B678D9F43D for ; Mon, 27 Oct 2014 15:52:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3FBB2017D for ; Mon, 27 Oct 2014 15:52:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC39C20172 for ; Mon, 27 Oct 2014 15:52:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XimYi-0006xn-Lg; Mon, 27 Oct 2014 15:50:16 +0000 Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XimYe-0005ot-TK for linux-arm-kernel@lists.infradead.org; Mon, 27 Oct 2014 15:50:13 +0000 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-05v.sys.comcast.net with comcast id 8Fpn1p00729Cfhx01Fpn9W; Mon, 27 Oct 2014 15:49:47 +0000 Received: from gentwo.org ([98.213.233.247]) by resomta-ch2-03v.sys.comcast.net with comcast id 8Fpm1p0045Lw0ES01FpmrW; Mon, 27 Oct 2014 15:49:47 +0000 Received: by gentwo.org (Postfix, from userid 1001) id DD71119D; Mon, 27 Oct 2014 10:49:45 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id DAEDD12C; Mon, 27 Oct 2014 10:49:45 -0500 (CDT) Date: Mon, 27 Oct 2014 10:49:45 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Tejun Heo Subject: [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1414424987; bh=0feUmLZO+crzD7urfufeQMFn1AjLidClXOrrMCKCktE=; h=Received:Received:Received:Received:Date:From:To:Subject: Message-ID:Content-Type; b=BSP3t4fo9b2rlPUvTlKanizJBhKEtpure3730Yaawuf1cZDvpjJ6ecbneuODDnuAc UddC5xGRBd+KyynzHSR+GJ/+IAFWXAKWP8YqRPecD7ix/NS86dMxmLE49d0NIK3+mS 3U3M6wxt6/Dbk/oAguTIOldw6oFURGMoOpRQX7rLVRESpLC6KEwWh0Mid5ZVTtcWY/ 1dMEdjbteZw8iHLxNKR/TeLI1k6rbCrCyeqHVTY/7vXP9/tfgmm9PphD05XmOB4vgx cwofYiMc/i/L2o+Xi+aWfX07XgZnTr94DIhLyGQWji8P0gm5lQTlg71IrRrm4SH9yj g0Aouk+8uxvaQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141027_085013_005082_9EB7DB55 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, John Stultz , Thomas Gleixner , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP During the 3.18 merge period additional __get_cpu_var uses were added. The patch converts these to this_cpu_ptr(). Signed-off-by: Christoph Lameter Acked-by: Thomas Gleixner Index: linux/arch/arm64/kernel/psci.c =================================================================== --- linux.orig/arch/arm64/kernel/psci.c +++ linux/arch/arm64/kernel/psci.c @@ -511,7 +511,7 @@ static int cpu_psci_cpu_kill(unsigned in static int psci_suspend_finisher(unsigned long index) { - struct psci_power_state *state = __get_cpu_var(psci_power_state); + struct psci_power_state *state = __this_cpu_read(psci_power_state); return psci_ops.cpu_suspend(state[index - 1], virt_to_phys(cpu_resume)); @@ -520,7 +520,7 @@ static int psci_suspend_finisher(unsigne static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index) { int ret; - struct psci_power_state *state = __get_cpu_var(psci_power_state); + struct psci_power_state *state = __this_cpu_read(psci_power_state); /* * idle state index 0 corresponds to wfi, should never be called * from the cpu_suspend operations Index: linux/kernel/irq_work.c =================================================================== --- linux.orig/kernel/irq_work.c +++ linux/kernel/irq_work.c @@ -175,11 +175,11 @@ EXPORT_SYMBOL_GPL(irq_work_run); void irq_work_tick(void) { - struct llist_head *raised = &__get_cpu_var(raised_list); + struct llist_head *raised = this_cpu_ptr(&raised_list); if (!llist_empty(raised) && !arch_irq_work_has_interrupt()) irq_work_run_list(raised); - irq_work_run_list(&__get_cpu_var(lazy_list)); + irq_work_run_list(this_cpu_ptr(&lazy_list)); } /* Index: linux/kernel/time/tick-sched.c =================================================================== --- linux.orig/kernel/time/tick-sched.c +++ linux/kernel/time/tick-sched.c @@ -235,7 +235,7 @@ void tick_nohz_full_kick(void) if (!tick_nohz_full_cpu(smp_processor_id())) return; - irq_work_queue(&__get_cpu_var(nohz_full_kick_work)); + irq_work_queue(this_cpu_ptr(&nohz_full_kick_work)); } /*