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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGo_u6oZM0K8XDMtmXKFyoGy2qf+-HSPvU0EMangM5Jj_prKsA@mail.gmail.com>
Date:	Thu, 11 Apr 2013 18:23:52 -0500
From:	Nishanth Menon <nm@...com>
To:	Amit Daniel Kachhap <amit.daniel@...sung.com>
Cc:	linux-pm@...r.kernel.org, Kukjin Kim <kgene.kim@...sung.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	lkml <linux-kernel@...r.kernel.org>, cpufreq@...r.kernel.org,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	linux-samsung-soc@...r.kernel.org,
	Thomas Abraham <thomas.abraham@...aro.org>,
	Inderpal Singh <inderpal.singh@...aro.org>,
	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RESEND PATCH V6 1/4] cpufreq: exynos: Add cpufreq driver for exynos5440

Hi,
On Mon, Apr 8, 2013 at 4:57 AM, Amit Daniel Kachhap
<amit.daniel@...sung.com> wrote:
> +
> +static int init_div_table(void)
> +{
> +       struct cpufreq_frequency_table *freq_tbl = dvfs_info->freq_table;
> +       unsigned int tmp, clk_div, ema_div, freq, volt_id;
> +       int i = 0;
> +       struct opp *opp;
> +
> +       for (i = 0; freq_tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
> +
> +               opp = opp_find_freq_exact(dvfs_info->dev,
> +                                       freq_tbl[i].frequency * 1000, true);
> +               if (IS_ERR(opp)) {
> +                       dev_err(dvfs_info->dev,
> +                               "failed to find valid OPP for %u KHZ\n",
> +                               freq_tbl[i].frequency);
> +                       return PTR_ERR(opp);
> +               }
please use RCU read locks.

> +
> +               freq = freq_tbl[i].frequency / 1000; /* In MHZ */
> +               clk_div = ((freq / CPU_DIV_FREQ_MAX) & P0_7_CPUCLKDEV_MASK)
> +                                       << P0_7_CPUCLKDEV_SHIFT;
> +               clk_div |= ((freq / CPU_ATB_FREQ_MAX) & P0_7_ATBCLKDEV_MASK)
> +                                       << P0_7_ATBCLKDEV_SHIFT;
> +               clk_div |= ((freq / CPU_DBG_FREQ_MAX) & P0_7_CSCLKDEV_MASK)
> +                                       << P0_7_CSCLKDEV_SHIFT;
> +
> +               /* Calculate EMA */
> +               volt_id = opp_get_voltage(opp);
Please use RCU read locks as documented for OPP library.

Regards,
Nishanth Menon
--
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