Hello,
We are using ARM foundation models for evaluation of ARMv8 architecture.
We are able to boot the prebuilt images as provided and directed by Linaro on the following link.
http://www.linaro.org/engineering/armv8/#tab1
But if we try to recompile the kernel as directed on following link (https://wiki.linaro.org/HowTo/BuildArm64Kernel)
we observed that Foundation model is not able to boot the kernel completely.
The following is the error message "Starting Boolog daemon: bootlogd: cannot find console device 204:64 under /dev"
I screened throughout the linaro site as well as on Google but didn't get any fix suitable for it.
I have fixed this bug and would like to submit the patch to linaro upstream branch.
Could you please review the patch and let me know how I can upload it to Linaro so that other developers can also use it.
PFA the patch for the same.
Thanks & BR,
Sagar Kadam
On 11/13/2012 10:52 PM, Julius Werner wrote:
> Many cpuidle drivers measure their time spent in an idle state by
> reading the wallclock time before and after idling and calculating the
> difference. This leads to erroneous results when the wallclock time gets
> updated by another processor in the meantime, adding that clock
> adjustment to the idle state's time counter.
>
> If the clock adjustment was negative, the result is even worse due to an
> erroneous cast from int to unsigned long long of the last_residency
> variable. The negative 32 bit integer will zero-extend and result in a
> forward time jump of roughly four billion milliseconds or 1.3 hours on
> the idle state residency counter.
>
> This patch changes all affected cpuidle drivers to use the monotonic
> clock for their measurements instead. It also removes the erroneous
> cast, making sure that negative residency values are applied correctly
> even though they should not appear anymore.
>
> Signed-off-by: Julius Werner <jwerner(a)chromium.org>
> ---
> arch/powerpc/platforms/pseries/processor_idle.c | 4 ++--
> drivers/acpi/processor_idle.c | 12 ++++++------
> drivers/cpuidle/cpuidle.c | 3 +--
> drivers/idle/intel_idle.c | 13 ++++---------
> 4 files changed, 13 insertions(+), 19 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
> index 45d00e5..4d806b4 100644
> --- a/arch/powerpc/platforms/pseries/processor_idle.c
> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
> @@ -36,7 +36,7 @@ static struct cpuidle_state *cpuidle_state_table;
> static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
> {
>
> - *kt_before = ktime_get_real();
> + *kt_before = ktime_get();
> *in_purr = mfspr(SPRN_PURR);
> /*
> * Indicate to the HV that we are idle. Now would be
> @@ -50,7 +50,7 @@ static inline s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
> get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
> get_lppaca()->idle = 0;
>
> - return ktime_to_us(ktime_sub(ktime_get_real(), kt_before));
> + return ktime_to_us(ktime_sub(ktime_get(), kt_before));
> }
>
> static int snooze_loop(struct cpuidle_device *dev,
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index e8086c7..8c98d73 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -751,9 +751,9 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
>
>
> lapic_timer_state_broadcast(pr, cx, 1);
> - kt1 = ktime_get_real();
> + kt1 = ktime_get();
> acpi_idle_do_entry(cx);
> - kt2 = ktime_get_real();
> + kt2 = ktime_get();
> idle_time = ktime_to_us(ktime_sub(kt2, kt1));
>
> /* Update device last_residency*/
> @@ -843,11 +843,11 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
> if (cx->type == ACPI_STATE_C3)
> ACPI_FLUSH_CPU_CACHE();
>
> - kt1 = ktime_get_real();
> + kt1 = ktime_get();
> /* Tell the scheduler that we are going deep-idle: */
> sched_clock_idle_sleep_event();
> acpi_idle_do_entry(cx);
> - kt2 = ktime_get_real();
> + kt2 = ktime_get();
> idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
> idle_time = idle_time_ns;
> do_div(idle_time, NSEC_PER_USEC);
> @@ -934,7 +934,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
> */
> lapic_timer_state_broadcast(pr, cx, 1);
>
> - kt1 = ktime_get_real();
> + kt1 = ktime_get();
> /*
> * disable bus master
> * bm_check implies we need ARB_DIS
> @@ -965,7 +965,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
> c3_cpu_count--;
> raw_spin_unlock(&c3_lock);
> }
> - kt2 = ktime_get_real();
> + kt2 = ktime_get();
> idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
> idle_time = idle_time_ns;
> do_div(idle_time, NSEC_PER_USEC);
Maybe you can remove all these computations and set the flag
en_core_tk_irqen for the driver ? That will be handled by the cpuidle
framework, no ?
Same comment for the intel_idle driver.
Thanks
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
When the generic ftrace implementation modifies code for trace-points it
uses stop_machine() to call ftrace_modify_all_code() on one CPU. This
ultimately calls the ARM specific function ftrace_modify_code() which
updates the instruction and then does flush_icache_range(). As this
cache flushing only operates on the local CPU then other cores may end
up execute the old instruction if it's still in their icaches.
This may or may not cause problems for the use of ftrace on kernels
compiled for ARM instructions. However, Thumb2 instructions can straddle
two cache lines so its possible for half the old instruction to be in
the cache and half the new one, leading the the CPU executing garbage.
This patch fixes this situation by providing and arch specific
implementation of arch_ftrace_update_code() which ensures that after one
core has modified all the code, the other cores invalidate their icaches
before continuing.
Signed-off-by: Jon Medhurst <tixy(a)linaro.org>
---
arch/arm/kernel/ftrace.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index 34e5664..38b670c 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -14,6 +14,7 @@
#include <linux/ftrace.h>
#include <linux/uaccess.h>
+#include <linux/stop_machine.h>
#include <asm/cacheflush.h>
#include <asm/opcodes.h>
@@ -156,6 +157,39 @@ int ftrace_make_nop(struct module *mod,
return ret;
}
+struct afmc_data {
+ int command;
+ atomic_t cpu;
+ atomic_t done;
+};
+
+static int __arch_ftrace_modify_code(void *data)
+{
+ struct afmc_data *afmcd = data;
+
+ if (atomic_inc_return(&afmcd->cpu) == num_online_cpus()) {
+ /* Last cpu to get into this function does the actual work */
+ ftrace_modify_all_code(afmcd->command);
+ wmb();
+ atomic_set(&afmcd->done, true);
+ } else {
+ /* Other cpus wait for the code modifications to be done */
+ rmb();
+ while (!atomic_read(&afmcd->done))
+ cpu_relax();
+ /* Ensure icache is consistent with the code changes */
+ __flush_icache_all();
+ }
+
+ return 0;
+}
+
+void arch_ftrace_update_code(int command)
+{
+ struct afmc_data afmcd = { command };
+ stop_machine(__arch_ftrace_modify_code, &afmcd, cpu_online_mask);
+}
+
int __init ftrace_dyn_arch_init(void *data)
{
*(unsigned long *)data = 0;
--
1.7.10.4
Currently when none of CONFIG_NET_DSA_TAG_DSA, CONFIG_NET_DSA_TAG_EDSA and
CONFIG_NET_DSA_TAG_TRAILER is defined, we get following compilation warnings:
net/dsa/slave.c:51:12: warning: 'dsa_slave_init' defined but not used [-Wunused-function]
net/dsa/slave.c:60:12: warning: 'dsa_slave_open' defined but not used [-Wunused-function]
net/dsa/slave.c:98:12: warning: 'dsa_slave_close' defined but not used [-Wunused-function]
net/dsa/slave.c:116:13: warning: 'dsa_slave_change_rx_flags' defined but not used [-Wunused-function]
net/dsa/slave.c:127:13: warning: 'dsa_slave_set_rx_mode' defined but not used [-Wunused-function]
net/dsa/slave.c:136:12: warning: 'dsa_slave_set_mac_address' defined but not used [-Wunused-function]
net/dsa/slave.c:164:12: warning: 'dsa_slave_ioctl' defined but not used [-Wunused-function]
Earlier approach to fix this was discussed here:
lkml.org/lkml/2012/10/29/549
This is another approach to fix it. This is done by some changes in config
options, which make more sense than the earlier approach. As, atleast one
tagging option must always be selected for using net/dsa/ infrastructure, this
patch selects NET_DSA from tagging configs instead of having it as an selectable
config.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
I am resending it as the earlier thread is lost somewhere in Maintainers mailbox
:)
drivers/net/dsa/Kconfig | 1 -
net/dsa/Kconfig | 16 +++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index dd151d5..96eae22 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -1,5 +1,4 @@
menu "Distributed Switch Architecture drivers"
- depends on NET_DSA
config NET_DSA_MV88E6XXX
tristate
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 9c09f6e..3588e54 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -1,5 +1,5 @@
config NET_DSA
- tristate "Distributed Switch Architecture support"
+ tristate
default n
depends on NETDEVICES && !S390
select PHYLIB
@@ -8,19 +8,21 @@ config NET_DSA
the Distributed Switch Architecture.
-if NET_DSA
+menu "Distributed Switch Architecture support"
# tagging formats
config NET_DSA_TAG_DSA
- bool
+ bool "Original DSA packet tagging format"
+ select NET_DSA
default n
config NET_DSA_TAG_EDSA
- bool
+ bool "Ethertype DSA packet tagging format"
+ select NET_DSA
default n
config NET_DSA_TAG_TRAILER
- bool
+ bool "Trailer DSA packet tagging format"
+ select NET_DSA
default n
-
-endif
+endmenu
--
1.7.12.rc2.18.g61b472e
https://wiki.linaro.org/projects/big.LITTLE.MP
big.LITTLE MP v12 has been built:
http://lists.linaro.org/pipermail/linaro-dev/2012-November/014490.html
Roadmap Cards
==============
http://cards.linaro.org/browse/CARD-190
No change from last status
QA
======
The paperwork for the TC2 board that has been stuck in customs in India and
it's release is hopefully imminent. This also coincides with some cleared
blockages for the QA team and the hardware coming on line in the lab. This
means our QA efforts can proceed much more efficiently.
Other efforts
============
On big.LITTLE MP kernel branch Vincent has finally found and patched the
root cause of a bug in the scheduler that generates spurious wake up of
idle CPU. He has spent some time to discuss the fix for the inclusion of
packing small tasks patches in the master branch, and is preparing the next
version of packing small tasks but i would like to come with figures for
real use case like mp3.
Mathieu is concentrating on benchmarking: being able to run same benchmark
with IKS MP and a15 to start comparing things.
--
David Zinman, Project Manager
Linaro.org | Open source software for ARM SoCs
--
David Zinman, Project Manager
Linaro.org | Open source software for ARM SoCs
There is no need to do cpufreq_get_cpu() and cpufreq_put_cpu() for drivers that
don't support getavg() routine.
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
drivers/cpufreq/cpufreq.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 85df538..f552d5f 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1511,12 +1511,14 @@ int __cpufreq_driver_getavg(struct cpufreq_policy *policy, unsigned int cpu)
{
int ret = 0;
+ if (!(cpu_online(cpu) && cpufreq_driver->getavg))
+ return 0;
+
policy = cpufreq_cpu_get(policy->cpu);
if (!policy)
return -EINVAL;
- if (cpu_online(cpu) && cpufreq_driver->getavg)
- ret = cpufreq_driver->getavg(policy, cpu);
+ ret = cpufreq_driver->getavg(policy, cpu);
cpufreq_cpu_put(policy);
return ret;
--
1.7.12.rc2.18.g61b472e
From: "hongbo.zhang" <hongbo.zhang(a)linaro.com>
the greater-than symbol ">" in if state isn't valid and a file named "0" will
be created in this case, "-gt" should be used instead.
Signed-off-by: hongbo.zhang <hongbo.zhang(a)linaro.com>
---
include/thermal_functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/thermal_functions.sh b/include/thermal_functions.sh
index 5b60698..f385ec1 100644
--- a/include/thermal_functions.sh
+++ b/include/thermal_functions.sh
@@ -42,7 +42,7 @@ check_valid_temp() {
local descr="'$zone_name'/'$file' ='$temp_val'"
log_begin "checking $descr"
- if [ $temp_val > 0 ]; then
+ if [ $temp_val -gt 0 ]; then
log_end "pass"
return 0
fi
--
1.8.0
Hello everybody
This time I want to post some information and questions about binary
blobs situation on Exynos5 devices. It means Samsung Chromebook and
Andale Board (I do not have data about other Exynos5 powered devices).
Chromebook ships with Chromium OS and under it has working OpenGL ES and
OpenMAX based video acceleration. I was able to play 1080p YouTube
videos both on internal and external screen without any slowdown.
But under normal GNU/Linux systems (Debian, Fedora, OpenSUSE, Ubuntu)
there is none of it...
We got OpenGL ES running by copying libmali and all symlinks pointing to
it (lib{EGL,GLES} etc) and taking care of /dev/mali* permissions. But we
can not make packages with it for our distibutions because of lack of
any license for it. Normal "this is proprietary binary, do not hack it
etc but you can distribute it freely" kind of license will be enough.
Android binaries for OpenGL ES are available for Andale Board. GNU/Linux
ones can be extracted from Chromebook recovery image (363MB download
extracting to ~1GB file). But lack of license anyway.
I know that we have ARM Ltd. people here, same with Samsung - maybe
someone can tell us what is going on in this area?
Other thing is video acceleration. I do not know is there a source for
it available or not. This is area where I do not have knowledge needed
to get it running. All I know is that Exynos5 itself is able to play
480p DivX encoded movie - did not yet tried 720p or 1080p ones but do
not think it will make it on it own.