From patchwork Mon Feb 4 22:44:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 14549 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DD13824195 for ; Mon, 4 Feb 2013 22:44:55 +0000 (UTC) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by fiordland.canonical.com (Postfix) with ESMTP id 7F982A1848E for ; Mon, 4 Feb 2013 22:44:55 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id cz11so3740552veb.17 for ; Mon, 04 Feb 2013 14:44:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=T4FWPFMOygFDLXYCGMKkDALdQ+SUfEzSAq+rJeFwPws=; b=GzFyNvw9iFJZlEdsmpftfKd93B3SZdIXQwhApaz7jerPyILQrLBwVMIiq24QnMAD2u jmr9wUVaUchreWORpaCQKZqcyxIEZHyR8STpSuh3TZrn3eBs2p9t8RmLR8t66kLOiUzy E8HDW2jFyudTq74IugNpPtJjGqBlNl4YuLTcjy7/vXRlFfntS22OFye3oOKvGNqXZ13q Gv3S6vqJwUcRDbkAZGA9slvwrA7WIfzeCDPeYuSfuqDWGJj5bXn+dBewxAUQwLUQxiBb exDJwLo1CuzLBLWOmaLLp8CSB8cGTvZo+LKieVOLw/h3LZyLEaZMV8YFcF6uzUn44hhA RQbQ== X-Received: by 10.220.151.141 with SMTP id c13mr24730634vcw.64.1360017894991; Mon, 04 Feb 2013 14:44:54 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp110418vec; Mon, 4 Feb 2013 14:44:54 -0800 (PST) X-Received: by 10.194.76.237 with SMTP id n13mr38416355wjw.57.1360017894138; Mon, 04 Feb 2013 14:44:54 -0800 (PST) Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]) by mx.google.com with ESMTPS id fb6si4181168wib.59.2013.02.04.14.44.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 14:44:54 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22f is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::22f; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22f is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-we0-f175.google.com with SMTP id x8so5315149wey.20 for ; Mon, 04 Feb 2013 14:44:53 -0800 (PST) X-Received: by 10.195.13.200 with SMTP id fa8mr38135888wjd.15.1360017893532; Mon, 04 Feb 2013 14:44:53 -0800 (PST) Received: from mai.home (AToulouse-654-1-332-150.w86-199.abo.wanadoo.fr. [86.199.219.150]) by mx.google.com with ESMTPS id ex1sm2812774wib.7.2013.02.04.14.44.50 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 14:44:52 -0800 (PST) From: Daniel Lezcano To: rjw@sisk.pl Cc: linaro-dev@lists.linaro.org, patches@linaro.org, lenb@kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 4/4] ACPI / idle: remove usage of the statedata Date: Mon, 4 Feb 2013 23:44:43 +0100 Message-Id: <1360017883-9544-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360017883-9544-1-git-send-email-daniel.lezcano@linaro.org> References: <1360017883-9544-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnlcoMqlYP3x/EgfnTubX886JCTeIuS8h3O34ST7k1FpZcVWHJR5KTr/X1KR37JF8EmLKYk Len Brown sent a patch to remove this field in the intel_idle driver. The other user of this field is the davinci cpuidle driver and a patch has been sent to remove the usage of it. This patch removes the last user of this field. Signed-off-by: Daniel Lezcano --- drivers/acpi/processor_idle.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 6837065..8b433cb 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -66,6 +66,8 @@ module_param(latency_factor, uint, 0644); static DEFINE_PER_CPU(struct cpuidle_device *, acpi_cpuidle_device); +static struct acpi_processor_cx *acpi_cstate[CPUIDLE_STATE_MAX]; + static int disabled_by_idle_boot_param(void) { return boot_option_idle_override == IDLE_POLL || @@ -721,8 +723,7 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { struct acpi_processor *pr; - struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; - struct acpi_processor_cx *cx = cpuidle_get_statedata(state_usage); + struct acpi_processor_cx *cx = acpi_cstate[index]; pr = __this_cpu_read(processors); @@ -745,8 +746,7 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, */ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) { - struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; - struct acpi_processor_cx *cx = cpuidle_get_statedata(state_usage); + struct acpi_processor_cx *cx = acpi_cstate[index]; ACPI_FLUSH_CPU_CACHE(); @@ -776,8 +776,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { struct acpi_processor *pr; - struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; - struct acpi_processor_cx *cx = cpuidle_get_statedata(state_usage); + struct acpi_processor_cx *cx = acpi_cstate[index]; pr = __this_cpu_read(processors); @@ -835,8 +834,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { struct acpi_processor *pr; - struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; - struct acpi_processor_cx *cx = cpuidle_get_statedata(state_usage); + struct acpi_processor_cx *cx = acpi_cstate[index]; pr = __this_cpu_read(processors); @@ -935,7 +933,6 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr, { int i, count = CPUIDLE_DRIVER_STATE_START; struct acpi_processor_cx *cx; - struct cpuidle_state_usage *state_usage; if (!pr->flags.power_setup_done) return -EINVAL; @@ -954,7 +951,6 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr, for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { cx = &pr->power.states[i]; - state_usage = &dev->states_usage[count]; if (!cx->valid) continue; @@ -965,8 +961,7 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr, !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED)) continue; #endif - - cpuidle_set_statedata(state_usage, cx); + acpi_cstate[count] = cx; count++; if (count == CPUIDLE_STATE_MAX)