From patchwork Sat Jun 24 05:11:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 9807587 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 6CE64603F3 for ; Sat, 24 Jun 2017 05:12:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AF202854A for ; Sat, 24 Jun 2017 05:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F95528558; Sat, 24 Jun 2017 05:12:38 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 CAA832854A for ; Sat, 24 Jun 2017 05:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbdFXFMF (ORCPT ); Sat, 24 Jun 2017 01:12:05 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:34256 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbdFXFMD (ORCPT ); Sat, 24 Jun 2017 01:12:03 -0400 Received: by mail-qt0-f193.google.com with SMTP id w6so7637228qtg.1; Fri, 23 Jun 2017 22:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:reply-to:organization; bh=yKYFzRQElE+6egBGgderyALlxx0/ylv4tGR6YDZMovU=; b=RMoVOVLCVGIBL8WOqa12Q/HYTfR6g5buIUPqT5AEgtcOk5aun3AWtSfxzwoK4YGqP1 JlKyGn2ExHUAIcd62YUl73vbixx2jwsU7qLT5WeN8apwvNf3rrKeZmNhMuHIr0w7hABA bCSr7iS1CxSWJo3CQT4HX7jBBSymWd/Uh3qmJqXPAZ/BtcjsTbErPJmLlDnLlK7D+tDC 7f1VZcSDL5fn1LnGWcyjoFP2cFqfUsKya6bFuvHUrDnZ6Ta33wRkPV9LtsZYcMiZvvQA UMNcMG5pobWJzPtbMwmml1CbfD/hb+6Gy7x7LRuDHAXM5/ZxBZTwi83u8T0uTwtDyNZi kC/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:reply-to:organization; bh=yKYFzRQElE+6egBGgderyALlxx0/ylv4tGR6YDZMovU=; b=M+K8oPBxlkEhRdn3TWx+qx73BHSCT+kvJKDdMhI3+zbBup//Kwdg8mEbybnZC3tVvt U5SnJ3W6li27dxysQo8QuIAQS4hAYKlg3gT7+HY0/zSR7u8qPXtZj7KkXtNk3WzPJaEe 6u0exAn7GKSLIt7tAYGawgdT8LIcxZzUyvNf8y1B87aUc8ngitQgN0yrvQ6ZsP7mXgDx KX4Fzpl2wZaVbiJXSvR3n/2WgUVpgfc6t/61MaP+fO0eppU7nKTtIanl/Rn58p6dfmxW j7l7c796MkOukASSmoPy4kqMrRhzA3NPzBBnX+IYbaoY03M8hwqmQF4GyXOKU/AhdZVZ 4jmw== X-Gm-Message-State: AKS2vOwZwMWH5qG5BSTXwSxWGlEWTfABeXj9srck/4YC4xNoffVIa9cn 0/jL39Yvc79cGQ== X-Received: by 10.200.34.55 with SMTP id o52mr13624165qto.67.1498281122901; Fri, 23 Jun 2017 22:12:02 -0700 (PDT) Received: from localhost.localdomain (pool-173-48-65-169.bstnma.fios.verizon.net. [173.48.65.169]) by smtp.gmail.com with ESMTPSA id k6sm5060704qtk.10.2017.06.23.22.12.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jun 2017 22:12:02 -0700 (PDT) From: Len Brown To: rafael@kernel.org, tglx@linutronix.de Cc: x86@kernel.org, srinivas.pandruvada@linux.intel.com, peterz@infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH 3/4] intel_pstate: delete scheduler hook in HWP mode Date: Fri, 23 Jun 2017 22:11:53 -0700 Message-Id: <43ecf292a796eaa86bf112eebdc066e46db15c39.1498280509.git.len.brown@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498281114-3868-1-git-send-email-lenb@kernel.org> References: <1498281114-3868-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center 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 From: Len Brown The cpufreq/scaling_cur_freq sysfs attribute is now provided by shared x86 cpufreq code on modern x86 systems, including all systems supported by the intel_pstate driver. In HWP mode, maintaining that value was the sole purpose of the scheduler hook, intel_pstate_update_util_hwp(), so it can now be removed. Signed-off-by: Len Brown --- drivers/cpufreq/intel_pstate.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b7de5bd..4ec5668 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1732,16 +1732,6 @@ static void intel_pstate_adjust_pstate(struct cpudata *cpu, int target_pstate) fp_toint(cpu->iowait_boost * 100)); } -static void intel_pstate_update_util_hwp(struct update_util_data *data, - u64 time, unsigned int flags) -{ - struct cpudata *cpu = container_of(data, struct cpudata, update_util); - u64 delta_ns = time - cpu->sample.time; - - if ((s64)delta_ns >= INTEL_PSTATE_HWP_SAMPLING_INTERVAL) - intel_pstate_sample(cpu, time); -} - static void intel_pstate_update_util_pid(struct update_util_data *data, u64 time, unsigned int flags) { @@ -1933,6 +1923,9 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num) { struct cpudata *cpu = all_cpu_data[cpu_num]; + if (hwp_active) + return; + if (cpu->update_util_set) return; @@ -2557,7 +2550,6 @@ static int __init intel_pstate_init(void) } else { hwp_active++; intel_pstate.attr = hwp_cpufreq_attrs; - pstate_funcs.update_util = intel_pstate_update_util_hwp; goto hwp_cpu_matched; } } else {