lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Mar 2013 14:23:53 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Amit Daniel Kachhap <amit.daniel@...sung.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	Kukjin Kim <kgene.kim@...sung.com>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	cpufreq@...r.kernel.org,
	Inderpal Singh <inderpal.singh@...aro.org>,
	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>
Subject: Re: [PATCH V5 1/4] cpufreq: exynos: Add cpufreq driver for exynos5440

On 28 March 2013 13:35, Amit Daniel Kachhap <amit.daniel@...sung.com> wrote:
> This patch adds dvfs support for exynos5440 SOC. This soc has 4 cores and
> they scale at same frequency. The nature of exynos5440 clock controller is
> different from previous exynos controllers so not using the common exynos
> cpufreq framework. The major difference being interrupt notification for
> frequency change. Also, OPP library is used for device tree parsing to get
> different parameters like frequency, voltage etc. Since the opp library sorts
> the frequency table in ascending order so they are again re-arranged in
> descending order. This will have one-to-one mapping with the clock controller
> state management logic.
>
> Signed-off-by: Amit Daniel Kachhap <amit.daniel@...sung.com>

Mostly okay now, just minor comments:

> diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
> +static void exynos_cpufreq_work(struct work_struct *work)
> +{

> +       if (likely(index < dvfs_info->freq_count)) {
> +               freqs.new = freq_table[index].frequency;
> +               for_each_cpu(freqs.cpu, policy->cpus)
> +                       cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
> +               dvfs_info->cur_frequency = freqs.new;
> +       } else {
> +               dev_crit(dvfs_info->dev, "New frequency out of range\n");
> +       }

I believe there is something wrong here. For failure cases too
we need to issue cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
with the old frequency.

> +static int exynos_cpufreq_probe(struct platform_device *pdev)
> +{

> +       ret = cpufreq_register_driver(&exynos_driver);
> +       if (ret) {
> +               dev_err(dvfs_info->dev,
> +                       "%s: failed to register cpufreq driver\n", __func__);
> +               goto err_free_table;
> +       }
> +
> +       of_node_put(np);

Don't we need to put node everytime?

> +       dvfs_info->dvfs_enabled = true;
> +       return 0;
> +
> +err_free_table:
> +       opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
> +err_put_node:
> +       of_node_put(np);
> +       dev_err(dvfs_info->dev, "%s: failed initialization\n", __func__);
> +       return ret;
> +}

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ