Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 May 2010 05:44:57 +0200
From:      Giovanni Trematerra <giovanni.trematerra@gmail.com>
To:        Demelier David <demelier.david@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Kernel panic when unpluggin AC adaptor
Message-ID:  <AANLkTilcNzzLt2GUPbL_Vqjspzx5a-oem1oZpKAYqoN8@mail.gmail.com>
In-Reply-To: <1273257226.1671.3.camel@malikania.fr>
References:  <4DEBDE2C-C0D2-469D-AC42-DD5027926424@FreeBSD.org> <i2i4e6cba831005051407keabbe871tf70749b80276298f@mail.gmail.com> <h2mb3954bba1005060127t619952f4k63ed35a4c6800a0b@mail.gmail.com> <m2l4e6cba831005060216zae79a16bw1d4671ca79294a0c@mail.gmail.com> <i2ub3954bba1005061103ya3dabb7dw2d60d3aab712ed47@mail.gmail.com> <v2tb3954bba1005070134x3cca53c1vc67e5557e680061d@mail.gmail.com> <i2j4e6cba831005070159qa3df06ccw925073a05a1057f7@mail.gmail.com> <20100507120843.GA1738@Melon.malikania.fr> <k2u4e6cba831005070922vfc3bcf18i59551da3b40317a@mail.gmail.com> <1273257226.1671.3.camel@malikania.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
--0015174733ce3d093504865d77b5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, May 7, 2010 at 8:33 PM, Demelier David <demelier.david@gmail.com> w=
rote:
> Le Vendredi 07 mai 2010 =E0 18:22 +0200, Giovanni Trematerra a =E9crit :
>> On Fri, May 7, 2010 at 2:08 PM, Demelier David <demelier.david@gmail.com=
> wrote:
>> > Hi,
>> > =A0 =A0 =A0 =A0I noticed that pluggin the AC adaptor when I boot witho=
ut it does not
>> > =A0 =A0 =A0 =A0panic. It only panic when removing it.
>> >
>> > =A0 =A0 =A0 =A0Maybe that could help ?
>> >
>>
>> Good to know. The problem lies somewhere when performance state change.
>> In your case it happens when you remove AC adaptor. Let's hope someone o=
n
>> acpi@ ml comes up with a good idea.
>>
>
> Okay so for the moment no change, I'll wait for someone with an idea
> that could solve my problem. For me because the panic only happens when
> changing profile from ac plugged -> ac unplugged (and not the reverse) I
> would think it's a cpu related acpi issue.
>

I looked deeper and it seems to me that when you unplug the AC
adapter, acpi_cpu_notify calls acpi_cpu_cx_cst that try to allocate a
new cx_ptr->p_lvlx  via acpi_PkgGas.
If acpi_PkgGas set cx_ptr->p_lvlx to NULL for any reasons you'll have
the panic that you reported.
A solution would be to set acpi_cpu_hook to NULL so acpi_cpu_idle won't cal=
l it.
I need some time to have a patch because of the possible race between
acpi_cpu_notify and
acpi_cpu_idle during set acpi_cpu_hook to NULL.
if you have time and want panic your system you could try the attached
patch, just to be
sure that we catch it.

Thanks

--
Gianni

--0015174733ce3d093504865d77b5
Content-Type: text/plain; charset=US-ASCII; name="lvlx.diff.txt"
Content-Disposition: attachment; filename="lvlx.diff.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g93ls0t80

SW5kZXg6IHN5cy9kZXYvYWNwaWNhL2FjcGlfY3B1LmMKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9h
Y3BpY2EvYWNwaV9jcHUuYwkocmV2aXNpb24gMjA3OTQ3KQorKysgc3lzL2Rldi9hY3BpY2EvYWNw
aV9jcHUuYwkod29ya2luZyBjb3B5KQpAQCAtNjA5LDcgKzYwOSw5IEBAIGFjcGlfY3B1X2dlbmVy
aWNfY3hfcHJvYmUoc3RydWN0IGFjcGlfY3B1X3NvZnRjICpzCiAJICAgIGN4X3B0ci0+dHJhbnNf
bGF0ID0gQWNwaUdibF9GQURULkMyTGF0ZW5jeTsKIAkgICAgY3hfcHRyKys7CiAJICAgIHNjLT5j
cHVfY3hfY291bnQrKzsKLQl9CisJfSBlbHNlCisJCXBhbmljKCIlczogQ2Fubm90IGFsbG9jYXRl
IHJlc291cmNlICVkIGZvciBDMyBzdGF0ZSIsIF9fZnVuY19fLCAKKwkJICAgIGN4X3B0ci0+cmVz
X3R5cGUpOwogICAgIH0KICAgICBpZiAoc2MtPmNwdV9wX2Jsa19sZW4gPCA2KQogCXJldHVybjsK
QEAgLTYyNSw3ICs2MjcsOSBAQCBhY3BpX2NwdV9nZW5lcmljX2N4X3Byb2JlKHN0cnVjdCBhY3Bp
X2NwdV9zb2Z0YyAqcwogCSAgICBjeF9wdHItPnRyYW5zX2xhdCA9IEFjcGlHYmxfRkFEVC5DM0xh
dGVuY3k7CiAJICAgIGN4X3B0cisrOwogCSAgICBzYy0+Y3B1X2N4X2NvdW50Kys7Ci0JfQorCX0g
ZWxzZQorCQlwYW5pYygiJXM6IENhbm5vdCBhbGxvY2F0ZSByZXNvdXJjZSAlZCBmb3IgQzMgc3Rh
dGUiLCBfX2Z1bmNfXywgCisJCSAgICBjeF9wdHItPnJlc190eXBlKTsKICAgICB9CiB9CiAKQEAg
LTczMiw3ICs3MzYsOCBAQCBhY3BpX2NwdV9jeF9jc3Qoc3RydWN0IGFjcGlfY3B1X3NvZnRjICpz
YykKIAkJCSAgICAgY3hfcHRyLT50cmFuc19sYXQpKTsKIAkgICAgY3hfcHRyKys7CiAJICAgIHNj
LT5jcHVfY3hfY291bnQrKzsKLQl9CisJfSBlbHNlCisJCXBhbmljKCJHb3QgaXQhIGFjcGlfUGtn
R2FzIHNldCBwX2x2bHggdG8gTlVMTCIpOwogICAgIH0KICAgICBBY3BpT3NGcmVlKGJ1Zi5Qb2lu
dGVyKTsKIAo=
--0015174733ce3d093504865d77b5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilcNzzLt2GUPbL_Vqjspzx5a-oem1oZpKAYqoN8>