Hello,
Here is an improved version of my patch that properly implements
Indy/Indigo2 machine type in /proc/cpuinfo using the sgi_guiness flag.
I'd like whoever has the power to commit it please ;)
For example, my indigo2 now shows
bash# cat /proc/cpuinfo
cpu : MIPS
cpu model : R4000SC V3.0
system type : SGI Indigo2
BogoMIPS : 49.87
byteorder : big endian
unaligned accesses : 0
wait instruction : no
microsecond timers : no
extra interrupt vector : no
hardware watchpoint : yes
VCED exceptions : 38
VCEI exceptions : 56
The patch follows....
[-----------------------------]
--- ./linux/include/asm-mips/bootinfo.old.h Thu Jan 13 12:29:17 2000
+++ ./linux/include/asm-mips/bootinfo.h Fri Jan 14 07:28:13 2000
@@ -91,8 +91,9 @@
* Valid machtype for group SGI
*/
#define MACH_SGI_INDY 0 /* R4?K and R5K Indy workstaions */
+#define MACH_SGI_INDIGO2 1
-#define GROUP_SGI_NAMES { "Indy" }
+#define GROUP_SGI_NAMES { "Indy", "Indigo2" }
/*
* Valid machtype for group COBALT
--- ./linux/arch/mips/arc/identify.old.c Thu Jan 13 12:45:18 2000
+++ ./linux/arch/mips/arc/identify.c Fri Jan 14 07:29:48 2000
@@ -17,6 +17,7 @@
#include <asm/sgi/sgi.h>
#include <asm/sgialib.h>
#include <asm/bootinfo.h>
+#include <asm/sgi/sgihpc.h>
struct smatch {
char *name;
@@ -59,10 +60,14 @@
*/
p = prom_getchild(PROM_NULL_COMPONENT);
printk("ARCH: %s\n", p->iname);
- mach = string_to_mach(p->iname);
+ mach = string_to_mach(p->iname);
mips_machgroup = mach->group;
- mips_machtype = mach->type;
+
+ /* sgi_guiness=1 implies an indy, sgi_guiness=0 implies an Indigo2.
+ * We'll need to fix this if more SGI arch's get added. --vmw
+ */
+ mips_machtype = !sgi_guiness;
prom_flags = mach->flags;
}
|