From patchwork Thu Dec 19 15:50:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 3382591 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49750C0D4A for ; Thu, 19 Dec 2013 15:57:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E570206B3 for ; Thu, 19 Dec 2013 15:57:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5773B206B4 for ; Thu, 19 Dec 2013 15:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755896Ab3LSP4n (ORCPT ); Thu, 19 Dec 2013 10:56:43 -0500 Received: from qmta03.emeryville.ca.mail.comcast.net ([76.96.30.32]:44446 "EHLO qmta03.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616Ab3LSP4m (ORCPT ); Thu, 19 Dec 2013 10:56:42 -0500 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Dec 2013 10:56:42 EST Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta03.emeryville.ca.mail.comcast.net with comcast id 3SAy1n0031GXsucA3Tqczl; Thu, 19 Dec 2013 15:50:36 +0000 Received: from gentwo.org ([98.213.233.247]) by omta07.emeryville.ca.mail.comcast.net with comcast id 3Tqa1n0045Lw0ES8UTqabN; Thu, 19 Dec 2013 15:50:35 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 775A15B216; Thu, 19 Dec 2013 09:50:31 -0600 (CST) Message-Id: <20131219155031.396219497@linux.com> Date: Thu, 19 Dec 2013 09:50:21 -0600 From: Christoph Lameter To: Tejun Heo Cc: akpm@linuxfoundation.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Daniel Lezcano , linux-pm@vger.kernel.org, "Rafael J. Wysocki" Subject: [PATCH 06/40] drivers/cpuidle: Replace __get_cpu_var uses for address calculation References: <20131219155015.443763038@linux.com> Content-Disposition: inline; filename=this_drivers_cpuidle DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1387468236; bh=gpvpxlN1dGSQJIwgla8sFZvy0sKeqjXE2H+iNdhCNQE=; h=Received:Received:Received:Message-Id:Date:From:To:Subject: Content-Type; b=fIvDOTcIJBqGP4p3U4D9t2b6dMzcFyzdkhd1ngKbOS68vTw7jUYUqm7lN60JF2o/H 5j+s+zjOR37FoJRB+kI74X1gndwTBLWWRHY2pfl2XNAIs7y9tq03M6mcUCXTm149+R zdxknwDrSlOnxM8txs/IgjElrmu5LOfg+GlzIxWoY4eTtTiFzXCm3hZbx0zLR0RgVJ jCij3p47B4MAG6B62wdjwFnie7DzeQil7CvJZh0NhIED36pkGHAiK5I2AxjdJ7kaZI CfHDEbpft5JvsoT/Tqs3mJ1WF374SDMUqnrQJh4BRpZh9HGTEZRt2bjCUhe5dUWk5N hgjUZJCd90EgA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 All of these are for address calculation. Replace with this_cpu_ptr(). Cc: Daniel Lezcano Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki [cpufreq changes] Signed-off-by: Christoph Lameter --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/cpuidle/governors/ladder.c =================================================================== --- linux.orig/drivers/cpuidle/governors/ladder.c 2013-12-02 16:07:48.284675507 -0600 +++ linux/drivers/cpuidle/governors/ladder.c 2013-12-02 16:07:48.274675782 -0600 @@ -66,7 +66,7 @@ static inline void ladder_do_selection(s static int ladder_select_state(struct cpuidle_driver *drv, struct cpuidle_device *dev) { - struct ladder_device *ldev = &__get_cpu_var(ladder_devices); + struct ladder_device *ldev = this_cpu_ptr(&ladder_devices); struct ladder_device_state *last_state; int last_residency, last_idx = ldev->last_state_idx; int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); @@ -170,7 +170,7 @@ static int ladder_enable_device(struct c */ static void ladder_reflect(struct cpuidle_device *dev, int index) { - struct ladder_device *ldev = &__get_cpu_var(ladder_devices); + struct ladder_device *ldev = this_cpu_ptr(&ladder_devices); if (index > 0) ldev->last_state_idx = index; } Index: linux/drivers/cpuidle/governors/menu.c =================================================================== --- linux.orig/drivers/cpuidle/governors/menu.c 2013-12-02 16:07:48.284675507 -0600 +++ linux/drivers/cpuidle/governors/menu.c 2013-12-02 16:07:48.274675782 -0600 @@ -286,7 +286,7 @@ again: */ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) { - struct menu_device *data = &__get_cpu_var(menu_devices); + struct menu_device *data = this_cpu_ptr(&menu_devices); int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); int i; int multiplier; @@ -375,7 +375,7 @@ static int menu_select(struct cpuidle_dr */ static void menu_reflect(struct cpuidle_device *dev, int index) { - struct menu_device *data = &__get_cpu_var(menu_devices); + struct menu_device *data = this_cpu_ptr(&menu_devices); data->last_state_idx = index; if (index >= 0) data->needs_update = 1; @@ -388,7 +388,7 @@ static void menu_reflect(struct cpuidle_ */ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) { - struct menu_device *data = &__get_cpu_var(menu_devices); + struct menu_device *data = this_cpu_ptr(&menu_devices); int last_idx = data->last_state_idx; unsigned int last_idle_us = cpuidle_get_last_residency(dev); struct cpuidle_state *target = &drv->states[last_idx];