From patchwork Thu Aug 28 05:52:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4792661 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 D7ECCC0338 for ; Thu, 28 Aug 2014 05:52:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DDC62015E for ; Thu, 28 Aug 2014 05:52:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F210320145 for ; Thu, 28 Aug 2014 05:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbaH1Fww (ORCPT ); Thu, 28 Aug 2014 01:52:52 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:41954 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbaH1Fwv (ORCPT ); Thu, 28 Aug 2014 01:52:51 -0400 Received: by mail-pa0-f41.google.com with SMTP id lj1so1121646pab.14 for ; Wed, 27 Aug 2014 22:52:51 -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=uiXcCev0zsST6++BZb3HIsKnLOxMtcv6ZklW4a+5JW4=; b=N4thn/9pAj+zt+CJhh4xPNr+/ohKjAN9ilgNA/pUBLk2fnL4ajpv+YpkyyiWiLQnyq JgwlUS4cE5KIcZUaxNchQl/tA8ot+V7EwiEoC5qGbcP5JGI6oSvNCDsn3LPPiC0MCCHs 8up85OlXu57Q7k+K8+RVnj+o5PzrzvXLsbfxZy3NPiDOn8Qo7iGs4bKMupgQ4i/RLus8 BUp+bjbYcBJD7bHBmAAz4x4+T6uJjzfD0w7NsgihkT40JUyBBTG+qaRHkDQzrDKAVp+Q B8+aO9TS8vjyi2DEYUIRL0vDnvDuy7v7vbBodfGMVAz6MI0b35xiMTNwNKOQ1XrgM1Gz 29eA== X-Gm-Message-State: ALoCoQk1wTAaRcDiUufDEQzf6we2bRC29bNbrHjMTkZIh9+sua7sXlMGh8DY3udf1cgaW7TVNZcn X-Received: by 10.66.168.204 with SMTP id zy12mr2317020pab.19.1409205170957; Wed, 27 Aug 2014 22:52:50 -0700 (PDT) Received: from localhost ([122.167.123.172]) by mx.google.com with ESMTPSA id lx10sm3697880pdb.31.2014.08.27.22.52.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 27 Aug 2014 22:52:49 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, shawn.guo@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, spk.linux@gmail.com, thomas.ab@samsung.com, t.figa@samsung.com, santosh.shilimkar@ti.com, thomas.petazzoni@free-electrons.com, pramod.gurav@smartplayin.com, Viresh Kumar Subject: [PATCH V3 01/10] cpufreq: Add support for per-policy driver data Date: Thu, 28 Aug 2014 11:22:23 +0530 Message-Id: X-Mailer: git-send-email 2.0.3.693.g996b0fd 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, 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 per-policy data. If the core doesn't provide support for that, 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 for driver's internal use only. Tested-by: Stephen Boyd 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 7d1955a..138336b 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 */