Re: timer interrupts during boot

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

 



Syed Khader a écrit :
On Thu, Nov 27, 2008 at 3:05 PM, Stephane Lambert
<stephane.lambert@xxxxxxxxxx> wrote:
Hi all,
I'm porting uClinux (linux kernel 2.6.19) on a new architecture and I have a

Which architecture?

            bad: scheduling from the idle thread!

and the dump_stack() function displays stack and call trace. (see below)
I suspect that this bad message is related to the timer interrupt.
Should the timer interrupts be enabled at this point?
Maybe I should allows timer interrupts only from cpu_idle..
Am I wrong?

1. Was the init task successfully created? The init thread is itself
created in init/main.c:rest_init():
2. Did you have correct sys_timer installed? You must have registered
a timer handler in your arch specific code(arch/arm/mach-youarch/)?
Did you verify sys_timer in the machine_desc initialized?

-syed


Hi
Thanks for your reply.
I'm porting uClinux on the CORTUS APS3 processor.

Concerning the init task (init process), it is created in rest_init() by calling the kernel_thread() function.

              kernel_thread()
                        |---> system_call()
                                       |---> sys_clone()
                                                      |---> do_fork()

Then, the init() function is called and performs a new kernel_thread() and runs the kthread() function. However, kthread() invokes the scheduler (it's at this point that (bad: scheduling from the idle thread!) printk message is printed..). The scheduler switch to the process previously created (switch_to() ) and run ksoftirqd .
But the cpu remains in a endless loop into ksoftirqd:

            while (!kthread_should_stop()) {
   493            preempt_disable();
   494                 if (!local_softirq_pending()) {
   495                     preempt_enable_no_resched();
   496                     schedule();
   497                     preempt_disable();
   498                }
            }

Concerning the timer interrupts:
Yes I have implemented the timer in my arch-specific directory. The gdb-trace of the boot shows that a timer interrupt occurs each
times do_fork() returns. Does it correct?

What do you mean by machine_desc?

Do you know if the timer interrupts need to be disabled until cpu_idle?

Thanks in advance.







--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux