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]
Message-ID: <20160912215515.GF7243@codeaurora.org>
Date:   Mon, 12 Sep 2016 14:55:15 -0700
From:   Stephen Boyd <sboyd@...eaurora.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Finlye Xiao <finley.xiao@...k-chips.com>,
        srinivas.kandagatla@...aro.org, maxime.ripard@...e-electrons.com,
        heiko@...ech.de, robh+dt@...nel.org, frowand.list@...il.com,
        sre@...nel.org, dbaryshkov@...il.com, dwmw2@...radead.org,
        mark.rutland@....com, khilman@...nel.org, nm@...com,
        rjw@...ysocki.net, linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        wxt@...k-chips.com, jay.xu@...k-chips.com,
        rocky.hao@...k-chips.com, tim.chen@...k-chips.com,
        tony.xie@...k-chips.com, ulysses.huang@...k-chips.com,
        lin.huang@...k-chips.com
Subject: Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling
 Rockchip cpu avs

On 08/29, Viresh Kumar wrote:
> On 18-08-16, 16:52, Finlye Xiao wrote:
> > +static int rockchip_adjust_opp_table(struct device *cpu_dev,
> > +				     struct cpufreq_frequency_table *table,
> > +				     int volt)
> > +{
> > +	struct opp_table *opp_table;
> > +	struct cpufreq_frequency_table *pos;
> > +	struct dev_pm_opp *opp;
> > +
> > +	if (!volt)
> > +		return 0;
> > +
> > +	rcu_read_lock();
> > +
> > +	opp_table = _find_opp_table(cpu_dev);
> > +	if (IS_ERR(opp_table)) {
> > +		rcu_read_unlock();
> > +		return PTR_ERR(opp_table);
> > +	}
> > +
> > +	cpufreq_for_each_valid_entry(pos, table) {
> > +		opp = dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * 1000,
> > +						 true);
> > +		if (IS_ERR(opp))
> > +			continue;
> > +
> > +		opp->u_volt += volt;
> > +		opp->u_volt_min += volt;
> > +		opp->u_volt_max += volt;
> > +	}
> > +
> > +	rcu_read_unlock();
> > +
> > +	return 0;
> > +}
> 
> I wouldn't prefer altering the opp tables from individual drivers at all. At the
> least, it should be done via some helpers exposed by the core.
> 
> But before that I would like to hear from Stephen a bit as I recall he was also
> working on something similar.
> 

I had a patch to modify the voltage at runtime for the "current"
OPP. Now that we have regulator and clk control inside OPP that
became a little easier to do without having to do some notifier
from the OPP layer to the consumers. I haven't had time to revive
those patches though. Should we do that? Does this need to modify
anything besides the OPP the device is currently running at?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ