Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Fix hang in freeze_processes during hibernation
- Change soft_restart to use non-tracing raw_local_irq_disable
Patches based on v3.13 tag, verified hibernation on beaglebone black on a branch
based on 3.13 merged with initial omap support from Russ Dill which be found here:
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
(includes v1 patchset)
[PATCH v3 1/3] Fix hibernation restore hang in freeze_processes
drivers/base/firmware_class.c | 1 +
1 file changed, 1 insertion(+)
Add handling for PM_RESTORE_PREPARE notifier (unchanged from v1)
[PATCH v3 2/3] ARM: avoid tracers in soft_restart
arch/arm/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use raw_local_irq_disable in place of local_irq_disable to avoid
infinite abort recursion while tracing.
[PATCH v3 3/3] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 106 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 115 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v3:
--------------
* added comment to use of soft_restart
* drop irq disable soft_restart patch
* add patch to avoid tracers in soft_restart by using raw_local_irq_*
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Thanks,
Sebastian Capella
This revision of the series places any otherwise unmapped CPUs into a
cluster in order to avoid confusing the scheduler if no topology
information is provided. This means that we should never bring up a CPU
with no topology information so while the warning is still present and
has been upgraded it should never triger unless there is a genuine bug
(as opposed to missing information).
Mark Brown (4):
arm64: topology: Implement basic CPU topology support
arm64: topology: Add support for topology DT bindings
arm64: topology: Tell the scheduler about the relative power of cores
arm64: topology: Provide relative power numbers for cores
arch/arm64/Kconfig | 24 +++
arch/arm64/include/asm/topology.h | 39 ++++
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/smp.c | 11 ++
arch/arm64/kernel/topology.c | 388 ++++++++++++++++++++++++++++++++++++++
5 files changed, 463 insertions(+)
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Change soft_restart to use non-tracing raw_local_irq_disable
Patches based on v3.13 tag, verified hibernation on beaglebone black on a
branch based on 3.13 merged with initial omap support from Russ Dill which
can be found here (includes v1 patchset):
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
[PATCH v4 1/2] ARM: avoid tracers in soft_restart
arch/arm/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use raw_local_irq_disable in place of local_irq_disable to avoid
infinite abort recursion while tracing. (unchanged since v3)
[PATCH v4 2/2] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 113 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 122 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v4:
--------------
* updated comment for soft_restart with review feedback
* dropped freeze_processes patch which was queued separately
to 3.14 by Rafael Wysocki:
https://lkml.org/lkml/2014/2/25/683
Changes in v3:
--------------
* added comment to use of soft_restart
* drop irq disable soft_restart patch
* add patch to avoid tracers in soft_restart by using raw_local_irq_*
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Thanks,
Sebastian Capella
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Change soft_restart to use non-tracing raw_local_irq_disable
Patches based on v3.13 tag, verified hibernation on beaglebone black on a
branch based on 3.13 merged with initial omap support from Russ Dill which
can be found here (includes v1 patchset):
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
[PATCH v5 1/2] ARM: avoid tracers in soft_restart
arch/arm/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use raw_local_irq_disable in place of local_irq_disable to avoid
infinite abort recursion while tracing. (unchanged since v3)
[PATCH v5 2/2] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 113 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 122 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v5:
--------------
* Checkpatch warning on trailing whitespace
Changes in v4:
--------------
* updated comment for soft_restart with review feedback
* dropped freeze_processes patch which was queued separately
to 3.14 by Rafael Wysocki:
https://lkml.org/lkml/2014/2/25/683
Changes in v3:
--------------
* added comment to use of soft_restart
* drop irq disable soft_restart patch
* add patch to avoid tracers in soft_restart by using raw_local_irq_*
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Thanks,
Sebastian Capella
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Change soft_restart to use non-tracing raw_local_irq_disable
Patches based on v3.13 tag, verified hibernation on beaglebone black on a
branch based on 3.13 merged with initial omap support from Russ Dill which
can be found here (includes v1 patchset):
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
[PATCH v4 1/2] ARM: avoid tracers in soft_restart
arch/arm/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use raw_local_irq_disable in place of local_irq_disable to avoid
infinite abort recursion while tracing. (unchanged since v3)
[PATCH v4 2/2] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 113 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 122 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v4:
--------------
* updated comment for soft_restart with review feedback
* dropped freeze_processes patch which was queued separately
to 3.14 by Rafael Wysocki:
https://lkml.org/lkml/2014/2/25/683
Changes in v3:
--------------
* added comment to use of soft_restart
* drop irq disable soft_restart patch
* add patch to avoid tracers in soft_restart by using raw_local_irq_*
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Thanks,
Sebastian Capella
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Fix hang in freeze_processes during hibernation
- add an irq disabled version of soft_restart
Patches based on v3.13 tag, verified hibernation on beaglebone black on a branch
based on 3.13 merged with initial omap support from Russ Dill which be found here:
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
[PATCH RFC v1 1/3] ARM: Add irq disabled version of soft_restart.
arch/arm/include/asm/system_misc.h | 1 +
arch/arm/kernel/process.c | 15 ++++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
Adds the ability to run soft restart with local_irq/fiq_disable
Useful in hibernation code paths
[PATCH RFC v1 2/3] Fix hibernation restore hang in freeze_processes
drivers/base/firmware_class.c | 1 +
1 file changed, 1 insertion(+)
Add handling for PM_RESTORE_PREPARE notifier
[PATCH RFC v1 3/3] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 106 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 115 insertions(+)
Adds support for ARM based hibernation
Additional notes:
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
From: Mark Brown <broonie(a)linaro.org>
The driver reads from the DC offset control registers during callibration
but since the registers are marked as volatile and there is a register
cache the values will not be read from the hardware after the first reading
rendering the callibration ineffective.
It appears that the driver was originally written for the ASoC level
register I/O code but converted to regmap prior to merge and this issue
was missed during the conversion as the framework level volatile register
functionality was not being used.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
Cc: stable(a)vger.kernel.org
---
sound/soc/codecs/da732x.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 8e2c74d..798eb43 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = {
},
};
+static bool da732x_volatile(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case DA732X_REG_HPL_DAC_OFF_CNTL:
+ case DA732X_REG_HPR_DAC_OFF_CNTL:
+ return true;
+ default:
+ return false;
+ }
+}
+
static const struct regmap_config da732x_regmap = {
.reg_bits = 8,
.val_bits = 8,
.max_register = DA732X_MAX_REG,
+ .volatile_reg = da732x_volatile,
.reg_defaults = da732x_reg_cache,
.num_reg_defaults = ARRAY_SIZE(da732x_reg_cache),
.cache_type = REGCACHE_RBTREE,
--
1.9.0.rc3
Use the scheduler documented default for unknown CPUs rather than
assigning them to a cluster.
Mark Brown (4):
arm64: topology: Implement basic CPU topology support
arm64: topology: Add support for topology DT bindings
arm64: topology: Tell the scheduler about the relative power of cores
arm64: topology: Provide relative power numbers for cores
arch/arm64/Kconfig | 24 +++
arch/arm64/include/asm/topology.h | 39 ++++
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/smp.c | 11 ++
arch/arm64/kernel/topology.c | 380 ++++++++++++++++++++++++++++++++++++++
5 files changed, 455 insertions(+)
cpufreq_update_policy() calls cpufreq_driver->get() to get current frequency of
a CPU and it is not supposed to fail or return zero. Return error in case that
happens.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
V1->V2:
- Fixed return error to EIO instead of EINVAL
- Added WARN_ON() to flag get() failing and hence removed the print message as
well which was earlier printed during errors.
drivers/cpufreq/cpufreq.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index c755b5f..bf80502 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2139,6 +2139,11 @@ int cpufreq_update_policy(unsigned int cpu)
*/
if (cpufreq_driver->get) {
new_policy.cur = cpufreq_driver->get(cpu);
+ if (WARN_ON(!new_policy.cur)) {
+ ret = -EIO;
+ goto no_policy;
+ }
+
if (!policy->cur) {
pr_debug("Driver did not initialize current freq");
policy->cur = new_policy.cur;
--
1.7.12.rc2.18.g61b472e
Hi,
I am learning building arm64 kernel on:
https://wiki.linaro.org/HowTo/BuildArm64Kernel
I followed the page and started the kernel, because I didn't indicate a mmc
deivce,
the console outputs as below:
VFS: Cannot open root device "vda2" or unknown-block(254,2): error -6
Please append a correct "root=" boot option; here are the available
partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(254,2)
I had download the pre-built root filesystem, but I don't know how to use
it.
Could anyone tell me how to mount rootfs? Thank you!
--
Regards,
Zhi-zhou
The cpu_load decays on time according past cpu load of rq. The sched_avg also decays tasks' load on time. Now we has 2 kind decay for cpu_load. That is a kind of redundancy. And increase the system load by decay calculation. This patch try to remove the cpu_load decay.
There are 5 load_idx used for cpu_load in sched_domain. busy_idx and idle_idx are not zero usually, but newidle_idx, wake_idx and forkexec_idx are all zero on every arch. A shortcut to remove cpu_Load decay in the first patch. just one line patch for this change.
V2,
1, This version do some tuning on load bias of target load, to maximum match current code logical.
2, Got further to remove the cpu_load in rq.
3, Revert the patch 'Limit sd->*_idx range on sysctl' since no needs
Any testing/comments are appreciated.
This patch rebase on latest tip/master.
The git tree for this patchset at:
git@github.com:alexshi/power-scheduling.git noload
Thanks
Alex
Patches adding support for hibernation on ARM
- ARM hibernation / suspend-to-disk
- Fix hang in freeze_processes during hibernation
- add an irq disabled version of soft_restart
Patches based on v3.13 tag, verified hibernation on beaglebone black on a branch
based on 3.13 merged with initial omap support from Russ Dill which be found here:
http://git.linaro.org/git-ro/people/sebastian.capella/linux.git hibernation_3.13_russMerge
(includes v1 patchset)
[PATCH v2 1/3] ARM: Add irq disabled version of soft_restart.
arch/arm/include/asm/system_misc.h | 1 +
arch/arm/kernel/process.c | 15 ++++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
Adds the ability to run soft restart with local_irq/fiq_disable
Useful in hibernation code paths (unchanged from v1)
[PATCH v2 2/3] Fix hibernation restore hang in freeze_processes
drivers/base/firmware_class.c | 1 +
1 file changed, 1 insertion(+)
Add handling for PM_RESTORE_PREPARE notifier (unchanged from v1)
[PATCH v2 3/3] ARM hibernation / suspend-to-disk
arch/arm/include/asm/memory.h | 1 +
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/hibernate.c | 104 +++++++++++++++++++++++++++++++++++++++++
arch/arm/mm/Kconfig | 5 ++
include/linux/suspend.h | 2 +
5 files changed, 113 insertions(+)
Adds support for ARM based hibernation
Additional notes:
-----------------
There are two checkpatch warnings added by this patch. These follow
behavior in existing hibernation implementations on other platforms.
WARNING: externs should be avoided in .c files
#116: FILE: arch/arm/kernel/hibernate.c:26:
+extern const void __nosave_begin, __nosave_end;
This extern is picking up the linker nosave region definitions, only
used in hibernate. Follows same extern line used mips, powerpc, s390,
sh, sparc, x86 & unicore32
WARNING: externs should be avoided in .c files
#191: FILE: arch/arm/kernel/hibernate.c:101:
+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp);
This extern is used in the arch/arm/ in hibernate, process and bL_switcher
Changes in v2:
--------------
* Removed unneeded flush_thread, use of __naked and cpu_init.
* dropped Cyril Chemparathy <cyril(a)ti.com> from Cc: list as
emails are bouncing.
Patchset related to hibernation resume:
- enhancement to make the use of an existing resume file more general
Patch is based on the 3.13 tag. This was tested on a Beaglebone black
with partial hibernation support, also compiled for x86_64.
[PATCH v9 1/1] PM / Hibernate: use name_to_dev_t to parse resume
kernel/power/hibernate.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
Use name_to_dev_t to parse the /sys/power/resume file making the
syntax more flexible. It supports the previous use syntax
and additionally can support other formats such as
/dev/devicenode and UUID= formats.
By changing /sys/debug/resume to accept the same syntax as
the resume=device parameter, we can parse the resume=device
in the initrd init script and use the resume device directly
from the kernel command line.
Changes in v9:
--------------
* Dropped util changes based on feedback
* Reverted to handling newlines in resume_store
Changes in v8:
--------------
* Dropped cleanup checkpatch warnings in hibernate.c file
* Review comments for more compact checking in hibernate.c
Changes in v7:
--------------
* Switch to trim only one trailing newline if present using kstrdup_trimnl
* remove kstrimdup patch
* add kstrdup_trimnl patch
* Add clean up patch for kernel/power/hibernate.c checkpatch warnings
Changes in v6:
--------------
* Revert tricky / confusing while loop indexing
Changes in v5:
--------------
* Change kstrimdup to minimize allocated memory. Now allocates only
the memory needed for the string instead of using strim.
Changes in v4:
--------------
* Dropped name_to_dev_t rework in favor of adding kstrimdup
* adjusted resume_store
Changes in v3:
--------------
* Dropped documentation patch as it went in through trivial
* Added patch for name_to_dev_t to support directly parsing userspace
buffer
Changes in v2:
--------------
* Added check for null return of kstrndup in hibernate.c
Thanks,
Sebastian
From: Mark Brown <broonie(a)linaro.org>
On systems which were not booted using DT it is entirely unsurprising that
device nodes don't have any DT information and this is going to happen for
every single device in the system. Make pinctrl be less chatty about this
situation by only logging in the case where we have DT.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/pinctrl/devicetree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 340fb4e6c600..eda13de2e7c0 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -186,7 +186,9 @@ int pinctrl_dt_to_map(struct pinctrl *p)
/* CONFIG_OF enabled, p->dev not instantiated from DT */
if (!np) {
- dev_dbg(p->dev, "no of_node; not parsing pinctrl DT\n");
+ if (of_have_populated_dt())
+ dev_dbg(p->dev,
+ "no of_node; not parsing pinctrl DT\n");
return 0;
}
--
1.9.rc1
This patchset creates/calls cpufreq suspend/resume callbacks from dpm_{suspend|resume}()
for handling suspend/resume of cpufreq governors and core.
There are multiple problems that are fixed by this patch:
- Nishanth Menon (TI) found an interesting problem on his platform, OMAP. His board
wasn't working well with suspend/resume as calls for removing non-boot CPUs
was turning out into a call to drivers ->target() which then tries to play
with regulators. But regulators and their I2C bus were already suspended and
this resulted in a failure. Many platforms have such problems, samsung, tegra,
etc.. They solved it with driver specific PM notifiers where they used to
disable their driver's ->target() routine.
- Lan Tianyu (Intel) & Jinhyuk Choi (Broadcom) found an issue where tunables
configuration for clusters/sockets with non-boot CPUs was getting lost after
suspend/resume, as we were notifying governors with CPUFREQ_GOV_POLICY_EXIT on
removal of the last cpu for that policy and so deallocating memory for
tunables. This is fixed by this patch as we don't allow any operation on
governors after device suspend and before device resume now.
This is already tested by few people and so incorporating their Tested-by as
well.
I have tested this again on latest stuff on my thinkpad for several
suspend/resume cycles.
Viresh Kumar (7):
cpufreq: suspend governors on system suspend/hibernate
cpufreq: suspend governors from dpm_{suspend|resume}()
cpufreq: call driver's suspend/resume for each policy
cpufreq: Implement cpufreq_generic_suspend()
cpufreq: exynos: Use cpufreq_generic_suspend()
cpufreq: s5pv210: Use cpufreq_generic_suspend()
cpufreq: Tegra: Use cpufreq_generic_suspend()
drivers/base/power/main.c | 5 ++
drivers/cpufreq/cpufreq.c | 133 ++++++++++++++++++++++----------------
drivers/cpufreq/exynos-cpufreq.c | 96 ++-------------------------
drivers/cpufreq/s5pv210-cpufreq.c | 49 +-------------
drivers/cpufreq/tegra-cpufreq.c | 46 ++-----------
include/linux/cpufreq.h | 11 ++++
6 files changed, 108 insertions(+), 232 deletions(-)
--
1.7.12.rc2.18.g61b472e
The cpu_load decays on time according past cpu load of rq. The sched_avg
also decays tasks' load on time. Now we has 2 kind decay for cpu_load.
That is a kind of redundancy. And increase the system load by decay
calculation. This patch try to remove the cpu_load decay.
There are 5 load_idx used for cpu_load in sched_domain. busy_idx and
idle_idx are not zero usually, but newidle_idx, wake_idx and forkexec_idx
are all zero on every arch. A shortcut to remove cpu_Load decay in the first
patch. just one line patch for this change.
V3,
1, correct the wake_affine bias. Thanks for Morten's reminder!
2, replace source_load by weighted_cpuload for better function name meaning.
V2,
1, This version do some tuning on load bias of target load.
2, Got further to remove the cpu_load in rq.
3, Revert the patch 'Limit sd->*_idx range on sysctl' since no needs
Any testing/comments are appreciated.
This patch rebase on latest tip/master.
The git tree for this patchset at:
git@github.com:alexshi/power-scheduling.git noload
From: Mark Brown <broonie(a)linaro.org>
The da732x driver no longer uses the ASoC level register cache but the
cache size setting had been left in the driver by mistake. Remove it.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/codecs/da732x.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index f295b65..8e2c74d 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1554,7 +1554,6 @@ static struct snd_soc_codec_driver soc_codec_dev_da732x = {
.dapm_routes = da732x_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(da732x_dapm_routes),
.set_pll = da732x_set_dai_pll,
- .reg_cache_size = ARRAY_SIZE(da732x_reg_cache),
};
static int da732x_i2c_probe(struct i2c_client *i2c,
--
1.9.0.rc3
From: Vijaya Kumar K <Vijaya.Kumar(a)caviumnetworks.com>
Based on the step-handler and break-handler hooks patch from
Sandeepa, KGDB debugging support is added for EL1
debug in AArch64 mode.
In first patch, PSTATE.D is set correctly
In second patch,register layout is updated to be inline with GDB tool.
Basic GDB connection, break point set/clear and info commands
are supported except step/next debugging
With second patch, step/next debugging support is added, where in
pc is updated to point to the instruction to be stepped and
stopped.
With third patch, the compile time breakpoint instruction
reordering is fixed by making kgbd_breakpoint() as noinline
Tested with ARM64 simulator
v9:
- minor code movement comments fix
v8:
- fixed comments on local_dbg_{save,restore} macros
- instruction_pointer() macro to return unsigned long to fix
compilation warnings
v7:
- Changes made to set PSTATE.D properly
- Performed KGDB boot tests
- Fixed compilation warnings in driver/misc/kgbdts.c
Results:
kgdb boot test:
[32927.237895] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[32927.266066] kgdb: Registered I/O driver kgdbts.
[32927.266419] kgdb: Waiting for connection from remote gdb...
[32927.268598] kgdbts:RUN plant and detach test
[32927.270683] kgdbts:RUN sw breakpoint test
[32927.287659] kgdbts:RUN bad memory access test
[32927.290322] kgdbts:RUN singlestep test 1000 iterations
[32927.330342] kgdbts:RUN singlestep [0/1000]
[32931.286356] kgdbts:RUN singlestep [100/1000]
[32935.242536] kgdbts:RUN singlestep [200/1000]
[32939.205392] kgdbts:RUN singlestep [300/1000]
[32943.169522] kgdbts:RUN singlestep [400/1000]
[32947.231868] kgdbts:RUN singlestep [500/1000]
[32951.188008] kgdbts:RUN singlestep [600/1000]
[32955.332243] kgdbts:RUN singlestep [700/1000]
[32959.467109] kgdbts:RUN singlestep [800/1000]
[32963.430888] kgdbts:RUN singlestep [900/1000]
[32967.346992] kgdbts:RUN do_fork for 100 breakpoints
kgdb test from sysfs:
~ # echo V1F1000 > /sys/module/kgdbts/parameters/kgdbts
[33231.554237] kgdb: Registered I/O driver kgdbts.
[33231.554677] kgdbts:RUN plant and detach test
[33231.557072] kgdbts:RUN sw breakpoint test
[33231.576980] kgdbts:RUN bad memory access test
[33231.580022] kgdbts:RUN singlestep test 1000 iterations
[33231.627056] kgdbts:RUN singlestep [0/1000]
[33235.954027] kgdbts:RUN singlestep [100/1000]
[33240.429086] kgdbts:RUN singlestep [200/1000]
[33244.687118] kgdbts:RUN singlestep [300/1000]
[33248.945191] kgdbts:RUN singlestep [400/1000]
[33253.203751] kgdbts:RUN singlestep [500/1000]
[33257.462019] kgdbts:RUN singlestep [600/1000]
[33261.817809] kgdbts:RUN singlestep [700/1000]
[33266.081268] kgdbts:RUN singlestep [800/1000]
[33270.339813] kgdbts:RUN singlestep [900/1000]
[33274.712404] kgdbts:RUN do_fork for 1000 breakpoints
~ #
v6:
- Change pstate register to 8 bytes to make endian nuetral.
Use GDB below GDB patch to display pstate in Big endian mode.
https://sourceware.org/ml/gdb-patches/2013-12/msg00720.html
Thanks to Andrew.
v5:
- Updated BRK #imm16 value to 0x400 & 0x401 as per recommendation
as per Marcus recommendataion
http://patchwork.ozlabs.org/patch/290801/
- Rebased to 3.13 AArch64 kernel
v4:
- Updated kgdb_single_step and kgdb_cpu_doing_single_step
variables properly based on gdb state
v3:
- Rebased to v4 version of Sandeepa Prabhu's patch (patch 1)
- Made dynamic break point instruction encoding generic
- Made ESR value encoding generic for dynamic and compile break point
- Used memcpy and memset to copy register contents to gdb buffer
- Fixed reordering of break point instruction by compiler with
patch 3
- Rebased against AAach64 upstream kernel
v2:
- Moved break instruction encoding to debug-monitors.h file
- Fixed endianess of compile break instruction encoding
- Updated I/O buffer sizes
- Updated register buffer size
- Remove changes to debug_exception handler in entry.S for
- ELR update and step debugging with update pc instead of ELR
- Rebased against AArch64 upstream kernel
v1:
- Initial patch-set
Vijaya Kumar K (6):
arm64: Add macros to manage processor debug state
arm64: KGDB: Add Basic KGDB support
arm64: KGDB: Add step debugging support
KGDB: make kgdb_breakpoint() as noinline
misc: debug: remove compilation warnings
arm64: KGDB: Add KGDB config
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/debug-monitors.h | 64 ++++--
arch/arm64/include/asm/irqflags.h | 23 +++
arch/arm64/include/asm/kgdb.h | 84 ++++++++
arch/arm64/include/asm/ptrace.h | 2 +-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/debug-monitors.c | 1 +
arch/arm64/kernel/kgdb.c | 336 +++++++++++++++++++++++++++++++
kernel/debug/debug_core.c | 2 +-
9 files changed, 495 insertions(+), 19 deletions(-)
create mode 100644 arch/arm64/include/asm/kgdb.h
create mode 100644 arch/arm64/kernel/kgdb.c
--
1.7.9.5
Governors might use cpufreq_global_kobject when they don't have governor per
policy. And so they must initialize it with a call to
cpufreq_get_global_kobject(). Also after removing sysfs entries we must take the
refcount down as well with a call to: cpufreq_put_global_kobject().
If above isn't done we will see following boot crash:
kernel BUG at /home/arm/work/kernel/mywork/linux.git/fs/sysfs/group.c:92!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.0-rc1-00852-g293953e-dirty #171
task: ee094000 ti: ee092000 task.ti: ee092000
PC is at internal_create_group+0x1f0/0x224
LR is at cpufreq_governor_interactive+0x13c/0x504
pc : [<c01094a0>] lr : [<c02aff44>] psr: 60000113
sp : ee093c90 ip : 00013880 fp : ee301368
r10: ee301300 r9 : c05084f0 r8 : c0531814
r7 : 00000000 r6 : ee105640 r5 : ee301300 r4 : ee105640
r3 : c0531a88 r2 : c0531814 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 4000406a DAC: 00000015
<snip>
[<c01094a0>] (internal_create_group) from [<c02aff44>] (cpufreq_governor_interactive+0x13c/0x504)
[<c02aff44>] (cpufreq_governor_interactive) from [<c02ab090>] (__cpufreq_governor+0x78/0x1f0)
[<c02ab090>] (__cpufreq_governor) from [<c02ac224>] (cpufreq_set_policy+0x144/0x1c8)
[<c02ac224>] (cpufreq_set_policy) from [<c02ac530>] (cpufreq_init_policy+0x54/0x80)
[<c02ac530>] (cpufreq_init_policy) from [<c02ad8b0>] (__cpufreq_add_dev.isra.27+0x72c/0x804)
[<c02ad8b0>] (__cpufreq_add_dev.isra.27) from [<c0223610>] (subsys_interface_register+0x80/0xc4)
[<c0223610>] (subsys_interface_register) from [<c02ac890>] (cpufreq_register_driver+0xb8/0x214)
[<c02ac890>] (cpufreq_register_driver) from [<c02b0744>] (exynos_cpufreq_probe+0xf4/0x1a0)
[<c02b0744>] (exynos_cpufreq_probe) from [<c0225808>] (platform_drv_probe+0x18/0x48)
[<c0225808>] (platform_drv_probe) from [<c0224498>] (driver_probe_device+0x100/0x218)
[<c0224498>] (driver_probe_device) from [<c022463c>] (__driver_attach+0x8c/0x90)
[<c022463c>] (__driver_attach) from [<c0222cb8>] (bus_for_each_dev+0x54/0x88)
[<c0222cb8>] (bus_for_each_dev) from [<c0223c78>] (bus_add_driver+0xd4/0x1d0)
[<c0223c78>] (bus_add_driver) from [<c0224c58>] (driver_register+0x78/0xf4)
[<c0224c58>] (driver_register) from [<c0008854>] (do_one_initcall+0xe4/0x140)
[<c0008854>] (do_one_initcall) from [<c04c8c68>] (kernel_init_freeable+0xfc/0x1c8)
[<c04c8c68>] (kernel_init_freeable) from [<c0379abc>] (kernel_init+0x8/0x118)
[<c0379abc>] (kernel_init) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
Code: ebfc504c eaffffe0 e3500000 1affff8e (e7f001f2)
---[ end trace 04d313d9fc559575 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
Todd,
You need this patch for all kernels after 3.10. Not sure if android has already
hit 3.11 or not.. Though I haven't seena a branch for that :)
drivers/cpufreq/cpufreq_interactive.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index ff77b30..5286e57 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -1157,6 +1157,9 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
if (!have_governor_per_policy())
common_tunables = tunables;
+ if (!have_governor_per_policy())
+ WARN_ON(cpufreq_get_global_kobject());
+
rc = sysfs_create_group(get_governor_parent_kobj(policy),
get_sysfs_attr());
if (rc) {
@@ -1185,6 +1188,10 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
sysfs_remove_group(get_governor_parent_kobj(policy),
get_sysfs_attr());
+
+ if (!have_governor_per_policy())
+ cpufreq_put_global_kobject();
+
kfree(tunables);
common_tunables = NULL;
}
--
1.7.12.rc2.18.g61b472e