Subject: [PATCH 0/2] Alchemy: fix interrupt routing

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 5 Dec 2007 19:08:18 +0300

Hello.

   The two following patches together fix the interrupt routing currently broken
and causing boot failure with such messages:

unexpected IRQ # 8
irq 8, desc: 80406dd0, depth: 1, count: 0, unhandled: 0
->handle_irq():  80157d70, handle_bad_irq+0x0/0x38c
->chip(): 804016d0, 0x804016d0
->action(): 00000000
  IRQ_DISABLED set

   The patches are against the Linus' tree...

WBR, Sergei

---

From: Manuel Lauss <[email-masked]>
Date: Wed, 05 Dec 2007 17:39:10 +0100

Sergei,

>    The patches are against the Linus' tree...

Thanks a billion!
Finally I can boot linux-2.6.24-rc on my Au1200 again!

-- 
Manuel Lauss
HSSE / FH Hagenberg

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 5 Dec 2007 18:23:53 +0000

> Finally I can boot linux-2.6.24-rc on my Au1200 again!

And with a bit of luck Alchemy will now support tickless, too.

  Ralf

---

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 05 Dec 2007 21:29:38 +0300

> And with a bit of luck Alchemy will now support tickless, too.

    Sigh. If only it had working PCI... :-(

WBR, Sergei

---

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 05 Dec 2007 21:57:24 +0300

> And with a bit of luck Alchemy will now support tickless, too.

    It works:

Timer Stats Version: v0.2
Sample period: 8.024 s
     8,     1 swapper          __netdev_watchdog_up (dev_watchdog)
     8,     1 swapper          phy_connect (phy_timer)
     8,     1 swapper          phy_connect (phy_timer)
     7,     0 swapper          receive_chars (delayed_work_timer_fn)
     1,     1 swapper          cache_register (delayed_work_timer_fn)
     1,     1 swapper          neigh_table_init_no_netlink (neigh_periodic_timer)
     4,     1 swapper          queue_delayed_work_on (delayed_work_timer_fn)
     2,   866 mvltd            schedule_timeout (process_timeout)
     1,     0 swapper          page_writeback_init (wb_timer_fn)
     1,     1 init             schedule_timeout (process_timeout)
41 total events, 5.109 events/sec

WBR, Sergei

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 5 Dec 2007 19:12:08 +0000

> 41 total events, 5.109 events/sec

That's the expected behaviour, good.

One of the remaining problems on some platforms with tickless kernels is
that not all clocksource / clockevent driver combinations are playing
nicely with each other.  You can switch the clocksource driver manually
at runtime.  First let's see what clocksource we have:

  # cd /sys/devices/system/clocksource/clocksource0/
  # cat available_clocksource 
  MIPS pit jiffies 
  # cat current_clocksource 
  MIPS 

MIPS is the CP0 count register.  pit is the i8259 and jiffies simply counts
interrupts like in the old days so has problems with lost timer interrupts
and generally not such a great idea for tickless.  You should be able to
switch between all these drivers by something like:

  # echo jiffies > current_clocksource
  Time: jiffies clocksource has been installed.
  #

Try switching between all the available clocksources a few times to see if
that's working right also.

   Ralf

---

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 05 Dec 2007 22:22:20 +0300

>   # cat available_clocksource 

    I only have MIPS and jiffies of course. :-)

> that's working right also.

    It died after I selected jiffies.

WBR, Sergei