From owner-freebsd-alpha Fri Sep 1 16:58: 5 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [209.152.133.57]) by hub.freebsd.org (Postfix) with ESMTP id A6D7D37B42C for ; Fri, 1 Sep 2000 16:58:02 -0700 (PDT) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id QAA00348; Fri, 1 Sep 2000 16:54:15 -0700 (PDT) (envelope-from obrien) Date: Fri, 1 Sep 2000 16:54:14 -0700 From: "David O'Brien" To: Marcel Moolenaar Cc: alpha@freebsd.org Subject: Re: linprocfs movement Message-ID: <20000901165414.A314@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: <20000901061132.A87154@dragon.nuxi.com> <39AFD975.C0207B36@cup.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <39AFD975.C0207B36@cup.hp.com>; from marcel@cup.hp.com on Fri, Sep 01, 2000 at 12:29:41PM -0400 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 #include +#ifdef __i386__ #include +#endif +#ifdef __alpha__ +#include +#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