Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760026AbYARBG5 (ORCPT ); Thu, 17 Jan 2008 20:06:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757120AbYARBGr (ORCPT ); Thu, 17 Jan 2008 20:06:47 -0500 Received: from smtp-out.google.com ([216.239.45.13]:30760 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbYARBGp (ORCPT ); Thu, 17 Jan 2008 20:06:45 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:in-reply-to: mime-version:content-type:references; b=HaU4l/tswbTNm4j1brjmY7BhqrT63b9cxLg71toVeda6X7bQhMrmuXXdL9/VqFaGP tseyT8yI2l6c6kDhdXNkg== Message-ID: <3f1a065b0801171706o57ae5d6w8a986db508ddcee4@mail.gmail.com> Date: Thu, 17 Jan 2008 17:06:33 -0800 From: "Russell Leidich" To: "Andi Kleen" , "Torsten Kaiser" , "Andrew Morton" , linux-kernel@vger.kernel.org, "Thomas Gleixner" , "Ingo Molnar" , valdis.kletnieks@vt.edu, "Tim Hockin" Subject: Re: [PATCH] AMD Thermal Interrupt Support In-Reply-To: <3f1a065b0801101821k71ea7523l5024f12abb50357f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2952_5582479.1200618393118" References: <3f1a065b0801021350x7fd065fbj9680ce1a4f3c6538@mail.gmail.com> <20080104222637.GA19248@one.firstfloor.org> <3f1a065b0801041653y77c27a8cvce703cb7d13e10a0@mail.gmail.com> <20080105132402.GA705@one.firstfloor.org> <3f1a065b0801051208y7e832e8ctda61f28e6328dec3@mail.gmail.com> <3f1a065b0801081542p6cca6249g35e83f7e1f450fbd@mail.gmail.com> <20080108235212.GE2117@one.firstfloor.org> <3f1a065b0801081828y4b084a52g1db9bcb8821cb3da@mail.gmail.com> <20080109023714.GK2117@one.firstfloor.org> <3f1a065b0801101821k71ea7523l5024f12abb50357f@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 20601 Lines: 308 ------=_Part_2952_5582479.1200618393118 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline All, Sorry, but the Google code review process has turned up a subtle issue with my formerly submitted patch. It is fixed in this newer patch (attached). Otherwise, the functional description is exactly as explained below. The issue is that there were 2 printk()s which printed the northbridge PCI device number associated with throttling initialization and detection. These printk()s assumed that the northbridges were enumerated in-order. While this is highly likely to be the case, it should not have been assumed. In the event that it is _not_ the case, then the PCI device numbers printed out would have been wrong. Since I had to respin the patch, I took the opportunity to fix a few minor issues as well: (1) Changed the contents of the aforementioned printk()s to reveal the PCI bus, function, and register which relate to the throttling message -- not just the device. (2) Deleted all mention of "AMD Quad Core", leaving only "Family 0x10". (3) Fixed one comment with incorrect grammar. (4) Fixed punctuation in a printk(). I sincerely hope that this will be the last iteration. Thanks to all who contributed to the review, here and at Google! On Jan 10, 2008 6:21 PM, Russell Leidich wrote: > All, > > Here's the hopefully-final version of the patch, which I have just > tested on Intel and AMD. > > In my AMD test, I happened to discover that although MCEs were being > logged, the MCE counter at > /sys/devices/system/cpu/cpu(whatever)/thermal_throttle/count was not > being updated. I fixed this by (1) moving smp_thermal_init from > late_initcall to device_initcall in mce_amd_64.c (2) moving > thermal_throttle_init_device from device_initcall to late_initcall in > therm_throt.c. > > Thanks to Andi for his notes on how to hack up an indirect call in > AT&T-style X86-64. > > To reiterate my earlier general description of the patch: > > This patch adds thermal machine check event (MCE) support to AMD > Barcelona (and probably later, if new PCI IDs are added to > k8_northbridges[]), styled after the same in the Intel code. The > initialization consists of 3 parts: (1) northbridge, which enables the > delivery of the interrupt to the local APIC, (2) APIC, which enables > delivery to X86, and (3) hotplug support in threshold_cpu_callback(), > which accomplishes #2 for CPUs which (re)enter the OS later. > > Whenever the temperature reaches the throttling threshold programmed > into a northbridge register (by the BIOS -- my code doesn't change > this value), a thermal interrupt is delivered. The interrupt is > delivered to the vector specified in the thermal APIC register at > (APIC_BASE + 0x330), which is identical to Intel. Because the vector > register is the same between both architectures, and because I don't > know which brand of CPU is present until runtime (if either), > thermal_interrupt in entry_64.S will branch to smp_thermal_interrupt > in mce_thermal.c. In turn, smp_thermal_interrupt will branch to the > CPU-specific code for handling the interrupt. (Apart from the common > vector location, AMD and Intel use radically different architectures > for the purpose of reporting throttling events.) At that point, an > MCE is logged if and only if the temperature has made a low-to-high > transition. Rate limiting is employed so as not to spam the log. > > -- > Russell Leidich > -- Russell Leidich ------=_Part_2952_5582479.1200618393118 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fbk0tm3k0 Content-Disposition: attachment; filename=patch.txt U2lnbmVkLW9mZi1ieTogUnVzc2VsbCBMZWlkaWNoIDxybWxAZ29vZ2xlLmNvbT4KZGlmZiAtdXBy TiBsaW51eC0yLjYuMjQtcmM1Lm9yaWcvYXJjaC94ODYva2VybmVsL2NwdS9tY2hlY2svTWFrZWZp bGUgbGludXgtMi42LjI0LXJjNS9hcmNoL3g4Ni9rZXJuZWwvY3B1L21jaGVjay9NYWtlZmlsZQot LS0gbGludXgtMi42LjI0LXJjNS5vcmlnL2FyY2gveDg2L2tlcm5lbC9jcHUvbWNoZWNrL01ha2Vm aWxlCTIwMDctMTItMTEgMTQ6MzA6NTMuNTMzMjk3MDAwIC0wODAwCisrKyBsaW51eC0yLjYuMjQt cmM1L2FyY2gveDg2L2tlcm5lbC9jcHUvbWNoZWNrL01ha2VmaWxlCTIwMDctMTItMTEgMTE6NTY6 MjAuNTQ5MTg1MDAwIC0wODAwCkBAIC0xLDQgKzEsNCBAQAotb2JqLXkJCQkJPSAgbWNlXyQoQklU UykubyB0aGVybV90aHJvdC5vCitvYmoteQkJCQk9ICBtY2VfJChCSVRTKS5vIHRoZXJtX3Rocm90 Lm8gbWNlX3RoZXJtYWwubwogCi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ZW50cnlf NjQuUyBsaW51eC0yLjYuMjQtcmM1L2FyY2gveDg2L2tlcm5lbC9lbnRyeV82NC5TCi0tLSBsaW51 eC0yLjYuMjQtcmM1Lm9yaWcvYXJjaC94ODYva2VybmVsL2VudHJ5XzY0LlMJMjAwNy0xMi0xMSAx NDozMDo1My43NTYyOTcwMDAgLTA4MDAKKysrIGxpbnV4LTIuNi4yNC1yYzUvYXJjaC94ODYva2Vy bmVsL2VudHJ5XzY0LlMJMjAwOC0wMS0wOSAxMDozMDo1Ni4zNTY5NzUwMDAgLTA4MDAKQEAgLTY0 OSw3ICs2NDksNyBAQCBFTkQoY29tbW9uX2ludGVycnVwdCkKIAkuZW5kbQogCiBFTlRSWSh0aGVy bWFsX2ludGVycnVwdCkKLQlhcGljaW50ZXJydXB0IFRIRVJNQUxfQVBJQ19WRUNUT1Isc21wX3Ro ZXJtYWxfaW50ZXJydXB0CisJYXBpY2ludGVycnVwdCBUSEVSTUFMX0FQSUNfVkVDVE9SLCpzbXBf dGhlcm1hbF9pbnRlcnJ1cHQoJXJpcCkKIEVORCh0aGVybWFsX2ludGVycnVwdCkKIAogRU5UUlko dGhyZXNob2xkX2ludGVycnVwdCkK ------=_Part_2952_5582479.1200618393118-- -- 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/