Subject: Re: [PATCH][MIPS] fix the installation condition of MIPS clocksource

From: Ralf Baechle <[email-masked]>
Date: Wed, 12 Mar 2008 14:02:01 +0000

On Mon, Feb 18, 2008 at 11:04:59PM +0900, Yoichi Yuasa wrote:

> MIPS clocksource has been installed on DEC 5000/200(R3000).
> The installation condition of MIPS clocksource is wrong.

A bug indeed but I figured it was cleaner to have init_mips_clocksource()
itself check for the presence of an r4k style counter like other
device initialitation functions.  So I went for a different fix for
both 2.6.24 and master.

Thanks for raising the issue,

  Ralf

---

From: Yoichi Yuasa <[email-masked]>
Date: Wed, 12 Mar 2008 23:50:02 +0900

Hi Ralf,

On Wed, 12 Mar 2008 14:02:01 +0000

> Thanks for raising the issue,

I think it has a one more bug.

Signed-off-by: Yoichi Yuasa <[email-masked]>

diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/arch/mips/kernel/time.c linux/arch/mips/kernel/time.c
--- linux-orig/arch/mips/kernel/time.c	2008-03-12 23:42:37.492242141 +0900
+++ linux/arch/mips/kernel/time.c	2008-03-12 23:44:47.819669076 +0900
@@ -157,6 +157,6 @@ void __init time_init(void)
 {
 	plat_time_init();
 
-	if (mips_clockevent_init() || !cpu_has_mfc0_count_bug())
+	if (!mips_clockevent_init() || !cpu_has_mfc0_count_bug())
 		init_mips_clocksource();
 }

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 17 Mar 2008 13:05:19 +0000

> I think it has a one more bug.

Applied.

  Ralf