Subject: -current GENERIC kernel compilation fails...
To: None <port-sparc@netbsd.org>
From: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
List: port-sparc
Date: 08/28/2004 21:55:04
  #   compile  GENERIC/scsipi_base.o
  /usr/toolchain-sparc/bin/sparc--netbsdelf-gcc -mno-fpu -ffreestanding
  -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
  -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare
  -fno-zero-initialized-in-bss -I. -I/usr/src/sys/arch -I/usr/src/sys
  -nostdinc -DRASTERCONSOLE -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT
  -c /usr/src/sys/dev/scsipi/scsipi_base.c
  /usr/src/sys/dev/scsipi/scsipi_base.c: In function `scsipi_init':
  /usr/src/sys/dev/scsipi/scsipi_base.c:107: error: `PAGE_SIZE'
  undeclared (first use in this function)
  /usr/src/sys/dev/scsipi/scsipi_base.c:107: error: (Each undeclared
  identifier is reported only once
  /usr/src/sys/dev/scsipi/scsipi_base.c:107: error: for each function it
  appears in.)

... because src/sys/arch/sparc/include/vmparam.h (line 66-):

  #if CPU_NTYPES != 0 && !defined(SUN4)
  #define PAGE_SHIFT              PAGE_SHIFT_SUN4CM
  #define PAGE_SIZE               (1 << PAGE_SHIFT)
  #define PAGE_MASK               (PAGE_SIZE - 1)
  #elif CPU_NTYPES == 1 && defined(SUN4)
  #define PAGE_SHIFT              PAGE_SHIFT_SUN4
  #define PAGE_SIZE               (1 << PAGE_SHIFT)
  #define PAGE_MASK               (PAGE_SIZE - 1)
  #endif

is missing PAGE_SIZE definition for GENERIC's supported CPU models
(CPU_NTYPES > 1, defined(SUN4)).

Maybe, someone can complete this decision list...