From patchwork Mon Feb 26 05:08:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129527 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230108lja; Sun, 25 Feb 2018 21:09:33 -0800 (PST) X-Google-Smtp-Source: AH8x225trfIJFewiLe2H8UO+Xn1ykTMg9VDbeQBcGGYQX5ZSu0w4dAQ7+6OaomATsflLOyRyU+yA X-Received: by 10.98.47.65 with SMTP id v62mr9214905pfv.152.1519621773799; Sun, 25 Feb 2018 21:09:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621773; cv=none; d=google.com; s=arc-20160816; b=U/CGlFNIJU6za01KR7X7BCsUoBex1AQJwiAIpBsWmd4QMalsW5ise1jCb0yXOz+wWe k1AyXT91k56pDOA0yMV+Akfqb0tYi38N9H0LhHFGH2E27cUd8vIzdkVJuoc6AnEVwdRq QAVGEr2RNssKfDJqz+gIHS4egl0Gu9fPzfsNJCJmYS9Ot4+VMJOli5bgKPWHlCAHf+HD 2f6iPkIO37IySmcVDC8HaCAdhjzlwsnRGzHpdPUEN4tm9GVf9pXOWbvL1tybSZLk6gcF OBLB6mfy2ZjMG7SDQHUuGogoVtbj+a3DrVsA+K6Q/oOFwW2WLQ/U4jOaeNx+GPq8+mRm sgDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=IRF+MQeOVHlhVJTzFnx7uJZGfQIq/OPPymBcGDWrVbE=; b=FFEP+20th3RDjwmy40lDVhgR7RPxGojSEykTOTgRfZUtSo769v6QFCkpY/gqqTzy50 H8oy+IxTONpNJdHQgjD4yPPtnJgoVJTz5Uo3QomaBWbDss133FJNuDZHztk1qaq358iD Lr4v4fF50ZZvxM7O3hfGe273FjTOAE6G/nL2GD/qbzjCCBf1ZkGSIlIKd2Kkvv2hxEtO 3ABjpEANK6eVWSXHWyVW8E6X5lC4AL0WiipyArbsyRSgcqcIwB52EYqAYdfdaQCd/Adh G7qHXcbdEkilwkMBQiVHJ54N7PJGkxcZXrlsyczAD11kl8ALtChF35FJosuTtlJd2IzE 8Mjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CukAmvO0; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.33; Sun, 25 Feb 2018 21:09:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=CukAmvO0; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1750749AbeBZFJc (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:32 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46061 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751319AbeBZFJb (ORCPT ); Mon, 26 Feb 2018 00:09:31 -0500 Received: by mail-pl0-f66.google.com with SMTP id v9-v6so6653041plp.12 for ; Sun, 25 Feb 2018 21:09:31 -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=IRF+MQeOVHlhVJTzFnx7uJZGfQIq/OPPymBcGDWrVbE=; b=CukAmvO0P+SPlYQuAhjiPOPaQucmS2cN0yJ2yKJ9D7HIbRHLIBfM7irQQyHZlyYWTh RGe6D7fYnS7Gor/ANena3e+7ssWA2wc0oWKz6TKrbSolmKfW8YaGCnmSyWuztSYp1lcF gnP+NJskhL27yvV7ELjreEIYpBo5qKN78wHOo= 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=IRF+MQeOVHlhVJTzFnx7uJZGfQIq/OPPymBcGDWrVbE=; b=q1WrKbwtZ7ugQb+DK8nZV9bBW9oTkz0eTolQMk1yuE/8jUiJc1gl6PQuvQT0YBNgLW kh6jCmUCUTK7jLNLa5SH+hcsoT4AS5RbDtS0rvE3PJZO7/TlC+d/xDUlRsn9xS2+/fut X9fBcGafxO0rnPspo75qjSVzBxf21EepA9Bc3CsKmD6zrSsNiZLLZvqfMMKLO8JUbxbq gEQ2xXRwVfPW8EEp8ElBvdgenUEUPriRQ3nG4Xqc1ElxR1/eOa47zlA7jnnBOdjHmW8h JkLrGMANWQZcR0xO2oDI/C2xlauRq1DJ1g4/lEKVSc1FKToFImDem1PPAucgdBI/dexQ BXEQ== X-Gm-Message-State: APf1xPBKW24MPYeOfFaQOVxBK9jd9tAFoRhTjxS2ob+Hn5UlqQsKNb09 l8kcta6p5MAYO2nbwssGJLQo5n4PJoc= X-Received: by 2002:a17:902:44:: with SMTP id 62-v6mr9183436pla.193.1519621771430; Sun, 25 Feb 2018 21:09:31 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id g77sm16925960pfk.135.2018.02.25.21.09.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:30 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 01/27] cpufreq: imx6q: Find max freq from frequency table itself Date: Mon, 26 Feb 2018 10:38:44 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This is a preparatory commit to make policy->suspend_freq independent of validation of the cpufreq table, as a later commit would update cpufreq_generic_init() to not validate the cpufreq table any longer. The driver already assumes the order in which the frequency table is sorted and we can get the max frequency easily. Signed-off-by: Viresh Kumar --- drivers/cpufreq/imx6q-cpufreq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index ff67859948b3..83cf631fc9bc 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -52,6 +52,7 @@ static struct clk_bulk_data clks[] = { static struct device *cpu_dev; static bool free_opp; static struct cpufreq_frequency_table *freq_table; +static unsigned int max_freq; static unsigned int transition_latency; static u32 *imx6_soc_volt; @@ -196,7 +197,7 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy) policy->clk = clks[ARM].clk; ret = cpufreq_generic_init(policy, freq_table, transition_latency); - policy->suspend_freq = policy->max; + policy->suspend_freq = max_freq; return ret; } @@ -437,12 +438,12 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) * freq_table initialised from OPP is therefore sorted in the * same order. */ + max_freq = freq_table[--num].frequency; opp = dev_pm_opp_find_freq_exact(cpu_dev, freq_table[0].frequency * 1000, true); min_volt = dev_pm_opp_get_voltage(opp); dev_pm_opp_put(opp); - opp = dev_pm_opp_find_freq_exact(cpu_dev, - freq_table[--num].frequency * 1000, true); + opp = dev_pm_opp_find_freq_exact(cpu_dev, max_freq * 1000, true); max_volt = dev_pm_opp_get_voltage(opp); dev_pm_opp_put(opp); From patchwork Mon Feb 26 05:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129528 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230121lja; Sun, 25 Feb 2018 21:09:36 -0800 (PST) X-Google-Smtp-Source: AH8x2247RtkU+doU42TBUAtClVEGlUyI4r9UwQAYy2icOw4mf5WnqgKccP3MV8PizVXS7K/d6Ri5 X-Received: by 2002:a17:902:8302:: with SMTP id bd2-v6mr9120374plb.295.1519621776029; Sun, 25 Feb 2018 21:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621776; cv=none; d=google.com; s=arc-20160816; b=y+kgl1nhPCm3Jjy2eb9CLn8xtKOIfFuA5FhWEc2hBBoSHzUVycsfTkgEJ5NEbSoPlL OLgEymUEhyd8pPScB/X8f1rmz7rmf38kNw7nXWqldd7EEL3MtO6JFfKduqIC3PrON7S1 zYieuTo2iaOGqLcPK8RAZRAreNTTHPngYK8L6SbfjolZJ2ZbQKCU4iQuRA17BYFtXKon Aqqiv+BHsdBfk1JmNRA2xQmI3oCSBkWgxbw39KKIvze1bmiG+2nkQNlfvpHOiP+iaSnX rWxhMYNVx61c1Z1hP2DqVyz2zx08pwil3swuZpqywroUh6gD4zw4GykM8lBeM/uiIZLH +ivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=jvHkCNCXeZ5IQjW2YJfTEJ7Sa/zN79JJesuvDpn0bRMMJQ4maFa+cTTrsSW8RCUlQB AXrPunb2utMj56KJHDgX8Ey/80iObceIFbgzQBdmCLQ83bsW/sob6P8DGw4cM0RaeTu9 d+Egz2KBokX97RH1gQENNO+sQ6fA3/YJDyXlBl9NUD2w7OxQwAaiGg5HzuvgrAb4W9eL 1bpLBnw2PQvIeAwir2uIl862pBYJ8LqFJ0gu1osF0s5RZ2AfxGEGNTFbKyUZOw0t28fH SkKZe9b7J6d6yblLWlte/EnLM5NRos/toc9/zLL7YM4UBBJkBDPq2hNrMyuT4Upulsn5 soew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCvlamPg; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.35; Sun, 25 Feb 2018 21:09:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=iCvlamPg; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1750877AbeBZFJf (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:35 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36674 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeBZFJe (ORCPT ); Mon, 26 Feb 2018 00:09:34 -0500 Received: by mail-pg0-f68.google.com with SMTP id i14so864920pgv.3 for ; Sun, 25 Feb 2018 21:09:34 -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=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=iCvlamPguwri/p9HR96hIbCFKA4uCjjO6xeXoVW32Nv3gySWSBUdRhSoLGrCrfKc/6 7yuN0FstDkcSVaQqLGOeYEUr+/XMLZ6qE04dG8wFETX8z4wFSNd2exCfeYpyCcpRoFPw 2WpRP1Ooafeb/XY92e4Sl2W8mQJGulmTbTSd0= 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=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=n2thC9siOYIsatRudRL2ZFVfIUTGlhZGp2Fb22kYKOBMzCOeUKjGL5/tcqrbWfenCY 7wBuh31Ztr1h6ZBErB6vo6kWLOz7Y5IJZ7KJdkTfmQbcoXoA/Os+u3L1EwyHBc0fHWd+ jDzCFoHffksvQcPsScBV1dtNbR2EpogX4PF77n3KvX+jRlqnMtrzrrXeRV0kFpPEH1Zi A8gn5yJvE01swEt6oPO/hXkmFQmv0GHMFapMGbBuYKfIm8YRKsec04OpHBk5BY9Y2ndV I6hVdhtKQhK+T17WRn15ecLapMS+KZWQPBE4tP0BT7gSDzVXxC/+2oMQRood0hHHJ2lt 83fA== X-Gm-Message-State: APf1xPC9pFGFeOPNtUuSHgyg2L4LN1FMEo2KQJ1xmWmXDV0vhSfibTjD +rTy+lNrotOtGrSOh9FQ7tB8Vd0raM8= X-Received: by 10.167.129.24 with SMTP id b24mr9361235pfi.183.1519621774051; Sun, 25 Feb 2018 21:09:34 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id t87sm17269645pfi.37.2018.02.25.21.09.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:33 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 02/27] cpufreq: Don't validate cpufreq table from cpufreq_generic_init() Date: Mon, 26 Feb 2018 10:38:45 +0530 Message-Id: <4c60b30c1a011f6750675e62217bf8edeef8f03d.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq table is already validated by the cpufreq core and none of the users of cpufreq_generic_init() have any dependency on it to validate the table as well. Don't validate the cpufreq table anymore from cpufreq_generic_init(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 239063fb6afc..075d18f6ba7a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -178,14 +178,7 @@ int cpufreq_generic_init(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table, unsigned int transition_latency) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, table); - if (ret) { - pr_err("%s: invalid frequency table: %d\n", __func__, ret); - return ret; - } - + policy->freq_table = table; policy->cpuinfo.transition_latency = transition_latency; /* From patchwork Mon Feb 26 05:08:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129529 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230144lja; Sun, 25 Feb 2018 21:09:38 -0800 (PST) X-Google-Smtp-Source: AH8x227IFI5nPrtxFets7vEUhwCvGnbBlqgTIiHk7Cfv3t4GI8B0D+gjQIvE418pfWqGpB4JRFgD X-Received: by 2002:a17:902:2904:: with SMTP id g4-v6mr9295411plb.170.1519621778840; Sun, 25 Feb 2018 21:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621778; cv=none; d=google.com; s=arc-20160816; b=0pUzF83bvANYh5ftL5op8kKWzS2KnGRl7Uqf/SPD9cfh9aFIlpzKiXZ1wf4mQc5dKo TMTjaw5z4S5Ye4U7A5orplomlQVKcPv0+hiwqPKgV+DdpXyRoeS8Trc688JqT/sW3Rwe TZ/J66U5ivA67IyjfMSHr/QzeM1eoEAcRQmqb2RdFhvfJGw6GUUQzwFvl4IZZMarlv3Z XStCrs+Waz0gltCAwGpmdTJfLH/olcEeEXwKyX/CvmP+0naoNYQm8Q+fToPOO4t0FdHD sr3GuI9Z7fm233Lu2k1hsgHTJunUYfxq0zNaK9m8SuDR4XY9YIk9yb1EisTcm9TZns/i YKlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qZbJU4xM3O5VkI89+LfIxT9ccFZcbDnHbmJGkd1XZDw=; b=wSFLeOV5LRrb60AV7NCeM021wgrCyD4//5GkCrq8OVaTYUy08bWGG0S1A5Bl0zSx8H Tf2r5g+RkNpIuz5XZFORLjxxj6dxZotFoQ1kGHiW8Q8rUCzJ/NOmvxqJrCIjBR3Ao4y5 mfAqDKN5qE29n7kejZCuBsDyhZKXQKCX5sWpxjbqnXLh08Cx6rK+iHcBX3LOyI0OB4Tc 30w6lOg9GracTwctjk6HD2869pGXk5puYrPxmbaqjYn9QEn1rUo892gQhmSOjkzfjkD+ tUccBITP1vWCQt/LVnHiTPw6pLuYpAXvTRYMiQfCBfY8qFLb9QYowUl0y1TzEgMSTISr 14+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FHDDbmIg; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.38; Sun, 25 Feb 2018 21:09:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=FHDDbmIg; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751094AbeBZFJh (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:37 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36481 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJh (ORCPT ); Mon, 26 Feb 2018 00:09:37 -0500 Received: by mail-pf0-f195.google.com with SMTP id 68so6085734pfx.3 for ; Sun, 25 Feb 2018 21:09:37 -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=qZbJU4xM3O5VkI89+LfIxT9ccFZcbDnHbmJGkd1XZDw=; b=FHDDbmIgVUPcGG5u8orSM1HSArLknhcWOe+Mf/WQKkaPaSdI3y6wePIlb5pB8dzUNd d3+6xRxoEsRYM1HIm33nSlZjJ8Zy0U30I0zzwkf7ykbcoovvcbni6MLWFGNuQbJBAmF1 Gr+cp6Nwtez18QKK3FkrpHgFgOHKiBeW6QZJQ= 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=qZbJU4xM3O5VkI89+LfIxT9ccFZcbDnHbmJGkd1XZDw=; b=UVpEbc+g5SsxR5i23qWZQXwQgRoFCt6TMmLd1z0vNR6hwD4H9DDH749UYNjGomaMoU mWmTCOX0jyGzd7kw6HHSNFu+SnYGJqVh1mlGb3wCftNZer7FNWY5hOuPqLIX/XxOovGb ctHVHOS5rb2M3wbj1XwuYSbty0d9YKHMAls3sm6gJhy/Pg/2JAp5JltuvKmxCA6mqJEX BJ1DM50fyFXyQLoAWhw3RpJTdSDP/vDHJ4SjRgYEHZnHFIrXYNCuGunXQi/qX3YrM3wN /wVKv2WjbL1r/9kyzue5kBoPvNB7wA2ThOpZXkSdstKf2Apy6Mp9jwFf6jvv0AiBhCyg jnRQ== X-Gm-Message-State: APf1xPAUzMtRQ7Jlxz9xUKtsWX03qu3nOzKcJvmgsoLg/hreh4aO/Tuc E7W7GZZ5bV6ieL6peuKb8t7jXA== X-Received: by 10.98.55.7 with SMTP id e7mr1994089pfa.112.1519621776798; Sun, 25 Feb 2018 21:09:36 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id h17sm6358753pfd.64.2018.02.25.21.09.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:36 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 03/27] cpufreq: acpi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:46 +0530 Message-Id: <06cc728bfe2ebd52dce2ccd2310a40cc9d4db1dc.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from acpi-cpufreq driver. The driver needs to crosscheck if the max frequency corresponds to the P-state 0 or not and the same is done from the ->ready() callback now. Signed-off-by: Viresh Kumar --- drivers/cpufreq/acpi-cpufreq.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index d0c34df0529c..9449657d72f0 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -794,15 +794,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) valid_states++; } freq_table[valid_states].frequency = CPUFREQ_TABLE_END; + policy->freq_table = freq_table; perf->state = 0; - result = cpufreq_table_validate_and_show(policy, freq_table); - if (result) - goto err_freqfree; - - if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) - pr_warn(FW_WARN "P-state 0 is not max freq\n"); - switch (perf->control_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: /* @@ -842,8 +836,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) return result; -err_freqfree: - kfree(freq_table); err_unreg: acpi_processor_unregister_performance(cpu); err_free_mask: @@ -871,6 +863,15 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } +static void acpi_cpufreq_cpu_ready(struct cpufreq_policy *policy) +{ + struct acpi_processor_performance *perf = per_cpu_ptr(acpi_perf_data, + policy->cpu); + + if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) + pr_warn(FW_WARN "P-state 0 is not max freq\n"); +} + static int acpi_cpufreq_resume(struct cpufreq_policy *policy) { struct acpi_cpufreq_data *data = policy->driver_data; @@ -898,6 +899,7 @@ static struct cpufreq_driver acpi_cpufreq_driver = { .bios_limit = acpi_processor_get_bios_limit, .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit, + .ready = acpi_cpufreq_cpu_ready, .resume = acpi_cpufreq_resume, .name = "acpi-cpufreq", .attr = acpi_cpufreq_attr, From patchwork Mon Feb 26 05:08:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129530 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230171lja; Sun, 25 Feb 2018 21:09:41 -0800 (PST) X-Google-Smtp-Source: AH8x227k8R/GanYPFBO188tXxjwnvdb7uDcjSTL4C2JjT2uljUN5dLHmGt84AkmUQyvke3Dv4hxM X-Received: by 2002:a17:902:10d:: with SMTP id 13-v6mr9310681plb.266.1519621781503; Sun, 25 Feb 2018 21:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621781; cv=none; d=google.com; s=arc-20160816; b=B7lqlvOKI8phMnlX7r9KaWH4vxFcrdwVjDyfsxPxzaF5jad1pIYxLUi6+fT86/4k/m uWuWQfb9z58mYI9iA38iy4XzqLYtA5LC98LHtIv9LZ+s3UwrDlBG+d/+6fyL1kkH8gtj 0Sr8CwYFjQyFAxcRsqCjSLXWWrxfjVbidIKEtKJz+UCL/iO90oG5R5D/nKXHskjBQ+9q zP//r1wnZhgst1N8dzNP7avDC3UqBtBUCcGL/G7yf2CXId/xo45QdzwrAdgpVf1tRuVu aaDeSoMkFQ6JwGAumPK8SrVklRb+O1ui8kgYCH1TxRhhqdmsFMZc4deZa/d9Ht26gzW8 fS5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=GAkohg+ki3fiuOX8bkbde+YORPX1kQnv7YBut49p0tw=; b=jxAINQdEacJpBKxfEfRHtIOM8nWwNGMraXu35KXzOguHqao8hpG671187q4j31vNep Rb2ptR59p5d03HNGKeU2kOrNq3BpFZ40v7jsTMHLIam/I/EizCquMyBNmPabEs4/Q3Br ZlGDpxw2YBaPI/pi3jZ3sx71d+b6X0lxNo3lfZjdho5IApkiUPMkR/Zeo2M6tBtHVacT 4bbMQ1H6pl0Kn1qjxgLNPlVvkUFozI/Go+2Byb75EFF3k3n1pg/hpFcvL30V4kEGRDYX QokFTAuMKEkR3E+wKMZuOz3+CjtNveg2jU/EeJSlQHeqvqeZGIIXZyHpGOOxoUQBqGf8 Lo/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UDTFWjVH; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.41; Sun, 25 Feb 2018 21:09:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=UDTFWjVH; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751153AbeBZFJk (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:40 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:39930 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbeBZFJk (ORCPT ); Mon, 26 Feb 2018 00:09:40 -0500 Received: by mail-pg0-f66.google.com with SMTP id w17so5775982pgv.6 for ; Sun, 25 Feb 2018 21:09:39 -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=GAkohg+ki3fiuOX8bkbde+YORPX1kQnv7YBut49p0tw=; b=UDTFWjVHF3mQnVRzdx1efZYj/2momdGrzp9vkTEBzcdK7fqB3TJBd46PNkDQVATkKO XYwPHxyZqURkyJwiD6igSmYB0Rn/gkl8EpKyJuMm7FIv4VHLZMg0/G7IjbrBqPMxGOmO YGyRvGDwnzoszJtICv5YQRQvwspbTChctw5SQ= 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=GAkohg+ki3fiuOX8bkbde+YORPX1kQnv7YBut49p0tw=; b=KsP0mqf1R66lv42/k2gKEvCTX2B4cvLHe/NteK3/j9T+FXGEgp446eHeD1yge+SdWz 1Y28egZo+vKLl6wl49Ovkqy5o03RCil3Tnk1Jv04BdsKJzDzFqC09nJ8ZQnjXiIHSWN0 Zs1rjbWrm986RhNkgM3zaggpk3bqHzU89dcI1XwqC8kKWct5szn8S3PK+vz6moQflKnw 3vsCqF9IpMkCmHXniZGtK5UVWrVJaoSZKtIf1Og1bNi6p/ShJWqCiJoOUXP4pI8pXEL4 IRJxfY/AAE8U1gARZiLa0zt/ShZIe7JJCesTYFfnCBsNqoXXzWfFTWXEdgR9dRXtrtZ+ kKTw== X-Gm-Message-State: APf1xPBjsV/2lqzak/NgKtPlHos/YlO0tMGNoALuInonpS4/3HDmuoyp DmKRDvKPr1Zp8PHs6czr1SqjRw== X-Received: by 10.99.95.15 with SMTP id t15mr7339692pgb.183.1519621779504; Sun, 25 Feb 2018 21:09:39 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id 191sm10703837pfv.167.2018.02.25.21.09.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:38 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 04/27] cpufreq: arm_big_little: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:47 +0530 Message-Id: <2380b45067ab61f982cb0e75ed59d032748f04b2.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from arm_big_little driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index c56b57dcfda5..1d7ef5fc1977 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -483,14 +483,7 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy) if (ret) return ret; - ret = cpufreq_table_validate_and_show(policy, freq_table[cur_cluster]); - if (ret) { - dev_err(cpu_dev, "CPU %d, cluster: %d invalid freq table\n", - policy->cpu, cur_cluster); - put_cluster_clk_and_freq_table(cpu_dev, policy->cpus); - return ret; - } - + policy->freq_table = freq_table[cur_cluster]; policy->cpuinfo.transition_latency = arm_bL_ops->get_transition_latency(cpu_dev); From patchwork Mon Feb 26 05:08:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129531 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230205lja; Sun, 25 Feb 2018 21:09:44 -0800 (PST) X-Google-Smtp-Source: AH8x225WuGLtzpLhj5iIKxb6vWavysZfmWCNsE7njuiL8jEezR02QWp6EFSgvT560Hh96k4kF5Hu X-Received: by 10.99.113.75 with SMTP id b11mr7605283pgn.271.1519621784330; Sun, 25 Feb 2018 21:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621784; cv=none; d=google.com; s=arc-20160816; b=ne4FEPZhi/DJETk6+WbpKnz91nVBVZhy5q++vYX9L9zpv5LniddLIPNY7sxHvBe30y Es4o5HfhMdZw2iO/ZUVqbJXQoNYaXn3zJUO+cYvS9b1QKDLIdOmbOnq+gdtkFNlmNfcL CLSrVAnwL88piRbA6MzyFeY1DWgqZUzirkn5qC7DlIIawwo1Tp+C7RtnAlK/mC4qt3QQ 4ENOo5x5eDnZKK0N+kv19ipIHSwtVPEmexY39qs2fZwKjUW3QHiymaQnkb0DjCOFuJy/ vd8hBGG1VyVdNGaWs9glzAk3WF1lURNnpwPGeriwuOdsMCvhn9hJpZtHU320ynw7zVMI 21jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8GlGUGDrjDrrPYpBOSD9KYsLzkT12xlX2ILt6IAbjnY=; b=gfLQQOipp9BEAq377WqIvL8SRUofiDTfvdX/cVLmS9HZFTuhbwRXg8jJ9x/nsNH7VR Q651ZtOtt7nTiCWPaG9KEvzMst2Xadvd2sGpkh3WGH3gytczUmhAdfLBEYNGrkgFLKkH KwleiJAtsLAsMAOOT4z3M0kFcBeoFg27o/X8027gi+/Kw8+GnUnGabL8HCOSCr3dJpWA 5mKgaFWkKfuQi8w+rlLLOCH5b6xJqliuW9BhLkJCYDfqmc+sw6GZl6KsCJ0HYkQBGuKH OrKa0SdvOUF+bd7nFz2SRg9WQhwAzFYLicAqNnQSD/GvHRo4orE0+8X1zEr7d7u+j+5G Po7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iiTrvLAV; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.43; Sun, 25 Feb 2018 21:09:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=iiTrvLAV; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751319AbeBZFJn (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:43 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34755 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJm (ORCPT ); Mon, 26 Feb 2018 00:09:42 -0500 Received: by mail-pf0-f194.google.com with SMTP id j20so2648649pfi.1 for ; Sun, 25 Feb 2018 21:09: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=8GlGUGDrjDrrPYpBOSD9KYsLzkT12xlX2ILt6IAbjnY=; b=iiTrvLAVXXlyOdxqANCZnM/8Jv+fHkSqCJ/mt0mleFLYFfDlsTrCjseAiuiP5Bgvp6 B4LA4BO0jBuSX1rbRfWLBPGDDwuxqcuoFFtM3ZrcmQFkE+f92PisgVMpAtPGbJ4M3iLY aTvgR+XXkjcDxINvB3QW+vrUvFHjQpH2FzRxw= 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=8GlGUGDrjDrrPYpBOSD9KYsLzkT12xlX2ILt6IAbjnY=; b=Kh19mgq+RSOCtsfcWhlykI9cQ/gGoME4GtUQ8gqTuzQVgFjraQ3E+mi+K87hI+yHBA 5btQx+XnqdeFRst6b2riBk5nDGX/O+YfhVN7y7KB1pmOYxcEsLd27lP4h+/sjLj8Bv1C Bll1j8ICZn4euH9gpnfTo5tY1QDJznU94o1lAiQR9Wl3r/yobimvwIsdo3TWRWM2L2+j 6d0gkQgqd7X27HHv1Gz4cqesRZB21uhmKiw34EUS8YdVUu3uwuBQ9ar/J8CcKmuRyCVR f7bng+/Aupu7t9Nwn055WcOE1v1fXdZ31VkCoSw8M5CvIRLSyeo9TWignJnrJPFNJ8Lw zwhQ== X-Gm-Message-State: APf1xPDbE5z7GyXFyH2rbKPLtTDF28kiPRL1SYjdqtugmv6RoV6yLFIt kN/ptbLEawHmWFOjj6WaxDQl4Q== X-Received: by 10.98.117.139 with SMTP id q133mr9301842pfc.64.1519621782144; Sun, 25 Feb 2018 21:09:42 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id f4sm21106715pfn.82.2018.02.25.21.09.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:41 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 05/27] cpufreq: blackfin: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:48 +0530 Message-Id: <0f944c0a7e521d42e7cd008e7341cf5515856076.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from blackfin driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/blackfin-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c index 12e97d8a9db0..3f9d96c0f37e 100644 --- a/drivers/cpufreq/blackfin-cpufreq.c +++ b/drivers/cpufreq/blackfin-cpufreq.c @@ -186,8 +186,9 @@ static int __bfin_cpu_init(struct cpufreq_policy *policy) bfin_init_tables(cclk, sclk); policy->cpuinfo.transition_latency = 50000; /* 50us assumed */ + policy->freq_table = bfin_freq_table; - return cpufreq_table_validate_and_show(policy, bfin_freq_table); + return 0; } static struct cpufreq_driver bfin_driver = { From patchwork Mon Feb 26 05:08:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129532 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230229lja; Sun, 25 Feb 2018 21:09:46 -0800 (PST) X-Google-Smtp-Source: AH8x225lkwBpvYYZwAyVfts1Kvt17e89dqB6Ih5Wv/YjQ7IBigwL2exksCI1Zjt6j815KiWqlDaO X-Received: by 10.98.83.6 with SMTP id h6mr9457714pfb.174.1519621786731; Sun, 25 Feb 2018 21:09:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621786; cv=none; d=google.com; s=arc-20160816; b=prUjlcP3OyWkZfuFUqTLJPqtg/l1TB5T7nao+SE6XaFQYn3/XcA1qK2m/9igmdCZQa I1plrYu3CAw9QXcQ79R9yVRB4LqicDzm7hcaIbySoX6wKxCmgsX6GZLToiTLYgjEo8NL PzG/SPk8euw3le21GC9CFfR4XqifJYGvKQQdamly3WCek8Ag2YTDXFJjeMScxE4L9JR2 J/e+mSkI7LrJH95bEQoELAoHAC69eXr+a6iRHVz18fYuQztidX7QctcN9biSLuGo4/m+ d7/pgJQFsbcmeZZxl5qZsiOppryvasYnV2WTcbAGDrZd5yhbKngUfcWgNC7FG/uwx0R/ i17A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=mbM/nQwKbDGCgT5aGrfXK+B80WlDzF6HIV3v2fYFi8Q=; b=eqFFC/wZ+22XPCSyFjnZaCj2pc+26azompmL3d37VMc+KdA1kx0fuG7K9lzRCjzwFs S4fqeoL469tQMmWpwWYYLX8HXDRvGl1mXHbWhX3ADwLbz3huWgpn7N3cji96fec38JmP Wjd3CodDXJ/1hTvmCpxG+jhQ6dTUSn5Ek3AON7hVOntFY4NBpr+B/S45yUuecJb4Q/h8 HK+DHO9EDlk4c4UHPDX+mLoSgW2HtfGn27SnYWK34WrFQHHwcjKw2dJgT3AJuLmRSp2E 2XDw3vxh+YyXHk+0XaPxEp0CU9Ba/wxrfYbco6ov6onqvm8gDyRut2eswHxJdfNYlY0R eo7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9gbsi9z; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.46; Sun, 25 Feb 2018 21:09:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=I9gbsi9z; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751671AbeBZFJp (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:45 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:42127 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbeBZFJp (ORCPT ); Mon, 26 Feb 2018 00:09:45 -0500 Received: by mail-pl0-f66.google.com with SMTP id 31so8648973ple.9 for ; Sun, 25 Feb 2018 21:09:45 -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=mbM/nQwKbDGCgT5aGrfXK+B80WlDzF6HIV3v2fYFi8Q=; b=I9gbsi9zkHiGgj/HFP0AmBWJKTpxFGBvkFgdZTLjKEX2M/dQZgF7ysYfXUvhz5Pak2 YeAUcQOq0c29c64amrFQDL5MlnIXMOS186d2EkF+eFi1Dfhf8OlJGwVCaQEUyPc5VbmO 9bjpDXcHIhUjwtmnDjAi00avAzaQN88C+Zji4= 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=mbM/nQwKbDGCgT5aGrfXK+B80WlDzF6HIV3v2fYFi8Q=; b=K2ztJFlwYbtKMMmQy/UwFHZqCa5R2VAA0cA84hEFqa3KejRvT0jsh82HMojx6irpyg FwLTvmsRHWzEEicQYGTQzcX600wTgGpoxaEkz6rP2OkHo5rUaeIDbBF3r4Z97zy4Tr7P XnYGygYizXyk5yOGCU9F3Ouk9PBQpkxgEUeLj2upIT2BisdYRvG5VXExHed+xDWmzQM+ oOVfYll81UV0qf/YTgI4lEuDvcD7jDqj51eIo/DsE7mdOrsscaRUBeytKh6Sx0m7DZsm N36IkXaF6XpgtIPo6aMmZVB3NJAAHkmEaljvw9W15JpcgLqkS4HOf8MiTvA7EQKX9W6A KS/w== X-Gm-Message-State: APf1xPAVliP7ueK3RGZQDNHp18t+3IZE4jIKyrZrAiPwpGqJl0TLxhYF PikLib3JOt8Uu2GPRelAAAUAqg== X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr9435428plb.77.1519621784945; Sun, 25 Feb 2018 21:09:44 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id 14sm16389077pfi.132.2018.02.25.21.09.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:44 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Markus Mayer , bcm-kernel-feedback-list@broadcom.com, Brian Norris , Gregory Fong , Florian Fainelli Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/27] cpufreq: brcmstb: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:49 +0530 Message-Id: <7d2bc4de102c81503c30a64503179c4ccebe6287.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from brcmstb driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index 7281a2c19c36..6cdac1aaf23c 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -902,11 +902,7 @@ static int brcm_avs_cpufreq_init(struct cpufreq_policy *policy) return ret; } - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(dev, "invalid frequency table: %d\n", ret); - return ret; - } + policy->freq_table = freq_table; /* All cores share the same clock and thus the same policy. */ cpumask_setall(policy->cpus); From patchwork Mon Feb 26 05:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129533 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230266lja; Sun, 25 Feb 2018 21:09:49 -0800 (PST) X-Google-Smtp-Source: AH8x2278HSEAWm0sQryp1G7xb/GIQ+n+3QhqbydwHjH0Rp1r2yt/P7yaN2NBBFsORxHAiPkJbSlA X-Received: by 2002:a17:902:9343:: with SMTP id g3-v6mr9589899plp.319.1519621789694; Sun, 25 Feb 2018 21:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621789; cv=none; d=google.com; s=arc-20160816; b=cDH5sUQQQOnv97mUbH7+Rrg4fi4miuo7OQIn9r3sfkmFv9EhfLOrXYOMAX1aMZjhl3 7G66CGiu5ZuN/gYXHo0/ZjFTcy18zj6lmZLU8PlPXmNrUnojXW34XLwHSnSDD/7pT9mN pGPE1ze9ox8sjVfZFWX0MC3+J/+LyBUxAMMhoRxwxtaDSPg32bS40aJXaCtkcQYdxGpF spjwBJTS3NVUU1Jg56K1eMNqPOgTQ5H6VaQnfFpHjuwYAUrT0G/G2u0jKn5nIfZfoULn eMxDmQZvo3hxuLVpl+e/IlBpy13VbPseBhh5e/sC+t/4K8B/7jjY5rpYfWxeLa+Ss1w+ ySxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=WoKFozBxCNwthsceT9U7XTOlxSHKME8CG5QMlYBKh9gMCDWbVmTjQejyDL0WoEmhdY robDYGazIK/YgNAx3lPrty8HQSI3nXe+7sj0bJvtO0cKuyeLsPAi1vMXXNGJ3eXZYWup 2AL01qBP3ngsSKYWDu6JP9D7heyIPb9F9DDROMIlC39Ual6cvvwmIi6i7eJQj0nrIojj L9ThNR+lz+Lcs3nEtJxuVOZZc8sm4h2iii+i07yPaTPFY4UUhQ7z4/Yckx00tts79wZN p5IxS+g9YU/3QiTtDnnFgqdrJHTP1k9qqRDQuVFb86FtkIwogdqYGpGPcmpsUjojxmSa ps6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYPzS7Ka; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.49; Sun, 25 Feb 2018 21:09:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=WYPzS7Ka; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751788AbeBZFJs (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:48 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:46895 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJs (ORCPT ); Mon, 26 Feb 2018 00:09:48 -0500 Received: by mail-pl0-f67.google.com with SMTP id x19so8654617plr.13 for ; Sun, 25 Feb 2018 21:09:47 -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=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=WYPzS7Ka4gMkKFdmFLaLUqCDhcqjU93fVlQgHQOQZJ24VnjMcMuPP7KIH9ddRfNFbe EgArx1BmVR4FhMNQyKS+Emwmg+jNybFJh3uWngOico4AcZbz4X/646dYWy92/J7bOtcH DgL8E+G96p9LqQMf5QQM20UrzsnmAJ+DsUesw= 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=qcXKQcD1fgPfs5hTTi7lJwbH+0qqoIEafaA77+7reyM=; b=b/tmQIW0e62EgO4VRViD4aHbr3QMU42kvbXeqCQ2rUND9PhxLFllKYLcKZ/lSv13ji qWU1CwZGYb+7JHpQ/y2fwGyQbTOuh2O0Xj51NXde1g82mwT+H4LCrNeADnCiVoLwaCyU WzZh2oELLmAroWn4/d/FcAWNo4kJAgl0Mu9NNuBEhypfYyHAVkbrMFbFOXBn5Eb6Hvlx ylvbWFbvSoTylZaXIjv2iKD6k+4BHZ8SSUQZQTIsTpuVmMgWcPPmo/5hWAdQHIzW486+ +/6ewCo31rIvbI+JOTSKFyw0Arvi6TaA7+oTDLZmXkenb8ZWDsWStRM6vYl8XbeiINz3 tO0A== X-Gm-Message-State: APf1xPAhYjCsDWB5RiJW7KU2TN08HSsfl8b+HRyNgy3n9b/ItDaj5+We B4qhrbqpHaFb9wQYmeewb5knsA== X-Received: by 2002:a17:902:bb06:: with SMTP id l6-v6mr5292997pls.394.1519621787591; Sun, 25 Feb 2018 21:09:47 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id w3sm17609553pfw.30.2018.02.25.21.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:47 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 07/27] cpufreq: cpufreq-dt: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:50 +0530 Message-Id: <68d899334334fe62034462cdfacc0328f4c7adef.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from cpufreq-dt driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index de3d104c25d7..190ea0dccb79 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -258,16 +258,10 @@ static int cpufreq_init(struct cpufreq_policy *policy) priv->cpu_dev = cpu_dev; policy->driver_data = priv; policy->clk = cpu_clk; + policy->freq_table = freq_table; policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, - ret); - goto out_free_cpufreq_table; - } - /* Support turbo/boost mode */ if (policy_has_boost_freq(policy)) { /* This gets disabled by core on driver unregister */ From patchwork Mon Feb 26 05:08:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129534 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230307lja; Sun, 25 Feb 2018 21:09:52 -0800 (PST) X-Google-Smtp-Source: AH8x224sJHuSn4TNembD3JxajUpN7skSz8uQLZoF+KSl+v3lF0sHwN7C+Sg1PHJoKAowPAGaJveT X-Received: by 10.98.82.138 with SMTP id g132mr9449473pfb.120.1519621792257; Sun, 25 Feb 2018 21:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621792; cv=none; d=google.com; s=arc-20160816; b=pY+42ijfHEqSRzST68VGUOZj2WTCXvlWiSDPlEkpWHMgm9KPM3zqpZhhGPvEBPEMYC kroLrDhUZ/PFWd30N7NsFe/e0t6lW6xNz17qNe+dqEZgnLow+6JM2dF4s8mWBhwo/3x0 MC0KeUXvDCdiBMtoAq4RtXU/rYvlDZGnkcY/I8/3L2h7OKU3HVUXiJElDtymUzuB2O3p a4trXajuqPAF6e0M16CZWuD3YSssYyOWhTpvM6z2AMQYr9Zz2B4erAyXEa9FKr+nJtR+ h3YZ4Tfg2fZRTaqqYU72oyLaJPz8TOOkEVw7i5oOvpMXw0Tna68LA7NLhcaTw/T9C1lP 4nug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=qPzThHrNh1aDCRcksOu0z7DWxooaWC0cy7L2AU409xpFrMYLHniuuc981cY6XJh3TG EXz0XzQKGxm1Okry1PBVBLbLZKFXaOdB7ypFpO7xFx8ItzWLpRmuMLtuIpodQFVgy26z v8PBXBiZrKsTFy7mDhbhFmUphPxyWjNKH6tZ/mJfLFCdoQuIGgTOFxrnaFILz1yO2Pn4 FTqV3/CCjWFXt9plqX3ukY916IyiMxxuXCct9MAlzfhGLbwV819gDVOH/OM7YQRLWESm xSJf8BD2tvDdCQa/EWklu44K6Av2pDxspJiuBYMEnG5vmBZeW2YQWlemiSRXIylRHnzD M2uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eNjFPzdf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.51; Sun, 25 Feb 2018 21:09:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=eNjFPzdf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751796AbeBZFJv (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:51 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:35059 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJu (ORCPT ); Mon, 26 Feb 2018 00:09:50 -0500 Received: by mail-pl0-f68.google.com with SMTP id bb3so8659840plb.2 for ; Sun, 25 Feb 2018 21:09:50 -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=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=eNjFPzdfIkQ5aQuJ78O1GgEvsThfgpFd9YlW21Dco+pjVj+VIa9PukKLQ3YmdmsAdo bbh+N5CHHOGwYyvFCCmToDccZ7ZF9ieVXnhamOOlvFspa5x+udmzK8bxgbM9j+4dfDm6 vpT4/nlzPExYenkBESi07LaW2ZJzuizXZAlfY= 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=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=UMCpqmeodJdoFtUj7YyUKmrLghcaHN80t5NCOhOV7Mm44V16J6xExkG3KLqw9nzx38 cPP2CsFBtY1jyxTCZQp9pIfo9Vj6ymURXMftkQP6MKPhOWBinlfMCdfmcwWnMf+jXtxc Mf3DpgY8QR5/IGP0xomqwzBHu2m8GZWpOOwGag8eOW59uSRcQblR/zn15wSiAGVcbIsY 2ygyQIf/AB072E+/e9S70cfzR8HuWuQf/h5Qt+GUJeObAZoYLaXjKESAGAKzk0o0/h7K d/lQGF0pu1ORjYBHu5apgGDLJkheRbSBgSA6pW7VyDl1KbuNgc7yCgLw56Gghq0mgj56 qMUA== X-Gm-Message-State: APf1xPBNQgyeu4i8Sb+NtB8u5przpWQu/1aTCLnM4quLnxE7XF4OALb6 AroBxYr/TD6npRSczUd28dMfvGIUZZ4= X-Received: by 2002:a17:902:7844:: with SMTP id e4-v6mr9130786pln.83.1519621790273; Sun, 25 Feb 2018 21:09:50 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id a87sm16221323pfj.13.2018.02.25.21.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:49 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 08/27] cpufreq: e_powersaver: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:51 +0530 Message-Id: <8c69a1611f395d02f2bf53cca5fba7f1007059cc.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from e_powersaver driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/e_powersaver.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index cdf097b29862..60bea302abbe 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c @@ -184,7 +184,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy) struct cpuinfo_x86 *c = &cpu_data(0); struct cpufreq_frequency_table *f_table; int k, step, voltage; - int ret; int states; #if IS_ENABLED(CONFIG_ACPI_PROCESSOR) unsigned int limit; @@ -359,12 +358,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) } policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ - - ret = cpufreq_table_validate_and_show(policy, ¢aur->freq_table[0]); - if (ret) { - kfree(centaur); - return ret; - } + policy->freq_table = ¢aur->freq_table[0]; return 0; } From patchwork Mon Feb 26 05:08:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129535 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230342lja; Sun, 25 Feb 2018 21:09:54 -0800 (PST) X-Google-Smtp-Source: AH8x224kFJsoWj6RE9bub7vhEBEPrqX1YsGt3QqXRf5uA2rAbCIv2kUcmE41SOOZ24w1CGefrHA4 X-Received: by 10.101.77.201 with SMTP id q9mr7388818pgt.395.1519621794737; Sun, 25 Feb 2018 21:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621794; cv=none; d=google.com; s=arc-20160816; b=mekJcgndYhXNuugUfOeThtV1R2wrGbMaqp2ssXxc3xMcaUYC2xxmpEmpjR19SqCDye uYt/nabZevDzkC23kkaXxDWvO79QOKuNYimyKkNoUvHUNzlVWAkYhnIu8R82Q1WlivBm pbp7/PvqTHNGFsc45i/Ot0/YBkLrY8IW0HSA1fokWLTErwktpR+9qS/sJel+aq8vMCVT Jnzh6ERFPRe/Qfucxuo/uV2Gmzm4QIMsspVPkGhTWJsja/X0buLOoJV9aDOIMHgUnaGh 2p+EzRKcnzd4fpcp64Vd3MVIxGEggYbp6Lfw6l/8I0cP1G8gy6x4OYDhbm+EHOWtPTXZ Caeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=eH71Esuf3v0D+BYkRyw3tlwsq2CWU4aFGNta+rnMhYXbJAVuTrBWplP1PkcX0w2wW0 RLEawR0ZKwOSjyfN6zc5lERZPk8zYKYoXjClx14kR9BlLRGrAd0d32MPH8YpuM+edJaY nNl0pRz/z73zufhuUt68GBI3cUgPQrksaMKVXZ1cs4YtQbxuvPWU2NBzQvFdFvkPn3Mv 2aTEkAxX5a7Ci95/1/psPXPcTlVFWTIZLmyB/C6KeIoWfn/SRzM0pQ9ZnQyDj6pvo9Ls jvHGVt1szrnuFFpG19VuwNkJmPhVcZuJOon3RKJrgFnr0FdGe+uSgJhXGf/6eSsC8D5p loyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DsS3LFMr; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.54; Sun, 25 Feb 2018 21:09:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=DsS3LFMr; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751848AbeBZFJx (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:53 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43449 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJx (ORCPT ); Mon, 26 Feb 2018 00:09:53 -0500 Received: by mail-pl0-f68.google.com with SMTP id f23so8659364plr.10 for ; Sun, 25 Feb 2018 21:09:53 -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=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=DsS3LFMrYOk//lDbyVJOw5B5P96H7rUYjZpGWRPgBe1R2FVSDci6Y08/MBGqhhp8vz rHdl8BmMYrondxQ0W+iFAjYtwJETBNB5Ma+7LM2ze4tcXUlUWEkl+iNSsRWWNWOuIqz5 06w76KWnOWnHtAHEH4F7EPLuACBkmFavE4ldo= 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=XSmBu9wyFwuM6caOzlnqkdIMA3t9CGAR9zSFgKNBkvE=; b=IDZaUGkBNZT2OwC2IcynNcgwudhrtnXYyDL73qKOaY894AwMDgNjlAoem/d1zrOIMk Fo+Gqy6mDJIg0rzlHSdEThiggWb6IIETzxcC08OideIp3gysFQJW9QiZSLhiMGDFDdk1 NC0wB4a+ejmF97B2W9JSbOL9MbS1OJ/zpOfZL97s7N24ZgO562jH9WwVc5Gwk7cR9zbh GEIjIPgIPzHqVpj8hKmp88XVmq8sER78rsWOPjuTRkrs/tnUz+2lSylJo2YB8qhyJl0h iwMn5UxZVCxo1IY7VBBhoADMFf0H58o5TdZwnRFC5BNaZCwumGtpxjmxqnMKzZfuo281 oCBw== X-Gm-Message-State: APf1xPBFvaWgJ46BfX7zLMoW/s1C9g7cNjltDau8N2R7e4ziuyrfkrd2 yd/QWJIm4By9qHLHcWFNLOuHSkGIOAs= X-Received: by 2002:a17:902:7b92:: with SMTP id w18-v6mr9183901pll.159.1519621792942; Sun, 25 Feb 2018 21:09:52 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id b6sm18315342pfm.160.2018.02.25.21.09.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:52 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 09/27] cpufreq: elanfreq: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:52 +0530 Message-Id: <52a5c7064afa56fa8935a8d014c83537667bc026.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from elanfreq driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/elanfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 45e2ca62515e..03419f064752 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -165,7 +165,8 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) if (pos->frequency > max_freq) pos->frequency = CPUFREQ_ENTRY_INVALID; - return cpufreq_table_validate_and_show(policy, elanfreq_table); + policy->freq_table = elanfreq_table; + return 0; } From patchwork Mon Feb 26 05:08:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129536 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230374lja; Sun, 25 Feb 2018 21:09:57 -0800 (PST) X-Google-Smtp-Source: AH8x226oN4xhD10jKPBLUR+eOVUTaE5ejc9DHuhdMEwJVAhPB2ICp9YmBnDTXDDh/vB020fu9zYA X-Received: by 10.98.171.24 with SMTP id p24mr9373088pff.71.1519621797430; Sun, 25 Feb 2018 21:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621797; cv=none; d=google.com; s=arc-20160816; b=XRyec2U2SwVug5yFkh/w+t58Qch9ELvKTvm2fleAZImeYqVmf1048OTAMdwKt/8HGC Ap2Xw0M891ARi3pKbuXyh+P1L7jpv9eRef4CS0z7EjZHypjjm0sl4D2QkQQXN+He3qT/ GJpnYv4pfe7Ko0+APNHjK8H8m6xFQoPRGKVY6+jkcldO7VYGhqkpwAgsz+AQbDbrh+wR Sxc8G56cJ3LKdaUrXgi0hIaXYb/D1QnHO25AkutncBvoWqTDQDwLEcyA/kKFYeWTevBj NmC71pS6eBIc1vawD8vWERYAPYlX+qAcBjaMltVbPSqXSPaGI/p4FWerO/Na/AP3KyGl sLyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=U4POzxsyRiOcOhh4vVX9bya0cGAo3jqjf6nVErE6acI=; b=CuS9NwZUS4g7CcopirCI4bLntunSg4/mAynBlDUz1oIuZtIxqXVJ+lDY9SCEyUJOq/ 8D9upNvYBFcGdMix3qG8StaFWFGKHwhZ+stbLXC5MiWW0koFakm/0xa4783fJ+KZzQ9G MBtCypIfFuFM2zbGBvFa7bOxYJdQXUadHbghlmSjT6Pdn5z42HzwAy8eG2JkXSFYddNo lhvAcIkDbwYqXytY0G0zd9+qF874W1+xdnRpUO373m36AzheD9gW0QhhdaCtJ+mMdoI8 VkqfewNJ3uA/9LOr4/F4IdEHaHvr2wE+yAW5sw/6FUepcAn5vUZZXvWyOQWjL7NokMP1 DrvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5/nnAAv; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.57; Sun, 25 Feb 2018 21:09:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=D5/nnAAv; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751946AbeBZFJ4 (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:56 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42991 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJ4 (ORCPT ); Mon, 26 Feb 2018 00:09:56 -0500 Received: by mail-pg0-f67.google.com with SMTP id y8so5772796pgr.9 for ; Sun, 25 Feb 2018 21:09:55 -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=U4POzxsyRiOcOhh4vVX9bya0cGAo3jqjf6nVErE6acI=; b=D5/nnAAvYMjduiulLr7T2fSPzy1WKvKploCiqBoQ6L9goUNatBCLiygeRSrkcdL/s5 a29FABnSAu9C5bWYyhhdAOjAkd1Yh+LKfeo2Eupb70zVXgRImxFXQtpcjG8JrANLjdZX IZrc1oKjy6t4fxS5bIyXwmhEb9L6ObO1k6PX0= 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=U4POzxsyRiOcOhh4vVX9bya0cGAo3jqjf6nVErE6acI=; b=h8W4BHGBmyn/K0YYyTM1PsFC7S8ewABdyRPOOaRzVmiYYmwP7JmyM1RBe2FQoD9y1K mpdOuMf1gJDGgJGVtjhXrSQ/gvNHhKrVOEa5p8zKUTnOO1Pkt7gpzFBKfmgLhpxycL+X 0O5ar9TVhJxIYKoE4297p03x2NaScm0Z4a3iZxpzgn1I2Wowxht0KKOU7OJy1zwvI9lQ zF17ZV6nkEdi45NvBVRHngaHLY0X2kh5PQ6PcRIvAj8AwqbE/vJdUZklvtfRzQ2JaLuk e8aoVdubt4cOuv87AHED+P0qHRq5LdkD9LshmAwegpX9Q6z7z6NmNms5esrbA8BYHMVE UnCw== X-Gm-Message-State: APf1xPAAIECevCoEL/WGDn49ZqJ7kAO4ilOfM2yCmN5f2atPRLKDrXSo B1A/GvBj0NEdRk6SvLTMyvVaKI5yuFw= X-Received: by 10.98.157.18 with SMTP id i18mr9421896pfd.62.1519621795627; Sun, 25 Feb 2018 21:09:55 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id m3sm13539772pgd.3.2018.02.25.21.09.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:55 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 10/27] cpufreq: ia64-acpi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:53 +0530 Message-Id: <8f16b7fb6292d095f27181494e99b336ddce5fb7.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from ia64-acpi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index a757c0a1e7b5..7974a2fdb760 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -270,10 +270,7 @@ acpi_cpufreq_cpu_init ( } } - result = cpufreq_table_validate_and_show(policy, freq_table); - if (result) { - goto err_freqfree; - } + policy->freq_table = freq_table; /* notify BIOS that we exist */ acpi_processor_notify_smm(THIS_MODULE); @@ -296,8 +293,6 @@ acpi_cpufreq_cpu_init ( return (result); - err_freqfree: - kfree(freq_table); err_unreg: acpi_processor_unregister_performance(cpu); err_free: From patchwork Mon Feb 26 05:08:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129537 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230389lja; Sun, 25 Feb 2018 21:10:00 -0800 (PST) X-Google-Smtp-Source: AH8x227l96n4IQmY36RCTSFRTUgRZJ5nZjzxh9HK08E53UfxCgB0Ry5Z3UJQNymZk0ogjCDdUgRz X-Received: by 10.98.83.6 with SMTP id h6mr9458231pfb.174.1519621800173; Sun, 25 Feb 2018 21:10:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621800; cv=none; d=google.com; s=arc-20160816; b=KY+xQQUwe05mq/eeSkJJhtGxxHXiMl1WU849xcU8ZI7Ki5cQOYCFRjaAFmCrUKVFGj AqwXvcUuinavH/8vNtNTy/aSRDQ3vzQCT1IFEwvP1VOskCiUsB3vXozOTQiSARC213jx Af0llOBcfn1rF2IcYU5Bli9MM0vrqPG3wWGQIFnOZVZylv8omTnunn4qKqAjU27+auz7 Z5hzhnRHlsF5SpcgmW7bhV/8r0r6Xdc9S0V2xEnbxCAltJHNCazOS5lZA0TOCn1BTSdJ JImyqao1PP3CLZedEoDdcw6HFIOa6OsIoRAVZzO2vT2wFmj0OiVKRgGE6Db7nNncD7Cj kW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=Npdoc4SgRv/LQNm936EHJzlkdQuDqCh7F+B+YYKRhiu4AQF7/lORKw3VxnuXo+Ks6g g8mvtUfdXLlTOTEzrajWD2uiLZlApiwv5M1/tKKu5e2dy1WvX6fXCIZSu7IF0YPDQDLw OJxD8au1RaJ4yh7Z+5V6iB4Jv1LhrTgznWKiKLAvtbZqIetK6JAY1Y2r8i3B5NAlAwbb OgqaF2cxiakFF3CKjhtPBoucrwldQmgnAO5nItS6Vn8/tWVRHfGD0WuyoxUtVimmHZTf 277GzTL2pK60Knt+usBCxuwpl7MMJ2VOYtJStY/ifvrAK0pMJ2CFFjoGmB3pxB9SSnbV vSYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCDRWMo4; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.59; Sun, 25 Feb 2018 21:10:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=QCDRWMo4; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751947AbeBZFJ7 (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:59 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41686 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJ6 (ORCPT ); Mon, 26 Feb 2018 00:09:58 -0500 Received: by mail-pf0-f195.google.com with SMTP id f80so977589pfa.8 for ; Sun, 25 Feb 2018 21:09:58 -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=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=QCDRWMo4soWPdgR05NAIJvFn0aNFKKMPfVeAB3uYhNmb0cKZEjn5ohkanHupIg4fx7 FtaqJOq3Pj2WG6HMmwxKJ1E3Un68FODfuClAVysB67OyRaw4AukHacVIiLafg0EpfxCw zZCAhk185ChbHKl6UIfO1HfyCPk+sLnQwPvhg= 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=4C3iPkRzW2cWckGqrnavW37hoxQuKqY46ZZCxA1H7Fc=; b=HE+TTwllz5L2e0O2tq7DGJttE4Yr6Zx7xxEn95NgtZFLUqyUMob7dGnmmddlpjlgQg 4ZdYjYoCApVA/Wkb357pyZUqu2s3lT1zRJra/oaPBYpU70A0gekhvlKFWXOaME6cgOlJ sietwELvWAIMNobopinRdLqwv/y3S2PRsRDOmGm1vZc/gZ6PjulUeimapXH3j1VHmbSg gv7fz+rzb6Gipr35kL837Lqc29H5y6BpoMnBozHPml/GztTDKxGL7eUYBngJDEkBl34Z o8Np3KCmuAW8EzTWlBTnf0i+pSlSmkBrtNgwYGnEtu4Rmz3i6ulumDQ7by0YgRtqJC1i 0rbg== X-Gm-Message-State: APf1xPDzO7HR83ABaALA6UKnbfPWgc/6L9pKUGLebietVsZxuoUn3+Kr A/XTRV8HMWdHx8L7UxJjzXfSIA== X-Received: by 10.99.190.15 with SMTP id l15mr7641869pgf.325.1519621798400; Sun, 25 Feb 2018 21:09:58 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id a13sm14388194pgd.1.2018.02.25.21.09.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:57 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 11/27] cpufreq: longhaul: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:54 +0530 Message-Id: <86eda8f5f00916b8dd4cd9d7295a16ab2376a4d5.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from longhaul driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/longhaul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index f730b6528c18..61a4c5b08219 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c @@ -895,8 +895,9 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) longhaul_setup_voltagescaling(); policy->transition_delay_us = 200000; /* usec */ + policy->freq_table = longhaul_table; - return cpufreq_table_validate_and_show(policy, longhaul_table); + return 0; } static struct cpufreq_driver longhaul_driver = { From patchwork Mon Feb 26 05:08:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129538 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230415lja; Sun, 25 Feb 2018 21:10:03 -0800 (PST) X-Google-Smtp-Source: AG47ELuHpVrXI1emxRosuXoNO9l8ZjdWiTPyvflgLDZZqOAwqbCaVXV0baVUIADw3GhxNA9Sr7fa X-Received: by 2002:a17:902:6d0f:: with SMTP id s15-v6mr2465403plk.375.1519621803020; Sun, 25 Feb 2018 21:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621803; cv=none; d=google.com; s=arc-20160816; b=rUOtSf5aCueAY8/FmtUnOzOL34O9s6RCnT3QbEfGDNob3405KRsDA4ZMV7kUbdQiEd 7Frieou7v/OU1LpOn9meaXFNq61UXAl7BFXqv6y+9Q1ZA038H/a2v+I1cug22ia4qnxC Nhlf8se0YUqTerruRCvZWuS2eVUfGFpquOG3UFh7Qv/daIHmzXw8Win3N6rrp8Wq1tr4 UDKJN0KzpTdhzuN6ynUqJBdckpMHOyLVbmdk/iHmRAMU4GHbqXv6aq73MfG9fXO9vl4E jX40VaYmZxJJm8parjJi6uSwFlWVnirqOAvuKQ7GUmGYoWhLcKjp/FaNeIJhu9LBP6TQ czLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=7QGZw8xY1AzKmWeZQrfRD07I9AonUp4Z/GOKO/Ikvbw=; b=BsLxxBxjOc9yb5vAwNTQ0CD0UaaW8b68Zz9jawlltrZdbNc9ctCTHArTsiFD4fR9qp 4dXILS/wCfYRoNoZ2SdydAzGV4c+gp2PtynN5wxZs/X2oUVKAvBIMkoSKkh6pUuUJVNA BcilOf5FIYQDXEM4BVaGLGpTO5gZ2sTJ1ME1o80BT5vwfEPTZ9NAHJga/TciqrvnAjhm CoM9zq+ej38bYIdcaGvI2+Wmh9r94GwyW/zR/rmK8zDcqXP6tKViGNZogucpft2qVBWi hDt9ffJ0ddAVd+scp5u4rn1DQGLn0HLqc2+B7HSWnQ7PezTsIJSLWIcWRrtwGw4K8JlN ssJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eCPtDp91; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.02; Sun, 25 Feb 2018 21:10:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=eCPtDp91; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751706AbeBZFKC (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:02 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35614 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbeBZFKB (ORCPT ); Mon, 26 Feb 2018 00:10:01 -0500 Received: by mail-pg0-f68.google.com with SMTP id l131so5778543pga.2 for ; Sun, 25 Feb 2018 21:10:01 -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=7QGZw8xY1AzKmWeZQrfRD07I9AonUp4Z/GOKO/Ikvbw=; b=eCPtDp91vBN5ijuIryNZwCbBFf2J+afAvNmlf45rtxRWtzvHTTgCj/CGv32rD311Ph xGYtsF3lJ6v2o7ZqAwbGAhGt+NKVEuwFjUzs6D/vk9lyu0h36Qaxzw6jq79LO8FIqUVy tIHNZdR27ubCqZJ0T0URx1Gs9hqMs0OB+kOjw= 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=7QGZw8xY1AzKmWeZQrfRD07I9AonUp4Z/GOKO/Ikvbw=; b=tU66DddAbCEbqgW265Mvqs4LVBM1f0Xuddhl7SzEzeHFJCu37vCRcDOSpgjJoqr/gO eCwJla8b8lk+nBuVOJQfph6ai7gx5cLmIsn4XJ2nEvWe1W8VHhJMOIvNTG/AdxDy1mlS rdmojCxuIePGm8oIE86OwSAi6m819Y827+/QJW9/CK7qhEHIhctQ0RgB8P9hju2gAw3m eO/gwnmcNVF7PN8Kppjz7w4fc8lyE+3a6ERGsDI6c+SrEApjqWJLaB5/HrwVyb0B02nn nK/u+g3Ljo7tmIo8e5xWW8MqMvjnOR+QMLE84H5ke8uSQsdfRjEIgNzQPQRf3o33lz2l 0h1g== X-Gm-Message-State: APf1xPD3Aw+fyyNwn0VFD0MdIXiEF8RtA/jZcBDYMlslpKQKBxFGpyzV h5CBMW1KBGR1bA3A0SDuZ8M14A== X-Received: by 10.101.101.78 with SMTP id a14mr7406828pgw.368.1519621801018; Sun, 25 Feb 2018 21:10:01 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id i125sm6740325pfe.176.2018.02.25.21.10.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:00 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Matthias Brugger Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 12/27] cpufreq: mediatek: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:55 +0530 Message-Id: <19a79fac3ea680f23690e4d995539f4b21213275.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from mediatek driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/mediatek-cpufreq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 84d658d57029..eb8920d39818 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -460,21 +460,12 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy) return ret; } - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - pr_err("%s: invalid frequency table: %d\n", __func__, ret); - goto out_free_cpufreq_table; - } - cpumask_copy(policy->cpus, &info->cpus); + policy->freq_table = freq_table; policy->driver_data = info; policy->clk = info->cpu_clk; return 0; - -out_free_cpufreq_table: - dev_pm_opp_free_cpufreq_table(info->cpu_dev, &freq_table); - return ret; } static int mtk_cpufreq_exit(struct cpufreq_policy *policy) From patchwork Mon Feb 26 05:08:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129539 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230454lja; Sun, 25 Feb 2018 21:10:05 -0800 (PST) X-Google-Smtp-Source: AH8x224uyu2Ui0pMwRgOYzkgVbQV7u8MltJiz8qaEFw8mnqZE95kRMjMdbGWWt4CWciS4TM4GfZo X-Received: by 10.99.110.131 with SMTP id j125mr7556136pgc.382.1519621805845; Sun, 25 Feb 2018 21:10:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621805; cv=none; d=google.com; s=arc-20160816; b=BvQVj8tOYmQg0HadFhnwUVhQJ/B9q6AowPehwNAwX+NyCzluUfLqlyrTZuntnkbcKx AirIeDuaDUla7JgsvrFdYQiM7s/A2XZ1pe/oFnPIbHNqZNsxfp0Z4XYeIFhjA42MxvTS +aJLsShlk/zwG1EWPyuCFMnrcOk0039BfenV++gwfZe/aEVKy/oRbENX5Ka0HJFvy2RS qzxzROw0dSJI+BtATR3Kv0oZ/u/dPhTZZe1JHUFfbD/5PJfMXG8XpHoRng9svskTv+Gm BvOWS/UcuE5c9GmFR9C6gigJWUnSUtWTrmc3SKsU06rJWWx6ryVxYe2pZVP3OCZtdglv fBCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4Sogwb2lNk7UZvpkDPXA9TMONekYwcbfZW09UuiK0B0=; b=lhtns/oOOxB8nf+ScRO7RONkdSL6UlUw1decoTf+P8Tf+1kekitPiEvtX3NqhnRCf1 n1OzopHEj0cSY3y69xtN9fuFColzmN1AGTEYiyCGBSeddkDN2AcCX/plvR8d7iCZUIyX A1C8eQpdko16j28q8bg7FVDhz7782jmBgv29fLvMICQJOtTKKo1sZSX6QE3XpnQwk6eq StfC36kWdRcL8TW1CiYQF69EQURlaAjDagmXA01fUierbMpfNw9mb6tJGCASQg9GUHls u6yiJDRzLQXpB2Z8l9bGZCVwRiu9IZbvu852X1MgINTNYwtdOgzM+TkpvnLLcO+J21lT 8KdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGFPgNTl; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.05; Sun, 25 Feb 2018 21:10:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=LGFPgNTl; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1750839AbeBZFKE (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:04 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:46913 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKE (ORCPT ); Mon, 26 Feb 2018 00:10:04 -0500 Received: by mail-pl0-f68.google.com with SMTP id x19so8654915plr.13 for ; Sun, 25 Feb 2018 21:10:04 -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=4Sogwb2lNk7UZvpkDPXA9TMONekYwcbfZW09UuiK0B0=; b=LGFPgNTlWFFsOS1oP6x/9CDJv3rJ5wEsp8ujHrrx6SiTXw0hu3q/lKS6Kj/NTZ000u 2CGzroIo7GexBRaoEDedUaqVW1t1BLMPT140+mncwPZd2IbdckOlyFXu4pV+aG4PuPwB bsrL4IomgQvV6yTbHNkAkegUhRl43s22980YE= 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=4Sogwb2lNk7UZvpkDPXA9TMONekYwcbfZW09UuiK0B0=; b=lfp8vZaUdRMARIBIRxCrWUqFgLRvC0LVyI37pgH40ovPK3rBHUS+22b/oS92LwEGW9 gWJTdacx9vZId3iYEG+bZaEWCC09dlUoNaYgkIqNQc5EJQtaKUbgfzMPZBgkJTIQXIu7 7JK+/hnu4+ER3dDKGoXJj5o7OWXGaCfaRA9LfXNB7aSm9I3gHVsUfuu4nL4/eO5h49Ss BHb/S6N53TknWvDQ6YkuRUkJ9mcN1Ccdu3KXcpkjq1swpYrvD43IdatgwhQJ89R6p/MD eySC0+hc59qF+t2yA4BLPn0bA++pu9Vb5W+oNKMGBatp3jXrgEosKPzHllDTbzKauxth XDxQ== X-Gm-Message-State: APf1xPC8Qiq7gIs2cCm+8Pn9vtN3Dgcawi3huRmTkKyhhywcboP/ajcj /Wd9uyOKNUB22SJ3I1xuFCb07g== X-Received: by 2002:a17:902:bc41:: with SMTP id t1-v6mr9597309plz.436.1519621803764; Sun, 25 Feb 2018 21:10:03 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id h67sm2497243pfk.184.2018.02.25.21.10.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:03 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 13/27] cpufreq: p4-clockmod: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:56 +0530 Message-Id: <5a33f133f779d8ac59354feadec0bdb205720042.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from p4-clockmod driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/p4-clockmod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index a25741b1281b..911206243050 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c @@ -202,8 +202,9 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) /* the transition latency is set to be 1 higher than the maximum * transition latency of the ondemand governor */ policy->cpuinfo.transition_latency = 10000001; + policy->freq_table = &p4clockmod_table[0]; - return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]); + return 0; } From patchwork Mon Feb 26 05:08:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129540 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230468lja; Sun, 25 Feb 2018 21:10:08 -0800 (PST) X-Google-Smtp-Source: AH8x227S0qP3ms2k9qvlr9e4w4udryPHrCmDZ19iHc5K2m9L1RMicO8/Xlg99QpkNOq/lO/B/wOy X-Received: by 2002:a17:902:2904:: with SMTP id g4-v6mr9296491plb.170.1519621808433; Sun, 25 Feb 2018 21:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621808; cv=none; d=google.com; s=arc-20160816; b=ZNTCXIAaCvGliKQvFZol4yiNi9jvGDOUyHEEYh4wLyWRT/BpD/yfCrqYE+9r85RAdQ k2Y5Y/9PzlYEHxlV6Ta89psjkrSiA192mA1i+tZGJFdd2+J24f4w6ySNIty6rOyeeNGj eOtDPKAR+RltbqIl5cdpzdjgCDLhGYow5/8ccKetP2/jC+EjjOo8UAiRIuJDXhTcs5BS HcsI3whGaTH2izW66vE7yESt9VZrpdkw4S239G1p3Cj9+37SVVJaki4a13+mIleyUEtU CnnilJjk6bdxyIjdWIPBqXRHUvrx0cX1Av+6DRLXKo10jtAPxDE1my36GG9YUzTfuH/n owWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=5E4IZ5X/+j0mHhsPclVR6FGkLsrx28tHLU7PR/FpO1M=; b=NG4K8f2hn+7iulFKxM/cjBkofRo74gAYKJ5CJ+tflOPVBIOf2zCjdyyL+UpstrS/eL n38P2WvcUEfP9BL4CIfY1E31xhUPda7t/qUSCWKSxKsz0FtUFTgyF3LOXQz9OalkS+GZ zBw+2CIKhlOXy/ik/6YyZaTGdJSBHmOp1wMIk4KH5RzetVmnurbv5/I4S6jPZHdMAWHb jUkXcJq66wsRpaxXstvfFnuvcXlsA7m1vZj1tipcX/a8pqLRLMXJ+7QW2RoMfaXBZZNG eaGGsxwaYacB+UGRLolf9YLQC1cJ35qpz4mOFsVekwFKIwF4hsUOPF7EfwKdIiO7mKVt iuZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=etyYJ34m; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.08; Sun, 25 Feb 2018 21:10:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=etyYJ34m; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751954AbeBZFKH (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:07 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:42148 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKH (ORCPT ); Mon, 26 Feb 2018 00:10:07 -0500 Received: by mail-pl0-f66.google.com with SMTP id 31so8649376ple.9 for ; Sun, 25 Feb 2018 21:10:06 -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=5E4IZ5X/+j0mHhsPclVR6FGkLsrx28tHLU7PR/FpO1M=; b=etyYJ34mYNvf2k7zLPY14ZyY6sPgifsX0CtOusC58QnNDjNo775zwf/ybU6RqC9fL5 X3kpBWSJowpTYhWKduBBJp8XVJKWdRcbvk4Vf2Oe1/rG0ygCZthd5BJ35QTriqKaD32n o/HGjfjOg0Zt0mXmuxEUMw2U8jNw3HaXF5DSQ= 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=5E4IZ5X/+j0mHhsPclVR6FGkLsrx28tHLU7PR/FpO1M=; b=acBcFWLLqzHvXBDp9MWdZKXO2pQjeSvo8HwA1r4uD4c1Jypf4dE9GfcM1oWJXu+Qjr WkSYdDLgAp617a7VoDBtil0E7+CKX/9KcSkTtvLRa8Ao1kmt4tzUwOFvfwgGjssqiKDH 7oLRrWxa+CdajfKKAIvrlraYO95IYmfbtNGVrwW3MjxTkbvjNbN21bFlWFmM0K+XFHyB G24YLPdsJd7P19/4pVsr1MeQ0eu4EXPHF0uZIEIxR2xMxqvxJKFF0cruGJ15boYUe8Uc cynFac+jDUrM0t0+7VDE0zA2ipi4CAW1GcbMmr+TK1CXLvw62g7eQYCQydtpwbWaMhBF 7yDg== X-Gm-Message-State: APf1xPCt8vWxm0aXt6qinjCs/YP1pnmhMI77b9suV9XdAWims2UBHDt1 MLpGLoHC89iD5xN8wOYxN9JX5g== X-Received: by 2002:a17:902:225:: with SMTP id 34-v6mr9442002plc.415.1519621806579; Sun, 25 Feb 2018 21:10:06 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id v1sm6107640pgt.62.2018.02.25.21.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:06 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 14/27] cpufreq: powernow: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:57 +0530 Message-Id: <64f6ee28c8343d967c1ed540d11ffd3d8e24c4b9.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from powernow driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernow-k6.c | 3 ++- drivers/cpufreq/powernow-k7.c | 3 ++- drivers/cpufreq/powernow-k8.c | 10 +--------- 3 files changed, 5 insertions(+), 11 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index dedd2568e852..8a8ea68611a8 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c @@ -214,8 +214,9 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 500000; + policy->freq_table = clock_ratio; - return cpufreq_table_validate_and_show(policy, clock_ratio); + return 0; } diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 302e9ce793a0..d6cb052b0a75 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c @@ -639,8 +639,9 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency); + policy->freq_table = powernow_table; - return cpufreq_table_validate_and_show(policy, powernow_table); + return 0; } static int powernow_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index b01e31db5f83..b9c04e74cdbf 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1084,15 +1084,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol) cpumask_copy(pol->cpus, topology_core_cpumask(pol->cpu)); data->available_cores = pol->cpus; - - /* min/max the cpu is capable of */ - if (cpufreq_table_validate_and_show(pol, data->powernow_table)) { - pr_err(FW_BUG "invalid powernow_table\n"); - powernow_k8_cpu_exit_acpi(data); - kfree(data->powernow_table); - kfree(data); - return -EINVAL; - } + pol->freq_table = data->powernow_table; pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n", data->currfid, data->currvid); From patchwork Mon Feb 26 05:08:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129541 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230497lja; Sun, 25 Feb 2018 21:10:11 -0800 (PST) X-Google-Smtp-Source: AH8x226+/e7CKMO7xq4RpajnxS3FB2+hd6YHgOph3HVl6TtPLZZl3Z3khiPXqirEWxpTrch1FXMI X-Received: by 10.101.97.139 with SMTP id c11mr7380017pgv.449.1519621811155; Sun, 25 Feb 2018 21:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621811; cv=none; d=google.com; s=arc-20160816; b=MBEUXp9QI2Lt7xq7KsloKZhHx1Evmq5N1rkgAOE/l3qTb06X0q6BajK/Phncf+YQhj KTYomZvxgC4YX14zq1Gx3mYKbRZK7GQGtpU2wONR5g9fZawRtHgZK/XL5tWED9rCmIsU 80CIXoovDTjLwVhotX2NThDD9af+0COKdMrTbfA7nh8ThKrx0ISXRpQtG8n2YJoax1IB BHDlK2iunEXArhaWKPMujxWC7QVLAiEwWoIofrXRNhEXHUm7DS7hxnT3G8dBHUNPwmro 3DZ63NTiVUAq1KBSMjo1pQyCiahe7kzK9sG6aoYEa+PCr/houE4RLMdFWRxYoR3Da6D0 4b6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=S9I5NEQLmCJXPHbik4waQr5Xe6PeubJ1kIWZIQAIp0k=; b=ISEjW9XX6FNkEA1wSUtYGVuMvQ/po/6BnjjNI0RBBSbxE9j1m6t+diBiANnysQPPNL +vyl3tK3VPW37e0SKxrxr4CAg6gv8n35iFBxOmfqwEgCKt9dpbRQ61cb82xY9QDAmSQa rZsiB93tr7HZfkzx4fzExrNov2coTy0EU/95O1xpJDYsy9/jBHmD5C7VZRjYKZcCSsAx /AhPaD321BnTlV9JmC32RuR+YEZm/1zX84TR9jG1V0/isyLc0KLhuDB3mwhg+7Q6qbVC uP6bxv+jIPefMDig1Qqko3fhXTXRHidjWxtps2b/tWlyNfTBPdWcU/VYZ4g6lP+xSu2e dFDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S/5TVUJL; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.10; Sun, 25 Feb 2018 21:10:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=S/5TVUJL; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751959AbeBZFKK (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:10 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:44270 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKJ (ORCPT ); Mon, 26 Feb 2018 00:10:09 -0500 Received: by mail-pl0-f67.google.com with SMTP id w21so8654435plp.11 for ; Sun, 25 Feb 2018 21:10:09 -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=S9I5NEQLmCJXPHbik4waQr5Xe6PeubJ1kIWZIQAIp0k=; b=S/5TVUJLTzR6/kgtf5zQi07cRVGGtZIHmmEjMAiFnw/V+Dqma/1mzgO46kMCeLQ1nL T7w5q4XY6xbGKAOP56Ug94WcSeHH8IDJVFwpj6VxMwaVuITvNLJeJ2O/C/7TGcS2q9lN 2puUjN6gPG28GxiGvfUdcg7xW/My404ee+XpI= 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=S9I5NEQLmCJXPHbik4waQr5Xe6PeubJ1kIWZIQAIp0k=; b=qA+wdPe/x0zcMLxbUdLgFLCHn9fWxBBLqAAoUSgXbkTjHOshClSvx8MBUTE044c0JA 4BzlXo/V5aT1xZUK+pFrdDFak2ErnYreueX/2ej4xeMyKiI8RP/bEJIcOgy4eZQY3EO9 65DoGw0C5QsYacHIPSfxE6FmywNMorvZEyv//D8fGAjYVWUMk9P66IoWUHc4ZmsSRQ0Q X7v6aynsXgX7kZVIwn1vEA/0FozWyW4KMVETUvEhoZd1y9pbvihdZHpiNzcwAOISbVIE PGQ/Rm43VnkXWJWSbBYP7GzDpxZFp5fPil5tG+ZGkzTuy4YTR73sf1zk5TGX8Y9eYOk6 JC3A== X-Gm-Message-State: APf1xPBbZzrc0zm2Zj+vsJYbyK66DSfqfR2eE3+QSnDFN6IDyEG2w8s5 ZY/2nPi2pGHwzL7H/2Bw8bHnVw== X-Received: by 2002:a17:902:536a:: with SMTP id b97-v6mr9390907pli.421.1519621809307; Sun, 25 Feb 2018 21:10:09 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id u27sm11171721pfk.172.2018.02.25.21.10.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:08 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 15/27] cpufreq: powerenv: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:58 +0530 Message-Id: <3120e4db4ae3bc014d198a206f46be1305ec65e8.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from powerenv driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernv-cpufreq.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 29cdec198657..0591874856d3 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -812,7 +812,7 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) { - int base, i, ret; + int base, i; struct kernfs_node *kn; struct global_pstate_info *gpstates; @@ -848,15 +848,10 @@ static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) gpstates->timer.expires = jiffies + msecs_to_jiffies(GPSTATE_TIMER_INTERVAL); spin_lock_init(&gpstates->gpstate_lock); - ret = cpufreq_table_validate_and_show(policy, powernv_freqs); - - if (ret < 0) { - kfree(policy->driver_data); - return ret; - } + policy->freq_table = powernv_freqs; policy->fast_switch_possible = true; - return ret; + return 0; } static int powernv_cpufreq_cpu_exit(struct cpufreq_policy *policy) From patchwork Mon Feb 26 05:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129542 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230541lja; Sun, 25 Feb 2018 21:10:14 -0800 (PST) X-Google-Smtp-Source: AH8x224B0VdSjIpRLMjDwqBez+lDez6qJWP3RP+VQGg6Xm3tO6G5D6gCHzwe1JSozp7XVOY/fO5D X-Received: by 2002:a17:902:2904:: with SMTP id g4-v6mr9296714plb.170.1519621813808; Sun, 25 Feb 2018 21:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621813; cv=none; d=google.com; s=arc-20160816; b=lBPbltJKVOCW/fkyVCvHjKFeSBWtVQHAsKKxydiVvvLeXw0nDc3BUmlVf3PveO/aVK e6DLZ2PZgsxkFenYcba6N7KKIMJt+1zXh2euK8stgs3f1W7+yLhpH8ArWERa6WSqiZMY LINZNyozUyfT6uQEHLPcDu3yZhyMbXecM14Ws7xtPxOl9c6bMzGlBfReyFR6n2eVIvCb MkzBmYWEz4M3yRdhJTrZtuB5kp9dL+VARu3pmzmFK3zd/5OJ5+TGWDC2tWDTPzpGPvXd mqQQTDB6oB7uFkldvVqGg51JjxejhPrVDbJky4zDfzaSg8JX0lcg8Kna7P2DjEr5Mwlw 2H7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6j740EtZOnvUCIAV01E5dh8Mc4ezSRm+HqbucwEq+9s=; b=VcOxlJJjnpbqHWn4vrAavYCKLTiMPdl+T+V4Nzo/fnI9PgWE0Paw0dgDsrWTSh0e12 oH1Cd3Oh3iu3eWNHBa6hFHf5Uv+0xh5YsF90oZX+oRsy7LG3nm8TPWobM7szSmFCwGMM gu2I3yBJLW+yck7cvywy7f2j8tsUyPyDhfILkxc7rgtsYWKNLPB4qXxpyFRBcVuWPpnH oyZ1h/m1xhURu0XwaUSsmVCODNh8pERTm/v8M9aJ8Grb05IJJz10Pujr3GTKvvN8XEES CDDk/tZQiBEXjyHk/uoSNRQZorTDA15HKHAuXJGUn0AKEilTp0CKMwuMkAqiBvcd6LZn s/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bW/b9xQl; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.13; Sun, 25 Feb 2018 21:10:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=bW/b9xQl; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751960AbeBZFKM (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:12 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35619 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKM (ORCPT ); Mon, 26 Feb 2018 00:10:12 -0500 Received: by mail-pg0-f66.google.com with SMTP id l131so5778696pga.2 for ; Sun, 25 Feb 2018 21:10:12 -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=6j740EtZOnvUCIAV01E5dh8Mc4ezSRm+HqbucwEq+9s=; b=bW/b9xQlGre5b9yHY3njU0bnrIcrGnNjrDcDBaxZCeiBu5mMAhAaPh3WfGGeVknL7C 4pSs8LS78KjlcpYOxUnHOvebBV5Hzye4ttWsz9ocnrBIQrvVZXFOWBWaPPyuBcFAzBVE SAU0Y72ckmwWVqK8Us9K40ZEjIVyghUhbUmqc= 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=6j740EtZOnvUCIAV01E5dh8Mc4ezSRm+HqbucwEq+9s=; b=njWGZhMvlUeBr9jXjLkzKojFOXDyBfW2j9Q8A0RxNhmy6dbJmESMKwtrXfOizEMFXm ZRYAblf9NofovlwSL4httsvw9vyNn6d2QvNVdJg8kpqU+oy2U9dNZkeDGTlF/RGL1I+P 4Tbk4ujuokGLewtyBak+zMOqORPR3SqZAskLu2lX9cW2Yw4Pcq3ranAIHrXNd2Rn9klG twGJ8PhaCVy7BhP883lR36M1JXVBC+tEVWbMklKm9bizwG0LMNEzSWpCaIv19FEX+Brh 7Eriplu0TXv1NFcx9w1cUjg81ES1bqH0lQGAafd6FwharEPIBoR0QwkidJ+wAO5cGy06 du7g== X-Gm-Message-State: APf1xPArlgnyU3jvs/MXHKcg/428Wo3fS36AyvtO3hRk/nT8rhX4sWap 2m0EAHwqBSADPyVJW6bQU0HJGA== X-Received: by 10.101.101.204 with SMTP id y12mr7589579pgv.450.1519621811939; Sun, 25 Feb 2018 21:10:11 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id y6sm9963345pfg.71.2018.02.25.21.10.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:11 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 16/27] cpufreq: ppc_cbe: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:59 +0530 Message-Id: <801dd1ab84eb8801d4050203e0374b55438a95bc.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from ppc_cbe driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/ppc_cbe_cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index 5a4c5a639f61..41a0f0be3f9f 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c @@ -121,9 +121,8 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); #endif - /* this ensures that policy->cpuinfo_min - * and policy->cpuinfo_max are set correctly */ - return cpufreq_table_validate_and_show(policy, cbe_freqs); + policy->freq_table = cbe_freqs; + return 0; } static int cbe_cpufreq_target(struct cpufreq_policy *policy, From patchwork Mon Feb 26 05:09:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129543 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230586lja; Sun, 25 Feb 2018 21:10:16 -0800 (PST) X-Google-Smtp-Source: AH8x227qfWq/AQKXiq4ZafPn4Vx61A9gw2RSpGJXcSliSNI/YWydp+qgnICtZ0AJdFgGtfwLa2sj X-Received: by 10.99.42.148 with SMTP id q142mr7471148pgq.115.1519621816650; Sun, 25 Feb 2018 21:10:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621816; cv=none; d=google.com; s=arc-20160816; b=Tpr15WPbK2zK4m8Dlrfjyz62QXeEI93KgAR55IE/EXmH4+oA7bMR5+/xOi/YRoj8n7 p6s9CLuailBSUkHymHr14/5TENAu+d8XwQR/I3ejPxgun5RQ0t6Qj4o1XkvRStqk/lTj cB8a4Oa1WA0Jm5UlsWjRdq8fdRqdSLZayhHqdy1dr297HtDizPU8A/wBlRZYEP/hz5f4 NAH1MhleMxmTvuIlKHP5g8OhQnOqHaSVUshlpF1P+Hh6sImPtC3gI/ZJ6GketYgff3p+ LpFdsHOi0/9/dnTph7Hf9515wACvGIlAJFRbYK0ob7KDQgkVpxMpo0mjsApYZT7oA2V8 N8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=rr2wbJ0GjtmkpEP0+Gb4ygwsQWUcusus4wEQfY/Bn254JsAdaFbDvmVMzbEuN/SKvy pKxWQmOSwNmeP4/aTurtBNKyEWYpSTrQc6HGlUBKPUn2N5jAVnEwgBewp+aSiU+et5Vq doxDX4TP/oSm7eDv72CvcMeR9aRQuUv7zkS+Z6RcNcTua6C2y01A8HEhW4olXa+tXniQ CgXCvv3B3HK7XWQnpowL0S4Bm041okSUqk+seyF8pYhtsFse+DNQfZQqbg3tKUHWt9ok a09J5KoVPMDcvVsM9HcKJFyij0kX9wNG5vEmdh/VSdwQjW2zI2PTvuz28kpiMvRV0dxq R2qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMW4Eq24; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.16; Sun, 25 Feb 2018 21:10:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=PMW4Eq24; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751963AbeBZFKP (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:15 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38458 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKP (ORCPT ); Mon, 26 Feb 2018 00:10:15 -0500 Received: by mail-pl0-f66.google.com with SMTP id d4so8656815pll.5 for ; Sun, 25 Feb 2018 21:10:15 -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=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=PMW4Eq24hBzqkOzf/0z8IUZmOdXofq8Ed4zsN7dsc87ixzgcGux9kCCoiKJfFPZ8NS JkIj+H0Xg+jnexe4Jx3gHUAC5RFOz93d+AEndyARhNv513Q3rlR2WG6krEo9pCg5X5Uo L2SrpUO7BavSXfQiuMx7D1d0z7YlQHIzJK5pc= 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=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=dTzTCQQH8lv4hNGZnZcGPwnl8kuJaaqwU3LxQaikqdB0619fXNo9Qy6ANKTj49jKv6 cnoxmvXxG39YW3FDOMfNsTvMpT8gO6GPz3jbvUouXg+iB4tHhuZFH0N3ybbfUfDkIFdD rsIY+lO84CQcCTS5M/+cj6v5gqRjbvWvQq7BudX7TXakfnPWKB7P/aHE0HLQsTHsXSS5 Yx3NHZD5dDMzQH5LoFkZ7ClHLz/D5pz/Rnm0ubFXFvhBpc5JJRXLvgA1jjh+QJOgy3tA ybpQBUaUfW6Nw6SyunP26WxSfIrzpthhL7Gr2bK/BjasxptEYfLJgd+MN7030T6oK87S oWNw== X-Gm-Message-State: APf1xPAgBgWKukOk/RpxeHjoVIg8Lf/tC91uJTG11E7gtPxncyLqBjZl jQYCQeg1MNPuxIDR3MdclcmmbA== X-Received: by 2002:a17:902:6805:: with SMTP id h5-v6mr9413628plk.46.1519621814792; Sun, 25 Feb 2018 21:10:14 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id s62sm12512453pgc.12.2018.02.25.21.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:14 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 17/27] cpufreq: pxa: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:00 +0530 Message-Id: <8e6f90ab32a92c6256885f5b48837e49eb623168.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from pxa driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++-- drivers/cpufreq/pxa3xx-cpufreq.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 06b024a3e474..46254e583982 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -292,10 +292,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) pr_info("using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); - cpufreq_table_validate_and_show(policy, pxa255_freq_table); + policy->freq_table = pxa255_freq_table; } else if (cpu_is_pxa27x()) { - cpufreq_table_validate_and_show(policy, pxa27x_freq_table); + policy->freq_table = pxa27x_freq_table; } pr_info("frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index a01275900389..7acc7fa4536d 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -108,7 +108,9 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - return cpufreq_table_validate_and_show(policy, table); + policy->freq_table = table; + + return 0; } static void __update_core_freq(struct pxa3xx_freq_info *info) From patchwork Mon Feb 26 05:09:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129544 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230629lja; Sun, 25 Feb 2018 21:10:19 -0800 (PST) X-Google-Smtp-Source: AH8x225QGrM3NEpvmpQZh64GBCSaMv4806WVSsMyKpwEqb+vk8ILE4MRErpfktnEvIbtfpVvI77F X-Received: by 10.167.130.88 with SMTP id e24mr9292715pfn.169.1519621819539; Sun, 25 Feb 2018 21:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621819; cv=none; d=google.com; s=arc-20160816; b=gMftWgvgXB+wqopg6jbqCFzx0sNdLa4QASt8RNuSYIABPZm8m/Jw6IU7EVxxfxyhNY AqwmyxWszts8YGsGH45/OiDWbg+6PVcCJ9M5W9Pimew7gsdNSFMQeFKXdQA71zfZ0GPa ZrA7GNwzoUZPDthy6QWgaftJuRYyZVQ44Ua6NK/q6aUbiQzWqTxhNcpC81cgXYgJClbn 0LmwGUWDkqZ62GOGYbOiBXfGS5qjSnqFTuOLjnzd+beHfLBmPRBc9IOJTltYM5bxvKal DMbKjNk19bd0onj0Jhi4R4DpaLumt12WGcrgGq+LSnSH+GdZ0e/ZyS8k0zXg5ISPjzBl J2QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qh/+GpEvGyuW/Zspx9kpe7jf9gBjpRlz09+U9WjLNu8=; b=Ik3w/D7p6Ei9nYlk2/cMg+0/RNL8gbF0Cvn4kpuZ+vvaeKwtgR9RVikN6MSJUSaae8 9HZ64S7a/2V21GG0nKCWuPLbhbX9Ur1FSkdREBJQi0WDxzDLMkv983CPgSDhErS+nPNC lllJOAL6IQdjhM38Vr3x3PI6sm0bnxm0TXV/Bqudw45MbNgwZUoLfz9PVqRd6Rzf1SL4 Y0dSFx6GEJZUayVBbTx46cUcLsfeDegLDHSz+E6XcnuaGpwT/X6JzN/2wC8tbYePxy2Z 14ErGzpAH9oRn2djDSqOqSTw3/qUfjw/I223rNjq5BCaYGi+l060wqjl/QMIfwX1OqiO So4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dhfxHY5R; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.19; Sun, 25 Feb 2018 21:10:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=dhfxHY5R; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751967AbeBZFKS (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:18 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:44279 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKR (ORCPT ); Mon, 26 Feb 2018 00:10:17 -0500 Received: by mail-pl0-f65.google.com with SMTP id w21so8654595plp.11 for ; Sun, 25 Feb 2018 21:10:17 -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=qh/+GpEvGyuW/Zspx9kpe7jf9gBjpRlz09+U9WjLNu8=; b=dhfxHY5REkPRrCG4WD1cRaFTzPFvWoOOSmD4QM24CQgMn54cph/JcpP5IKFKN6NySh Ve42rJpPVT/X0S4P4TB21fsVc7VVsQ7rvdGLEs+yG5DHzC2dO6leblBpTh7oj+eOz+SO 3dQ+AMI6pKsV2UkBemQN4GBYlX7nJEjQdarAc= 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=qh/+GpEvGyuW/Zspx9kpe7jf9gBjpRlz09+U9WjLNu8=; b=pwBPATAIqbxo2LN/MIOIyJDr4Hftzsh2Toj8SV3OsULo/Mu+gUi5lhBr4joVsg0nXi j4WUNW98Qf1xvuGjUBP5fzBSsey8VlBASktjsn0aLHxSK0bfPamh9HLbHm0ytlQa8ibN iXPGLnR78hLsgas0k4Y0eDeewxCgs/ktgjt3al0lHZ9/XzLy0hClaCCILWCufiMrrSpU Y+3DLboaEtfzU2i/pB50jEj7RRaSoShtzeRTs4S9ZRamWXKJB5UcrpZ4Tfm7kqfktY38 bltpYpSokjHgQEfdpS52wpcPiodOJGeiCJnhJV+g1F/sor01XTe9e3+l5wZptXUwlD+N DpUg== X-Gm-Message-State: APf1xPDEJC6j47H0mpyYgB2d9UCE7hyQ2uA77Cfea8DCcXBaPjbXVz+Y YnFpfgb4nTLaJx59nIPcYQEO3A== X-Received: by 2002:a17:902:ba84:: with SMTP id k4-v6mr9320424pls.116.1519621817400; Sun, 25 Feb 2018 21:10:17 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id x26sm14520757pfi.141.2018.02.25.21.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:16 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 18/27] cpufreq: qoirq: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:01 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from qoirq driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/qoriq-cpufreq.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 0562761a3dec..ba533e9c6b11 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -165,7 +165,7 @@ static void freq_table_sort(struct cpufreq_frequency_table *freq_table, static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) { struct device_node *np; - int i, count, ret; + int i, count; u32 freq; struct clk *clk; const struct clk_hw *hwclk; @@ -213,14 +213,7 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) freq_table_redup(table, count); freq_table_sort(table, count); table[i].frequency = CPUFREQ_TABLE_END; - - /* set the min and max frequency properly */ - ret = cpufreq_table_validate_and_show(policy, table); - if (ret) { - pr_err("invalid frequency table: %d\n", ret); - goto err_nomem1; - } - + policy->freq_table = table; data->table = table; /* update ->cpus if we have cluster, no harm if not */ @@ -236,8 +229,6 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) return 0; -err_nomem1: - kfree(table); err_pclk: kfree(data->pclk); err_nomem2: From patchwork Mon Feb 26 05:09:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129546 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230715lja; Sun, 25 Feb 2018 21:10:25 -0800 (PST) X-Google-Smtp-Source: AH8x224BR3Bhxf4yGH3ar4fz6mo3acsXHofwisNxreOjYVmvg1au/NlzhpA2yPBQg1asnnSvfi12 X-Received: by 2002:a17:902:8302:: with SMTP id bd2-v6mr9122242plb.295.1519621824923; Sun, 25 Feb 2018 21:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621824; cv=none; d=google.com; s=arc-20160816; b=Xds1W7DMioOrDSQPF+NA2wG/RCV8mVaRgDbaWWROuU6N+87BFM783BgP00gEV9RInm MEffhQGNxoSt/omQLaPNTmJFD1qmPwKl5uym6LvO3cZwYr5OLE903LgY8lICZ0Lu1+aT olEpj0gb7LLKnzE4iGQZ6X94CGbHkwrqFTym1z5txXDIj0PlsK/hSJLSxyizNdAxyh9E jSMMr9xiAExa3JFe3pq6sadMzWNhD1eOmqqUvrx42wsCHYBobuXRAx4rvGRHfMrnNVtm eYtuia0OjyihL2t7xv370k94uWVvJTQvpjTDTn7bYFKvW6YJWRUgcmaSR8a8GvEcNYET ghEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=uexsEejaqILmf4ZtdkSAZqeKDu7niqeAJdapu8BF/q0=; b=m6DdnbjrFKpiQ+D04fyiUPQ+y9+5BYp1Eu5uD1ClxOcEWwItcHCUXe0uM6k0434mc5 91+RV/6Sg48oXgpFT4NF+e80FzVPEdtQeFPPgdUeXDbKB269YzPDPbib1xJKLDgaaAdj VzU17vN0Y6hxBB4LfWZOcqhT9WMkhJU2t6mUvv/vBIMNTnCbInh9nDETWRJQz83A0AVp BT2bpAaLOJSp+jeUNtBrjEIKbS9nByJMpkhlBR0MfrWH9O3+ZdutXxy5VLGcR7AMHf/w 0iz5NuVD4PmVG9nSB8CsCqIKGDtHdUZ9Xo7U+qwz02+Cyg/DNOPEBPnYjkQKPuDtQs+t t6EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SEW+mDBi; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.24; Sun, 25 Feb 2018 21:10:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=SEW+mDBi; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751175AbeBZFKY (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:24 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41469 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeBZFKX (ORCPT ); Mon, 26 Feb 2018 00:10:23 -0500 Received: by mail-pl0-f68.google.com with SMTP id k8so8651353pli.8 for ; Sun, 25 Feb 2018 21:10:23 -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=uexsEejaqILmf4ZtdkSAZqeKDu7niqeAJdapu8BF/q0=; b=SEW+mDBilzPlZr9ffiBWE/jkZ+E9WgTwi1oDYrXQTlmMOnl5JYoWA6sJkzeGBfbdtv YNj0JEmlWyhP/VwTfJR2qgOs/g9x+qV0Z3UAqupokMD/vpjI5Z8fY3NZ3332s9+De9mg hCjDxoICe+IWvf4ytMgFlAmd59j+UJmnsioro= 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=uexsEejaqILmf4ZtdkSAZqeKDu7niqeAJdapu8BF/q0=; b=WWi/vZhxBgLJ8IP9fcbNB7+Xf1FvI0c+VGKsERkIIoAFA9ocIw0IcPYYYEclhm4X3X 2fZLZHsfWsxpwBHKof7bj+JqqMXYwg7gA6TfAQlNceJhDeMpEqobWjSn/Qo6wJNSFlWi GVSwBI6RpLyZy9Vl85Q5q6Vfhw3FR6fUIg3/AA7rHtwcdLE3ZBYMvOwMKL+KTTMyqkPR lkwnUYOctMBQZLvJviBaPLkL8QvkSfXrhPy5q/Z6PkBY8iV4/2kMTXcEFUZeLIfw+v/n wrb+RFpqXxu/UIgvDX7Bv4zfRYylhn2sI3phRkDgo93S4rmAmy5X9snGAQ6FxFhY2lSv Ydyw== X-Gm-Message-State: APf1xPDJAkBq60meOz6WcHnNGx5Qbd5ayki58qFlaWIWcONSidFombZN 4Do7RDSxqDUlcDVWI5qqPgsamBptqHU= X-Received: by 2002:a17:902:128c:: with SMTP id g12-v6mr9442838pla.85.1519621822697; Sun, 25 Feb 2018 21:10:22 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id j64sm17036982pfe.68.2018.02.25.21.10.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:22 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 20/27] cpufreq: sc520: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:03 +0530 Message-Id: <9ba3ed6f58409704e1ac82d81c5eaf3cbd423f35.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sc520 driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sc520_freq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index 4225501a4b78..abaa75e86148 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c @@ -83,8 +83,9 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ + policy->freq_table = sc520_freq_table; - return cpufreq_table_validate_and_show(policy, sc520_freq_table); + return 0; } From patchwork Mon Feb 26 05:09:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129547 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230748lja; Sun, 25 Feb 2018 21:10:27 -0800 (PST) X-Google-Smtp-Source: AH8x224QhZuzRmr8JjNXZOzeu0AzZs6SxAU8S89KAWzuzgXR2TD/2QXw13rKobYv5NdkKlow0+VM X-Received: by 10.101.72.198 with SMTP id o6mr7385882pgs.279.1519621827148; Sun, 25 Feb 2018 21:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621827; cv=none; d=google.com; s=arc-20160816; b=MourJdFYsFAzRhuCwsPCMYE7vUgbtzUaY3TitretRdDfudeGnN1hKyKmgN/5Q8unMC FBFpqQrWvgqAxbcDXmremiOdhRHbar/7EqyNwAVh9dp60q768Ez8cHmFr9PI6n9YpSdH jG59ypDiWEhekP+EPFVdaEpJbBWa2xx9DmlhoDxRH2BG2xw3lhcaWLT5rbssv2KKqpTc GQoKTnSCQionSCdmd6YLFyAHyFrc9H8MySro2H1Vjh91eN7+CURObgMUFBHcfpoMyHrO XPam6yq/+saj1oXmifC2qbBC/5wcE8aWT3/Cc7P3+YMr9zW4N0qg8NVV110w2ffhH3Yb UAWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=R0eRwI4CcGJHlRS6047/cUzrFodzSWOaOGrqDNWDTzA=; b=Feg6j4y1LnCEF6LRBsHmrRuMQvBhD8pxEO9hVZoqGxnUD3jXdwkCm7yD3VXxTcBUbW 0147XI1ZF8dCWoceUQ4A4sP98OQYW2ThAIwtUlN6vbV+Z9HRtKUKxWG+7gmD6JU8KJh7 C9do7j4f8l3KxDV0440yfNDrjcwHlBoQImZZPer4xaFmrAXpFGbU0E9PujhaVK/HZg3y eVvqdnKSnc1uk5Jv9tNsD6UmNwXH9WOvvlRKvtrcCsrkYeK8l/YmKB+sj/YdycK4L9is UWUMNgx0GlSnzZLqVJpl2etyEps9drQjwzW+15JUIn7nBAHDpp/JW6inWczW83H1qz5S xZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Us2MLYJo; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.26; Sun, 25 Feb 2018 21:10:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=Us2MLYJo; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751981AbeBZFK0 (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:26 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:42166 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeBZFKZ (ORCPT ); Mon, 26 Feb 2018 00:10:25 -0500 Received: by mail-pl0-f65.google.com with SMTP id 31so8649712ple.9 for ; Sun, 25 Feb 2018 21:10:25 -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=R0eRwI4CcGJHlRS6047/cUzrFodzSWOaOGrqDNWDTzA=; b=Us2MLYJocnkrEjSpTJ+w9fb9FHXTe39CU1z4wNQ9gNCeNNZKOtIQyxfh4eVruBtLkR uADx+K0iFQ0rnIsujuqx1hTV1CMb1xbKk6HomE1SrLnxcGrn5Pz+ILq2oyVs4QKbQfAW TSrrRI4SCGngvG/k4Pp605lQJ6nX7kgFNApEg= 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=R0eRwI4CcGJHlRS6047/cUzrFodzSWOaOGrqDNWDTzA=; b=cFw2vS6WWLXNzRG7gYsgBTDrKe0TtMXjhW0zRSZwDdXWxrrSiJfd6c4TggeJSJfh/v n20A3y5iPuFdfeBrxGiow/NwjWenss6KoZoGts6acvAcvaj7DolCNVh5OhJruUbGess2 bCsilGUoI+J/syBP1cBsnLcF3YTJAVvVop2cn7yg3bfkZtlx5mF+jivYJXo8GrC8iSBS V3lmIP3eZ1OPI6jT/aM/Dx/hVM7ir9NWmhwsSFY8gyfPDsm1cy+VFgYZOo9jdOk2i5D4 hoLB3U8kEG3DJg+TWqCH3R403mTUewkEuUBffR5cffXFzYO2Udsg87Px04xlY1mgewb5 a25g== X-Gm-Message-State: APf1xPAsg2RK1wo6nCYgByKkdnyPTQgYEwIzLySzOr4pOCOFfJRJhXtc to7yOYCQPyHKzICSguKqbS+aZw== X-Received: by 2002:a17:902:9881:: with SMTP id s1-v6mr9304461plp.286.1519621825326; Sun, 25 Feb 2018 21:10:25 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id b8sm15848848pff.31.2018.02.25.21.10.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:24 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org Subject: [PATCH 21/27] cpufreq: scpi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:04 +0530 Message-Id: <9a5c962bd3a225cfa87d6dcb0f6bb85697991c66.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from scpi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/scpi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.15.0.194.g9af6a3dea062 Acked-by: Sudeep Holla Tested-by: Sudeep Holla diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index c32a833e1b00..7b31efe53252 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -150,13 +150,7 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy) } policy->driver_data = priv; - - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, - ret); - goto out_put_clk; - } + policy->freq_table = freq_table; /* scpi allows DVFS request for any domain from any CPU */ policy->dvfs_possible_from_any_cpu = true; @@ -170,8 +164,6 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy) policy->fast_switch_possible = false; return 0; -out_put_clk: - clk_put(priv->clk); out_free_cpufreq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_priv: From patchwork Mon Feb 26 05:09:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129548 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230770lja; Sun, 25 Feb 2018 21:10:30 -0800 (PST) X-Google-Smtp-Source: AH8x2264B2XNbv2PBRzG8js+9BrMVATmyT2IqF2Ec96sbDwjhsb74p7zAdOx+fqqynKRheXr+F2i X-Received: by 10.167.130.88 with SMTP id e24mr9293146pfn.169.1519621829924; Sun, 25 Feb 2018 21:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621829; cv=none; d=google.com; s=arc-20160816; b=mw7q9sHtjxNp0ScyNbKsB/eJUgIH7ygdynoeNlPogKO1Z+0MWBARQ6fXeEuFHmMrfS PyEJKw/0wDkr0VDTo8P+3BWYHJNHLD//HjCsGMKxVWSLzqBN5YQrgofyPl5fxRZm+/4T IbnRzCFgyU873zGfy8d7oVt4+ZGtOaE4s2pnmySQmMKWjNkYAh1ZNQCEGPx6VkVyHljc qllbneCJk/8z/G8z7a/Owoo5w0T07P3ELdoJacIqYGVAZ6jX0IqTMeFSZI1ltaTjpa9z fSPzkcdRR+P+fOm1fXbwhAG9xL60R9Srb/G5MiM7W4kaK3p2p5ZIOGYYDKGT0LgC20YR fPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=NtqClj6GgwmxIngogqqNOsEN+6GjR3wiItUwTwbklpyL6oZi1HwKZeHPCTT6U8BmoD x9e1S0g2CcGBHa53VeM7LK/BdHh2WOYGKdlsph/TghRYP4wAXBiQ5fUIbAxvTOBmS1yX g4dfu6bx6ntLqknpUbcB1a4p2zoERj12SPfVUVFbbtsFGtrfMv91VAEvYnPrpQjSwf6j MtcgXwWPEjtRQgH8RynBf/0D9SXAlpPnfhlejiMWwTVzg3x5tLQZjPPNws+PG8NoIG4r LUcte4w8Z8990z42FxFkMGxFe24+XUNzvaNCGzcLYPBSRcbMdpe7P6qZbbH4dRrA4HT7 p2rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IcpAmXDb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.29; Sun, 25 Feb 2018 21:10:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=IcpAmXDb; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1750749AbeBZFK3 (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:29 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38686 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeBZFK2 (ORCPT ); Mon, 26 Feb 2018 00:10:28 -0500 Received: by mail-pg0-f65.google.com with SMTP id l24so5782323pgc.5 for ; Sun, 25 Feb 2018 21:10:28 -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=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=IcpAmXDbsoYgWbeg2u8cAVLMwA97pp21lycud4n7KBX6Bf0lszntUf2OAuh+GqYzyV iTZd11RVDmpnAtj2efXfuF/V4ZJ4s8IgYcK3CSwc8Ipr7ans40VCIZto/tpK4NUl4qRE 5HCriGWc1g+FzDvrBjlYD2AmpL5JdDCvmS6ao= 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=QpBnUKkEdO9JU++m6n0Pp9F2+zCA8KV/Q5z84WSh15w=; b=g6247zq4DZYMOcKfvklHbeTjyXw92ejP10+aqWla9fVT/4I+sFjLqVpKTaKQbZwWrU nFCFwyZ7sWv5Pt13TnKF2188Dnyo0PlGu3wWTFK+444eQm6lcJQIYaUFRIWKHWAVmJaG gNojbcFoQiVpKT0nWVBsjJ2Du0jopF2zot0k44VuFihLDmKIScvJCv/kWI2kSGna5LuF J0MM1Tw5gC1+cETTuivU/jzyaJCgQPlo1ovc5HSe+EUgPKOzQAnQq2ijmN4N+RAhhiE1 oxewv3yUXTgCpYfd+eEaUGqTXXYUG3xHgaa7qvAA5uLWIgcz+7bkmsaHOrI0xg6IOaZi KQuw== X-Gm-Message-State: APf1xPAMZDtDv1eckFYlXEUJnhcE0JnGjLD9dsxOjzDV0i1t+1OXw2Nf /+NYyOvwS5e2Wtclc9sOJbGc4A== X-Received: by 10.98.211.198 with SMTP id z67mr9568685pfk.0.1519621828094; Sun, 25 Feb 2018 21:10:28 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id u9sm13252099pgb.11.2018.02.25.21.10.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:27 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 22/27] cpufreq: sfi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:05 +0530 Message-Id: <38b0c450b600183f94621f8f4fc9d2ae8948c73b.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sfi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sfi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/sfi-cpufreq.c b/drivers/cpufreq/sfi-cpufreq.c index 3779742f86e3..9767afe05da2 100644 --- a/drivers/cpufreq/sfi-cpufreq.c +++ b/drivers/cpufreq/sfi-cpufreq.c @@ -72,8 +72,9 @@ static int sfi_cpufreq_cpu_init(struct cpufreq_policy *policy) { policy->shared_type = CPUFREQ_SHARED_TYPE_HW; policy->cpuinfo.transition_latency = 100000; /* 100us */ + policy->freq_table = freq_table; - return cpufreq_table_validate_and_show(policy, freq_table); + return 0; } static struct cpufreq_driver sfi_cpufreq_driver = { From patchwork Mon Feb 26 05:09:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129549 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230800lja; Sun, 25 Feb 2018 21:10:32 -0800 (PST) X-Google-Smtp-Source: AH8x225REWHsZPSYd+jBdcLQxiNymmgByTO39QxlhidECnW2rd3EJ21GfuCMJRI/CvV4tNv/kGrM X-Received: by 10.99.110.131 with SMTP id j125mr7557032pgc.382.1519621832693; Sun, 25 Feb 2018 21:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621832; cv=none; d=google.com; s=arc-20160816; b=UGgDNlTRi60Mdy49l3QKpe5tW7oBUPvciEAB3pFcDzUVTRsA+WpQU4Bmf/o6qVitiz XJq75sPkTtI5yeb87PDFlSFNL20obEvjb/vJH1hvrfMmdwW/QIi5kHwMFbQdijL2BdsQ VWBG+hMDc/W9d3lWkJn2bMYpguatM0cwzZ8pP4Ba9RZE+/AnJUOUAbjpmVbmBSNQXRD0 tjmps/iAhvZgYst6I97v7OVychSTPw2zmks1G3oKfUyyTYCcMbprlDBJqtBs+ed77zvv C+nLCQPAIb1GtxNs5nGjgGs3bYPrvJmASsq4Y8ETW+f9+c10fr+nSEeyASBgwcPySR71 qXiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=dPFAnfwJ79b/mg1j2ql0DFEFr1wlX2nawEdtrqpDD5A=; b=MRVoJFAjLwewJRk1KaJ9vSlKkzosFTHnRE51A5gjL83WK2Mo91678wpmnszmSFSnLz 37ddeMXro+WfChYdfSgDOnDgfFIsRRbEtWmbOot3VAX/BNYm8I6MmSgwXkDjf3gdLA8w pzkdVdBxSuAh8Jmkoc8V6Qa6w6L8FNi5I5xhH48ezjlWx2nbXex9zNRinO271AgNB156 fM2zGnircvAReE/vI+qX0joksUezRuzaIp/a7VWFpSSn+LzvJoNICy1aI3LX/nNVeB9l IRmv3tseXC7Tn+kfraws8eB0elNYVuYQaofWU/ShwwYVUOcMXCPIDGt9fRlX8/HPkSqt m9ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsVe88z3; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.32; Sun, 25 Feb 2018 21:10:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=IsVe88z3; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1750877AbeBZFKb (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:31 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:44295 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeBZFKb (ORCPT ); Mon, 26 Feb 2018 00:10:31 -0500 Received: by mail-pl0-f67.google.com with SMTP id w21so8654851plp.11 for ; Sun, 25 Feb 2018 21:10:31 -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=dPFAnfwJ79b/mg1j2ql0DFEFr1wlX2nawEdtrqpDD5A=; b=IsVe88z3+TJtBGVGTk/oyT3JNrNwWyxxb/gluOHSiFt5ZWxxXNFrR/tizeytZyt53t qqywxrDjYN4pZGWBKWDxOisN3rAHuIerUsciE2QkKxImMVknDe3lPqdXtiUvFCTQ5Kw+ YpK78RZt5ZI5q31OjP1ewEQaS5A5oeViHHiPA= 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=dPFAnfwJ79b/mg1j2ql0DFEFr1wlX2nawEdtrqpDD5A=; b=AVTiQLgY9ap5VDGrQot5786tIhi9ISLv9kvIxbpnpuStn7s3YzS7neb6tEiYJeN4q+ 40z/8K9EF6/uJpDpCpkAU+ddBuCc5krJAvHJXME8Da9x1HBQ50QmG5Uu+HwfGkchCMZo HjmJ4XbkfhAdMG6d4iC4CO954V7AtfBs08yWDrFIYPaVccOgR6GUOb2tJXzXCUQ8W7Bp tSyhCV+nOWg88sHn0keaQjobmRVHgBXEVHlBBTQnrsF+c3C72KdvbmTSvlvgVPr7lv2/ j75VsAvv1tFBeowG/+8Lj2TWXDpaxqU/eTggWJ/odMGuT2T1Q4aKu5z0ZzEBTIrtZ5uf O7JA== X-Gm-Message-State: APf1xPB3Jue9v4j47l1VC2V4iiRKTa2PZU+UixJyZ1gvRDfqiuX2uTGu /CY3N9KjeAV1ucWHm+KnMqX8wg== X-Received: by 2002:a17:902:50e:: with SMTP id 14-v6mr9391194plf.360.1519621830801; Sun, 25 Feb 2018 21:10:30 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id p14sm4387458pgu.44.2018.02.25.21.10.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:30 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 23/27] cpufreq: sh: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:06 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sh-cpufreq driver. The driver though prints the min/max frequency values and the same is done from the ->ready() callback now to keep the behavior unchanged. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sh-cpufreq.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c index 28893d435cf5..5096c0ab781b 100644 --- a/drivers/cpufreq/sh-cpufreq.c +++ b/drivers/cpufreq/sh-cpufreq.c @@ -122,11 +122,7 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; if (freq_table) { - int result; - - result = cpufreq_table_validate_and_show(policy, freq_table); - if (result) - return result; + policy->freq_table = freq_table; } else { dev_notice(dev, "no frequency table found, falling back " "to rate rounding.\n"); @@ -137,11 +133,6 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; } - dev_info(dev, "CPU Frequencies - Minimum %u.%03u MHz, " - "Maximum %u.%03u MHz.\n", - policy->min / 1000, policy->min % 1000, - policy->max / 1000, policy->max % 1000); - return 0; } @@ -155,6 +146,16 @@ static int sh_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } +static void sh_cpufreq_cpu_ready(struct cpufreq_policy *policy) +{ + struct device *dev = get_cpu_device(policy->cpu); + + dev_info(dev, "CPU Frequencies - Minimum %u.%03u MHz, " + "Maximum %u.%03u MHz.\n", + policy->min / 1000, policy->min % 1000, + policy->max / 1000, policy->max % 1000); +} + static struct cpufreq_driver sh_cpufreq_driver = { .name = "sh", .flags = CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING, @@ -163,6 +164,7 @@ static struct cpufreq_driver sh_cpufreq_driver = { .verify = sh_cpufreq_verify, .init = sh_cpufreq_cpu_init, .exit = sh_cpufreq_cpu_exit, + .ready = sh_cpufreq_cpu_ready, .attr = cpufreq_generic_attr, }; From patchwork Mon Feb 26 05:09:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129550 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230839lja; Sun, 25 Feb 2018 21:10:35 -0800 (PST) X-Google-Smtp-Source: AH8x224A0FE8bvBnlPVgHbcJKEsLLb5s2KQp1CFLod4UTh04Zc2QZCHTvvbJjuaKePvRsHam37lp X-Received: by 10.98.89.156 with SMTP id k28mr9254052pfj.130.1519621835290; Sun, 25 Feb 2018 21:10:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621835; cv=none; d=google.com; s=arc-20160816; b=KCWRS0Xe9TC/9oBxS/hKaBsOIcqA9KKXW8ChGYh2n6ScPZ8AIJ0wvXasjrVSgSjTk5 0Qb4rSTvETkT8wKovJFAbpALcanJbEweQz6Y+a58VLqeMyw1hufd7ibatC3pwVszphY3 pVtf+eIaJuzkYZ5tDkqoJ0EX59dkfprNTHZA22nz+S9yxdACSGMXY0usjLbNPaRRhnNg 4SF+trPIc7vJ4w9PHlOZJFS+5loLsFThL136pOzQSR/JFvaj2HsU4cjQEDPQ26vyTxZ0 GaH0zJxh3JGvxpF9Ar/e+4Msx+p8eVE4ZVHnpxp7HLo/FUxb7NWBRcvJQQ3kvyP3P7sx y30g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Ff3C3HNXm7RhCecxML+vCKakOrbNexctLR5loscC010=; b=q1MGaCTfBk2sZgZTGhhV37CbMJXcSKGloJt3vh43YMyT3R3FFXOgdTtZ0ouOwc1M40 b8KPPThDUSZ55zH2kQi1RRS+P1zEqAwGiayaIWkvYfgPuxdj2v7l2suUqwGZuzJoZZEA VlIfv51L61a3lK+DoCGsSjmv/rE4blSKQuNArV6PnY6GTvn75y24eJP+LJGbmlDP+LRw 7sdT2rBbXC0LFSUa+vCl1oxJc+eAGlcwEpESgkxNywi89z5deXYJjxAh6hdBKNJLtdBo 0WZ1eJTKlMd6ZDauS/6v0R4Sw1YsuT9LwfevVSHw5sj2O3Tcb/RQxF1TUJ7foF6yO0Y4 NlKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aQnhbOxp; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.35; Sun, 25 Feb 2018 21:10:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=aQnhbOxp; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751094AbeBZFKe (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:34 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:42176 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeBZFKd (ORCPT ); Mon, 26 Feb 2018 00:10:33 -0500 Received: by mail-pl0-f67.google.com with SMTP id 31so8649879ple.9 for ; Sun, 25 Feb 2018 21:10:33 -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=Ff3C3HNXm7RhCecxML+vCKakOrbNexctLR5loscC010=; b=aQnhbOxp2IstPYerDwKIUTlA5B9irX06HGyL0Lyh7KPRLhZp4gEpds2ploH7cHhUlQ LU63tGVfctFvg5FIhCzLT+KPEO7GHm0S4k21qYdDXh9gQx3jevqnPsSxytcg01a3/v5M 7LPpk3leQPNJuu9hA/u3EPZTUs2JaZf7YbpP0= 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=Ff3C3HNXm7RhCecxML+vCKakOrbNexctLR5loscC010=; b=UwpQ/wB6W+uMvdrXE4bVQCZds7KuvRN7nie6kBT4tyPQX5O0FXwT4KNjR9OxLi7Duk n/hQceWINkcEB2YOYHxa4ezZAuDSqWWxkHKc/31PzZVRpHSxx4I8i8j/UN61qOMvUaSx rheMs6sOgTzPttcQIsJHuMGT2hznyWAq4WNu9R0KLogNFoywXeZlhOtEGdxRYKmUuDo+ Ru2v2QYVl2JZaPohbDPh7OeItbAhJLnlv+OSJQUV0GZ2u26OCCM6gw/eMGX8ZO7RnNYT FNoRfXaZ4ru3bubXpMiQzn3/zqzg2q6kU11ieFC3MN0zTWkWrvf9sirAAygXeBAT6ts4 CO8g== X-Gm-Message-State: APf1xPAA9AeAh5A4GNZWlHyegDO8iS31E3/YBggZAMqkfaVvucSRCkYE TNRRvuhjRRSr0KoywV/coIxk/Q== X-Received: by 2002:a17:902:b101:: with SMTP id q1-v6mr9508390plr.287.1519621833487; Sun, 25 Feb 2018 21:10:33 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id n81sm17865703pfk.152.2018.02.25.21.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:33 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 24/27] cpufreq: sparc: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:07 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sparc driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sparc-us2e-cpufreq.c | 3 ++- drivers/cpufreq/sparc-us3-cpufreq.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 90f33efee5fc..bbd1d1e166b8 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -292,8 +292,9 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; + policy->freq_table = table; - return cpufreq_table_validate_and_show(policy, table); + return 0; } static int us2e_freq_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 30645b0118f9..51e3c6018e74 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -136,8 +136,9 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; + policy->freq_table = table; - return cpufreq_table_validate_and_show(policy, table); + return 0; } static int us3_freq_cpu_exit(struct cpufreq_policy *policy) From patchwork Mon Feb 26 05:09:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129551 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230872lja; Sun, 25 Feb 2018 21:10:38 -0800 (PST) X-Google-Smtp-Source: AH8x224Mb7ZSzwQKxJhb9zF5ywBdLjsLEp+QTtYH7pjxVBwhwfOwNKER1ApNK2eIKYyANxmk2H66 X-Received: by 10.99.149.4 with SMTP id p4mr7722798pgd.0.1519621838094; Sun, 25 Feb 2018 21:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621838; cv=none; d=google.com; s=arc-20160816; b=SUVKLuioijpj27D2eUEHQXahxqbCxeOcU2+Be2yKv92ML0xCkSe04eeREwgTC43uTq T22GR0m0btmKpWRuzuV9iYTYaE/Y2C2//L/TOIaCPM4RN5CWOBHAjSchovTSNgkcrdUn Z40AXaFmUx2A5qxlC8Wy7mEG70hEqjjnGS5PA3bND5B0lOeLfac9T6ImwOLH5PoFx789 QCUcbN5I2sPFr3b3P8OUL9QL0BDrdpneYq7I8/tcf9F+JlTbbELig7iMs5bu1joKeuCw U160cpovRNrc49C+1Z+/6UgTqJOR1cty8B0pPCUuCr+HEJ6apKLV+jmNWXtxCwdI1u+4 5b+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=gRnDb4+z8QNsKfjgnTqJzA9i4R1V4ibcJZQLV1ubghkIVzFfle+od6Ak+NS00oSOVJ cnrhLmWDQGChCf4xd2qLWm3JZwTBzNqrhdEQu+13qLYisP2QIUHEv9UrBTBv96gEwWJV yjHmEAIixdFrSYHLUdGAp6Hx/Rws7btnk2vGCx9jJ1he6QBYD/iMuo2alb8ySBr5uIHN QgV6BeAcogPXofFvMaidHEnK1Hxa01niIegLfNjBA9cMQW3KXgapbvodSVw+XxGHGr9p x/wX8vTn8ybXLylUEeFjiK3UODUJTnQvtkeKNY8DirD7EEoeyaPPuMkBiGHYBaaWUL1O Frtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjjFkl4k; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.37; Sun, 25 Feb 2018 21:10:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=cjjFkl4k; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751153AbeBZFKh (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:37 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:44404 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeBZFKg (ORCPT ); Mon, 26 Feb 2018 00:10:36 -0500 Received: by mail-pf0-f194.google.com with SMTP id 17so6072475pfw.11 for ; Sun, 25 Feb 2018 21:10:36 -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=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=cjjFkl4kAKINHLaW1C1nsMyX9/v0Fll/Ntinc6L8p8U8yJfXGc/WiItcYgswwbq8yO kawZUYB2z77CEBIzLVA5arj7Zr/wD5uDofV5WmXSKsX8GrElSGPst+bLuGOPp0qBF0yY 7mUYeyKl8cSktCijaxZNtq9pwQF21C0rb5D24= 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=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=m4IqVijkYJ65ZepxnduSogz5lPf/JTHANhxl4JnyZKSuyhPxiAYG5udBIHuDPJOVM7 2ediDDMia9YwbWcuf38wfGqt6IOkzIXEbR5thmaqSUxR2VAQIYETKlo0x1e+ly4PKRac rVHGrqtEG/gyjG9EHmAIqQsPWkH7VvQtYTP+p1EgUdBgwVZnmTxTtnZwgXuYW71xy9RI pCqY6FHD2zbG4dmDJSdcjXAeLClXXCA8T5Hze33DqH+aessTM+8e4rth8wopgA8jpnLL WtqlilsQVA/UJeWOUIABHp/ug2Li0EHguvx12vudVAI4UVjjDXGFnzSX/tqH9r0C6sU3 dWJA== X-Gm-Message-State: APf1xPDhwcFE+MVEUXr9S3qYD+h1x4Kq2PYRsncMCx4lb49hlhaBRHnu eRVNOceiWjFziRnu/r0YTBkIWhzo5mE= X-Received: by 10.98.217.211 with SMTP id b80mr9512218pfl.107.1519621836301; Sun, 25 Feb 2018 21:10:36 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id u22sm13006292pgv.77.2018.02.25.21.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:35 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 25/27] cpufreq: speedstep: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:08 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from speedstep driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/speedstep-centrino.c | 4 ++-- drivers/cpufreq/speedstep-ich.c | 4 +++- drivers/cpufreq/speedstep-smi.c | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 4fa5adf16c70..a1fb735685db 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c @@ -394,9 +394,9 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ + policy->freq_table = per_cpu(centrino_model, policy->cpu)->op_points; - return cpufreq_table_validate_and_show(policy, - per_cpu(centrino_model, policy->cpu)->op_points); + return 0; } static int centrino_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 0412a246a785..fbbcb88db061 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -304,7 +304,9 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) if (gf.ret) return gf.ret; - return cpufreq_table_validate_and_show(policy, speedstep_freqs); + policy->freq_table = speedstep_freqs; + + return 0; } diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index d23f24ccff38..01fe70dae20b 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c @@ -266,7 +266,9 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) pr_debug("workaround worked.\n"); } - return cpufreq_table_validate_and_show(policy, speedstep_freqs); + policy->freq_table = speedstep_freqs; + + return 0; } static unsigned int speedstep_get(unsigned int cpu) From patchwork Mon Feb 26 05:09:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129552 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230908lja; Sun, 25 Feb 2018 21:10:41 -0800 (PST) X-Google-Smtp-Source: AH8x225Xp9jmZzyqIdktNB19pPe/vk7sNx+Z6w3xi4Kfx0YGM9Xo8/Z2oqEz9HCiiwpNLuybQFL4 X-Received: by 10.98.32.200 with SMTP id m69mr9375121pfj.82.1519621841273; Sun, 25 Feb 2018 21:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621841; cv=none; d=google.com; s=arc-20160816; b=SIIR/ysjTQjB0bj/yVjAPaKtkcUXy7GlZa35jSqbChHfoYTD0d2kgQJJ5SiK3F17kO B8QMBINiJoowFUIzUjGR0FUVWJA4RjebI+H7sowxaFinP0/AQqxtOT6rwLzbhuKkf53X YvL1wUaPgoSnQ+n1mYRITR7rL67pOFLlxap1yU5XW0siV2Baf1sPoqtxXrtoXani8deE WjQhC269b6f3MwXKcXSF2NPXDMAQ7n8f25Jt+upuNFU3sFbk+o/IPCUoxSNChZNp8vue DcatKMdszrc5ASG9+7XlPV39Fo1jHcXh8OtB5sSB3axIHL12f7taI7/CUqnNF+hDaHst VVoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VGSbcuo4gsdmDUq0j8H1YRo1COuXuZ4A4oLw7LZydow=; b=vUvFwp+6vV9YDR1LfWr9AAfLx81XND+77HLT7SHi7vHgGz74hRz/T2y20uYo7DRBDx E+ifUkb1eKj0t/rgX6zvK6Rkd5l+8mEYuw1Z++3X8PLuSfUzat6JnRkEvAW2YLPxgpXn UXV4Noha5xIVd0aq1M+hby4gq8OXPSVDd2qel2ZbDHm/qCav2ACzN0HCDvHDlVx4MbNm pgRRwD1HimXPjLIhBiLBSbxcoqx+HB/0dnS5SmRflSsjNLmABf2rkv2oCK28b1sspAc9 NbHWWt8ds0SyIRaXN6aHp00W1rJ/M4eqU2aXL/qL5sAJ1c9D6rLj9/xm+jbfFcYYP61Z eLvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iDVsDDa9; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.41; Sun, 25 Feb 2018 21:10:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=iDVsDDa9; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751574AbeBZFKk (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:40 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35111 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbeBZFKj (ORCPT ); Mon, 26 Feb 2018 00:10:39 -0500 Received: by mail-pl0-f66.google.com with SMTP id bb3so8660767plb.2 for ; Sun, 25 Feb 2018 21:10:39 -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=VGSbcuo4gsdmDUq0j8H1YRo1COuXuZ4A4oLw7LZydow=; b=iDVsDDa9RYRg/wScGvTjEV8Bfegr49RfYIV+GJfZy4KeDRHug+Y65jnrWngcfphc+C sRcc8VAax4xRvU8EK1flg5uZuhtS6UPha35YJAKfVYdE2jN1ni5xJzZtmSBK2Ewzzu6V AR6aLpMO9cU9Bpqttgo1N3JL87x65pey76gZo= 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=VGSbcuo4gsdmDUq0j8H1YRo1COuXuZ4A4oLw7LZydow=; b=K709e/+f6uOvFTZ11nvG/aTMBxtF4i7StX7OiAmW2mY5vax21NMJz1xLTTPc61fAKR RFarbJNzHuSilwG6cdFG4pRsP3fycwlAbaIMNBmfFw8PhLeX9pMc2PUFk9uM+5/e+seb heeulRu6A6PLzwaGU6wg12yHMrncnmivDwd4eLn3TLQCkrkmMhgDKPoTpDmH2rsy8pRj I9gokqmW/O305LLO0YEP9ERD5CWJBn16T7+8/nmcAjn42K6vTCbWeSAf5NXZ2ina+z5B NZmv7V432vGVrEekAiOPH1Qb8Rcd8RgJc0AzAweI5ca2vTTpfZVoQV1hZyIEIkre/igN vdwQ== X-Gm-Message-State: APf1xPARyI8LvJR3ny9kMBLAmvy1TK9zqGFIWCZowezSUfg88PUjKxe+ X6Q+vgl1ij9GjyN3tXl4gJSZOQ== X-Received: by 2002:a17:902:b210:: with SMTP id t16-v6mr9368894plr.373.1519621838910; Sun, 25 Feb 2018 21:10:38 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id b88sm15788959pfd.108.2018.02.25.21.10.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:38 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Thierry Reding , Jonathan Hunter Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-tegra@vger.kernel.org Subject: [PATCH 26/27] cpufreq: tegra186: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:09 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from tegra186 driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/tegra186-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index 771df649ceb9..1f59966573aa 100644 --- a/drivers/cpufreq/tegra186-cpufreq.c +++ b/drivers/cpufreq/tegra186-cpufreq.c @@ -78,7 +78,7 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy) policy->driver_data = data->regs + info->offset + EDVD_CORE_VOLT_FREQ(core); - cpufreq_table_validate_and_show(policy, cluster->table); + policy->freq_table = cluster->table; break; } From patchwork Mon Feb 26 05:09:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129553 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230941lja; Sun, 25 Feb 2018 21:10:44 -0800 (PST) X-Google-Smtp-Source: AH8x227leqmkzyjwoc4mMonjaPVUmFT2MKXaV3Uytx9uyF4E5PPrRJeuD3kNnknpuCnWWXmdetGX X-Received: by 2002:a17:902:788b:: with SMTP id q11-v6mr9340786pll.378.1519621843875; Sun, 25 Feb 2018 21:10:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621843; cv=none; d=google.com; s=arc-20160816; b=dn1Ej5TJK/MSLXopoqXMxZaYy2CA0fRcPOQRtQveIy7AqYzBSXaB0xHGEYz12aSN7k Pk0e+qEnspPuL9OjN2LGDXMRQ8wP4X7/waZd84XPbeFS2U9k0s8qfxk7NpQvcE3hjVhp fyxxZFsojTL1/ItD37pvkYMtiXf+1qEnTToXe2rBRsdeECb2AZxv+rw015LXRxDKckih PhKaUwFl5S1KHLQshIOCwrQCSyQiky4kJ6ajvmBGiWo2bs4GvTFcUhiq4fhpmwVvc5x+ fclc7kXJhTzoFUUjMwnKvn/41UIj+DBPMoQ/TbuCJ/aJTxnrSaaAdHl/5Q0I+n61EzKs BNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=IAIpNtL2iMqPkTnZwcAXzqD+spty1E20i+jp7Ej6U1bWlQbEtEzzqGCuBI9ofRJM+7 nzInbSBVyXgowHY4/bWjp+ooo7GQPg2s5eVyXlJ7gwz5SsNuXjn/Y0A23MdpTu+pJ7Vr rPa4yBQGySqutr5P1jfToMdMPUH2gQEfY4yM18ndWMSNCU+hPLoQOa8lvt57yoF27v/8 hEp+H7JPiLiWL1tsAj1T3628tzO6RFST3NIJgGeoO7srbDzof01QpHOjS9NhbrXMAIcO Co09/Dn5dY/KGtH33ADqyZirLnlxIx1upAmc0T0NJhblPuHfBxAtBK9+dgOYhKPdrKPg 4F4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JfXU4FkP; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.43; Sun, 25 Feb 2018 21:10:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=JfXU4FkP; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751319AbeBZFKn (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:43 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36529 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbeBZFKm (ORCPT ); Mon, 26 Feb 2018 00:10:42 -0500 Received: by mail-pf0-f196.google.com with SMTP id 68so6086578pfx.3 for ; Sun, 25 Feb 2018 21:10: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=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=JfXU4FkPwfRXP7trJvUx1KqWZHrQ4ZAYm/ponuKobiiwpsmC+KzbPWbcITKue5vEqt gV+3iRzICtI2SIlZsgfIMPe7my6j+btprZ168zsIDOg122QBuAghT0VNNYv2N0jUZTzX UmtfoWX0Leb4Pf2lJybxtNOnJQgQUN9FRXetk= 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=nwSofTV9N8ugxM+QcG07G8fAlCwaT6x3rhVkDu924ac=; b=aPk8gNc4r3lOIrb9sgv1fzRUxnB65PnCDkYOfzcz4DJiTF57UhtCp27l7IgJPRielS 089zj7wmcOzX1UpxosNANtplge32AxrM8FNZ1691cOYAQQS/nLpFMhvAz/7KkCY1iPcY UX8cAQ09WY53JoKjbfCUYldyvzk6jwg4GMrdUhW900FuiZAecFD44dnVPFf+cxPlITg9 pkFveiiLPZH4jygFwbT3jdNyF8QFR3SglVQLMK39vD/GegnO3KTzMxANyV+vpyr9nTu/ ocSZj0kzyjgYIWvVz/PLaibag6JxeYgX3PlAwEyGzZgyA1bi9ELLqrv4y3OtMqxOSDUT bccQ== X-Gm-Message-State: APf1xPBpTPaLjtgjoFcwxwQeXpkECHUp/3va4HpRCg538GkbG1NE2PyY AbnM8WnOeE5g7tVyLTbqfL2IJA== X-Received: by 10.99.147.14 with SMTP id b14mr7662202pge.14.1519621841867; Sun, 25 Feb 2018 21:10:41 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id e13sm12196751pgt.82.2018.02.25.21.10.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:41 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 27/27] cpufreq: Drop cpufreq_table_validate_and_show() Date: Mon, 26 Feb 2018 10:39:10 +0530 Message-Id: <651f495d68e8d980cc80aa2247e749504a0de9d4.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This isn't used anymore. Remove the helper and update documentation accordingly. Signed-off-by: Viresh Kumar --- Documentation/cpu-freq/core.txt | 12 +++++------- Documentation/cpu-freq/cpu-drivers.txt | 6 ++---- drivers/cpufreq/freq_table.c | 14 -------------- include/linux/cpufreq.h | 2 -- 4 files changed, 7 insertions(+), 27 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index 978463a7c81e..073f128af5a7 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt @@ -97,12 +97,10 @@ flags - flags of the cpufreq driver ================================================================== For details about OPP, see Documentation/power/opp.txt -dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with - cpufreq_table_validate_and_show() which is provided with the list of - frequencies that are available for operation. This function provides - a ready to use conversion routine to translate the OPP layer's internal - information about the available frequencies into a format readily - providable to cpufreq. +dev_pm_opp_init_cpufreq_table - + This function provides a ready to use conversion routine to translate + the OPP layer's internal information about the available frequencies + into a format readily providable to cpufreq. WARNING: Do not use this function in interrupt context. @@ -112,7 +110,7 @@ dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with /* Do things */ r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); if (!r) - cpufreq_table_validate_and_show(policy, freq_table); + policy->freq_table = freq_table; /* Do other things */ } diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 61546ac578d6..6e353d00cdc6 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt @@ -259,10 +259,8 @@ CPUFREQ_ENTRY_INVALID. The entries don't need to be in sorted in any particular order, but if they are cpufreq core will do DVFS a bit quickly for them as search for best match is faster. -By calling cpufreq_table_validate_and_show(), the cpuinfo.min_freq and -cpuinfo.max_freq values are detected, and policy->min and policy->max -are set to the same values. This is helpful for the per-CPU -initialization stage. +The cpufreq table is verified automatically by the core if the policy contains a +valid pointer in its policy->freq_table field. cpufreq_frequency_table_verify() assures that at least one valid frequency is within policy->min and policy->max, and all other criteria diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 10e119ae66dd..3a8cc99e6815 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -352,20 +352,6 @@ static int set_freq_table_sorted(struct cpufreq_policy *policy) return 0; } -int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, - struct cpufreq_frequency_table *table) -{ - int ret; - - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (ret) - return ret; - - policy->freq_table = table; - return 0; -} -EXPORT_SYMBOL_GPL(cpufreq_table_validate_and_show); - int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) { int ret; diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1fe49724da9e..87f48dd932eb 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -960,8 +960,6 @@ extern void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; extern struct freq_attr *cpufreq_generic_attr[]; -int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, - struct cpufreq_frequency_table *table); int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy); unsigned int cpufreq_generic_get(unsigned int cpu);