On Thu, May 30, 2002 at 12:30:43AM -0700, Alfred Perlstein wrote: > alfred 2002/05/30 00:30:43 PDT > > Modified files: > sys/dev/ct ct_machdep.h > sys/dev/ncv ncr53c500var.h > sys/dev/stg tmc18c30var.h > Log: > Check for defined(__i386__) instead of just defined(i386) since the compiler > will be updated to only define(__i386__) for ANSI cleanliness. > > Revision Changes Path > 1.4 +3 -3 src/sys/dev/ct/ct_machdep.h > 1.7 +3 -3 src/sys/dev/ncv/ncr53c500var.h > 1.6 +3 -3 src/sys/dev/stg/tmc18c30var.h
On Fri, May 31, 2002 at 02:02:50PM +0200, John Hay wrote:
> A GENERIC kernel on current fails to compile missing softintr.
>
> #############################
> beast:/sys/i386/compile/GENERIC # make -DNO_MODULES -DNO_WERROR
> cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
>-Wno-format -ansi -g -nostdinc -I- -I. -I../../.. -I../../../dev
>-I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../../include
>-D_KERNEL -ffreestanding -include opt_global.h -fno-common
>-mpreferred-stack-boundary=2 -ffreestanding ../../../dev/ncv/ncr53c500.c
> ../../../dev/ncv/ncr53c500.c: In function `ncv_world_start':
> ../../../dev/ncv/ncr53c500.c:503: warning: implicit declaration of function
>`softintr'
> cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
>-Wno-format -ansi -g -nostdinc -I- -I. -I../../.. -I../../../dev
>-I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../../include
>-D_KERNEL -ffreestanding -include opt_global.h -fno-common
>-mpreferred-stack-boundary=2 -ffreestanding ../../../dev/nsp/nsp.c
> ../../../dev/nsp/nsp.c: In function `nsp_world_start':
> ../../../dev/nsp/nsp.c:495: warning: implicit declaration of function `softintr'
> cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
>-Wno-format -ansi -g -nostdinc -I- -I. -I../../.. -I../../../dev
>-I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../../include
>-D_KERNEL -ffreestanding -include opt_global.h -fno-common
>-mpreferred-stack-boundary=2 -ffreestanding ../../../dev/stg/tmc18c30.c
> ../../../dev/stg/tmc18c30.c: In function `stg_world_start':
> ../../../dev/stg/tmc18c30.c:377: warning: implicit declaration of function `softintr'
> sh ../../../conf/newvers.sh GENERIC
> cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs
>-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
>-Wno-format -ansi -g -nostdinc -I- -I. -I../../.. -I../../../dev
>-I../../../contrib/dev/acpica -I../../../contrib/ipfilter -I../../../../include
>-D_KERNEL -ffreestanding -include opt_global.h -fno-common
>-mpreferred-stack-boundary=2 -ffreestanding vers.c
> linking kernel.debug
> ncr53c500.o: In function `ncv_world_start':
> ../../../dev/ncv/ncr53c500.c:503: undefined reference to `softintr'
> nsp.o: In function `nsp_world_start':
> ../../../dev/nsp/nsp.c:495: undefined reference to `softintr'
> tmc18c30.o: In function `stg_world_start':
> ../../../dev/stg/tmc18c30.c:377: undefined reference to `softintr'
> *** Error code 1
>
> Stop in /usr/src/sys/i386/compile/GENERIC.
> #############################
>
> John
Alfred,
Your changes above broke building the GENERIC kernel. __i386__ is always
defined (whether -ansi or not), and this now causes SOFT_INTR_REQUIRED()
macro to use non-existing softintr(). (Well, it's defined as empty in
sys/i386/isa/bs/bsif.h.)
I'm not sure what would me more correct; to include the definition of
softintr() from bsif.h, or to just commit the following:
%%%
Index: ct/ct.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ct/ct.c,v
retrieving revision 1.5
diff -u -p -r1.5 ct.c
--- ct/ct.c 20 Mar 2002 02:04:09 -0000 1.5
+++ ct/ct.c 31 May 2002 16:02:22 -0000
@@ -505,7 +505,6 @@ ct_world_start(ct, fdone)
scsi_low_bus_reset(slp);
cthw_chip_reset(chp, NULL, ct->sc_chipclk, slp->sl_hostid);
- SOFT_INTR_REQUIRED(slp);
return 0;
}
Index: ct/ct_machdep.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/ct/ct_machdep.h,v
retrieving revision 1.4
diff -u -p -r1.4 ct_machdep.h
--- ct/ct_machdep.h 30 May 2002 07:30:42 -0000 1.4
+++ ct/ct_machdep.h 31 May 2002 16:02:22 -0000
@@ -208,9 +208,4 @@ ct_cmdp_write_1(chp, val)
CT_BUS_WEIGHT(chp)
}
-#if defined(__i386__)
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_CT_MACHDEP_H_ */
Index: ncv/ncr53c500.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ncv/ncr53c500.c,v
retrieving revision 1.7
diff -u -p -r1.7 ncr53c500.c
--- ncv/ncr53c500.c 20 Mar 2002 02:07:32 -0000 1.7
+++ ncv/ncr53c500.c 31 May 2002 16:02:22 -0000
@@ -500,7 +500,6 @@ ncv_world_start(sc, fdone)
(bus_space_read_1(sc->sc_iot, sc->sc_ioh, cr0_istat) & INTR_SBR))
return ENODEV;
- SOFT_INTR_REQUIRED(slp);
return 0;
}
Index: ncv/ncr53c500var.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/ncv/ncr53c500var.h,v
retrieving revision 1.7
diff -u -p -r1.7 ncr53c500var.h
--- ncv/ncr53c500var.h 30 May 2002 07:30:43 -0000 1.7
+++ ncv/ncr53c500var.h 31 May 2002 16:02:22 -0000
@@ -95,9 +95,4 @@ void ncvattachsubr(struct ncv_softc *);
int ncvprint(void *, const char *);
int ncvintr(void *);
-#if defined(__i386__)
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_NCR53C500VAR_H_ */
Index: stg/tmc18c30.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/stg/tmc18c30.c,v
retrieving revision 1.8
diff -u -p -r1.8 tmc18c30.c
--- stg/tmc18c30.c 20 Mar 2002 02:07:43 -0000 1.8
+++ stg/tmc18c30.c 31 May 2002 16:02:22 -0000
@@ -374,7 +374,6 @@ stg_world_start(sc, fdone)
scsi_low_bus_reset(slp);
stghw_init(sc);
- SOFT_INTR_REQUIRED(slp);
return 0;
}
Index: stg/tmc18c30var.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/stg/tmc18c30var.h,v
retrieving revision 1.6
diff -u -p -r1.6 tmc18c30var.h
--- stg/tmc18c30var.h 30 May 2002 07:30:43 -0000 1.6
+++ stg/tmc18c30var.h 31 May 2002 16:02:22 -0000
@@ -103,9 +103,4 @@ void stgattachsubr(struct stg_softc *);
int stgprint(void *, const char *);
int stgintr(void *);
-#if defined(__i386__)
-#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq))
-#else /* !__i386__ */
-#define SOFT_INTR_REQUIRED(slp)
-#endif /* !__i386__ */
#endif /* !_TMC18C30VAR_H_ */
%%%
--
Ruslan Ermilov Sysadmin and DBA,
[EMAIL PROTECTED] Sunbay Software AG,
[EMAIL PROTECTED] FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
msg39039/pgp00000.pgp
Description: PGP signature
