Message ID | 20200111094908.026436660@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=JpBV=3A=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A42C8C33C9E for <stable@archiver.kernel.org>; Sat, 11 Jan 2020 10:03:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 765D92087F for <stable@archiver.kernel.org>; Sat, 11 Jan 2020 10:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578737008; bh=eBjrplUd8aCTYwHqod0BQxVuTBr6XQqjFyvzyzNAwv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KCRyrJ6wwBMnUpc1e0uFfAWGnDVYMB0EhEI7N8WA0xw7mKu6fK8zsTfdR8YVsL5xq PGeCiUVj2cSUdJz3oKyYkA+vk/RNDe48AMkF27FdFrOTzJNySeqz/puy48vm1wKCTt H9eyrdcEEyMHkK/Qi9+njUhsUE+vlUikPfoNUdTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728910AbgAKKD2 (ORCPT <rfc822;stable@archiver.kernel.org>); Sat, 11 Jan 2020 05:03:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:34874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728919AbgAKKD1 (ORCPT <rfc822;stable@vger.kernel.org>); Sat, 11 Jan 2020 05:03:27 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B09D20866; Sat, 11 Jan 2020 10:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578737007; bh=eBjrplUd8aCTYwHqod0BQxVuTBr6XQqjFyvzyzNAwv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uQaI8ISRP6GtOoof1ddFTuTQQxKDo17za6xUadzIIDp2Ew8KHSirlTcoti0hL7Wn+ +dGYG4IpmcGH68iK5qGyDlcRQ3pLuaUjpgcJDf9wXxrkCYAjvKeFwG2V4rGE/ph6ai OxQOFsI3M2KxcM2q2HzlEr9bJRCjG8HlIuJYm46Q= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Liviu Dudau <liviu.dudau@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Viresh Kumar <viresh.kumar@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Sudeep Holla <sudeep.holla@arm.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.9 62/91] ARM: vexpress: Set-up shared OPP table instead of individual for each CPU Date: Sat, 11 Jan 2020 10:49:55 +0100 Message-Id: <20200111094908.026436660@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094844.748507863@linuxfoundation.org> References: <20200111094844.748507863@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index fe488523694c..635b0d549487 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -555,8 +555,9 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev) static int __init ve_spc_clk_init(void) { - int cpu; + int cpu, cluster; struct clk *clk; + bool init_opp_table[MAX_CLUSTERS] = { false }; if (!info) return 0; /* Continue only if SPC is initialised */ @@ -582,8 +583,17 @@ static int __init ve_spc_clk_init(void) continue; } + cluster = topology_physical_package_id(cpu_dev->id); + if (init_opp_table[cluster]) + continue; + if (ve_init_opp_table(cpu_dev)) pr_warn("failed to initialise cpu%d opp table\n", cpu); + else if (dev_pm_opp_set_sharing_cpus(cpu_dev, + topology_core_cpumask(cpu_dev->id))) + pr_warn("failed to mark OPPs shared for cpu%d\n", cpu); + else + init_opp_table[cluster] = true; } platform_device_register_simple("vexpress-spc-cpufreq", -1, NULL, 0);