From owner-freebsd-sparc64@FreeBSD.ORG Mon Aug 22 06:21:49 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0F9016A41F for ; Mon, 22 Aug 2005 06:21:49 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 338D343D46 for ; Mon, 22 Aug 2005 06:21:48 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by wproxy.gmail.com with SMTP id i4so919619wra for ; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=KDD9Zk3Y6F/xG0RfCUx12Q3ZSl5duYtlGoyB3LguxdQPlUJM8POOnMFM8ib8KxIs2diUuEAyc8T0kO36cX0y5Nujawx+psSiunHZUERok0LlQT53wPoyn+tZn/zVwqkCyYi2Fx4GiXIMkE08EeADtYuxH/SQ81kMBEWezrW6/2E= Received: by 10.54.56.37 with SMTP id e37mr1257044wra; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) Received: from michelle.rndsoft.co.kr ([211.32.202.209]) by mx.gmail.com with ESMTP id 7sm1418371wrl.2005.08.21.23.21.43; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j7M6IIUa002076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Aug 2005 15:18:18 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j7M6IEoG002075; Mon, 22 Aug 2005 15:18:14 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Mon, 22 Aug 2005 15:18:14 +0900 From: Pyun YongHyeon To: John Baldwin Message-ID: <20050822061813.GA712@rndsoft.co.kr> References: <200508110931.13802.john@jnielsen.net> <20050819043026.GC10519@rndsoft.co.kr> <200508190217.15943.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508201453.40439.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: John Nielsen , freebsd-sparc64@FreeBSD.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 06:21:50 -0000 On Sat, Aug 20, 2005 at 02:53:39PM -0400, John Baldwin wrote: > On Friday 19 August 2005 02:17 am, John Nielsen wrote: > > On Friday 19 August 2005 12:30 am, Pyun YongHyeon wrote: > > > On Thu, Aug 18, 2005 at 09:24:58AM -0400, John Nielsen wrote: > > > > On Wednesday 17 August 2005 16:59, Marius Strobl wrote: > > > > > On Mon, Aug 15, 2005 at 10:42:36AM -0400, John Nielsen wrote: > > > > > > On Friday 12 August 2005 00:53, Andrew Belashov wrote: > > > > > > > John Nielsen wrote: > > > > > > > > Can anyone say why removing "makeoptions DEBUG=-g" from a > > > > > > > > kernel would make it unreliable? I'm on an Ultra 5, and it's > > > > > > > > quite stable with either GENERIC or the kernel specified > > > > > > > > below. However, commenting out the "makeoptions DEBUG=-g" > > > > > > > > line builds a kernel that boots but then panics right after > > > > > > > > mounting /: > > > > > > > > > > > > > > > > Entropy harvesting: interrupts ethernet point_to_pointpanic: > > > > > > > > trap: fast data access mmu miss > > > > > > > > Uptime:2s > > > > > > > > Dumping 512 MB (2 chunks) > > > > > > > > > > > > > > Try to clean rebuild kernel (remove build directory > > > > > > > /usr/obj/usr/src/sys/KERNCONF or /sys/compile/KERNCONF). > > > > > > > > > > > > No change even after a fresh buildworld (using RELENG_6): > > > > > > > > > > > > cvsup /etc/supfile-src && rm -r /usr/obj/* && cd /usr/src && make > > > > > > make && make clean && make cleandir && make cleandir && make > > > > > > buildworld && make buildkernel && make installkernel && make > > > > > > installworld && mergemaster > > > > > > > > > > > > I don't mind leaving the option in the kernel, but it does seem > > > > > > like a strange bug. Let me know if anyone has any other ideas. > > > > > > Thanks, > > > > > > > > > > When the DEBUG make option is defined the compiler optimization > > > > > flags (COPTFLAGS) default to '-O -pipe' whereas without DEBUG the > > > > > default is '-O2 -pipe' ('-O2' can cause bogus stack traces so it's > > > > > not the default for debugging kernels). So in case you also get a > > > > > panic with a kernel having both: > > > > > makeoptions DEBUG=-g > > > > > and: > > > > > makeoptions COPTFLAGS="-O2 -pipe" > > > > > this probably means that there's bogus code that breaks at higher > > > > > optimization levels or a compiler bug. A stack trace from such a > > > > > panic might help to track this down in case it's not screwed due > > > > > to the '-O2'. > > > > > > > > That's what it was. A kernel with only > > > > makeoptions COPTFLAGS="-O -pipe" > > > > builds and runs just fine. > > > > > > Are you sure that GENERIC kernel panics too? > > > I couldn't verify it(I'm on a business trip) but I guess you should > > > remove smbfs related kernel options. smbfs never worked on sparc64 > > > and it needs more clean up on various places. > > > If you encounter the panic again would you post stack traces? > > > > Yes, I built about 20 kernels trying to track it down, including GENERIC > > sans makeoptions DEBUG=-g (but with WITNESS, etc). > > > > I haven't actually tried to use SMBFS yet, but simply having it in the > > kernel doesn't seem to be affecting anything. > > > > I'll see if I can get a stacktrace from an existing dump. > > My ultra60 won't boot a kernel that doesn't have WITNESS in it FWIW. Try a > stock GENERIC kernel and see if it works. You can disable witness with the > loader tunable 'debug.witness.watch=0'. > GENERIC kernel without WITNESS/DEBUG works here on U60(CURRENT). But loading libiconv.ko or linking kernel with "options LIBICONV" I got the panic in the following code path. panic: trap: fast data access mmu miss panic messages: --- panic: trap: fast data access mmu miss cpuid = 0 KDB: enter: panic Dumping 512 MB (1 chunks) chunk at 0xa0000000: 536870912 bytes |\^H --- #0 0x00000000c018730c in doadump () (kgdb) bt #0 0x00000000c018730c in doadump () #1 0x00000000c00736e0 in db_fncall () #2 0x00000000c00738e4 in db_command_loop () #3 0x00000000c0076328 in db_trap () #4 0x00000000c01a98e4 in kdb_trap () #5 0x00000000c034e8a8 in trap () #6 0x00000000c01a92f8 in kdb_enter () #7 0x00000000c01a92f0 in kdb_enter () #8 0x00000000c018822c in panic () #9 0x00000000c034e7c4 in trap () #10 0x00000000c02082a0 in strlcpy () #11 0x00000000c0205c9c in iconv_sysctl_drvlist () #12 0x00000000c0192044 in sysctl_root () #13 0x00000000c019239c in userland_sysctl () #14 0x00000000c019251c in __sysctl () #15 0x00000000c034ec28 in syscall () (kgdb) This trace is somewhat different in ddb. But I believe gdb53's trace is correct. I can reliably panic the system with "sysctl kern.random" command after loading libiconv.ko module. So I guess something is wrong in iconv. -- Regards, Pyun YongHyeon From owner-freebsd-sparc64@FreeBSD.ORG Mon Aug 22 11:02:25 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9613F16A423 for ; Mon, 22 Aug 2005 11:02:25 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 611B243D5E for ; Mon, 22 Aug 2005 11:02:25 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7MB2Pgt037000 for ; Mon, 22 Aug 2005 11:02:25 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7MB2OHw036994 for freebsd-sparc64@freebsd.org; Mon, 22 Aug 2005 11:02:24 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 22 Aug 2005 11:02:24 GMT Message-Id: <200508221102.j7MB2OHw036994@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-sparc64@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 11:02:25 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/09/14] sparc64/71729sparc64 printf in kernel thread causes panic on S o [2004/10/21] sparc64/72962sparc64 [sysinstall] Sysinstall panics on sparc64 o [2004/11/02] sparc64/73413sparc64 [patch] pthread(libkse) library is broken o [2005/02/12] sparc64/77417sparc64 [panic] with high usage of cpu when lan u o [2005/04/27] sparc64/80410sparc64 netgraph is causing crash with mpd on spa o [2005/05/11] sparc64/80890sparc64 panic: kmem_malloc(73728): kmem_map too s o [2005/06/23] sparc64/82569sparc64 USB mass storage plug/unplug causes syste 7 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/10/22] sparc64/72998sparc64 [patch] set_mcontext() change syscalls pa o [2005/06/26] sparc64/82681sparc64 dc state messages 2 problems total. From owner-freebsd-sparc64@FreeBSD.ORG Tue Aug 23 08:18:35 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A517016A422 for ; Tue, 23 Aug 2005 08:18:35 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 603B243D58 for ; Tue, 23 Aug 2005 08:18:34 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so1112832rne for ; Tue, 23 Aug 2005 01:18:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=ZJGXGPGoo3IQ8LsZJazHmrD2j3c7nRiF0cI6NNDRyD3+GXhtqDvX0PVBDSxo2x5UndcrmTaMTSqkknQbTEoee9Sa3PvKVTS9adOOnneYE0r4lOF33pg/BOIlTsUxJGNi6lzgijzLsjMjpstKv2mgdQGSqIxwIQbj7qEgX8ozGVI= Received: by 10.38.89.10 with SMTP id m10mr326484rnb; Tue, 23 Aug 2005 01:18:33 -0700 (PDT) Received: from michelle.rndsoft.co.kr ([211.32.202.211]) by mx.gmail.com with ESMTP id k3sm4504485rnb.2005.08.23.01.18.32; Tue, 23 Aug 2005 01:18:33 -0700 (PDT) Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j7N8FPZ9006693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2005 17:15:25 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j7N8FHbU006692; Tue, 23 Aug 2005 17:15:17 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Tue, 23 Aug 2005 17:15:17 +0900 From: Pyun YongHyeon To: John Baldwin Message-ID: <20050823081517.GB4956@rndsoft.co.kr> References: <200508110931.13802.john@jnielsen.net> <20050819043026.GC10519@rndsoft.co.kr> <200508190217.15943.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <200508201453.40439.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: John Nielsen , freebsd-sparc64@FreeBSD.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2005 08:18:35 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 20, 2005 at 02:53:39PM -0400, John Baldwin wrote: > On Friday 19 August 2005 02:17 am, John Nielsen wrote: > > On Friday 19 August 2005 12:30 am, Pyun YongHyeon wrote: > > > On Thu, Aug 18, 2005 at 09:24:58AM -0400, John Nielsen wrote: > > > > On Wednesday 17 August 2005 16:59, Marius Strobl wrote: > > > > > On Mon, Aug 15, 2005 at 10:42:36AM -0400, John Nielsen wrote: > > > > > > On Friday 12 August 2005 00:53, Andrew Belashov wrote: > > > > > > > John Nielsen wrote: > > > > > > > > Can anyone say why removing "makeoptions DEBUG=-g" from a > > > > > > > > kernel would make it unreliable? I'm on an Ultra 5, and it's > > > > > > > > quite stable with either GENERIC or the kernel specified > > > > > > > > below. However, commenting out the "makeoptions DEBUG=-g" > > > > > > > > line builds a kernel that boots but then panics right after > > > > > > > > mounting /: > > > > > > > > > > > > > > > > Entropy harvesting: interrupts ethernet point_to_pointpanic: > > > > > > > > trap: fast data access mmu miss > > > > > > > > Uptime:2s > > > > > > > > Dumping 512 MB (2 chunks) > > > > > > > > > > > > > > Try to clean rebuild kernel (remove build directory > > > > > > > /usr/obj/usr/src/sys/KERNCONF or /sys/compile/KERNCONF). > > > > > > > > > > > > No change even after a fresh buildworld (using RELENG_6): > > > > > > > > > > > > cvsup /etc/supfile-src && rm -r /usr/obj/* && cd /usr/src && make > > > > > > make && make clean && make cleandir && make cleandir && make > > > > > > buildworld && make buildkernel && make installkernel && make > > > > > > installworld && mergemaster > > > > > > > > > > > > I don't mind leaving the option in the kernel, but it does seem > > > > > > like a strange bug. Let me know if anyone has any other ideas. > > > > > > Thanks, > > > > > > > > > > When the DEBUG make option is defined the compiler optimization > > > > > flags (COPTFLAGS) default to '-O -pipe' whereas without DEBUG the > > > > > default is '-O2 -pipe' ('-O2' can cause bogus stack traces so it's > > > > > not the default for debugging kernels). So in case you also get a > > > > > panic with a kernel having both: > > > > > makeoptions DEBUG=-g > > > > > and: > > > > > makeoptions COPTFLAGS="-O2 -pipe" > > > > > this probably means that there's bogus code that breaks at higher > > > > > optimization levels or a compiler bug. A stack trace from such a > > > > > panic might help to track this down in case it's not screwed due > > > > > to the '-O2'. > > > > > > > > That's what it was. A kernel with only > > > > makeoptions COPTFLAGS="-O -pipe" > > > > builds and runs just fine. > > > > > > Are you sure that GENERIC kernel panics too? > > > I couldn't verify it(I'm on a business trip) but I guess you should > > > remove smbfs related kernel options. smbfs never worked on sparc64 > > > and it needs more clean up on various places. > > > If you encounter the panic again would you post stack traces? > > > > Yes, I built about 20 kernels trying to track it down, including GENERIC > > sans makeoptions DEBUG=-g (but with WITNESS, etc). > > > > I haven't actually tried to use SMBFS yet, but simply having it in the > > kernel doesn't seem to be affecting anything. > > > > I'll see if I can get a stacktrace from an existing dump. > > My ultra60 won't boot a kernel that doesn't have WITNESS in it FWIW. Try a > stock GENERIC kernel and see if it works. You can disable witness with the > loader tunable 'debug.witness.watch=0'. > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. With attached patch I can boot my system with LIBICONV. John Nielsen, would you please let me know how the attached patch goes on your system? -- Regards, Pyun YongHyeon --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iconv.patch" --- sys/libkern/iconv.c.orig Wed Aug 17 11:34:33 2005 +++ sys/libkern/iconv.c Tue Aug 23 15:54:14 2005 @@ -419,6 +419,12 @@ return 0; } +const char * +iconv_converter_namestub(struct iconv_converter_class *dp) +{ + return (NULL); +} + int iconv_converter_handler(module_t mod, int type, void *data) { --- sys/libkern/iconv_converter_if.m.orig Sat Apr 30 14:32:31 2005 +++ sys/libkern/iconv_converter_if.m Tue Aug 23 15:37:47 2005 @@ -67,4 +67,4 @@ STATICMETHOD const char * name { struct iconv_converter_class *dcp; -}; +} DEFAULT iconv_converter_namestub; --- sys/sys/iconv.h.orig Fri Jul 8 09:32:11 2005 +++ sys/sys/iconv.h Tue Aug 23 15:38:38 2005 @@ -231,6 +231,7 @@ int iconv_converter_initstub(struct iconv_converter_class *dp); int iconv_converter_donestub(struct iconv_converter_class *dp); +const char*iconv_converter_namestub(struct iconv_converter_class *dp); int iconv_converter_handler(module_t mod, int type, void *data); #ifdef ICONV_DEBUG --6c2NcOVqGQ03X4Wi-- From owner-freebsd-sparc64@FreeBSD.ORG Tue Aug 23 10:45:45 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AAFB16A41F for ; Tue, 23 Aug 2005 10:45:45 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8476F43D48 for ; Tue, 23 Aug 2005 10:45:44 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7NAjhPa010506 for ; Tue, 23 Aug 2005 12:45:43 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7NAjcPx010505 for freebsd-sparc64@freebsd.org; Tue, 23 Aug 2005 12:45:38 +0200 (CEST) (envelope-from marius) Date: Tue, 23 Aug 2005 12:45:37 +0200 From: Marius Strobl To: freebsd-sparc64@freebsd.org Message-ID: <20050823124537.B94166@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.158; host: newtrinity.zeist.de) Subject: ATA66 and data corruption issues should be fixed [Fwd: cvs commit: src/sys/dev/ata ata-chipset.c ata-pci.h] X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2005 10:45:45 -0000 FYI, the change below should fix the issues with ATA66 ("TIMEOUT - WRITE_DMA retrying", etc.) and the data corruption seen with the onboard Acer M5229 in sun4u machines (Blade 100, Netra X1, ...). It's also planned to be MFC'ed to RELENG_6 in time for 6.0. ----- Forwarded message from Søren Schmidt ----- X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org From: Søren Schmidt Date: Tue, 23 Aug 2005 08:53:01 +0000 (UTC) To: src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/ata ata-chipset.c ata-pci.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: owner-cvs-all@freebsd.org sos 2005-08-23 08:53:01 UTC FreeBSD src repository Modified files: sys/dev/ata ata-chipset.c ata-pci.h Log: Apply fix for "pr82261 DMA-support on Sparc64 broken" The Acer chip or wiring that SUN uses has problems that this patch tries to work around. Original patch by Marius Strobl, hacked into shape by me.. Revision Changes Path 1.131 +41 -5 src/sys/dev/ata/ata-chipset.c 1.52 +1 -0 src/sys/dev/ata/ata-pci.h _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" ----- End forwarded message ----- From owner-freebsd-sparc64@FreeBSD.ORG Tue Aug 23 13:13:12 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB47016A41F; Tue, 23 Aug 2005 13:13:12 +0000 (GMT) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09A6743D46; Tue, 23 Aug 2005 13:13:09 +0000 (GMT) (envelope-from john@jnielsen.net) Received: from localhost (ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id j7NDD6sh097573; Tue, 23 Aug 2005 06:13:09 -0700 (PDT) (envelope-from john@jnielsen.net) From: John Nielsen To: freebsd-sparc64@freebsd.org, pyunyh@gmail.com Date: Tue, 23 Aug 2005 09:11:17 -0400 User-Agent: KMail/1.8.2 References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> In-Reply-To: <20050823081517.GB4956@rndsoft.co.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508230911.18163.john@jnielsen.net> X-Virus-Scanned: ClamAV 0.85.1/1035/Mon Aug 22 04:37:18 2005 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2005 13:13:12 -0000 On Tuesday 23 August 2005 04:15, Pyun YongHyeon wrote: > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. > With attached patch I can boot my system with LIBICONV. > John Nielsen, would you please let me know how the attached patch goes > on your system? My system already boots fine with LIBICONV, although I haven't tried mounting and SMB FS yet. JN From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 01:04:54 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0BE116A41F for ; Wed, 24 Aug 2005 01:04:54 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB13643D48 for ; Wed, 24 Aug 2005 01:04:53 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so2651rne for ; Tue, 23 Aug 2005 18:04:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=hNaExWu69peDIKjPw/iNat2YFAFNT/t2yolPaG9Efc2+Nsn/oUEdNBiw7ppIfjAhWqeAExXBV9vUs/+27KjAffWtXgbhI0mJfn9W6SlgJ5I8GeI+vTnSE1ihEzQCO5Y6ajyakUaSHf8BZH739NEHPtEY1FKUpnugHP0E4p+MDTo= Received: by 10.38.209.5 with SMTP id h5mr13571rng; Tue, 23 Aug 2005 18:04:53 -0700 (PDT) Received: from michelle.rndsoft.co.kr ( [211.32.202.211]) by mx.gmail.com with ESMTP id k6sm4317rnd.2005.08.23.18.04.52; Tue, 23 Aug 2005 18:04:53 -0700 (PDT) Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j7O11s9B009852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Aug 2005 10:01:54 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j7O11lwq009851; Wed, 24 Aug 2005 10:01:47 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Wed, 24 Aug 2005 10:01:47 +0900 From: Pyun YongHyeon To: John Nielsen Message-ID: <20050824010147.GD4956@rndsoft.co.kr> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508230911.18163.john@jnielsen.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 01:04:54 -0000 On Tue, Aug 23, 2005 at 09:11:17AM -0400, John Nielsen wrote: > On Tuesday 23 August 2005 04:15, Pyun YongHyeon wrote: > > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. > > With attached patch I can boot my system with LIBICONV. > > John Nielsen, would you please let me know how the attached patch goes > > on your system? > > My system already boots fine with LIBICONV, although I haven't tried Then it seems that you are seeing differnet issues not known to me. Would you please post stack trace? > mounting and SMB FS yet. > smbfs does not work on sparc64 as smbfs assumes it runs on architectures that allow on-aligned memory access. It also needs big-endian clean up too.(See sys/mchain.h) > JN -- Regards, Pyun YongHyeon From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 14:39:56 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50BC616A41F for ; Wed, 24 Aug 2005 14:39:56 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from mail.ryu16.org (221x249x107x70.ap221.ftth.ucom.ne.jp [221.249.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id A257043D49 for ; Wed, 24 Aug 2005 14:39:54 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id j7OEdpn7065230; Wed, 24 Aug 2005 23:39:51 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id j7OEde7E065229; Wed, 24 Aug 2005 23:39:40 +0900 (JST) (envelope-from imura) Date: Wed, 24 Aug 2005 23:39:40 +0900 From: "R. Imura" To: Pyun YongHyeon Message-ID: <20050824143940.GA65078%imura@ryu16.org> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050824010147.GD4956@rndsoft.co.kr> User-Agent: Mutt/1.4.1i-ja.1 Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 14:39:56 -0000 Hi, On Wed, Aug 24, 2005 at 10:01:47AM +0900, Pyun YongHyeon wrote: > On Tue, Aug 23, 2005 at 09:11:17AM -0400, John Nielsen wrote: > > On Tuesday 23 August 2005 04:15, Pyun YongHyeon wrote: > > > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. > > > With attached patch I can boot my system with LIBICONV. > > > John Nielsen, would you please let me know how the attached patch goes > > > on your system? > > > > My system already boots fine with LIBICONV, although I haven't tried > > Then it seems that you are seeing differnet issues not known to me. > Would you please post stack trace? > > > mounting and SMB FS yet. > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > architectures that allow on-aligned memory access. It also needs > big-endian clean up too.(See sys/mchain.h) To begin with, you might want this patch. :) Index: sys/sys/mchain.h =================================================================== RCS file: /home/ncvs/src/sys/sys/mchain.h,v retrieving revision 1.9 diff -u -r1.9 mchain.h --- sys/sys/mchain.h 29 Jul 2005 13:22:36 -0000 1.9 +++ sys/sys/mchain.h 24 Aug 2005 10:55:39 -0000 @@ -42,42 +42,36 @@ */ #if (BYTE_ORDER == LITTLE_ENDIAN) -#define htoles(x) ((u_int16_t)(x)) -#define letohs(x) ((u_int16_t)(x)) -#define htolel(x) ((u_int32_t)(x)) -#define letohl(x) ((u_int32_t)(x)) -#define htoleq(x) ((int64_t)(x)) -#define letohq(x) ((int64_t)(x)) - -#define htobes(x) (__htons(x)) -#define betohs(x) (__ntohs(x)) -#define htobel(x) (__htonl(x)) -#define betohl(x) (__ntohl(x)) - -static __inline int64_t -htobeq(int64_t x) -{ - return (int64_t)__htonl((u_int32_t)(x >> 32)) | - (int64_t)__htonl((u_int32_t)(x & 0xffffffff)) << 32; -} - -static __inline int64_t -betohq(int64_t x) -{ - return (int64_t)__ntohl((u_int32_t)(x >> 32)) | - (int64_t)__ntohl((u_int32_t)(x & 0xffffffff)) << 32; -} +#define htoles(x) ((uint16_t)(x)) +#define letohs(x) ((uint16_t)(x)) +#define htolel(x) ((uint32_t)(x)) +#define letohl(x) ((uint32_t)(x)) +#define htoleq(x) ((uint64_t)(x)) +#define letohq(x) ((uint64_t)(x)) + +#define htobes(x) (bswap16(x)) +#define betohs(x) (bswap16(x)) +#define htobel(x) (bswap32(x)) +#define betohl(x) (bswap32(x)) +#define htobeq(x) (bswap64(x)) +#define betohq(x) (bswap64(x)) #else /* (BYTE_ORDER == LITTLE_ENDIAN) */ -#error "Macros for Big-Endians are incomplete" +#define htoles(x) (bswap16(x)) +#define letohs(x) (bswap16(x)) +#define htolel(x) (bswap32(x)) +#define letohl(x) (bswap32(x)) +#define htoleq(x) (bswap64(x)) +#define letohq(x) (bswap64(x)) + +#define htobes(x) ((uint16_t)(x)) +#define betohs(x) ((uint16_t)(x)) +#define htobel(x) ((uint32_t)(x)) +#define betohl(x) ((uint32_t)(x)) +#define htobeq(x) ((uint64_t)(x)) +#define betohq(x) ((uint64_t)(x)) -/* -#define htoles(x) ((u_int16_t)(x)) -#define letohs(x) ((u_int16_t)(x)) -#define htolel(x) ((u_int32_t)(x)) -#define letohl(x) ((u_int32_t)(x)) -*/ #endif /* (BYTE_ORDER == LITTLE_ENDIAN) */ #endif /* _KERNEL */ Regards, - R. Imura From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 15:00:31 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDB0B16A431 for ; Wed, 24 Aug 2005 15:00:30 +0000 (GMT) (envelope-from jema@mail.ru) Received: from f53.mail.ru (f53.mail.ru [194.67.57.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8917543D76 for ; Wed, 24 Aug 2005 15:00:15 +0000 (GMT) (envelope-from jema@mail.ru) Received: from mail by f53.mail.ru with local id 1E7wjV-0002zi-00; Wed, 24 Aug 2005 19:00:05 +0400 Received: from [195.46.172.247] by win.mail.ru with HTTP; Wed, 24 Aug 2005 19:00:05 +0400 From: Andy Jam To: Marius Strobl Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [195.46.172.247] Date: Wed, 24 Aug 2005 19:00:05 +0400 In-Reply-To: <20050810230618.B489@newtrinity.zeist.de> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: Cc: freebsd-sparc64@freebsd.org Subject: Re[2]: sparc64/82569: USB mass storage plug/unplug causes system panic X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andy Jam List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 15:00:31 -0000 -----Original Message----- From: Marius Strobl To: Andy Jema Date: Wed, 10 Aug 2005 23:06:18 +0200 Subject: Re: sparc64/82569: USB mass storage plug/unplug causes system panic > > On Thu, Jun 23, 2005 at 11:01:15AM +0000, Andy Jema wrote: > > > > >Number: 82569 > > >Category: sparc64 > > >Synopsis: USB mass storage plug/unplug causes system panic > > >Confidential: no > > >Severity: serious > > >Priority: medium > > >Responsible: freebsd-sparc64 > > >State: open > > >Quarter: > > >Keywords: > > >Date-Required: > > >Class: sw-bug > > >Submitter-Id: current-users > > >Arrival-Date: Thu Jun 23 11:10:19 GMT 2005 > > >Closed-Date: > > >Last-Modified: > > >Originator: Andy Jema > > >Release: 6.0-CURRENT > > >Organization: > > OT > > >Environment: > > FreeBSD 6.0-20050601-SNAP #0: Thu Jun 2 05:29:17 UTC 2005 > > root@u60.samsco.home:/usr/obj/usr/src/sys/GENERIC > > >Description: > > Just installed FreeBSD 6.0-20050601-SNAP. I repeatously pluged and unpluged a USB mass storage(DVD-ROM) on my Blade 150 and as result got a kernel panic > > > > blade150# kldload usb.ko > > ohci0: mem 0x2000000-0x2007fff at device 12.3 on pci0 > > ohci0: [GIANT-LOCKED] > > usb0: OHCI version 1.0, legacy support > > usb0: on ohci0 > > usb0: USB revision 1.0 > > uhub0: (0x108e) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > > uhub0: 4 ports with 4 removable, self powered > > blade150# kldload umass.ko > > blade150# (null): at uhub0 port 4 (addr 2) disconnected > > > > blade150# > > blade150# umass0: USB2.0 TO IDE USB Storage Adapter, rev 2.00/11.01, addr 2 > > umass0: at uhub0 port 4 (addr 2) disconnected > > panic: trap: memory address not aligned > > cpuid = 0 > > KDB: enter: panic > > [thread pid 16 tid 100019 ] > > Stopped at kdb_enter+0x3c: ta %xcc, 1 > > db> > > > > >How-To-Repeat: > > plug/unplug repeatously a USB CD/DVD-ROM > > Is this really sparc64-specific, i.e. it doesn't happen when repeatedly > plugging in and unplugging the same drive on e.g. i386? Is the drive > otherwise useable on sparc64? > Hello, Marius! My flash drive works fine on i386, there is only hassle bug with plug/unplug with mounted filesystem on this one. AFAIK, it's well known bug, btw, would it be fixed soon? However on sparc64 this flash is still usable. From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 17:14:45 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4E8C16A41F for ; Wed, 24 Aug 2005 17:14:45 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3813043D45 for ; Wed, 24 Aug 2005 17:14:45 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7OHEhsG037106; Wed, 24 Aug 2005 19:14:43 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7OHEbJl037105; Wed, 24 Aug 2005 19:14:37 +0200 (CEST) (envelope-from marius) Date: Wed, 24 Aug 2005 19:14:37 +0200 From: Marius Strobl To: "R. Imura" Message-ID: <20050824191437.A36508@newtrinity.zeist.de> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050824143940.GA65078%imura@ryu16.org>; from imura@ryu16.org on Wed, Aug 24, 2005 at 11:39:40PM +0900 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.172; host: newtrinity.zeist.de) Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 17:14:45 -0000 On Wed, Aug 24, 2005 at 11:39:40PM +0900, R. Imura wrote: > Hi, > > On Wed, Aug 24, 2005 at 10:01:47AM +0900, Pyun YongHyeon wrote: > > On Tue, Aug 23, 2005 at 09:11:17AM -0400, John Nielsen wrote: > > > On Tuesday 23 August 2005 04:15, Pyun YongHyeon wrote: > > > > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. > > > > With attached patch I can boot my system with LIBICONV. > > > > John Nielsen, would you please let me know how the attached patch goes > > > > on your system? > > > > > > My system already boots fine with LIBICONV, although I haven't tried > > > > Then it seems that you are seeing differnet issues not known to me. > > Would you please post stack trace? > > > > > mounting and SMB FS yet. > > > > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > architectures that allow on-aligned memory access. It also needs > > big-endian clean up too.(See sys/mchain.h) > > To begin with, you might want this patch. :) > You probably should go the NetBSD route and change the consumers of these macros to use the byteorder(9) functions like htole16(9) directly. Btw., NetBSD seems to also have fixed the alignment issues. Marius From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 17:20:49 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7211E16A41F for ; Wed, 24 Aug 2005 17:20:49 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id C826643D45 for ; Wed, 24 Aug 2005 17:20:48 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7OHKlKm037205; Wed, 24 Aug 2005 19:20:47 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7OHKgsC037204; Wed, 24 Aug 2005 19:20:42 +0200 (CEST) (envelope-from marius) Date: Wed, 24 Aug 2005 19:20:42 +0200 From: Marius Strobl To: "R. Imura" Message-ID: <20050824192042.B36508@newtrinity.zeist.de> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050824191437.A36508@newtrinity.zeist.de>; from marius@alchemy.franken.de on Wed, Aug 24, 2005 at 07:14:37PM +0200 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.172; host: newtrinity.zeist.de) Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 17:20:49 -0000 On Wed, Aug 24, 2005 at 07:14:37PM +0200, Marius Strobl wrote: > On Wed, Aug 24, 2005 at 11:39:40PM +0900, R. Imura wrote: > > Hi, > > > > On Wed, Aug 24, 2005 at 10:01:47AM +0900, Pyun YongHyeon wrote: > > > On Tue, Aug 23, 2005 at 09:11:17AM -0400, John Nielsen wrote: > > > > On Tuesday 23 August 2005 04:15, Pyun YongHyeon wrote: > > > > > It seems that iconv needs default KOBJMETHOD for ICONV_CONVERTER_NAME. > > > > > With attached patch I can boot my system with LIBICONV. > > > > > John Nielsen, would you please let me know how the attached patch goes > > > > > on your system? > > > > > > > > My system already boots fine with LIBICONV, although I haven't tried > > > > > > Then it seems that you are seeing differnet issues not known to me. > > > Would you please post stack trace? > > > > > > > mounting and SMB FS yet. > > > > > > > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > > architectures that allow on-aligned memory access. It also needs > > > big-endian clean up too.(See sys/mchain.h) > > > > To begin with, you might want this patch. :) > > > > You probably should go the NetBSD route and change the consumers > of these macros to use the byteorder(9) functions like htole16(9) Meant to note that these are also available for userland... From owner-freebsd-sparc64@FreeBSD.ORG Wed Aug 24 17:25:08 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2B6616A423 for ; Wed, 24 Aug 2005 17:25:08 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5880743D49 for ; Wed, 24 Aug 2005 17:25:07 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7OHP6Wh037277; Wed, 24 Aug 2005 19:25:06 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7OHP1Wn037276; Wed, 24 Aug 2005 19:25:01 +0200 (CEST) (envelope-from marius) Date: Wed, 24 Aug 2005 19:25:01 +0200 From: Marius Strobl To: Andy Jam Message-ID: <20050824192501.A19225@newtrinity.zeist.de> References: <20050810230618.B489@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jema@mail.ru on Wed, Aug 24, 2005 at 07:00:05PM +0400 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.172; host: newtrinity.zeist.de) Cc: freebsd-sparc64@freebsd.org Subject: Re: sparc64/82569: USB mass storage plug/unplug causes system panic X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 17:25:08 -0000 On Wed, Aug 24, 2005 at 07:00:05PM +0400, Andy Jam wrote: > > > -----Original Message----- > From: Marius Strobl > To: Andy Jema > Date: Wed, 10 Aug 2005 23:06:18 +0200 > Subject: Re: sparc64/82569: USB mass storage plug/unplug causes system panic > > > > > On Thu, Jun 23, 2005 at 11:01:15AM +0000, Andy Jema wrote: > > > > > > >Number: 82569 > > > >Category: sparc64 > > > >Synopsis: USB mass storage plug/unplug causes system panic > > > >Confidential: no > > > >Severity: serious > > > >Priority: medium > > > >Responsible: freebsd-sparc64 > > > >State: open > > > >Quarter: > > > >Keywords: > > > >Date-Required: > > > >Class: sw-bug > > > >Submitter-Id: current-users > > > >Arrival-Date: Thu Jun 23 11:10:19 GMT 2005 > > > >Closed-Date: > > > >Last-Modified: > > > >Originator: Andy Jema > > > >Release: 6.0-CURRENT > > > >Organization: > > > OT > > > >Environment: > > > FreeBSD 6.0-20050601-SNAP #0: Thu Jun 2 05:29:17 UTC 2005 > > > root@u60.samsco.home:/usr/obj/usr/src/sys/GENERIC > > > >Description: > > > Just installed FreeBSD 6.0-20050601-SNAP. I repeatously pluged and unpluged a USB mass storage(DVD-ROM) on my Blade 150 and as result got a kernel panic > > > > > > blade150# kldload usb.ko > > > ohci0: mem 0x2000000-0x2007fff at device 12.3 on pci0 > > > ohci0: [GIANT-LOCKED] > > > usb0: OHCI version 1.0, legacy support > > > usb0: on ohci0 > > > usb0: USB revision 1.0 > > > uhub0: (0x108e) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > > > uhub0: 4 ports with 4 removable, self powered > > > blade150# kldload umass.ko > > > blade150# (null): at uhub0 port 4 (addr 2) disconnected > > > > > > blade150# > > > blade150# umass0: USB2.0 TO IDE USB Storage Adapter, rev 2.00/11.01, addr 2 > > > umass0: at uhub0 port 4 (addr 2) disconnected > > > panic: trap: memory address not aligned > > > cpuid = 0 > > > KDB: enter: panic > > > [thread pid 16 tid 100019 ] > > > Stopped at kdb_enter+0x3c: ta %xcc, 1 > > > db> > > > > > > >How-To-Repeat: > > > plug/unplug repeatously a USB CD/DVD-ROM > > > > Is this really sparc64-specific, i.e. it doesn't happen when repeatedly > > plugging in and unplugging the same drive on e.g. i386? Is the drive > > otherwise useable on sparc64? > > > > Hello, Marius! > My flash drive works fine on i386, there is only hassle bug with plug/unplug with mounted filesystem on this one. AFAIK, it's well known bug, btw, would it be fixed soon? Don't know, sorry. > However on sparc64 this flash is still usable. Ok, now I'm confused; so umass(4) works with your USB flash drive on both i386 and sparc64 alike, i.e. works modulo the issue with unplugging while the file system is mounted? How about your USB CD/DVD-ROM? Marius From owner-freebsd-sparc64@FreeBSD.ORG Sat Aug 27 05:34:47 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D181D16A41F for ; Sat, 27 Aug 2005 05:34:47 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from mail.ryu16.org (221x249x107x69.ap221.ftth.ucom.ne.jp [221.249.107.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0404A43D48 for ; Sat, 27 Aug 2005 05:34:45 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id j7R5whgr086729; Sat, 27 Aug 2005 14:58:43 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id j7R5wfwD086728; Sat, 27 Aug 2005 14:58:41 +0900 (JST) (envelope-from imura) Date: Sat, 27 Aug 2005 14:58:41 +0900 From: "R. Imura" To: Marius Strobl Message-ID: <20050827055841.GB83681%imura@ryu16.org> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050824191437.A36508@newtrinity.zeist.de> User-Agent: Mutt/1.4.1i-ja.1 Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 05:34:47 -0000 Hi, On Wed, Aug 24, 2005 at 07:14:37PM +0200, Marius Strobl wrote: > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > > architectures that allow on-aligned memory access. It also needs > > > big-endian clean up too.(See sys/mchain.h) > > > > To begin with, you might want this patch. :) > > > > You probably should go the NetBSD route and change the consumers > of these macros to use the byteorder(9) functions like htole16(9) > directly. Btw., NetBSD seems to also have fixed the alignment > issues. I was too rushed that these macros in my patch are no longer used in our system, so we can safe to remove them. Fixes are done in 3 years ago. http://docs.freebsd.org/cgi/mid.cgi?200212161620.gBGGK6uX080655 Regards, - R. Imura From owner-freebsd-sparc64@FreeBSD.ORG Sat Aug 27 12:55:12 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 494A216A41F for ; Sat, 27 Aug 2005 12:55:12 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B26B43D48 for ; Sat, 27 Aug 2005 12:55:11 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7RCt9gA096505; Sat, 27 Aug 2005 14:55:09 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7RCt3sR096504; Sat, 27 Aug 2005 14:55:03 +0200 (CEST) (envelope-from marius) Date: Sat, 27 Aug 2005 14:55:03 +0200 From: Marius Strobl To: "R. Imura" Message-ID: <20050827145503.G19225@newtrinity.zeist.de> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> <20050827055841.GB83681%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050827055841.GB83681%imura@ryu16.org>; from imura@ryu16.org on Sat, Aug 27, 2005 at 02:58:41PM +0900 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.186; host: newtrinity.zeist.de) Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 12:55:12 -0000 On Sat, Aug 27, 2005 at 02:58:41PM +0900, R. Imura wrote: > Hi, > > On Wed, Aug 24, 2005 at 07:14:37PM +0200, Marius Strobl wrote: > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > > > architectures that allow on-aligned memory access. It also needs > > > > big-endian clean up too.(See sys/mchain.h) > > > > > > To begin with, you might want this patch. :) > > > > > > > You probably should go the NetBSD route and change the consumers > > of these macros to use the byteorder(9) functions like htole16(9) > > directly. Btw., NetBSD seems to also have fixed the alignment > > issues. > > I was too rushed that these macros in my patch are no longer used > in our system, so we can safe to remove them. > > Fixes are done in 3 years ago. > http://docs.freebsd.org/cgi/mid.cgi?200212161620.gBGGK6uX080655 > That commit only dealt with the kernel part, these macros are still used in the userland part: > grep -r htoles /usr/src/contrib/smbfs/* /usr/src/contrib/smbfs/lib/smb/nb_name.c:#define NBENCODE(c) (htoles((u_short)(((u_char)(c) >> 4) | \ Marius From owner-freebsd-sparc64@FreeBSD.ORG Sat Aug 27 13:20:19 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E34D016A41F for ; Sat, 27 Aug 2005 13:20:18 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from mail.ryu16.org (221x249x107x69.ap221.ftth.ucom.ne.jp [221.249.107.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0DDA43D45 for ; Sat, 27 Aug 2005 13:20:17 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id j7RDK9gr029093; Sat, 27 Aug 2005 22:20:09 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id j7RDK8Ws029092; Sat, 27 Aug 2005 22:20:08 +0900 (JST) (envelope-from imura) Date: Sat, 27 Aug 2005 22:20:08 +0900 From: "R. Imura" To: Marius Strobl Message-ID: <20050827132008.GA28954%imura@ryu16.org> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> <20050827055841.GB83681%imura@ryu16.org> <20050827145503.G19225@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050827145503.G19225@newtrinity.zeist.de> User-Agent: Mutt/1.4.1i-ja.1 Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 13:20:19 -0000 On Sat, Aug 27, 2005 at 02:55:03PM +0200, Marius Strobl wrote: > On Sat, Aug 27, 2005 at 02:58:41PM +0900, R. Imura wrote: > > Hi, > > > > On Wed, Aug 24, 2005 at 07:14:37PM +0200, Marius Strobl wrote: > > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > > > > architectures that allow on-aligned memory access. It also needs > > > > > big-endian clean up too.(See sys/mchain.h) > > > > > > > > To begin with, you might want this patch. :) > > > > > > > > > > You probably should go the NetBSD route and change the consumers > > > of these macros to use the byteorder(9) functions like htole16(9) > > > directly. Btw., NetBSD seems to also have fixed the alignment > > > issues. > > > > I was too rushed that these macros in my patch are no longer used > > in our system, so we can safe to remove them. > > > > Fixes are done in 3 years ago. > > http://docs.freebsd.org/cgi/mid.cgi?200212161620.gBGGK6uX080655 > > > > That commit only dealt with the kernel part, these macros are still > used in the userland part: > > grep -r htoles /usr/src/contrib/smbfs/* > /usr/src/contrib/smbfs/lib/smb/nb_name.c:#define NBENCODE(c) (htoles((u_short)(((u_char)(c) >> 4) | \ > > Marius I see. :) Then, could you test this patch? Index: contrib/smbfs/lib/smb/mbuf.c =================================================================== RCS file: /home/ncvs/src/contrib/smbfs/lib/smb/mbuf.c,v retrieving revision 1.2 diff -u -r1.2 mbuf.c --- contrib/smbfs/lib/smb/mbuf.c 19 Oct 2004 17:44:31 -0000 1.2 +++ contrib/smbfs/lib/smb/mbuf.c 27 Aug 2005 13:07:14 -0000 @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD: src/contrib/smbfs/lib/smb/mbuf.c,v 1.2 2004/10/19 17:44:31 obrien Exp $"); #include +#include #include #include #include @@ -268,7 +269,7 @@ mb_put_int64be(struct mbdata *mbp, int64_t x) { MB_PUT(int64_t); - *p = htobeq(x); + *p = htobe64(x); return 0; } @@ -276,7 +277,7 @@ mb_put_int64le(struct mbdata *mbp, int64_t x) { MB_PUT(int64_t); - *p = htoleq(x); + *p = htole64(x); return 0; } @@ -367,7 +368,7 @@ u_int16_t v; int error = mb_get_uint16(mbp, &v); - *x = letohs(v); + *x = le16toh(v); return error; } @@ -376,7 +377,7 @@ u_int16_t v; int error = mb_get_uint16(mbp, &v); - *x = betohs(v); + *x = be16toh(v); return error; } @@ -393,7 +394,7 @@ int error; error = mb_get_uint32(mbp, &v); - *x = betohl(v); + *x = be32toh(v); return error; } @@ -404,7 +405,7 @@ int error; error = mb_get_uint32(mbp, &v); - *x = letohl(v); + *x = le32toh(v); return error; } @@ -421,7 +422,7 @@ int error; error = mb_get_int64(mbp, &v); - *x = betohq(v); + *x = be64toh(v); return error; } @@ -432,7 +433,7 @@ int error; error = mb_get_int64(mbp, &v); - *x = letohq(v); + *x = le64toh(v); return error; } Index: contrib/smbfs/lib/smb/nb_name.c =================================================================== RCS file: /home/ncvs/src/contrib/smbfs/lib/smb/nb_name.c,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 nb_name.c --- contrib/smbfs/lib/smb/nb_name.c 20 Dec 2001 16:16:25 -0000 1.1.1.2 +++ contrib/smbfs/lib/smb/nb_name.c 27 Aug 2005 13:08:13 -0000 @@ -31,9 +31,9 @@ * * $Id: nb_name.c,v 1.2 2001/08/22 03:31:36 bp Exp $ */ +#include #include #include -#include /* for endiand macros */ #include #include @@ -139,7 +139,7 @@ return len; } -#define NBENCODE(c) (htoles((u_short)(((u_char)(c) >> 4) | \ +#define NBENCODE(c) (htole16((u_short)(((u_char)(c) >> 4) | \ (((u_char)(c) & 0xf) << 8)) + 0x4141)) static void Index: contrib/smbfs/lib/smb/rap.c =================================================================== RCS file: /home/ncvs/src/contrib/smbfs/lib/smb/rap.c,v retrieving revision 1.4 diff -u -r1.4 rap.c --- contrib/smbfs/lib/smb/rap.c 19 Jun 2004 19:03:01 -0000 1.4 +++ contrib/smbfs/lib/smb/rap.c 27 Aug 2005 13:10:08 -0000 @@ -35,6 +35,7 @@ * This is very simple implementation of RAP protocol. */ #include +#include #include #include #include @@ -45,8 +46,6 @@ #include #include -#include - #include #include #include @@ -290,7 +289,7 @@ return error; switch (ptype) { case 'h': - *value = letohs(*(u_int16_t*)rap->r_npbuf); + *value = le16toh(*(u_int16_t*)rap->r_npbuf); break; default: return EINVAL; @@ -320,8 +319,8 @@ if (error) return error; rp = (u_int16_t*)rap->r_pbuf; - rap->r_result = letohs(*rp++); - conv = letohs(*rp++); + rap->r_result = le16toh(*rp++); + conv = le16toh(*rp++); rap->r_npbuf = (char*)rp; rap->r_entries = entries = 0; done = 0; @@ -329,7 +328,7 @@ ptype = *p; switch (ptype) { case 'e': - rap->r_entries = entries = letohs(*(u_int16_t*)rap->r_npbuf); + rap->r_entries = entries = le16toh(*(u_int16_t*)rap->r_npbuf); rap->r_npbuf += 2; p++; break; Index: sys/sys/mchain.h =================================================================== RCS file: /home/ncvs/src/sys/sys/mchain.h,v retrieving revision 1.9 diff -u -r1.9 mchain.h --- sys/sys/mchain.h 29 Jul 2005 13:22:36 -0000 1.9 +++ sys/sys/mchain.h 27 Aug 2005 13:13:05 -0000 @@ -34,54 +34,6 @@ #ifndef _SYS_MCHAIN_H_ #define _SYS_MCHAIN_H_ -#include - -#ifndef _KERNEL -/* - * This macros probably belongs to the endian.h - */ -#if (BYTE_ORDER == LITTLE_ENDIAN) - -#define htoles(x) ((u_int16_t)(x)) -#define letohs(x) ((u_int16_t)(x)) -#define htolel(x) ((u_int32_t)(x)) -#define letohl(x) ((u_int32_t)(x)) -#define htoleq(x) ((int64_t)(x)) -#define letohq(x) ((int64_t)(x)) - -#define htobes(x) (__htons(x)) -#define betohs(x) (__ntohs(x)) -#define htobel(x) (__htonl(x)) -#define betohl(x) (__ntohl(x)) - -static __inline int64_t -htobeq(int64_t x) -{ - return (int64_t)__htonl((u_int32_t)(x >> 32)) | - (int64_t)__htonl((u_int32_t)(x & 0xffffffff)) << 32; -} - -static __inline int64_t -betohq(int64_t x) -{ - return (int64_t)__ntohl((u_int32_t)(x >> 32)) | - (int64_t)__ntohl((u_int32_t)(x & 0xffffffff)) << 32; -} - -#else /* (BYTE_ORDER == LITTLE_ENDIAN) */ - -#error "Macros for Big-Endians are incomplete" - -/* -#define htoles(x) ((u_int16_t)(x)) -#define letohs(x) ((u_int16_t)(x)) -#define htolel(x) ((u_int32_t)(x)) -#define letohl(x) ((u_int32_t)(x)) -*/ -#endif /* (BYTE_ORDER == LITTLE_ENDIAN) */ -#endif /* _KERNEL */ - - #ifdef _KERNEL /* Regards, - R. Imura From owner-freebsd-sparc64@FreeBSD.ORG Sat Aug 27 13:37:14 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D59A16A41F for ; Sat, 27 Aug 2005 13:37:14 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8BDD43D5A for ; Sat, 27 Aug 2005 13:37:12 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j7RDbAxY096969; Sat, 27 Aug 2005 15:37:11 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j7RDb4WB096968; Sat, 27 Aug 2005 15:37:04 +0200 (CEST) (envelope-from marius) Date: Sat, 27 Aug 2005 15:37:04 +0200 From: Marius Strobl To: "R. Imura" Message-ID: <20050827153704.H19225@newtrinity.zeist.de> References: <200508110931.13802.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> <20050827055841.GB83681%imura@ryu16.org> <20050827145503.G19225@newtrinity.zeist.de> <20050827132008.GA28954%imura@ryu16.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20050827132008.GA28954%imura@ryu16.org>; from imura@ryu16.org on Sat, Aug 27, 2005 at 10:20:08PM +0900 X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-7; AVE: 6.31.1.0; VDF: 6.31.1.186; host: newtrinity.zeist.de) Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 13:37:14 -0000 On Sat, Aug 27, 2005 at 10:20:08PM +0900, R. Imura wrote: > On Sat, Aug 27, 2005 at 02:55:03PM +0200, Marius Strobl wrote: > > On Sat, Aug 27, 2005 at 02:58:41PM +0900, R. Imura wrote: > > > Hi, > > > > > > On Wed, Aug 24, 2005 at 07:14:37PM +0200, Marius Strobl wrote: > > > > > > smbfs does not work on sparc64 as smbfs assumes it runs on > > > > > > architectures that allow on-aligned memory access. It also needs > > > > > > big-endian clean up too.(See sys/mchain.h) > > > > > > > > > > To begin with, you might want this patch. :) > > > > > > > > > > > > > You probably should go the NetBSD route and change the consumers > > > > of these macros to use the byteorder(9) functions like htole16(9) > > > > directly. Btw., NetBSD seems to also have fixed the alignment > > > > issues. > > > > > > I was too rushed that these macros in my patch are no longer used > > > in our system, so we can safe to remove them. > > > > > > Fixes are done in 3 years ago. > > > http://docs.freebsd.org/cgi/mid.cgi?200212161620.gBGGK6uX080655 > > > > > > > That commit only dealt with the kernel part, these macros are still > > used in the userland part: > > > grep -r htoles /usr/src/contrib/smbfs/* > > /usr/src/contrib/smbfs/lib/smb/nb_name.c:#define NBENCODE(c) (htoles((u_short)(((u_char)(c) >> 4) | \ > > > > Marius > > I see. :) > Then, could you test this patch? > While it should fix compilation on sparc64 it still doesn't deal with the alignment issues. Please have a look at the changes that went into the respective kernel and userland parts in NetBSD if you want to get it working on FreeBSD/sparc64, too. Marius From owner-freebsd-sparc64@FreeBSD.ORG Sat Aug 27 14:05:32 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8671316A41F for ; Sat, 27 Aug 2005 14:05:32 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from mail.ryu16.org (221x249x107x69.ap221.ftth.ucom.ne.jp [221.249.107.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id A893243D45 for ; Sat, 27 Aug 2005 14:05:31 +0000 (GMT) (envelope-from imura@ryu16.org) Received: from redeye.xt.ryu16.org (localhost [127.0.0.1]) by mail.ryu16.org (8.12.9p1/8.12.9) with ESMTP id j7RE5Qgr030784; Sat, 27 Aug 2005 23:05:26 +0900 (JST) (envelope-from imura@redeye.xt.ryu16.org) Received: (from imura@localhost) by redeye.xt.ryu16.org (8.12.9p1/8.12.9/Submit) id j7RE5PA9030783; Sat, 27 Aug 2005 23:05:25 +0900 (JST) (envelope-from imura) Date: Sat, 27 Aug 2005 23:05:25 +0900 From: "R. Imura" To: Marius Strobl Message-ID: <20050827140525.GA29949%imura@ryu16.org> References: <200508201453.40439.jhb@FreeBSD.org> <20050823081517.GB4956@rndsoft.co.kr> <200508230911.18163.john@jnielsen.net> <20050824010147.GD4956@rndsoft.co.kr> <20050824143940.GA65078%imura@ryu16.org> <20050824191437.A36508@newtrinity.zeist.de> <20050827055841.GB83681%imura@ryu16.org> <20050827145503.G19225@newtrinity.zeist.de> <20050827132008.GA28954%imura@ryu16.org> <20050827153704.H19225@newtrinity.zeist.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050827153704.H19225@newtrinity.zeist.de> User-Agent: Mutt/1.4.1i-ja.1 Cc: John Nielsen , freebsd-sparc64@freebsd.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 14:05:32 -0000 On Sat, Aug 27, 2005 at 03:37:04PM +0200, Marius Strobl wrote: > While it should fix compilation on sparc64 it still doesn't deal > with the alignment issues. Please have a look at the changes that > went into the respective kernel and userland parts in NetBSD if > you want to get it working on FreeBSD/sparc64, too. > > Marius Sorry but while I'm not a smbfs maintainer, I've just found a person who wanted to use smbfs on sparc64 and I just thought I want to help him. Because I don't have sparc64, I won't do anymore about this. I hope sparc64 people make smbfs work on sparc64. Regards, - R. Imura