From patchwork Sat Jun 9 14:13:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 927148 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="npabPM7z"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4131X513kmz9s01 for ; Sun, 10 Jun 2018 00:15:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZzjXqzBtn+sc27dU1erA1lUUByNeipiHFQgMyDnWLlE=; b=npabPM7zTi/5lR h1uS+KzkIiKiYbeqFk32YPAlwsfVUk68a2fP722kcVuYI/8prm0gC2hJNpPSARyScBWSJYb+gfoGl FN2WlTcssxdkUB1FezN4npezgT0f/hIF2Jr3KUgVxDVgOmOr4spkxxFNDumXRPjtiqIZNcx0JRqvR FlKWBblbCZMpJJcMyhDRo1ais4iJXYtwAplQ5u5sIU+esUSaVFqB60iKosfZ2+eAJes26yvogQ74w Vb9owXnoR3UI5vwVxkqdkBJNlfK2YT3zm1l15nWbgck1troNajwY/0zCUlp/2rD62Tip7sthA7Fcl v2DmRJA4WY59vxGi+nig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fReeK-0007Or-EP; Sat, 09 Jun 2018 14:15:24 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fRedA-00066Z-PF for openwrt-devel@lists.openwrt.org; Sat, 09 Jun 2018 14:14:52 +0000 Received: (wp-smtpd smtp.tlen.pl 32553 invoked from network); 9 Jun 2018 16:13:55 +0200 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 9 Jun 2018 16:13:55 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 9 Jun 2018 16:13:40 +0200 Message-Id: <20180609141342.23948-1-tomek_n@o2.pl> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-WP-MailID: 19c0cc3cc8461e3ba768beda19984fe6 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 000000A [kZMk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180609_071412_996256_19D992E8 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.158 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH 1/3] mvebu: add fix for armada 37xx cpufreq driver X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Backport from stable kernel tree fixing clock leak. Signed-off-by: Tomasz Maciej Nowak --- Please also cherry-pick this to OpenWrt 18.06. --- ...8-cpufreq-armada-37xx-Fix-clock-leak.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 target/linux/mvebu/patches-4.14/508-cpufreq-armada-37xx-Fix-clock-leak.patch diff --git a/target/linux/mvebu/patches-4.14/508-cpufreq-armada-37xx-Fix-clock-leak.patch b/target/linux/mvebu/patches-4.14/508-cpufreq-armada-37xx-Fix-clock-leak.patch new file mode 100644 index 0000000000..7479c6db21 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/508-cpufreq-armada-37xx-Fix-clock-leak.patch @@ -0,0 +1,35 @@ +From bbcc328561040292f7d6796954d478e4a2335e6f Mon Sep 17 00:00:00 2001 +From: Gregory CLEMENT +Date: Wed, 4 Apr 2018 16:44:44 +0200 +Subject: [PATCH] cpufreq: armada-37xx: Fix clock leak + +There was no clk_put() balancing the clk_get(). This commit fixes it. + +Fixes: 92ce45fb875d (cpufreq: Add DVFS support for Armada 37xx) +Cc: 4.16+ # 4.16+ +Reported-by: Thomas Petazzoni +Signed-off-by: Gregory CLEMENT +Acked-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +--- + drivers/cpufreq/armada-37xx-cpufreq.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/cpufreq/armada-37xx-cpufreq.c ++++ b/drivers/cpufreq/armada-37xx-cpufreq.c +@@ -202,6 +202,7 @@ static int __init armada37xx_cpufreq_dri + cur_frequency = clk_get_rate(clk); + if (!cur_frequency) { + dev_err(cpu_dev, "Failed to get clock rate for CPU\n"); ++ clk_put(clk); + return -EINVAL; + } + +@@ -210,6 +211,7 @@ static int __init armada37xx_cpufreq_dri + return -EINVAL; + + armada37xx_cpufreq_dvfs_setup(nb_pm_base, clk, dvfs->divider); ++ clk_put(clk); + + for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR; + load_lvl++) {