From patchwork Wed Apr 22 23:40:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 6259311 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4F30B9F389 for ; Wed, 22 Apr 2015 23:40:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D68B20380 for ; Wed, 22 Apr 2015 23:40:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49B5C20389 for ; Wed, 22 Apr 2015 23:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758593AbbDVXkn (ORCPT ); Wed, 22 Apr 2015 19:40:43 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:33590 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756722AbbDVXkl (ORCPT ); Wed, 22 Apr 2015 19:40:41 -0400 Received: by pdbnk13 with SMTP id nk13so1944251pdb.0 for ; Wed, 22 Apr 2015 16:40:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=6a1cWj0JrSg8v7xJJqFLGkmaYLc9Ht2Az3eIHAOBzgQ=; b=ctfPc41vocW5kY9vTmX0PW3mtWm1FyO1zSakRIPJ+QzOdNhbXU7HK1DF4+XZlZf9p+ yZa/Gyz9da4w4a+wS4rlItYX53VQe6aA3nkpZK40GJsYywooweWxaGvTR653w+sreo4R Q1hNQUpJRYvP46bZqllSRrY2dKg8DsJ68LMqxnMuzGcIrj3JH/EewXZVtHRS8gdTiT9h ouAr6zI+D90F7F16Qsj67XfVuV1+vOJdxY+a0B9Sd//oHTW79wAhh1R2ZbQX5+ME1TqK 4bFBHneJ8j2/orA8l90LtyCYPMUhJsYMn4hMjuho9HOYaCtvH54gDWleBw3JXO3PgZNi DXxw== X-Gm-Message-State: ALoCoQni78cdc0tLQg0nzO6IQ2RwdCSbezUYWAgWg1J+hgAX+w8ZeMK0IMfS1R+zAHDJAHpOY1cf X-Received: by 10.70.91.37 with SMTP id cb5mr3318pdb.151.1429746041237; Wed, 22 Apr 2015 16:40:41 -0700 (PDT) Received: from localhost (c-67-160-101-93.hsd1.wa.comcast.net. [67.160.101.93]) by mx.google.com with ESMTPSA id lb1sm4108589pab.39.2015.04.22.16.40.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 22 Apr 2015 16:40:39 -0700 (PDT) From: Kevin Hilman To: Bartlomiej Zolnierkiewicz Cc: Thomas Abraham , Sylwester Nawrocki , Mike Turquette , Kukjin Kim , Kukjin Kim , Viresh Kumar , Lukasz Majewski , Heiko Stuebner , linux-pm@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Chanwoo Choi , linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/4] cpufreq: use generic cpufreq drivers for Exynos5250 platform References: <1428946441-17058-1-git-send-email-b.zolnierkie@samsung.com> <5439319.JYC6t7bzy4@amdc1032> <7hsibtavuz.fsf@deeprootsystems.com> <4008289.pQOxzKW0Ir@amdc1032> Date: Wed, 22 Apr 2015 16:40:37 -0700 In-Reply-To: <4008289.pQOxzKW0Ir@amdc1032> (Bartlomiej Zolnierkiewicz's message of "Wed, 22 Apr 2015 19:37:43 +0200") Message-ID: <7hegnb91fu.fsf@deeprootsystems.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Bartlomiej Zolnierkiewicz writes: [...] >> However, with the default governor set to userspace it boots fine until >> my userspace (ubuntu) tries to enable the ondemand governor, and then it >> hangs. >> >> For it to boot, I have to disable the ondemand governor, and set the >> default governor to userspace. > > I've tried with ARM big.LITTLE cpuidle support enabled (I've just noticed > that it is not turned on in exynos_defconfig) and my ODROID-XU3 board > fails to boot. This happens even with cpufreq support disabled (hard > lockup happens during mmc initialization which is done just after cpufreq > initialization). Right, the XU3 has broken secure firmware such that MCPM cannot properly control CCI, so CPUidle will hang when trying to hit low power states, so you have to disable CCI by adding something like this to the end of your XU3 .dts file: &cci { status = "disabled"; }; > Could you please check if disabling cpuidle support helps? For now, I've disabled CPUidle so we have a similar setup, but it doesn't change anything on exynos5800-peach-pi >> As I reported earlier on Thomas' series, I suspect this is related to >> the fact that the higher OPPs aren't really functional without voltage >> scaling also supported. > > Part #4 contains voltage scaling support for arm_big_little[_dt] driver > so this should not be a problem any longer. > > You may try next-20150330-generic-cpufreq-exynos5420-5800-v2-debug > branch from my github (with cpufreq debugging printks enabled) to check > whether the voltage scaling is indeed done on your board. > >> I'm also seeing the wait_until_divider_stable errors when switching >> between the available A7 OPPs. I'd reported this one earlier as well, >> along with the script to reproduce it. > > I've tried your script and it works fine for me (I only needed to change > cpu4 to cpu0 as on ODROID-XU3 CPUs 0,5,6,7 are A7 and 1,2,3,4 are A15). Then it seems something isn't quite right for exynos5800-peach-pi. Below is the script[1] I'm using on exynos which also checks the voltage by quering the regulator fwk (and optionally checking the INA2xx sensors on odroid-xu3 if that support is enabled) On your debug branch, it just gives -1 for all the voltages, so the regulator voltage never changes: # ./dvfs CPU regulator: cpu0, vdd_arm, /sys/class/regulator/regulator.18 [ 45.691483] arm_big_little: bL_cpufreq_set_rate: cpu: 0, old cluster: 0, new cluster: 0, freq: 200000 [ 45.699581] arm_big_little: bL_cpufreq_set_rate_cluster: cpu 0, cluster: 0, 400 MHz, -1 mV --> 200 MHz, -1 mV current freq: 200000 current voltage: 1262500 [ 46.969821] arm_big_little: bL_cpufreq_set_rate: cpu: 0, old cluster: 0, new cluster: 0, freq: 300000 [ 46.978272] arm_big_little: bL_cpufreq_set_rate_cluster: cpu 0, cluster: 0, 200 MHz, -1 mV --> 300 MHz, -1 mV current freq: 300000 current voltage: 1262500 I added a bit more debug to the cpufreq driver[1] and found that the regulator_get_optional is failing: [ 3.407295] cpu cpu0: Unable to get regulator cpu-cluster.0 [ 3.458282] cpu cpu4: Unable to get regulator cpu-cluster.1 Kevin [1] #!/bin/sh if [ ! -d /sys/devices/system/cpu/cpu0/cpufreq ]; then echo "CPUfreq not enabled in kernel." exit 1 fi # NOTE: odroid-xu3: CPU0 = A7.0, CPU1 = A15.0 cpu=cpu0 reg_name=vdd_arm hwmon=hwmon0 #cpu=cpu4 #reg_name=vdd_kfc #hwmon=hwmon3 cpu_reg=$(dirname `find /sys/class/regulator/regulator.*/ -name name -exec grep -l $reg_name {} \;`) echo CPU regulator: $cpu, $reg_name, $cpu_reg # Cycle through frequencies (and check voltage) cd /sys/devices/system/cpu/$cpu/cpufreq echo userspace > scaling_governor for freq in `cat scaling_available_frequencies`; do echo ${freq} > scaling_setspeed sleep 0.2 echo -n "current freq: " cat scaling_cur_freq echo -n "current voltage: " cat ${cpu_reg}/microvolts # odroid-xu3 INA231 monitors if [ ! -z $hwmon ]; then if [ -e /sys/class/hwmon/$hwmon/in1_input ]; then echo -n "current voltage (ina2xx)": cat /sys/class/hwmon/$hwmon/in1_input fi fi sleep 1 done [2] ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]); --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 024f185b2154..4108f909cc9c 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -16,6 +16,7 @@ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#define DEBUG #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -446,6 +447,8 @@ static int _get_cluster_clk_and_freq_table(struct device *cpu_dev) ret = regulator_set_voltage_time(reg[cluster], min_uV, max_uV); if (ret > 0) transition_latencies[cluster] = ret * 1000; + } else { + dev_warn(cpu_dev, "Unable to get regulator %s", name); }