Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbXLKSpD (ORCPT ); Tue, 11 Dec 2007 13:45:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751160AbXLKSox (ORCPT ); Tue, 11 Dec 2007 13:44:53 -0500 Received: from smtp-out.google.com ([216.239.45.13]:23229 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbXLKSow (ORCPT ); Tue, 11 Dec 2007 13:44:52 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:mime-version:content-type; b=XBbGXLCDnxdo/BEMV2/NMAqj2h6do7htct1XBf0vZnSBXV+hCX0c6CB/hHRbsyEfh gtaixzLEMZc0fIapPxdkQ== Message-ID: <3f1a065b0712111044p4270c756qcc5aaee922cfbd12@mail.gmail.com> Date: Tue, 11 Dec 2007 10:44:45 -0800 From: "Russell Leidich" To: linux-kernel@vger.kernel.org Subject: [PATCH] AMD Thermal Interrupt Support MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_22354_33230943.1197398685025" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 17798 Lines: 251 ------=_Part_22354_33230943.1197398685025 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline This patch adds thermal interrupt logging support for AMD Barcelona to 2.6.18. In the style of the existing Intel implementation, thermal interrupts are logged as machine checks. Interrupts are logged only when throttling is activated, i.e. when the package gets too hot. Files affected: 2.6.18/arch/x86-64/kernel/Makefile 2.6.18/arch/x86-64/kernel/mce_amd.c 2.6.18/arch/x86-64/kernel/mce_intel.c 2.6.18/arch/x86-64/kernel/mce_thermal.c (new) 2.6.18/include/asm-x86-64/kernel/mce.h Signed-off-by: Russell Leidich -- Russell Leidich ------=_Part_22354_33230943.1197398685025 Content-Type: application/octet-stream; name=patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fa2s94jt0 Content-Disposition: attachment; filename=patch LS0tIC8yLjYuMTgub3JpZy9hcmNoL3g4Nl82NC9rZXJuZWwvTWFrZWZpbGUJMjAwNy0xMi0xMCAx NjowNToyNi40OTU5ODgwMDAgLTA4MDAKKysrIC8yLjYuMTgvYXJjaC94ODZfNjQva2VybmVsL01h a2VmaWxlCTIwMDctMTItMTAgMTY6MDg6MzMuODU5MjM1MDAwIC0wODAwCkBAIC0xMSw3ICsxMSw3 IEBAIG9iai15CTo9IHByb2Nlc3MubyBzaWduYWwubyBlbnRyeS5vIHRyYXAKIAkJcGNpLWRtYS5v IHBjaS1ub21tdS5vIGFsdGVybmF0aXZlLm8KIAogb2JqLSQoQ09ORklHX1NUQUNLVFJBQ0UpCSs9 IHN0YWNrdHJhY2Uubwotb2JqLSQoQ09ORklHX1g4Nl9NQ0UpICAgICAgICAgKz0gbWNlLm8gbWNl X2VjYy5vIHRoZXJtX3Rocm90Lm8KK29iai0kKENPTkZJR19YODZfTUNFKQkJKz0gbWNlLm8gbWNl X2VjYy5vIHRoZXJtX3Rocm90Lm8gbWNlX3RoZXJtYWwubwogb2JqLSQoQ09ORklHX1g4Nl9NQ0Vf SU5URUwpCSs9IG1jZV9pbnRlbC5vCiBvYmotJChDT05GSUdfWDg2X01DRV9BTUQpCSs9IG1jZV9h bWQubwogb2JqLSQoQ09ORklHX01UUlIpCQkrPSAuLi8uLi9pMzg2L2tlcm5lbC9jcHUvbXRyci8K LS0tIC8yLjYuMTgub3JpZy9hcmNoL3g4Nl82NC9rZXJuZWwvbWNlX2FtZC5jCTIwMDctMTItMTAg MTY6MDU6MTMuNzMyNjM4MDAwIC0wODAwCisrKyAvMi42LjE4L2FyY2gveDg2XzY0L2tlcm5lbC9t Y2VfYW1kLmMJMjAwNy0xMi0xMCAxODowMDo0My4zMDE5MDIwMDAgLTA4MDAKQEAgLTIwLDYgKzIw LDggQEAKICNpbmNsdWRlIDxsaW51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2VuZGlmCiAKICNlbmRpZgorCit0eXBlZGVmIHZvaWQgKCpjcHVf c3BlY2lmaWNfc21wX3RoZXJtYWxfaW50ZXJydXB0X2NhbGxiYWNrKSh2b2lkKTsKKworZXh0ZXJu IGNwdV9zcGVjaWZpY19zbXBfdGhlcm1hbF9pbnRlcnJ1cHRfY2FsbGJhY2sKKwkJCQkJY3B1X3Nw ZWNpZmljX3NtcF90aGVybWFsX2ludGVycnVwdDsKKwo= ------=_Part_22354_33230943.1197398685025-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/