From owner-freebsd-ppc@FreeBSD.ORG Mon Oct 1 11:08:38 2007 Return-Path: Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA8C16A421 for ; Mon, 1 Oct 2007 11:08:38 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1650513C474 for ; Mon, 1 Oct 2007 11:08:38 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l91B8cOp064571 for ; Mon, 1 Oct 2007 11:08:38 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l91B8ajC064567 for freebsd-ppc@FreeBSD.org; Mon, 1 Oct 2007 11:08:36 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Oct 2007 11:08:36 GMT Message-Id: <200710011108.l91B8ajC064567@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2007 11:08:38 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/93203 ppc FreeBSD PPC Can't Write to Partitions. 1 problem total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/111296 ppc [kernel] [patch] Support IMISS, DLMISS an DSMISS inter o power/112435 ppc [nexus] [patch] Update nexus children to use ofw_bus f 2 problems total. From owner-freebsd-ppc@FreeBSD.ORG Mon Oct 1 17:30:02 2007 Return-Path: Delivered-To: freebsd-ppc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0730A16A41B for ; Mon, 1 Oct 2007 17:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CC48413C48A for ; Mon, 1 Oct 2007 17:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l91HU1WE085328 for ; Mon, 1 Oct 2007 17:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l91HU1Gj085327; Mon, 1 Oct 2007 17:30:01 GMT (envelope-from gnats) Resent-Date: Mon, 1 Oct 2007 17:30:01 GMT Resent-Message-Id: <200710011730.l91HU1Gj085327@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ppc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Eric J. Christeson" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0268E16A419 for ; Mon, 1 Oct 2007 17:24:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id F393813C474 for ; Mon, 1 Oct 2007 17:24:34 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l91HOYMG008924 for ; Mon, 1 Oct 2007 17:24:34 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l91HOYZM008915; Mon, 1 Oct 2007 17:24:34 GMT (envelope-from nobody) Message-Id: <200710011724.l91HOYZM008915@www.freebsd.org> Date: Mon, 1 Oct 2007 17:24:34 GMT From: "Eric J. Christeson" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: powerpc/116789: 7.0-CURRENT-200709-powerpc doesn't show partitions X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2007 17:30:02 -0000 >Number: 116789 >Category: powerpc >Synopsis: 7.0-CURRENT-200709-powerpc doesn't show partitions >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ppc >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 01 17:30:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Eric J. Christeson >Release: 7.0-CURRENT-200709-powerpc >Organization: >Environment: I don't have any way to get info from machine. It's a PowerMac G4 MDD 1.0Ghz >Description: After partitioning my disc with 2 UFS partitions and booting sysinstall, fdisk doesn't find any partitions on the disc. I booted with http://people.freebsd.org/~grehan/miniinst.iso which found the partitions fine and was able to format them. >How-To-Repeat: Partition hard drive and boot into sysinstall. No partitions are found in fdisk. >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-ppc@FreeBSD.ORG Mon Oct 1 20:58:23 2007 Return-Path: Delivered-To: freebsd-ppc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B20D216A421; Mon, 1 Oct 2007 20:58:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9C76213C45A; Mon, 1 Oct 2007 20:58:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (marcel@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l91KwNmh098399; Mon, 1 Oct 2007 20:58:23 GMT (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l91KwN46098395; Mon, 1 Oct 2007 20:58:23 GMT (envelope-from marcel) Date: Mon, 1 Oct 2007 20:58:23 GMT Message-Id: <200710012058.l91KwN46098395@freefall.freebsd.org> To: eric.j.christeson@gmail.com, marcel@FreeBSD.org, freebsd-ppc@FreeBSD.org From: marcel@FreeBSD.org Cc: Subject: Re: powerpc/116789: 7.0-CURRENT-200709-powerpc doesn't show partitions X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2007 20:58:23 -0000 Synopsis: 7.0-CURRENT-200709-powerpc doesn't show partitions State-Changed-From-To: open->closed State-Changed-By: marcel State-Changed-When: Mon Oct 1 20:57:00 UTC 2007 State-Changed-Why: This was a known problem and fixed shortly after making the 200709 snapshot. The next snapshot or the first 7.0 BETA will have the fix. http://www.freebsd.org/cgi/query-pr.cgi?pr=116789 From owner-freebsd-ppc@FreeBSD.ORG Tue Oct 2 20:33:52 2007 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB16C16A419 for ; Tue, 2 Oct 2007 20:33:51 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id 7395413C4BD for ; Tue, 2 Oct 2007 20:33:51 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from excfreebsd.hq.netapp.com (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.7.5a-GA) with ESMTP id DED69532 (AUTH peterg@ptree32.com.au); Wed, 3 Oct 2007 06:33:36 +1000 (EST) Message-ID: <4702AB13.3060003@freebsd.org> Date: Tue, 02 Oct 2007 13:33:23 -0700 From: Peter Grehan User-Agent: Thunderbird 2.0.0.0 (X11/20070525) MIME-Version: 1.0 To: Jeff Roberson References: <200709271639.l8RGdREd032105@repoman.freebsd.org> <46FBDFE8.9050909@freebsd.org> <20070930153101.T583@10.0.0.1> <47004ACF.5020901@freebsd.org> <20070930184601.R583@10.0.0.1> In-Reply-To: <20070930184601.R583@10.0.0.1> Content-Type: multipart/mixed; boundary="------------090209030005060901090007" Cc: freebsd-ppc@freebsd.org Subject: Re: cvs commit: src/sys/kern sched_ule.c X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 20:33:52 -0000 This is a multi-part message in MIME format. --------------090209030005060901090007 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Jeff, > If you can test ULE on UP arm/powerpc I'd appreciate it. Works fine on ppc after some minor tweaks. I've attached the diff for those interested. A couple of questions: - Can ULE work without preemption ? When it wasn't enabled, the system wouldn't switch out of the idle loop. There's a comment in sched_idletd(): /* ULE relies on preemption for idle interruption. */ I'm asking because PREEMPTION has never been switched on in PPC, and it might be nice to enable ULE without having to determine if bugs are in PREEMPTION or ULE. - ppc's cpu_throw() was implemented in C. I modified it to pass the thread-lock mutex from the old thread, so the context switch routine would simply write it back. Is that an OK thing to do ? later, Peter. --------------090209030005060901090007 Content-Type: text/plain; name="ule.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ule.diff" Index: kern/sched_ule.c =================================================================== RCS file: /usr/home/ncvs/src/sys/kern/sched_ule.c,v retrieving revision 1.210 diff -d -u -r1.210 sched_ule.c --- kern/sched_ule.c 27 Sep 2007 16:39:27 -0000 1.210 +++ kern/sched_ule.c 1 Oct 2007 00:27:37 -0000 @@ -71,7 +71,7 @@ #include #include -#if !defined(__i386__) && !defined(__amd64__) +#if !defined(__i386__) && !defined(__amd64__) && !defined(__powerpc__) #error "This architecture is not currently compatible with ULE" #endif Index: powerpc/conf/GENERIC =================================================================== RCS file: /usr/home/ncvs/src/sys/powerpc/conf/GENERIC,v retrieving revision 1.71 diff -d -u -r1.71 GENERIC --- powerpc/conf/GENERIC 26 Sep 2007 20:05:07 -0000 1.71 +++ powerpc/conf/GENERIC 2 Oct 2007 02:00:27 -0000 @@ -30,7 +30,9 @@ options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator -options SCHED_4BSD #4BSD scheduler +options SCHED_ULE +#options SCHED_4BSD #4BSD scheduler +options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols options SCTP #Stream Control Transmission Protocol Index: powerpc/powerpc/genassym.c =================================================================== RCS file: /usr/home/ncvs/src/sys/powerpc/powerpc/genassym.c,v retrieving revision 1.58 diff -d -u -r1.58 genassym.c --- powerpc/powerpc/genassym.c 30 Nov 2006 04:17:05 -0000 1.58 +++ powerpc/powerpc/genassym.c 1 Oct 2007 00:08:13 -0000 @@ -137,6 +137,7 @@ ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FPU, PCB_FPU); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); Index: powerpc/powerpc/swtch.S =================================================================== RCS file: /usr/home/ncvs/src/sys/powerpc/powerpc/swtch.S,v retrieving revision 1.21 diff -d -u -r1.21 swtch.S --- powerpc/powerpc/swtch.S 7 Jan 2005 02:29:20 -0000 1.21 +++ powerpc/powerpc/swtch.S 1 Oct 2007 00:19:53 -0000 @@ -67,13 +67,17 @@ #include /* - * void cpu_switch(struct thread *old, struct thread *new) + * void cpu_switch(struct thread *old, + * struct thread *new, + * struct mutex *mtx); * * Switch to a new thread saving the current state in the old thread. */ ENTRY(cpu_switch) - lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */ + stw %r5,TD_LOCK(%r3) /* ULE: update old thread's lock */ + /* XXX needs to change for MP */ + lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */ mr %r12,%r2 stmw %r12,PCB_CONTEXT(%r5) /* Save the non-volatile GP regs. These can now be used for scratch */ Index: powerpc/powerpc/vm_machdep.c =================================================================== RCS file: /usr/home/ncvs/src/sys/powerpc/powerpc/vm_machdep.c,v retrieving revision 1.115 diff -d -u -r1.115 vm_machdep.c --- powerpc/powerpc/vm_machdep.c 6 Jun 2007 06:01:56 -0000 1.115 +++ powerpc/powerpc/vm_machdep.c 1 Oct 2007 01:13:50 -0000 @@ -197,7 +197,7 @@ cpu_throw(struct thread *old, struct thread *new) { - cpu_switch(old, new, NULL); + cpu_switch(old, new, old->td_lock); panic("cpu_throw() didn't"); } --------------090209030005060901090007-- From owner-freebsd-ppc@FreeBSD.ORG Tue Oct 2 21:31:33 2007 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C293B16A41A; Tue, 2 Oct 2007 21:31:33 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.freebsd.org (Postfix) with ESMTP id 728C813C461; Tue, 2 Oct 2007 21:31:33 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.103] (c-67-160-44-208.hsd1.wa.comcast.net [67.160.44.208]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id l92LVV5g086465 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 2 Oct 2007 17:31:32 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Tue, 2 Oct 2007 14:34:19 -0700 (PDT) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Peter Grehan In-Reply-To: <4702AB13.3060003@freebsd.org> Message-ID: <20071002142856.K594@10.0.0.1> References: <200709271639.l8RGdREd032105@repoman.freebsd.org> <46FBDFE8.9050909@freebsd.org> <20070930153101.T583@10.0.0.1> <47004ACF.5020901@freebsd.org> <20070930184601.R583@10.0.0.1> <4702AB13.3060003@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-ppc@freebsd.org Subject: Re: cvs commit: src/sys/kern sched_ule.c X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 21:31:33 -0000 On Tue, 2 Oct 2007, Peter Grehan wrote: > Hi Jeff, > >> If you can test ULE on UP arm/powerpc I'd appreciate it. > > Works fine on ppc after some minor tweaks. I've attached the diff for those > interested. A couple of questions: > > - Can ULE work without preemption ? When it wasn't enabled, the system > wouldn't switch out of the idle loop. There's a comment in sched_idletd(): It always must use preemption with idletd. You can disable it in all other cases by omitting the PREEMPTION option... Ah I see the bug now. I only tested by adjusting kern.sched.preempt_thresh. I didn't notice that the code in critical_exit() is conditional. I'll fix that so it should work without PREEMPTION. > > /* ULE relies on preemption for idle interruption. */ > > I'm asking because PREEMPTION has never been switched on in PPC, and it > might be nice to enable ULE without having to determine if bugs are in > PREEMPTION or ULE. Once I fix critical_exit() it should only preempt idle which is unlikely to cause bugs, except perhaps in your cpu_idle implementation. > > - ppc's cpu_throw() was implemented in C. I modified it to pass the > thread-lock mutex from the old thread, so the context switch routine would > simply write it back. Is that an OK thing to do ? Yes, that's fine. Thanks! Jeff > > later, > > Peter. >