Subject: port-sparc/10616: sparc/cpu.h includes non-installed kernel includes
To: None <>
From: John Hawkinson <>
List: netbsd-bugs
Date: 07/17/2000 18:01:45
>Number:         10616
>Category:       port-sparc
>Synopsis:       sparc/cpu.h includes non-installed kernel includes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 17 08:26:00 PDT 2000
>Originator:     John Hawkinson
>Release:        1.4.2, and -current of 16 July 2000
System: NetBSD 1.5B NetBSD 1.5B sparc

	/usr/include/sparc/cpu.h includes <sparc/sparc/cpuvar.h> and
<sparc/sparc/intreg.h> when _KERNEL is defined, as it must
be by LKMs that need kernel data structures.

	This was noticed under 1.4.2, so I'd like the fix pulled up
to netbsd-1-4 and netbsd-1-5 both.

	Try to build arla on the sparc port without a kernel tree in
	Is this as simple as moving sys/arch/sparc/sparc/{cpuvar.h,intreg.h}
into sys/arch/sparc/include? Or should their inclusion simply be

	I suppose it's not "as simple" as the former, as cpuvar.h
includes sparc/sparc/cache.h, and intreg.h includes sparc/sparc/vaddrs.h,
though there are no further levels of inclusion.

	Workaround is to populate /sys/arch/sparc/sparc/*.h and
build with "-I /sys/arch/".