Subject: configure() with valid context
To: None <tech-kern@netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 09/15/1999 15:22:30
Hi folks...

I'd like to make the following trivial change to main() to call configure()
a bit later:

Index: init_main.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/init_main.c,v
retrieving revision 1.155
diff -c -r1.155 init_main.c
*** init_main.c	1999/09/15 18:10:34	1.155
--- init_main.c	1999/09/15 22:13:43
***************
*** 209,220 ****
  	/* Initialize sockets. */
  	soinit();
  
! 	disk_init();		/* must come before autoconfiguration */
! 	tty_init();		/* initialise tty list */
  #if NRND > 0
! 	rnd_init();
  #endif
- 	configure();		/* configure the hardware */
  
  	/*
  	 * Initialize process and pgrp structures.
--- 209,222 ----
  	/* Initialize sockets. */
  	soinit();
  
! 	/*
! 	 * The following 3 things must be done before autoconfiguration.
! 	 */
! 	disk_init();		/* initialize disk list */
! 	tty_init();		/* initialize tty list */
  #if NRND > 0
! 	rnd_init();		/* initialize RNG */
  #endif
  
  	/*
  	 * Initialize process and pgrp structures.
***************
*** 320,325 ****
--- 322,330 ----
  
  	/* Start real time and statistics clocks. */
  	initclocks();
+ 
+ 	/* Configure the system hardware.  This will enable interrupts. */
+ 	configure();
  
  #ifdef SYSVSHM
  	/* Initialize System V style shared memory. */

...essentially, this allows autoconfiguration to run in a valid thread
context.

Objections?

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>