Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Sep 2000 16:54:14 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Marcel Moolenaar <marcel@cup.hp.com>
Cc:        alpha@freebsd.org
Subject:   Re: linprocfs movement
Message-ID:  <20000901165414.A314@dragon.nuxi.com>
In-Reply-To: <39AFD975.C0207B36@cup.hp.com>; from marcel@cup.hp.com on Fri, Sep 01, 2000 at 12:29:41PM -0400
References:  <20000901061132.A87154@dragon.nuxi.com> <39AFD975.C0207B36@cup.hp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 01, 2000 at 12:29:41PM -0400, Marcel Moolenaar wrote:
> At this time I don't know what is inherently MD and what is MI, so I
> don't know which files need to be where and whether we need to move
> some function around.

This diff at least allows compliation on the Alpha.

Index: linprocfs_misc.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/linux/linprocfs/linprocfs_misc.c,v
retrieving revision 1.4
diff -u -r1.4 linprocfs_misc.c
--- linprocfs_misc.c	2000/08/12 21:08:42	1.4
+++ linprocfs_misc.c	2000/09/01 13:06:30
@@ -58,7 +58,12 @@
 #include <sys/exec.h>
 
 #include <machine/md_var.h>
+#ifdef __i386__
 #include <machine/cputypes.h>
+#endif
+#ifdef __alpha__
+#include <machine/alpha_cpu.h>
+#endif
 
 struct proc;
 
@@ -168,11 +173,18 @@
 #if 0
 	extern char *cpu_model;		/* Yuck */
 #endif
+#ifdef __alpha__
+	int cpu_class;
+#endif
 
 	if (uio->uio_rw != UIO_READ)
 		return (EOPNOTSUPP);
 
+#ifdef __alpha__
+	cpu_class = alpha_implver();
+#endif
 	switch (cpu_class) {
+#ifdef __i386__
 	case CPUCLASS_286:
 		class = "286";
 		break;
@@ -188,6 +200,18 @@
 	case CPUCLASS_686:
 		class = "686";
 		break;
+#endif
+#ifdef __alpha__
+	case ALPHA_IMPLVER_EV4:
+		class = "EV4/EV45";
+		break;
+	case ALPHA_IMPLVER_EV5:
+		class = "EV5/EV56";
+		break;
+	case ALPHA_IMPLVER_EV6:
+		class = "EV6";
+		break;
+#endif
 	default:
 		class = "unknown";
 		break;
@@ -200,7 +224,12 @@
 			"model           : %.20s\n"
 			"vendor_id       : %.20s\n"
 			"stepping        : %d\n",
-			0, class, "unknown", cpu_vendor, cpu_id);
+			0, class, "unknown", 
+#ifdef __i386__
+			cpu_vendor, cpu_id);
+#else
+			"unknown", -1);
+#endif
 
 	xlen = ps - psbuf;
 	xlen -= uio->uio_offset;


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000901165414.A314>