Hi,
I tried booting linux-linaro-2.6.37 kernel on my beagle board C4. I executed
following:
1. Installed linaro on a 4 GB SD card using linaro-image-tools 0.4.1 with
hwpack daily snapshot hwpack_linaro-omap3_20110125-0_armel_supported.tar.gz
and linaro-natty-headless-tar-20101202-1.tar.gz. It was booting properly on
my BB.
2. Cloned linux-linaro-2.6.37. Changed to source directory
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- omap2plus_defconfig
4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig (enabled
EARLY_PRINTK)
5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
7. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/rootfs
8. cp arch/arm/boot/uImage /media/boot; sync
Everything went on smoothly. Then I put the SD card on BB and powered it on.
I got a kernel panic: http://paste.ubuntu.com/560562
Please help me figuring out the problem. Is it because I didn't create
uInitrd? If so, then how to create it for ARM?
Regards,
Avik
Hello Ming,
could you please give some pointers to observe an overall status of
oprofile support on ARM A9 cores? IIUC, now it doesn't work
without oprofile.timer=1 kernel option, at least for Linus' tree;
searching gives a lot of discussion/patches fragments and similar
stuff, but I was unable to find a complete patch/git tree/whatever
else to try.
Thanks in advance,
Dmitry
The usual cpuidle initialization routines are to register the
driver, then register a cpuidle device per cpu.
With the device's state count default initialization with the
driver's state count, the code initialization remains mostly the
same in the different drivers.
We can then add a new function 'cpuidle_register' where we register
the driver and the devices. These devices can be defined in a global
static variable in cpuidle.c. We will be able to factor out and
remove a lot of duplicate lines of code.
As we still have some drivers, with different initialization routines,
we keep 'cpuidle_register_driver' and 'cpuidle_register_device' as low
level initialization routines to do some specific operations on the
cpuidle devices.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/cpuidle.c | 34 ++++++++++++++++++++++++++++++++++
include/linux/cpuidle.h | 3 +++
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index b8a1faf..2a174e8 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -23,6 +23,7 @@
#include "cpuidle.h"
DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
+DEFINE_PER_CPU(struct cpuidle_device, cpuidle_device);
DEFINE_MUTEX(cpuidle_lock);
LIST_HEAD(cpuidle_detected_devices);
@@ -391,6 +392,39 @@ int cpuidle_register_device(struct cpuidle_device *dev)
EXPORT_SYMBOL_GPL(cpuidle_register_device);
+int cpuidle_register(struct cpuidle_driver *drv)
+{
+ int ret, cpu;
+ struct cpuidle_device *dev;
+
+ ret = cpuidle_register_driver(drv);
+ if (ret)
+ return ret;
+
+ for_each_online_cpu(cpu) {
+ dev = &per_cpu(cpuidle_device, cpu);
+ dev->cpu = cpu;
+
+ ret = cpuidle_register_device(dev);
+ if (ret)
+ goto out_unregister;
+ }
+
+out:
+ return ret;
+
+out_unregister:
+ for_each_online_cpu(cpu) {
+ dev = &per_cpu(cpuidle_device, cpu);
+ cpuidle_unregister_device(dev);
+ }
+
+ cpuidle_unregister_driver(drv);
+
+ goto out;
+}
+EXPORT_SYMBOL_GPL(cpuidle_register);
+
/**
* cpuidle_unregister_device - unregisters a CPU's idle PM feature
* @dev: the cpu
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index f3ebbba..17e3d33 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -133,6 +133,7 @@ struct cpuidle_driver {
#ifdef CONFIG_CPU_IDLE
extern void disable_cpuidle(void);
extern int cpuidle_idle_call(void);
+extern int cpuidle_register(struct cpuidle_driver *drv);
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
struct cpuidle_driver *cpuidle_get_driver(void);
extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
@@ -150,6 +151,8 @@ extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
#else
static inline void disable_cpuidle(void) { }
static inline int cpuidle_idle_call(void) { return -ENODEV; }
+static inline int cpuidle_register(struct cpuidle_driver *drv)
+{return -ENODEV; }
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
{return -ENODEV; }
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
--
1.7.5.4
The usual cpuidle initialization routines register the driver and
then register a cpuidle device per cpu.
By default, most drivers initialize the device state count with the
driver state count.
We can then add a new function 'cpuidle_register' where we register
the driver and the devices. These devices can be defined in a global
static variable in cpuidle.c. We will be able to factor out and
remove a lot of duplicate lines of code.
As we still have some drivers, with different initialization routines,
we keep 'cpuidle_register_driver' and 'cpuidle_register_device' as low
level initialization routines to do some specific operations on the
cpuidle devices.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/cpuidle.c | 42 ++++++++++++++++++++++++++++++++++++++++++
include/linux/cpuidle.h | 3 +++
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 87411ce..4d1f79b 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -23,6 +23,7 @@
#include "cpuidle.h"
DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
+DEFINE_PER_CPU(struct cpuidle_device, cpuidle_device);
DEFINE_MUTEX(cpuidle_lock);
LIST_HEAD(cpuidle_detected_devices);
@@ -419,6 +420,47 @@ int cpuidle_register_device(struct cpuidle_device *dev)
EXPORT_SYMBOL_GPL(cpuidle_register_device);
+/*
+ * cpuidle_register : register cpuidle driver and devices
+ * Note this function must be called after smp_init.
+ * @drv : the cpuidle driver
+ * Returns 0 on success, < 0 otherwise
+ */
+int cpuidle_register(struct cpuidle_driver *drv)
+{
+ int ret, cpu, i;
+ struct cpuidle_device *dev;
+
+ ret = cpuidle_register_driver(drv);
+ if (ret)
+ return ret;
+
+ for_each_online_cpu(cpu) {
+ dev = &per_cpu(cpuidle_device, cpu);
+ dev->cpu = cpu;
+
+ ret = cpuidle_register_device(dev);
+ if (ret)
+ goto out_unregister;
+ }
+
+out:
+ return ret;
+
+out_unregister:
+ for_each_online_cpu(i) {
+ if (i == cpu)
+ break;
+ dev = &per_cpu(cpuidle_device, i);
+ cpuidle_unregister_device(dev);
+ }
+
+ cpuidle_unregister_driver(drv);
+
+ goto out;
+}
+EXPORT_SYMBOL_GPL(cpuidle_register);
+
/**
* cpuidle_unregister_device - unregisters a CPU's idle PM feature
* @dev: the cpu
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 6c26a3d..3475294 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -135,6 +135,7 @@ struct cpuidle_driver {
#ifdef CONFIG_CPU_IDLE
extern void disable_cpuidle(void);
extern int cpuidle_idle_call(void);
+extern int cpuidle_register(struct cpuidle_driver *drv);
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
struct cpuidle_driver *cpuidle_get_driver(void);
extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
@@ -154,6 +155,8 @@ extern int cpuidle_play_dead(void);
#else
static inline void disable_cpuidle(void) { }
static inline int cpuidle_idle_call(void) { return -ENODEV; }
+static inline int cpuidle_register(struct cpuidle_driver *drv)
+{return -ENODEV; }
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
{return -ENODEV; }
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
--
1.7.5.4
Greetings,
I've just created linux-linaro-core-tracking branch in
git://git.linaro.org/kernel/linux-linaro-tracking.git.
It is based on mainline tip, and has all the Platform and Working Groups
topics which would appear in the next linux-linaro kernel release. No
topics from the Landing Teams there (this is what "core" implies). This
tree will be the basis for the next (12.05) linux-linaro kernel release.
So if you have a topic to be added to 12.05 you can ask me to add it
(the sooner you ask, the better), and it will appear in
linux-linaro-core-tracking first. The request to add a topic must
include the git tree location for me to pull the topic from, and the
base used by this topic (mainline, or another topic). If no base for the
topic is specified, the mainline is assumed. If needed, this is ok to
rebase the topic; this would be easier for me to handle than e.g.
reconfiguring my scripts to use topic-3.4rc5 branch instead of
topic-3.4rc4 branch used so far etc. Again, starting from now this tree
is open for the next release (12.05) topics.
The linux-linaro-core-tracking tree is first of all to identify the
conflicts early, so it could fail to build sometimes, or the kernel
built from it may not boot etc. The plan is to rebase this tree on the
current mainline tip daily. The topics causing the conflicts would be
excluded from the linux-linaro-core-tracking tree, and would be brought
back into it after the conflicts are resolved by the topic owners.
Thanks,
Andrey