qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sparc64: reimplement tick timers v2


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] sparc64: reimplement tick timers v2
Date: Wed, 20 Jan 2010 18:40:34 +0000

On Tue, Jan 19, 2010 at 10:24 PM, Igor Kovalenko
<address@hidden> wrote:
> On Tue, Jan 19, 2010 at 9:44 PM, Blue Swirl <address@hidden> wrote:
>> On Mon, Jan 18, 2010 at 10:28 PM, Igor V. Kovalenko
>> <address@hidden> wrote:
>>> From: Igor V. Kovalenko <address@hidden>
>>>
>>> sparc64 timer has tick counter which can be set and read,
>>> and tick compare value used as deadline to fire timer interrupt.
>>> The timer is not used as periodic timer, instead deadline
>>> is set each time new timer interrupt is needed.
>>
>> Does not compile:
>>
>>  CC    sparc64-softmmu/sun4u.o
>> cc1: warnings being treated as errors
>> /src/qemu/hw/sun4u.c: In function 'cpu_tick_set_count':
>> /src/qemu/hw/sun4u.c:467: error: implicit declaration of function
>> 'TIMER_DPRINTF'
>> make[1]: *** [sun4u.o] Error 1
>
> Sorry forgot the split out debugging piece. New v3 has all these
> comments addressed.
>
>> If I add the missing TIMER_DPRINTF, Linux still crashes:
>>
>> Memory: 117376k available (2136k kernel code, 664k data, 184k init)
>> [fffff80000000000,0000000007e80000]
>> SLUB: Genslabs=14, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
>> Hierarchical RCU implementation.
>> NR_IRQS:255
>> clocksource: mult[a0000] shift[16]
>> clockevent: mult[19999999] shift[32]
>> Console: colour dummy device 80x25
>> Unable to handle kernel NULL pointer dereference
>> tsk->{mm,active_mm}->context = 0000000000000000
>> tsk->{mm,active_mm}->pgd = fffff800006fdaa4
>>              \|/ ____ \|/
>>              "@'/ .. \`@"
>>              /_| \__/ |_\
>>                 \__U_/
>> swapper(0): Oops [#1]
>> TSTATE: 0000004480001607 TPC: 00000000006e32f4 TNPC: 00000000006e32f8
>> Y: 00000000    Not tainted
>> TPC: <calibrate_delay+0x94/0x2e0>
>
> Easy to reproduce here, and I still fail to find the reason for this crash.
> It looks like linux kernel loads zero values from memory while returning
> from timer softirq handler. Note this does not always happen at first timer
> interrupt inside calibrate_delay loop.

Maybe a bug with AG/MG/IG handling?

> I really want to see debug trace of all processed instructions, but
> qemu command line switch -singlestep does not really work for sparc64-softmmu
> and stepping through calibrate_delay does not seem to help at the moment.
> Any ideas on how to force all instructions after approx. 5000000 cpu
> cycles to be
> single stepped, so I get the trace in qemu.log ?

Fixing -singlestep should not be too difficult. :-)

For a quick hack, you could add a call to tb_flush() near the end of
cpu_exec() and hack gen_intermediate_code_internal() so that max_insns
is 1 (or 2 for delay slots?).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]