From owner-freebsd-bugs Tue Apr 9 23: 0:20 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9E4A537B400 for ; Tue, 9 Apr 2002 23:00:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3A602Z64389; Tue, 9 Apr 2002 23:00:02 -0700 (PDT) (envelope-from gnats) Received: from gssm.otsuka.tsukuba.ac.jp (utogwgw.gssm.otsuka.tsukuba.ac.jp [130.158.176.189]) by hub.freebsd.org (Postfix) with SMTP id D1B7D37B405 for ; Tue, 9 Apr 2002 22:55:51 -0700 (PDT) Received: (qmail 96544 invoked from network); 10 Apr 2002 05:55:50 -0000 Received: from OneOfLocalMachines (HELO smr01.gssm.otsuka.tsukuba.ac.jp) (10.2.1.2) by 10.1.1.1 with SMTP; 10 Apr 2002 05:55:50 -0000 Received: (from ohki@localhost) by smr01.gssm.otsuka.tsukuba.ac.jp (8.11.6/8.11.6) id g3A5tox02367; Wed, 10 Apr 2002 14:55:50 +0900 (JST) (envelope-from ohki) Message-Id: <200204100555.g3A5tox02367@smr01.gssm.otsuka.tsukuba.ac.jp> Date: Wed, 10 Apr 2002 14:55:50 +0900 (JST) From: Atsuo Ohki Reply-To: Atsuo Ohki To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/36953: linux emulation does not work well on SMP Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36953 >Category: kern >Synopsis: linux emulation does not work well on SMP >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 09 23:00:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Atsuo Ohki >Release: FreeBSD 4.5-RELEASE i386 >Organization: gssm, Univesity of Tsukua, Tokyo >Environment: System: FreeBSD smr01 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Wed Feb 27 19:18:56 JST 2002 ohki@smr01:/usr/src/sys/compile/gssm i386 >Description: linux emulation does not work well on SMP >How-To-Repeat: run Java demo programs of jdk1.4.0 >Fix: --- sys/i386/linux-REL/linprocfs/linprocfs_misc.c Tue Jun 26 04:46:47 2001 +++ sys/i386/linux/linprocfs/linprocfs_misc.c Mon Feb 25 13:28:52 2002 @@ -41,6 +41,7 @@ * $FreeBSD: src/sys/i386/linux/linprocfs/linprocfs_misc.c,v 1.3.2.8 2001/06/25 19:46:47 pirzyk Exp $ */ +#include "../../../../../../opt_global.h" /* for SMP */ #include #include #include @@ -172,7 +173,13 @@ { char *ps; int xlen; +#ifdef SMP + extern int mp_ncpus; + char psbuf[512*4]; /* XXX - conservative */ + int cpuidx; +#else char psbuf[512]; /* XXX - conservative */ +#endif /* SMP */ int class; int i; #if 0 @@ -218,13 +225,20 @@ } ps = psbuf; +#ifdef SMP + for (cpuidx = 0; cpuidx < mp_ncpus; cpuidx++) { +#endif /* SMP */ ps += sprintf(ps, "processor\t: %d\n" "vendor_id\t: %.20s\n" "cpu family\t: %d\n" "model\t\t: %d\n" "stepping\t: %d\n", +#ifdef SMP + cpuidx, cpu_vendor, class, cpu, cpu_id & 0xf); +#else 0, cpu_vendor, class, cpu, cpu_id & 0xf); +#endif /* SMP */ ps += sprintf(ps, "flags\t\t:"); @@ -248,6 +262,9 @@ (tsc_freq + 4999) / 1000000, ((tsc_freq + 4999) / 10000) % 100); } +#ifdef SMP + } +#endif /* SMP */ xlen = ps - psbuf; xlen -= uio->uio_offset; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message