From patchwork Thu Mar 9 11:45:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 95107 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp318718qgd; Thu, 9 Mar 2017 03:45:48 -0800 (PST) X-Received: by 10.99.138.202 with SMTP id y193mr13210424pgd.60.1489059948148; Thu, 09 Mar 2017 03:45:48 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si6247698pll.139.2017.03.09.03.45.47; Thu, 09 Mar 2017 03:45:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932237AbdCILpr (ORCPT + 25 others); Thu, 9 Mar 2017 06:45:47 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33677 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932196AbdCILpn (ORCPT ); Thu, 9 Mar 2017 06:45:43 -0500 Received: by mail-pf0-f172.google.com with SMTP id w189so28054421pfb.0 for ; Thu, 09 Mar 2017 03:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=BCst2qgvgJ5sAOCiw6nsb9VX9a0hNl0JcOBULhjvY10=; b=WhmVaugLazhUszeP6Fi+sOsZfgQ6B+8RPVO35FeUTdWWYJTsnK2S6PnaCkCMiId7TS 1clSOMbURH0V/a/DdI0KuKgDTS4ryJb+N8GlixBGv2rtd/dtC/7SOvbaSGEfd3sti8YZ JLo8Wr0YhhiaZIxfWTuLuW9WvAGeFx//TJAb4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=BCst2qgvgJ5sAOCiw6nsb9VX9a0hNl0JcOBULhjvY10=; b=Xtnrbo9YWfJoK0V/tkTAqfyzCM9DvdnggJQIa/UcNRjFIrskLo+UMGMYE0T/n4mWbt STtnPTKCU/E4rfw3lHdf9pru8SsjkAzv4ZoxbTtcGmrlMOi8GAactxBeoCZcFx41ZUPp JjgX1Qfya3+ruXop/rZCx/Cj6h7HkkikNTT9OHaYoeICaqgjhclQ1qFoWxO2f5Xx6iGR ENnk4uSX60E1Uo9+R2grxqOI96DujaF63EhXb/5pTZh3cyQqnPpxTRkZPRbw1CF7otsc 4UOfcD/bzLPl6DUoZbF8h3Sgo6w7Nn07vpsaMIyIW23sWirljpQBcmQA0iQsACihl574 jqGg== X-Gm-Message-State: AMke39lSf2OqMkyiwvR3t2nF38lHwezurXYtLFW0wz71PcYaBQEcadBs+RQbZ5sQJwDLUR+L X-Received: by 10.98.38.5 with SMTP id m5mr13448240pfm.65.1489059942207; Thu, 09 Mar 2017 03:45:42 -0800 (PST) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id g78sm12144748pfe.5.2017.03.09.03.45.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 03:45:41 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , smuckle.linux@gmail.com, juri.lelli@arm.com, Morten.Rasmussen@arm.com, patrick.bellasi@arm.com, eas-dev@lists.linaro.org, Viresh Kumar Subject: [RFC 1/9] sched: cpufreq: add cpu to update_util_data Date: Thu, 9 Mar 2017 17:15:11 +0530 Message-Id: <529d5f2d865f5982f7e0d4a7a44176e81f50ffc5.1489058244.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve Muckle Upcoming support for scheduler cpufreq callbacks on remote wakeups will require the client to know what the target CPU is that the callback is being invoked for. Add this information into the callback data structure. Signed-off-by: Steve Muckle Signed-off-by: Viresh Kumar --- include/linux/sched/cpufreq.h | 1 + kernel/sched/cpufreq.c | 1 + 2 files changed, 2 insertions(+) -- 2.7.1.410.g6faf27b diff --git a/include/linux/sched/cpufreq.h b/include/linux/sched/cpufreq.h index d2be2ccbb372..f798f63d93e8 100644 --- a/include/linux/sched/cpufreq.h +++ b/include/linux/sched/cpufreq.h @@ -16,6 +16,7 @@ #ifdef CONFIG_CPU_FREQ struct update_util_data { void (*func)(struct update_util_data *data, u64 time, unsigned int flags); + int cpu; }; void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, diff --git a/kernel/sched/cpufreq.c b/kernel/sched/cpufreq.c index dbc51442ecbc..ee4c596b71b4 100644 --- a/kernel/sched/cpufreq.c +++ b/kernel/sched/cpufreq.c @@ -42,6 +42,7 @@ void cpufreq_add_update_util_hook(int cpu, struct update_util_data *data, return; data->func = func; + data->cpu = cpu; rcu_assign_pointer(per_cpu(cpufreq_update_util_data, cpu), data); } EXPORT_SYMBOL_GPL(cpufreq_add_update_util_hook);