Re: 2.6.24-rc8 hangs at mfgpt-timer

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arnd Hannemann <hannemann@...>
Cc: <linux-kernel@...>, Jordan Crouse <jordan.crouse@...>
Date: Wednesday, January 16, 2008 - 5:56 pm

On Wed, 16 Jan 2008 16:19:12 -0500
Andres Salomon <dilinger@queued.net> wrote:



Also, could you provide a log with the following (untested) patch?  I'm
curious how many MFGPTs we're actually detecting as being available, and
the existing code is backwards.



From 0ea825fd564056ac653507517beb5cea9034e464 Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@debian.org>
Date: Wed, 16 Jan 2008 16:53:16 -0500
Subject: [PATCH] x86: geode: fix up ordering of messages during MFGPT detection

We're printing out informational messages in the wrong order while
probing for MFGPTs.  This changes the order so that we first display
the number of available timers that were detected before displaying
messages about how we actually are using those timers.

Signed-off-by: Andres Salomon <dilinger@debian.org>
---
 arch/x86/kernel/geode_32.c |    5 +----
 arch/x86/kernel/mfgpt_32.c |    7 +++----
 include/asm-x86/geode.h    |    2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kernel/geode_32.c b/arch/x86/kernel/geode_32.c
index f12d8c5..00b45ae 100644
--- a/arch/x86/kernel/geode_32.c
+++ b/arch/x86/kernel/geode_32.c
@@ -145,14 +145,11 @@ EXPORT_SYMBOL_GPL(geode_gpio_setup_event);
 
 static int __init geode_southbridge_init(void)
 {
-	int timers;
-
 	if (!is_geode())
 		return -ENODEV;
 
 	init_lbars();
-	timers = geode_mfgpt_detect();
-	printk(KERN_INFO "geode:  %d MFGPT timers available.\n", timers);
+	geode_mfgpt_detect();
 	return 0;
 }
 
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 0ab680f..d11cba3 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -70,14 +70,14 @@ __setup("nomfgpt", mfgpt_disable);
  * In other cases (such as with VSAless OpenFirmware), the system firmware
  * leaves timers available for us to use.
  */
-int __init geode_mfgpt_detect(void)
+void __init geode_mfgpt_detect(void)
 {
 	int count = 0, i;
 	u16 val;
 
 	if (disable) {
 		printk(KERN_INFO "geode-mfgpt:  Skipping MFGPT setup\n");
-		return 0;
+		return;
 	}
 
 	for (i = 0; i < MFGPT_MAX_TIMERS; i++) {
@@ -87,11 +87,10 @@ int __init geode_mfgpt_detect(void)
 			count++;
 		}
 	}
+	printk(KERN_INFO "geode-mfgpt:  %d MFGPT timers available.\n", count);
 
 	/* set up clock event device, if desired */
 	i = mfgpt_timer_setup();
-
-	return count;
 }
 
 int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable)
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index 771af33..1cb22cf 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -200,7 +200,7 @@ static inline u16 geode_mfgpt_read(int timer, u16 reg)
 	return inw(base + reg + (timer * 8));
 }
 
-extern int __init geode_mfgpt_detect(void);
+extern void __init geode_mfgpt_detect(void);
 extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable);
 extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable);
 extern int geode_mfgpt_alloc_timer(int timer, int domain, struct module *owner);
-- 
1.5.3.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Wed Jan 16, 1:44 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Andres Salomon, (Wed Jan 16, 5:19 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Andres Salomon, (Wed Jan 16, 5:56 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Thu Jan 17, 5:54 am)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Andres Salomon, (Thu Jan 17, 2:40 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Thu Jan 17, 3:53 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Thu Jan 17, 5:19 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Thu Jan 17, 5:50 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Thu Jan 17, 6:36 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Thu Jan 17, 6:52 pm)
Re: Geode GX/LX watchdog timer (RESEND), Jordan Crouse, (Mon Jan 21, 1:07 pm)
Re: Geode GX/LX watchdog timer (RESEND), Arnd Hannemann, (Mon Jan 21, 2:37 pm)
Re: Geode GX/LX watchdog timer (RESEND), Iain Paton, (Sun Feb 17, 10:14 am)
Re: Geode GX/LX watchdog timer (RESEND), Arnd Hannemann, (Sun Feb 17, 10:46 am)
Re: Geode GX/LX watchdog timer (RESEND), Adrian Bunk, (Sun Feb 17, 10:54 am)
Re: Geode GX/LX watchdog timer (RESEND), Iain Paton, (Sun Feb 17, 12:10 pm)
Re: Geode GX/LX watchdog timer (RESEND), Arnd Hannemann, (Sun Feb 17, 3:46 pm)
Re: Geode GX/LX watchdog timer (RESEND), Andres Salomon, (Sun Feb 17, 1:32 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Thu Jan 17, 6:57 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Thu Jan 17, 7:39 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Mon Jan 21, 7:27 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Tue Jan 22, 5:03 am)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Lars Heete, (Tue Jan 22, 6:11 am)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Tue Jan 22, 7:18 am)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Tue Jan 22, 3:27 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Arnd Hannemann, (Tue Jan 22, 4:54 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Ingo Molnar, (Tue Jan 22, 5:10 pm)
[PATCH 0/2] Was: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Wed Jan 23, 5:17 pm)
[PATCH 1/2] x86: GEODE fix MFGPT input clock value, Willy Tarreau, (Wed Jan 23, 5:18 pm)
Re: [PATCH 1/2] x86: GEODE fix MFGPT input clock value, H. Peter Anvin, (Wed Jan 23, 5:59 pm)
Re: [PATCH 1/2] x86: GEODE fix MFGPT input clock value, Willy Tarreau, (Wed Jan 23, 6:11 pm)
Re: x86: GEODE fix MFGPT input clock value, Jordan Crouse, (Wed Jan 23, 6:38 pm)
Re: x86: GEODE fix MFGPT input clock value, Arnd Hannemann, (Wed Jan 23, 7:17 pm)
Re: [PATCH 1/2] x86: GEODE fix MFGPT input clock value, H. Peter Anvin, (Wed Jan 23, 6:22 pm)
Re: [PATCH 1/2] x86: GEODE fix MFGPT input clock value, Willy Tarreau, (Wed Jan 23, 6:10 pm)
[git pull] was: Re: 2.6.24-rc8 hangs at mfgpt-timer, Thomas Gleixner, (Tue Jan 22, 5:53 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Tue Jan 22, 5:20 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Tue Jan 22, 2:15 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Mon Jan 21, 7:32 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Tue Jan 22, 4:15 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Tue Jan 22, 5:08 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Tue Jan 22, 5:15 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Wed Jan 23, 12:36 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Willy Tarreau, (Wed Jan 23, 12:10 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Jordan Crouse, (Thu Jan 17, 8:40 pm)
Re: 2.6.24-rc8 hangs at mfgpt-timer, Andres Salomon, (Thu Jan 17, 4:42 pm)