Subject: Re: MIPS cleanup/rototill and support for mips32/mips64
To: FUKAUMI Naoki <naoki@fukaumi.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-hpcmips
Date: 03/13/2002 13:10:40
FUKAUMI Naoki wrote:

> 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...

How does the patch below look?  I think this is a better general
solution to the problem...

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/


Index: cpu.h
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/include/cpu.h,v
retrieving revision 1.59
diff -d -p -u -r1.59 cpu.h
--- cpu.h	2002/03/06 07:31:38	1.59
+++ cpu.h	2002/03/13 01:57:31
@@ -134,6 +134,15 @@ extern int mips3_pg_cached;
 #define	CPU_MIPS_CACHED_CCA_SHIFT	 4
 #define	MIPS_NOT_SUPP			0x8000
 
+#ifdef _LKM
+/* Assume all CPU architectures are valid for LKM's */
+#define	MIPS1	1
+#define	MIPS3	1
+#define	MIPS4	1
+#define	MIPS32	1
+#define	MIPS64	1
+#endif
+
 #if (MIPS1 + MIPS3 + MIPS4 + MIPS32 + MIPS64) == 0
 #error at least one of MIPS1, MIPS3, MIPS4, MIPS32 or MIPS64 must be specified
 #endif