Subject: Re: Long delays during bootup in -current
To: None <sanjayl@kymasys.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 10/14/2006 22:31:59
sanjayl@kymasys.com wrote:

> I'm seeing long delays during bootup of the INSTALL kernel in - 
> current. This is on a PowerPC Mac mini.
> 
> timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
> timecounter: selected timecounter "clockinterrupt" frequency 100 Hz  
> quality 0
> timecounter: Timecounter "mftb" frequency 41600661 Hz quality 0
> timecounter: selected timecounter "mftb" frequency 41600661 Hz quality 0
> md0: internal 2048 KB image area
> Kernelized RAIDframe activated
> 
> <<<<<<<<<LONG DELAY>>>>>>>>>>>>>>>>>
> 
> atapibus0 at atabus1: 2 targets
> cd0 at atapibus0 drive 1: <MATSHITACD-RW  CW-8124, , DACD> cdrom  
> removable
> cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
> wd0 at atabus1 drive 0: <Hitachi HTS541080G9AT00>
> 
> Has anyone else seen this?

How about the attached patch?

I'm not sure where PSL_EE is set in that case, but I think
hardclock(9) shouldn't be enabled until cpu_initclocks(9) is called.
---
Izumi Tsutsui


Index: autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/macppc/autoconf.c,v
retrieving revision 1.48
diff -u -r1.48 autoconf.c
--- autoconf.c	29 Sep 2006 22:20:08 -0000	1.48
+++ autoconf.c	14 Oct 2006 13:30:46 -0000
@@ -69,7 +69,9 @@
 void
 cpu_configure()
 {
+#if 0
 	int msr;
+#endif
 
 	init_interrupt();
 	canonicalize_bootpath();
@@ -79,11 +81,13 @@
 
 	(void)spl0();
 
+#if 0
 	/*
 	 * Now allow hardware interrupts.
 	 */
 	__asm volatile ("mfmsr %0; ori %0,%0,%1; mtmsr %0"
 		      : "=r"(msr) : "K"(PSL_EE|PSL_RI));
+#endif
 }
 
 void