From owner-freebsd-acpi@FreeBSD.ORG Wed May 5 11:03:52 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37FB01065678; Wed, 5 May 2010 11:03:52 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 63F898FC18; Wed, 5 May 2010 11:03:51 +0000 (UTC) Received: by wwb39 with SMTP id 39so400887wwb.13 for ; Wed, 05 May 2010 04:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=1JW5mpfKrcC1r2YSHJTZz0ac5N3ma5jXG631aqy8Z1Q=; b=XD7UlCfi9jjVlB6vVuOhPNs+97k04AWI2+6NBvMYW4p4Be0ks4mQHP70DOZIANtJlV 8bmEYU4AXgiMBuiRCW56TULC6a7tD7IymAZSzULz+cLzRfnX3uHH2RqpAam3P5JKSQin fNozS5+4iggWgq1GU+EHB/XF9W0xq9v+/QW0A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=fR0KMbQxYGv9WSVdx5z9eXl/jMoyVPIbHO3yyDBxjcvpzwuICdObyu96K6SiRl6eep xWcJqE5XAFeXgJIALbipdgbgZINRH+dIA5LU6nTyEmYyiTrcZn/in+GQgeRGfymskvvu d6qd8XeMu5r3scGO2Fb9Xra20hkKiwaQ9nIuE= Received: by 10.227.142.71 with SMTP id p7mr2561051wbu.201.1273057427868; Wed, 05 May 2010 04:03:47 -0700 (PDT) Received: from Melon.malikania.fr (wifi-osiris-sec-183-144.u-strasbg.fr [130.79.183.144]) by mx.google.com with ESMTPS id x14sm57743796wbs.12.2010.05.05.04.03.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 May 2010 04:03:46 -0700 (PDT) Date: Wed, 5 May 2010 13:03:32 +0200 From: Demelier David To: Rui Paulo Message-ID: <20100505110332.GA1578@Melon.malikania.fr> References: <20100504200139.GP23646@deviant.kiev.zoral.com.ua> <20100504203809.GR23646@deviant.kiev.zoral.com.ua> <42ACDAF6-7EA9-4CE9-AA8D-FDA678A1EA74@FreeBSD.org> <20100505074045.GA28030@Abricot.malikania.fr> <4DEBDE2C-C0D2-469D-AC42-DD5027926424@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DEBDE2C-C0D2-469D-AC42-DD5027926424@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Giovanni Trematerra , freebsd-stable@freebsd.org, freebsd-acpi@freebsd.org Subject: Re: Kernel panic when unpluggin AC adaptor X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 11:03:52 -0000 On Wed, May 05, 2010 at 10:49:23AM +0100, Rui Paulo wrote: > > On 5 May 2010, at 08:40, Demelier David wrote: > > > On Wed, May 05, 2010 at 01:19:45AM +0100, Rui Paulo wrote: > >> On 4 May 2010, at 21:38, Kostik Belousov wrote: > >> > >>> On Tue, May 04, 2010 at 10:27:23PM +0200, David DEMELIER wrote: > >>>> 2010/5/4 Kostik Belousov : > >>>>> On Tue, May 04, 2010 at 06:35:52PM +0200, David DEMELIER wrote: > >>>>>> Good news ! It worked, check the picture here : > >>>>>> > >>>>>> http://img63.imageshack.us/img63/4244/dsc00361g.jpg > >>>>> > >>>>> Please try adding code fragment like this: > >>>>> if (cx_next->p_lvlx == NULL) > >>>>> printf("Going to panic.\n"); > >>>>> to dev/acpi/acpi_cpu.c:acpi_cpu_idle() function, right before > >>>>> CPU_GET_REG(cx_next->p_lvlx, 1); > >>>>> line and see if it prints the message immediately before the panic. > >>>>> > >>>> > >>>> Yes it does at the beginning of the kernel panic. > >>> > >>> Ok, so the point of panic is found, it is NULL cx_next->p_lvlx resource. > >>> With the data in hand, I recommend you to ask on acpi@ (added a Cc:) > >>> about the cause and possible solution. > >> > >> I don't remember the details, but I've seen this before. Does your CPU Cx levels change when you plug/unplug the AC adapter? > >> > > > > May 4 15:48:32 Melon power_profile: changed to 'economy' > > May 4 15:48:35 Melon power_profile: changed to 'performance' > > I wasn't asking about the profiles. Show us the output of sysctl dev.cpu with and without the AC cord plugged in. > That is when I have ac unplugged : $ sysctl dev.cpu dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.CPU0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq: 1200 dev.cpu.0.freq_levels: 2101/35000 1837/30625 1600/23888 1400/20902 1200/15000 1050/13125 900/11250 750/9375 600/7500 450/5625 300/3750 150/1875 dev.cpu.0.cx_supported: C1/1 C2/57 dev.cpu.0.cx_lowest: C2 dev.cpu.0.cx_usage: 7.22% 92.77% last 2482us dev.cpu.1.%desc: ACPI CPU dev.cpu.1.%driver: cpu dev.cpu.1.%location: handle=\_PR_.CPU1 dev.cpu.1.%pnpinfo: _HID=none _UID=0 dev.cpu.1.%parent: acpi0 dev.cpu.1.cx_supported: C1/1 C2/57 dev.cpu.1.cx_lowest: C2 dev.cpu.1.cx_usage: 5.55% 94.44% last 7724us -- Demelier David