From owner-freebsd-sparc64@FreeBSD.ORG Wed Sep 22 08:36:49 2004 Return-Path: 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 D1BBD16A4CE for ; Wed, 22 Sep 2004 08:36:49 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BD0943D54 for ; Wed, 22 Sep 2004 08:36:49 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i8M8ZMAh097390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 22 Sep 2004 17:35:22 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i8M8aQ34009170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Sep 2004 17:36:26 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.10/8.12.10/Submit) id i8M8aPhH009169; Wed, 22 Sep 2004 17:36:25 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Wed, 22 Sep 2004 17:36:25 +0900 From: Pyun YongHyeon To: dhaigh@gatorzone.com Message-ID: <20040922083625.GA8910@kt-is.co.kr> References: <20040920104006.GA1905@kt-is.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040920104006.GA1905@kt-is.co.kr> User-Agent: Mutt/1.4.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: sparc64@freebsd.org Subject: Re: PR sparc64/71729 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 08:36:49 -0000 On Mon, Sep 20, 2004 at 07:40:06PM +0900, To dhaigh@gatorzone.com wrote: > On Fri, Sep 17, 2004 at 09:29:41AM -0400, Doug Haigh wrote: > > > > I am not sure if the PR got updated, but I wanted to let you know that the > > printf in a kernel thread only fails if you are on a SMP machine. It appears > > that if you printf on a CPU other than CPU #0, it will panic the kernel. > > > > After reading your mail, I made a small test program which creates > a kernel thread and ran it on AXe(UP) and U2(SMP). > Under AXe it worked as expected but it paniced on U2. > So it seems that there is some issues in OF console. > Backtrace for the panic is somthing like: > While looking into the ofw_console(4) code I noticed there is possible races there. So I patched the code and ran it. However it didn't fix the problem. Since we can't simply use a mutex in ofw_cons_putc(), there should be other way to workaround this. Have no idea yet. If you really really want to see your messages from a kernel thread you can do one of the following(tested on U2): 1. remove invocation of timeout(9) in ofw_console.c. With this modification, you can't enter characters with keyboard. 2. use sc + creator + uart + puc instead of ofw_console(4) On my U2, keyboard input didn't work. If you want to see my partial patch as a starting point please let me know. Cheers, Pyun YongHyeon -- Pyun YongHyeon