CONFIG_EARLY_PRINTK on versatile broken in mainline
Grant Likely
grant.likely at secretlab.ca
Thu Apr 5 20:07:58 EDT 2012
On Thu, Apr 5, 2012 at 4:27 PM, Grant Likely <grant.likely at secretlab.ca> wrote:
> On Thu, Apr 5, 2012 at 4:19 PM, Grant Likely <grant.likely at secretlab.ca> wrote:
>> On Thu, Apr 5, 2012 at 4:08 PM, Fabio Estevam <festevam at gmail.com> wrote:
>>> On Thu, Apr 5, 2012 at 7:52 PM, Grant Likely <grant.likely at secretlab.ca> wrote:
>>>> Has anyone else had problems with CONFIG_EARLY_PRINTK on current
>>>> mainline? ARM versatile fails to boot on qemu when it is selected.
>>>> I've just started bisecting. v3.3 is okay, but current mainline is
>>>> broken. Output stops after dumping out the memblock regions, and
>>>> __log_buf stops at the same place.
>>>
>>> Please try this patch:
>>> http://permalink.gmane.org/gmane.linux.ports.arm.kernel/158694
>>
>> I've already had that fix applied. This is a different issue. The
>> kernel boots fine if CONFIG_EARLY_PRINTK isn't defined.
>
> Update: I'm still investigating, but it bisects out to this commit:
>
> commit 94e5a85b3be0ce109d26aa6812b2a02c518a0e4b
> Author: Russell King <rmk+kernel at arm.linux.org.uk>
> Date: Wed Jan 18 15:32:49 2012 +0000
>
> ARM: earlier initialization of vectors page
The following patch makes it boot. Calling printch() to output a
character right after early_trap_init() seems to unblock whatever was
wedging the system. A delay or a printk with "" format string doesn't
have any effect, it seems it must be a character output. This may be
a problem in the simulator. I've not been able to run this on real
hardware.
g.
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index b86f893..a6dafb1 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -995,6 +995,7 @@ void __init arm_mm_memblock_reserve(void)
* called function. This means you can't use any function or debugging
* method which may touch any device, otherwise the kernel _will_ crash.
*/
+extern void printch(int);
static void __init devicemaps_init(struct machine_desc *mdesc)
{
struct map_desc map;
@@ -1007,6 +1008,7 @@ static void __init devicemaps_init(struct
machine_desc *mdesc)
vectors = early_alloc(PAGE_SIZE);
early_trap_init(vectors);
+ printch('c');
for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
pmd_clear(pmd_off_k(addr));
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the linux-arm-kernel
mailing list