From patchwork Sun Jul 23 15:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 9858475 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EF1B3602B9 for ; Sun, 23 Jul 2017 15:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEA7528550 for ; Sun, 23 Jul 2017 15:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2F4A28556; Sun, 23 Jul 2017 15:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85E9E28550 for ; Sun, 23 Jul 2017 15:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755417AbdGWPyo (ORCPT ); Sun, 23 Jul 2017 11:54:44 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:35585 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755369AbdGWPyj (ORCPT ); Sun, 23 Jul 2017 11:54:39 -0400 Received: by mail-pg0-f54.google.com with SMTP id v190so47129188pgv.2 for ; Sun, 23 Jul 2017 08:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hD3tvBmk0bFKebmxVvnldfl8VT6vy8N+LzaeW3yio5s=; b=Z8wrO0e1PCBBAhmyZu0adw6AEeFscDr3qYAiUsSjEIp5CbQJAM5CZYzzyynwfX4yDK vvdfnaGl+SvqrNt73uIhvHOL+LnTKVBHCJEfeG/A8jJic6mW3oktLVleD04b4kG7cnr8 VawemcGPgQxWtOecOjeGdh9qHauSYx7RssBJ9voKvNYUHZyND0opVgEabXg/jChNF99Y VXNCgAEgshZ3dzLYgqaRCwQXiW4/1YVAZTWq8FPk+ZEE+kKaabMawdyT0D8wC32C4wrK kOjo/oj86YzQ6u+/ZxJvwTKoyGKe7/ECBN2E4xiAERtT2UkdXHeSlPjAt2BXNAr4nzXy Iy4w== 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; bh=hD3tvBmk0bFKebmxVvnldfl8VT6vy8N+LzaeW3yio5s=; b=P8Y/wcG0P1dtudHhZFQdmTNl77JsgGrLaDGdvs/7VDX6pJuInVWfuOdlhzSeLN9+HE Al3Mq9AyzhIsmRufyU90sxj94nzng3fX+ufxdl1PxRJnCNk8kfp6kTQojohpP268i0Pq LvsMK4ti6CcI7GldLHK2n0Xg2wpsxgGk6YJjCFiNjjCuXIvpu8XvedWgF+CBngzb4kbB abM1HyMxJ5I5Djfm/YYirh2U/T167VHq1BaFcSNKsIpgLnn9Y0BCNQGNzeA084pS160D 3tj7y0Qyi6cGJYM9l7PFHvnYv2AE+Rk3H2ax3sHYnAtsIcJ3cWM92ub7RtoGng9Qucd7 ljRg== X-Gm-Message-State: AIVw113BdmAMo/llfE6xZ7oJtlP6g5XziXtH4fRrXO8jfMd8yhTpts7B jiUAB4/50+UXGPzF X-Received: by 10.84.213.2 with SMTP id f2mr14820921pli.318.1500825278647; Sun, 23 Jul 2017 08:54:38 -0700 (PDT) Received: from joelaf-glaptop0.roam.corp.google.com (c-24-130-92-142.hsd1.ca.comcast.net. [24.130.92.142]) by smtp.gmail.com with ESMTPSA id k26sm17389870pfb.145.2017.07.23.08.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Jul 2017 08:54:37 -0700 (PDT) From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: Juri Lelli , Patrick Bellasi , Andres Oportus , Dietmar Eggemann , linux-pm@vger.kernel.org, Joel Fernandes , Srinivas Pandruvada , Len Brown , "Rafael J . Wysocki" , Viresh Kumar , Ingo Molnar , Peter Zijlstra Subject: [PATCH v7 2/2] cpufreq: schedutil: Use unsigned int for iowait boost Date: Sun, 23 Jul 2017 08:54:26 -0700 Message-Id: <20170723155426.9170-2-joelaf@google.com> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog In-Reply-To: <20170723155426.9170-1-joelaf@google.com> References: <20170723155426.9170-1-joelaf@google.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make iowait_boost and iowait_boost_max as unsigned int since its unit is kHz and this is consistent with struct cpufreq_policy. Also change the local variables in sugov_iowait_boost to match this. Cc: Srinivas Pandruvada Cc: Len Brown Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Joel Fernandes --- kernel/sched/cpufreq_schedutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 570ab6e779e6..7650784eb857 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -54,8 +54,8 @@ struct sugov_cpu { struct sugov_policy *sg_policy; bool iowait_boost_pending; - unsigned long iowait_boost; - unsigned long iowait_boost_max; + unsigned int iowait_boost; + unsigned int iowait_boost_max; u64 last_update; /* The fields below are only needed when sharing a policy. */ @@ -199,7 +199,7 @@ static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time, static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, unsigned long *util, unsigned long *max) { - unsigned long boost_util, boost_max; + unsigned int boost_util, boost_max; if (!sg_cpu->iowait_boost) return;