Subject: Re: MIPS cleanup/rototill and support for mips32/mips64
To: Simon Burge <simonb@wasabisystems.com>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: port-hpcmips
Date: 03/07/2002 12:30:28
At Thu, 07 Mar 2002 09:25:08 +0900,
FUKAUMI Naoki wrote:
> I saw sys/lkm/compat/ultrix/Makefile and I made patch:
> 
> Index: sys/lkm/netinet/if_ipl/Makefile
(snip)

Oh... I found that all lkm module (for mips) have same problem. ;)
Here is the patch. (Include previous netinet/if_ipl/Makefile diff)
But I don't know this is the best solution...

Index: sys/lkm/netinet/if_ipl/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/netinet/if_ipl/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	2002/01/24 13:50:32	1.15
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	ip_fil.c fil.c mln_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c \
 	ip_auth.c ip_log.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/adosfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/adosfs/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	2001/12/12 12:06:47	1.5
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	adlookup.c adutil.c advfsops.c advnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/coda/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/coda/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	2001/12/12 12:06:47	1.5
+++ Makefile	2002/03/07 03:23:58
@@ -10,4 +10,8 @@
 SRCS+=	coda_namecache.c coda_psdev.c coda_subr.c coda_venus.c
 SRCS+=	coda_vfsops.c coda_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/filecorefs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/filecorefs/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	2001/12/12 12:06:47	1.3
+++ Makefile	2002/03/07 03:23:58
@@ -10,4 +10,8 @@
 SRCS+=	filecore_bmap.c filecore_lookup.c filecore_node.c filecore_utils.c \
 	filecore_vfsops.c filecore_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/isofs/cd9660/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/isofs/cd9660/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	2001/12/12 12:06:48	1.7
+++ Makefile	2002/03/07 03:23:58
@@ -10,4 +10,8 @@
 SRCS+=	cd9660_bmap.c cd9660_lookup.c cd9660_rrip.c cd9660_vfsops.c
 SRCS+=	cd9660_node.c cd9660_vnops.c cd9660_util.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/fdesc/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/fdesc/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	2001/12/12 12:06:48	1.7
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	fdesc_vfsops.c fdesc_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/kernfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/kernfs/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	2001/12/12 12:06:48	1.10
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	kernfs_vfsops.c kernfs_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/nullfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/nullfs/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	2001/12/12 12:06:48	1.8
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	null_vfsops.c null_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/overlay/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/overlay/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	2001/12/12 12:06:48	1.3
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	overlay_vfsops.c overlay_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/portal/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/portal/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	2001/12/12 12:06:49	1.7
+++ Makefile	2002/03/07 03:23:58
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	portal_vfsops.c portal_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/procfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/procfs/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	2001/12/12 12:06:49	1.15
+++ Makefile	2002/03/07 03:23:59
@@ -12,4 +12,8 @@
 SRCS+=  procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c
 SRCS+=	procfs_machdep.c procfs_map.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/miscfs/umapfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/miscfs/umapfs/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	2001/12/12 12:06:49	1.7
+++ Makefile	2002/03/07 03:23:59
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	umap_vfsops.c umap_vnops.c umap_subr.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/msdosfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/msdosfs/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	2001/12/12 12:06:49	1.9
+++ Makefile	2002/03/07 03:23:59
@@ -10,4 +10,8 @@
 SRCS+=	msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c
 SRCS+=	msdosfs_vfsops.c msdosfs_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/ntfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/ntfs/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	2001/12/12 12:06:50	1.4
+++ Makefile	2002/03/07 03:23:59
@@ -10,4 +10,8 @@
 SRCS+=	ntfs_compr.c ntfs_ihash.c ntfs_subr.c ntfs_vfsops.c ntfs_vnops.c
 SRCS+=	ntfs_conv.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/ufs/ext2fs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/ufs/ext2fs/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	2001/12/12 12:06:50	1.5
+++ Makefile	2002/03/07 03:23:59
@@ -11,4 +11,8 @@
 SRCS+=	ext2fs_inode.c ext2fs_lookup.c ext2fs_readwrite.c ext2fs_subr.c
 SRCS+=	ext2fs_vfsops.c ext2fs_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/ufs/lfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/ufs/lfs/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	2001/12/12 12:06:50	1.8
+++ Makefile	2002/03/07 03:23:59
@@ -11,4 +11,8 @@
 SRCS+=	lfs_alloc.c lfs_balloc.c lfs_bio.c lfs_cksum.c lfs_debug.c
 SRCS+=	lfs_inode.c lfs_segment.c lfs_syscalls.c 
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>
Index: sys/lkm/vfs/ufs/mfs/Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/lkm/vfs/ufs/mfs/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	2001/12/12 12:06:50	1.7
+++ Makefile	2002/03/07 03:23:59
@@ -9,4 +9,8 @@
 SRCS=	lkminit_vfs.c
 SRCS+=	mfs_vfsops.c mfs_vnops.c
 
+.if ${MACHINE_CPU} == "mips"
+CPPFLAGS+=	-DMIPS1 -DMIPS3
+.endif
+
 .include <bsd.kmod.mk>