Subject: kern/10293: sparc kernel build failure in cpu.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 06/05/2000 20:17:10
>Number:         10293
>Category:       kern
>Synopsis:       sparc kernel build failure in cpu.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 05 20:18:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jim Bernard
>Release:        Mon Jun  5 19:01:56 MDT 2000
>Organization:
	Speaking for myself
>Environment:
System: NetBSD knox 1.4V NetBSD 1.4V (KNOX-$Revision: 1.5 $) #0: Sun Mar 19 10:27:24 MST 2000 jbernard@knox:/fh/usr/tmp/compile/sys/arch/sparc/compile/KNOX sparc


>Description:

cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -I. -I../../../../arch -I../../../.. -nostdinc -I../../../../../gnu/sys -DSUN4M -DRASTERCONSOLE -DDIAGNOSTIC -DMIIVERBOSE -DMAXUSERS=32 -D_KERNEL  -c ../../../../arch/sparc/sparc/cpu.c
cc1: warnings being treated as errors
../../../../arch/sparc/sparc/cpu.c:1098: warning: initialization from incompatible pointer type
*** Error code 1

	The line referenced is the viking_pcache_flush_page entry in:

struct module_info module_viking = {
        CPUTYP_UNKNOWN,         /* set in cpumatch() */
        VAC_NONE,
        cpumatch_viking,
        getcacheinfo_obp,
        viking_hotfix,
        viking_mmu_enable,
        viking_cache_enable,
        4096,
        viking_get_syncflt,
        no_asyncflt_regs,
        /* supersparcs use cached DVMA, no need to flush */
        noop_cache_flush,
        noop_vcache_flush_page,
        noop_vcache_flush_segment,
        noop_vcache_flush_region,
        noop_vcache_flush_context,
        viking_pcache_flush_page,
        noop_pure_vcache_flush,
        noop_cache_flush_all,
        viking_memerr,
        pmap_zero_page4m,
        pmap_copy_page4m
};

	viking_pcache_flush_page is defined in cache.c as:
	  void viking_pcache_flush_page(paddr_t pa, int invalidate_only)

	struct module_info is defined in cpuvar.h, and its "cache_flush_page"
	member is given as:
	  void (*pcache_flush_page)__P((int, int)).

>How-To-Repeat:
	Try to build sparc kernel -- may only be a problem on viking.
	  cpu.c is:    1.104 2000/06/05 20:38:25
	  cache.c is:  1.51 2000/06/05 20:38:24
	  cpuvar.h is: 1.27 2000/06/05 20:38:25

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: