From patchwork Wed Jun 25 08:42:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4417461 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 9C8E49F1D6 for ; Wed, 25 Jun 2014 08:43:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA0922038D for ; Wed, 25 Jun 2014 08:43:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E36F220386 for ; Wed, 25 Jun 2014 08:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756116AbaFYInF (ORCPT ); Wed, 25 Jun 2014 04:43:05 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:33623 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756102AbaFYInB (ORCPT ); Wed, 25 Jun 2014 04:43:01 -0400 Received: by mail-qg0-f52.google.com with SMTP id f51so1368978qge.39 for ; Wed, 25 Jun 2014 01:43:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=aTqCnicSRGjgoeU1CAGO7K3I9YrYnfMM4aASLxutBr0=; b=NZW9BfymOdY0j440QfurYGYYfzf75+DZwxvkaLr8kqwT5P4Skjx/y3+OVbUorraize ZkOgiuOJI5Jhjb7XTXw7KfdAnslrHIRuaCenpGLeHP8BvbR0P6pcrbMJT8S87Pc2oDPr gbcRnHg9WeNWV2JyuVF5AHkiEHNZCUI4GWO+tJZ0r9WS4fYPIt/KDZYZZDmpD2PvUxNA D5+MttBwTxxKoj5STxKhs/FDu9cXVuPc2XsU/6YMxnNhPJq/YmbQyQL3eq1kHt/O4TE3 PSt1kU+Z/REb3PXAuYcCTweDwtACuYyGLHnXeLGoEmGcnsbLru3sWB4AWvh6hecONxVl lxLg== X-Gm-Message-State: ALoCoQlkdTH5qWCZCpw6Tnxcme6WP5aPCiT/L2xpzQL8Y9PCAjMtj7C9jwBCx/RHJpzMX/kdJbWs X-Received: by 10.224.111.196 with SMTP id t4mr9370258qap.63.1403685780235; Wed, 25 Jun 2014 01:43:00 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id r3sm4893751qal.8.2014.06.25.01.42.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Jun 2014 01:42:59 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net, sboyd@codeaurora.org, shawn.guo@linaro.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, mturquette@linaro.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, spk.linux@gmail.com, thomas.ab@samsung.com, nm@ti.com, t.figa@samsung.com, Viresh Kumar Subject: [PATCH 1/2] cpufreq: Add support for per-policy driver data Date: Wed, 25 Jun 2014 14:12:28 +0530 Message-Id: <28dc4ae67a7c3c712714abc14619b7c1d4bfb361.1403684824.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Drivers supporting multiple clusters or multiple 'struct cpufreq_policy' instances may need to keep some per-policy data. If the core doesn't support them, they might do it in the most unoptimized way: per-cpu data. This patch adds another field in 'struct cpufreq_policy': driver_data. It isn't accessed by core and is completely for driver's internal use. Signed-off-by: Viresh Kumar --- include/linux/cpufreq.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ec4112d..d4b1108 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -112,6 +112,9 @@ struct cpufreq_policy { spinlock_t transition_lock; wait_queue_head_t transition_wait; struct task_struct *transition_task; /* Task which is doing the transition */ + + /* For cpufreq driver's internal use */ + void *driver_data; }; /* Only for ACPI */