Hi Guys,
[All this is not yet mainlined and is WIP]
Linaro and ARM are developing Linux solutions for big LITTLE Architecture. And
I maintain all the stable stuff on this here: [1] and this gets pulled
in by Andrey for
every linux-linaro release.
[1] by itself isn't much usable as it doesn't have many bits which are
pulled in by
Andrey, like: tc2 support from tixy and Android stuff from John.
As this is a stable release it contains what works best and it may
contain stuff that
is never going to be mainlined.
So, i have started to maintain another release for people who are only
interested in
working with latest upstream effort in this direction. It is created
with following steps:
- Checkout a new branch based of linux-linaro latest release tag
- git revert Merge with big-LITTLE-MP-master-v*
- git merge with [2]
And we finally get [3] which only contains all the big LITTLE MP
efforts that are
under review on LKML.
[3] has all the bits required to test it on TC2 as it is based of
linux-linaro release.
Interested people may check it out to give it a try.
--
viresh
[1]: https://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=shortlog;h=refs/hea…
[2]: https://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=shortlog;h=refs/hea…
[3]: https://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=shortlog;h=refs/hea…
Hello,
This series implements reentrancy for the common clk implementation of
the clk.h api. Making reentrant calls into the clock framework is both
necessary and desirable for many use cases such as enabling off-chip
clocks via i2c. The first patch in the series implements this.
A neat side effect of reentrancy is that it is possible for platforms
using voltage regulators controlled via i2c to register rate-change
notifier handlers to scale voltage as a function of clock rate. This is
an effective way to implement dynamic voltage & frequency scaling.
Patch #2 implements a helper function for registering such a notifier
handler.
The third patch in the series demonstrates dvfs on OMAP platforms by
modifying the cpufreq-omap driver; it migrates the voltage scaling logic
out of the cpufreq driver's .target callback and registers callbacks via
the helper introduced in patch #2.
Patches four and five are purely test coverage. And what better way to
test than to muck with fragile PLL programming code? These patches test
out a lot of the aforementioned reentrancy in the OMAP3+ DPLL code.
They are not for merging, but as a demonstration of what is now
possible.
Finally, I know that Documentation/clk.txt needs an update for these
changes but I wanted this on the list before I flew out to LCA 2013.
I'll provide that update during or after the conference.
Two previous (and considerably more insane) attempts at this,
v1: http://article.gmane.org/gmane.linux.kernel/1327866
v2: http://marc.info/?l=linux-kernel&m=134507429302463&w=2
Mike Turquette (5):
clk: allow reentrant calls into the clk framework
clk: notifier handler for dynamic voltage scaling
cpufreq: omap: scale regulator from clk notifier
HACK: set_parent callback for OMAP4 non-core DPLLs
HACK: omap: opp: add fake 400MHz OPP to bypass MPU
arch/arm/mach-omap2/cclock44xx_data.c | 1 +
arch/arm/mach-omap2/clock.h | 1 +
arch/arm/mach-omap2/dpll3xxx.c | 107 ++++++++++----
arch/arm/mach-omap2/opp4xxx_data.c | 18 +++
drivers/clk/Makefile | 1 +
drivers/clk/clk.c | 254 ++++++++++++++++++++++++---------
drivers/clk/dvfs.c | 125 ++++++++++++++++
drivers/cpufreq/omap-cpufreq.c | 82 +++--------
include/linux/clk.h | 27 +++-
9 files changed, 459 insertions(+), 157 deletions(-)
create mode 100644 drivers/clk/dvfs.c
--
1.7.10.4
Hi,
There are many scripts in use that parse the web interface for
snapshots and releases.linaro.org. This is far from ideal because
changes to the web interface can result in the scripts breaking. To
alleviate this problem an API has been introduced. The API is very
simple, just two new URLs and a new header when downloading files.
<server>/api/ls/<path to file> returns a JSON document containing all the
data shown by a file listing on the web interface. It can target
either a directory of a file.
<server>/api/license/<path to file> returns a JSON document containing
the licence information for the file pointed to. Both the license text
and the digest used to accept the license are returned. Including the
digest means that the choice of digest used internally can change without
re-writing clients - to the client this is just a magic string and they
don't need to care how it is generated.
When downloading a file you simply include the header
LICENSE_ACCEPTED, its value being a space separated list of license
digests representing the licenses that you have accepted.
e.g.
(license text and digest removed for brevity)
http://snapshots.linaro.org/api/ls/quantal/hwpacks/snowball/latest
{
"files": [
{
"mtime": "15-Mar-2013 08:29",
"name":
"hwpack_linaro-snowball_20130315-269_armhf_supported.manifest.txt",
"size": "762",
"type": "text",
"url":
"/quantal/hwpacks/snowball/latest/hwpack_linaro-snowball_20130315-269_armhf_supported.manifest.txt"
},
{
"mtime": "15-Mar-2013 08:31",
"name":
"hwpack_linaro-snowball_20130315-269_armhf_supported.tar.gz",
"size": "18.1M",
"type": "other",
"url":
"/quantal/hwpacks/snowball/latest/hwpack_linaro-snowball_20130315-269_armhf_supported.tar.gz"
}
]
}
http://snapshots.linaro.org/api/license/quantal/hwpacks/snowball/latest/hwp…
{
"licenses": [
{
"text": "license text...",
"digest": "license digest..."
}
]
}
wget --header="LICENSE_ACCEPTED: license digest..."
http://snapshots.linaro.org/quantal/hwpacks/snowball/latest/hwpack_linaro-s…
There is a example client script that illustrates how to use the API here:
http://bazaar.launchpad.net/~linaro-automation/linaro-license-protection/tr…
Usage: download.py <URL>
If URL points to a directory all files are downloaded.
If URL points to a file, just that file is downloaded.
It prints the license(s) for each file and waits for the user to
accept each one. It also stores which licenses the user has accepted
so they don't need to be re-accepted if the text hasn't changed.
--
James Tunnicliffe
Add notifier calls in clk_prepare and clk_unprepare so drivers which are
interested in knowing that clk_prepare/unprepare call can act accordingly.
The existing "clk_set_rate" notifier is not enough for normal DVFS
inplementation since clock might be enabled/disabled at runtime. Adding
these notifiers is useful on DVFS core which take clk_prepare as a hint
on that the notified clock might be enabled later so it can raise voltage
to a safe level before enabling the clock, and take clk_unprepare as a
hint that the clock has been disabled and is safe to lower the voltage.
The added notifier events are:
PRE_CLK_PREPARE
POST_CLK_PREPARE
ABORT_CLK_PREPARE
PRE_CLK_UNPREPARE
POST_CLK_UNPREPARE
Signed-off-by: Bill Huang <bilhuang(a)nvidia.com>
---
drivers/clk/clk.c | 88 ++++++++++++++++++++++++++++++---------------------
include/linux/clk.h | 5 +++
2 files changed, 57 insertions(+), 36 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ed87b24..ac07c6e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -516,6 +516,42 @@ struct clk *__clk_lookup(const char *name)
/*** clk api ***/
+/**
+ * __clk_notify - call clk notifier chain
+ * @clk: struct clk * that is changing rate
+ * @msg: clk notifier type (see include/linux/clk.h)
+ * @old_rate: old clk rate
+ * @new_rate: new clk rate
+ *
+ * Triggers a notifier call chain on the clk rate-change notification
+ * for 'clk'. Passes a pointer to the struct clk and the previous
+ * and current rates to the notifier callback. Intended to be called by
+ * internal clock code only. Returns NOTIFY_DONE from the last driver
+ * called if all went well, or NOTIFY_STOP or NOTIFY_BAD immediately if
+ * a driver returns that.
+ */
+static int __clk_notify(struct clk *clk, unsigned long msg,
+ unsigned long old_rate, unsigned long new_rate)
+{
+ struct clk_notifier *cn;
+ struct clk_notifier_data cnd;
+ int ret = NOTIFY_DONE;
+
+ cnd.clk = clk;
+ cnd.old_rate = old_rate;
+ cnd.new_rate = new_rate;
+
+ list_for_each_entry(cn, &clk_notifier_list, node) {
+ if (cn->clk == clk) {
+ ret = srcu_notifier_call_chain(&cn->notifier_head, msg,
+ &cnd);
+ break;
+ }
+ }
+
+ return ret;
+}
+
void __clk_unprepare(struct clk *clk)
{
if (!clk)
@@ -549,7 +585,14 @@ void __clk_unprepare(struct clk *clk)
void clk_unprepare(struct clk *clk)
{
mutex_lock(&prepare_lock);
+
+ if (clk->notifier_count)
+ __clk_notify(clk, PRE_CLK_UNPREPARE, clk->rate, clk->rate);
+
__clk_unprepare(clk);
+ if (clk->notifier_count)
+ __clk_notify(clk, POST_CLK_UNPREPARE, clk->rate, clk->rate);
+
mutex_unlock(&prepare_lock);
}
EXPORT_SYMBOL_GPL(clk_unprepare);
@@ -597,7 +640,16 @@ int clk_prepare(struct clk *clk)
int ret;
mutex_lock(&prepare_lock);
+
+ if (clk->notifier_count)
+ __clk_notify(clk, PRE_CLK_PREPARE, clk->rate, clk->rate);
+
ret = __clk_prepare(clk);
+ if (!ret && clk->notifier_count)
+ __clk_notify(clk, POST_CLK_PREPARE, clk->rate, clk->rate);
+ else if (clk->notifier_count)
+ __clk_notify(clk, ABORT_CLK_PREPARE, clk->rate, clk->rate);
+
mutex_unlock(&prepare_lock);
return ret;
@@ -749,42 +801,6 @@ long clk_round_rate(struct clk *clk, unsigned long rate)
EXPORT_SYMBOL_GPL(clk_round_rate);
/**
- * __clk_notify - call clk notifier chain
- * @clk: struct clk * that is changing rate
- * @msg: clk notifier type (see include/linux/clk.h)
- * @old_rate: old clk rate
- * @new_rate: new clk rate
- *
- * Triggers a notifier call chain on the clk rate-change notification
- * for 'clk'. Passes a pointer to the struct clk and the previous
- * and current rates to the notifier callback. Intended to be called by
- * internal clock code only. Returns NOTIFY_DONE from the last driver
- * called if all went well, or NOTIFY_STOP or NOTIFY_BAD immediately if
- * a driver returns that.
- */
-static int __clk_notify(struct clk *clk, unsigned long msg,
- unsigned long old_rate, unsigned long new_rate)
-{
- struct clk_notifier *cn;
- struct clk_notifier_data cnd;
- int ret = NOTIFY_DONE;
-
- cnd.clk = clk;
- cnd.old_rate = old_rate;
- cnd.new_rate = new_rate;
-
- list_for_each_entry(cn, &clk_notifier_list, node) {
- if (cn->clk == clk) {
- ret = srcu_notifier_call_chain(&cn->notifier_head, msg,
- &cnd);
- break;
- }
- }
-
- return ret;
-}
-
-/**
* __clk_recalc_rates
* @clk: first clk in the subtree
* @msg: notification type (see include/linux/clk.h)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index b3ac22d..41d567d 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -43,6 +43,11 @@ struct clk;
#define PRE_RATE_CHANGE BIT(0)
#define POST_RATE_CHANGE BIT(1)
#define ABORT_RATE_CHANGE BIT(2)
+#define PRE_CLK_PREPARE BIT(3)
+#define POST_CLK_PREPARE BIT(4)
+#define ABORT_CLK_PREPARE BIT(5)
+#define PRE_CLK_UNPREPARE BIT(6)
+#define POST_CLK_UNPREPARE BIT(7)
/**
* struct clk_notifier - associate a clk with a notifier
--
1.7.9.5
Linaro 13.03 Release (Calendar Week 13): Here is test result summary for
Linux Linaro ubuntu Quantal image on following boards:
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AgB-fT5LL31CdEtLT…
1) ARM Versatile Express A9;
2) Samsung Arndale;
3) TI Panda 4430;
4) TI Panda 4460;
5) ST Ericsson Snowball.
Synopsis: Kernel version on all boards has been upgraded to "3.9.0-1"; TI
Panda 4460 booting failed.
1. ARM Versatile Express A9 + Linux Linaro Quantal (Column O):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFNmV…
It keeps exactly same status since calendar week 50 last year: only "Halt"
& "Device Tree" test failed, all other features work well.
2. Samsung Arndale + Linux Linaro Quantal (Column I):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AgB-fT5LL31CdGZJS…
It keeps same status as last week: system hangs during the Power Management
test, HDMI display is unavailable. All other features work well.
3. TI Panda 4430 + Linux Linaro Quantal (Column O):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
WiFi, HDMI and DVI-D are unavailable. All other features work well.
4. TI Panda 4460 + Linux Linaro Quantal (Column O):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
System booting failed since 3 weeks ago, all test cases are blocked. No
release for this board in this month.
5. ST Ericsson Snowball + Linux Linaro Quantal (Column P):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFJ4X…
SD/MMC test works well now, I/O error has been eliminated. Kernel panic has
gone in power management test but another test case "thermal_03.1" failed
there. "Reboot" & HDMI display are still unavailable. All other features
work well.
For the previous week test summary (Calendar Week 12), please refer to
attachment.
Thank you.
Best Regards
Botao Sun