Subject: port-powerpc/33108: Cast eliminates part of interrupt mask on 405GPr
To: None <port-powerpc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: seebs <seebs@vash.cel.plethora.net>
List: netbsd-bugs
Date: 03/20/2006 15:55:00
>Number:         33108
>Category:       port-powerpc
>Synopsis:       cast eliminates part of interrupt mask
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 20 15:55:00 +0000 2006
>Originator:     seebs
>Release:        NetBSD 3.99.15
>Organization:
	
>Environment:
System: NetBSD vash.cel.plethora.net 3.99.15 NetBSD 3.99.15 (VASH) #1: Tue Jan 3 23:03:30 CST 2006 seebs@vash.cel.plethora.net:/sys/arch/i386/compile/VASH i386
Architecture: powerpc
Machine: TAMS 3011
>Description:
	The interrupt masks printed for debugging during setup are cast
	to unsigned short, but they're 32-bit values.
>How-To-Repeat:
	Debug a weirdness involving one of the other interrupts.
>Fix:

Index: ibm4xxgpx_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/ibm4xx/ibm4xxgpx_autoconf.c,v
retrieving revision 1.5
diff -c -r1.5 ibm4xxgpx_autoconf.c
*** ibm4xxgpx_autoconf.c	24 Dec 2005 22:45:36 -0000	1.5
--- ibm4xxgpx_autoconf.c	20 Mar 2006 15:50:30 -0000
***************
*** 68,75 ****
  	if (config_rootfound("plb", &local_plb_devs) == NULL)
  		panic("configure: plb not configured");
  
! 	printf("biomask %x netmask %x ttymask %x\n", (u_short)imask[IPL_BIO],
! 	    (u_short)imask[IPL_NET], (u_short)imask[IPL_TTY]);
  	
  	(void)spl0();
  
--- 68,75 ----
  	if (config_rootfound("plb", &local_plb_devs) == NULL)
  		panic("configure: plb not configured");
  
! 	printf("biomask %x netmask %x ttymask %x\n", (u_int)imask[IPL_BIO],
! 	    (u_int)imask[IPL_NET], (u_int)imask[IPL_TTY]);
  	
  	(void)spl0();