From owner-freebsd-current@FreeBSD.ORG Tue Nov 18 13:52:11 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89F4716A4D0 for ; Tue, 18 Nov 2003 13:52:11 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC0FB43FE5 for ; Tue, 18 Nov 2003 13:52:07 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id hAILo1Mg098167; Tue, 18 Nov 2003 16:50:01 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hAILo12K098164; Tue, 18 Nov 2003 16:50:01 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Tue, 18 Nov 2003 16:50:01 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Nate Lawson In-Reply-To: <20031118132905.P64933@root.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Updated acpi_cpu patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2003 21:52:11 -0000 On Tue, 18 Nov 2003, Nate Lawson wrote: > On Tue, 18 Nov 2003, Robert Watson wrote: > > On Tue, 18 Nov 2003, Nate Lawson wrote: > > > > > Below you'll find the update patch for acpi_cpu. Please test this, > > > especially for SMP and laptops with _CST objects in their ASL. > > ... > > > Notes: > > > * Add a detach method that disables entry to acpi_cpu_idle and in the SMP > > > case, IPIs all processors to exit sleeping. This fixes a panic on > > > shutdown for MP boxes. > > > > Sigh, I appear to have been mistaken about the SMP reboot problem being > > fixed, sorry about that. Mark's random_harvest panic appears to have > > caused me to miss the other failure mode in my last test. Stack trace > > attached, and I believe I'm running with your latest patch. > > Could you add a printf to the start of acpi_cpu_detach()? I want to see > if we're being called before or after ACPI is stopped ("Shutting down I modified acpi_cpu_detach: +acpi_cpu_detach(device_t dev) +{ + + printf("\nacpi_cpu_detach\n\n"); + But sure enough: syncing disks, buffers remaining... done Uptime: 56s Shutting down ACPI kernel trap 12 with interrupts disabled tanicR:e bAososteirntgi.o.n. d->td_turnstile != NULL failed at ../../../kern/subr_turnstile.c:437 cpuid = 0; Debugger("panic") Stopped at Debugger+0x55: xchgl %ebx,in_Debugger.0 db> So indeed, it doesn't look like the ACPI detach call has gone out yet. > ACPI"). Also, please do: > l *AcpiGetRegister+0x61 > I think it's the call to get the bus master status, which is interesting > since this means that cpu_cx_count != 0 which means that acpi_cpu_detach > hasn't run yet. This is using the existing crash from the trace I sent you previously. (kgdb) l *AcpiGetRegister+0x61 0xc047c071 is in AcpiGetRegister (../../../contrib/dev/acpica/hwregs.c:375). 370 { 371 return_ACPI_STATUS (Status); 372 } 373 } 374 375 Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, 376 BitRegInfo->ParentRegister, &RegisterValue); 377 378 if (Flags & ACPI_MTX_LOCK) 379 { Also potentially useful information: (kgdb) inspect cpu_cx_count $1 = 1 Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories