Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3865167pxb; Tue, 17 Nov 2020 05:43:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnENn5xtIekhyXKACIjUujLD4txJG1VIzcHHE7Vw4GM9HTbmtwy1QZRIBhkQ/bLTbXzu9+ X-Received: by 2002:a05:6402:17e6:: with SMTP id t6mr2424912edy.360.1605620605182; Tue, 17 Nov 2020 05:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620605; cv=none; d=google.com; s=arc-20160816; b=lUynKNTUAYYMqcw2hpCudWoRjekr+OMWhSaw8W64LAHdM+pYRpU1wp2LlKOK73Mdu7 l4WGBTLTx43A3f+OLIzotQ6QKifyaKJtoDuzQvhqwaA7BCdcgpJWOkD86/3//a8G7S6q b4GINqO5PzaH0mvLggc6WgcNX0Lx8KQU3+JlOcEQ7yb/l+b+ovfVelxklW9ytWeA+YI2 GONreLq7DAZJQfnh2w74bz2a+C16eGLo49aEC/DWM/3xI/zbI4m2dkSQA7jLxUhTNlgD daNPxPRYH9yj8ar9DXWPPJLjPrWUGtROjMCp6VUsU2hyzzLnw483JEFODrN+GNmcmFp1 6j+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kgP1x0loP9/62tDzg0RO9XjUNmE8lOdoYMNiys+phdw=; b=ILbuliwSqJ+wfLyGYZliYt19PMfxZyoGDqbbAhY9r/5NjhHdSSQ3YhCGpc7GkACyF8 6Zk9ldYxiHe3qFnUQjT0pWzefOU/h/tzWZrHKTnCWrlPJ/ie7cc4vK/c/0MM53FnyPCV rzUiCa0ewiSxvfVa0ePFiclu52Q+eA1EIfhUzZf+QTCi1wMq35HFtB0CoWIFpyPhuuhk GnzCvIbL3+PKq8IAScLEkvPweXn7PiKVS51sCZ4gnvxl12Q0oWFelC8P4eyXqZ3iU+Xk N/4R6YHzo9phvbLBzU7ri3Wulkw44raMYX1Dbjyzbwq83Rm7+cTKJxYWn40zL5VCu/Fp 55mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PLyx1EDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x3si717324ejj.269.2020.11.17.05.43.02; Tue, 17 Nov 2020 05:43:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PLyx1EDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732711AbgKQNlp (ORCPT + 99 others); Tue, 17 Nov 2020 08:41:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:53754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733100AbgKQNla (ORCPT ); Tue, 17 Nov 2020 08:41:30 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 36177206A5; Tue, 17 Nov 2020 13:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620489; bh=UEn0ZFjxedI0aPXmovHTbuX/YSC2lScuXPP+OvKagi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PLyx1EDMgnb6hyTCyCHXmOGAkh7+aAom6pA1ZXN2A45upexY9q3wQOvPSB45U5Rvh 7XDhMMrq0JY+q6KOivcR+zpcovjZZSyprEGpjfB94bfm+hbOarjR1eYfpj3ESgYLRu QWNmpOYwERD6U5MTvfBG4SMj9zbKGP9Rzi7dnlSg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 5.9 237/255] cpufreq: Add strict_target to struct cpufreq_policy Date: Tue, 17 Nov 2020 14:06:17 +0100 Message-Id: <20201117122150.471797225@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki commit ea9364bbadf11f0c55802cf11387d74f524cee84 upstream. Add a new field to be set when the CPUFREQ_GOV_STRICT_TARGET flag is set for the current governor to struct cpufreq_policy, so that the drivers needing to check CPUFREQ_GOV_STRICT_TARGET do not have to access the governor object during every frequency transition. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/cpufreq.c | 2 ++ include/linux/cpufreq.h | 6 ++++++ 2 files changed, 8 insertions(+) --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2259,6 +2259,8 @@ static int cpufreq_init_governor(struct } } + policy->strict_target = !!(policy->governor->flags & CPUFREQ_GOV_STRICT_TARGET); + return 0; } --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -110,6 +110,12 @@ struct cpufreq_policy { bool fast_switch_enabled; /* + * Set if the CPUFREQ_GOV_STRICT_TARGET flag is set for the current + * governor. + */ + bool strict_target; + + /* * Preferred average time interval between consecutive invocations of * the driver to set the frequency for this policy. To be set by the * scaling driver (0, which is the default, means no preference).