Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755327AbYAEAxq (ORCPT ); Fri, 4 Jan 2008 19:53:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754234AbYAEAxi (ORCPT ); Fri, 4 Jan 2008 19:53:38 -0500 Received: from smtp-out.google.com ([216.239.45.13]:32423 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753709AbYAEAxh (ORCPT ); Fri, 4 Jan 2008 19:53:37 -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=U9NjUAfjJtjWvi48Ri2Hff4B+kk18j/Vj0+n5ZbYH7cPXw+N1qvlquOKZQZlQM/iz xJM8vjQZUeG2SawHP33mw== Message-ID: <3f1a065b0801041653y77c27a8cvce703cb7d13e10a0@mail.gmail.com> Date: Fri, 4 Jan 2008 16:53:25 -0800 From: "Russell Leidich" To: "Andi Kleen" , "Torsten Kaiser" , "Andrew Morton" , linux-kernel@vger.kernel.org, "Thomas Gleixner" , "Ingo Molnar" , valdis.kletnieks@vt.edu, thockin@google.com Subject: Re: [PATCH] AMD Thermal Interrupt Support In-Reply-To: <20080104222637.GA19248@one.firstfloor.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4287_27926462.1199494405489" References: <20071227233419.d1adf3f3.akpm@linux-foundation.org> <3f1a065b0801021143y5fc15e29r4201ac19bc7c1daa@mail.gmail.com> <20080102200039.GA13784@one.firstfloor.org> <3f1a065b0801021312w6f823cbeh9ea6b73d2b0c46c8@mail.gmail.com> <64bb37e0801021333g3cccff81k68df75463e4a21d0@mail.gmail.com> <3f1a065b0801021350x7fd065fbj9680ce1a4f3c6538@mail.gmail.com> <20080102215433.GB13784@one.firstfloor.org> <3f1a065b0801041333x579d0a8fs9c5535f95dd56015@mail.gmail.com> <20080104222637.GA19248@one.firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 20290 Lines: 311 ------=_Part_4287_27926462.1199494405489 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 4, 2008 2:26 PM, Andi Kleen wrote: > > There are 2 pending issues, to which I have received insufficient feedback: > > > > 1. Andi would like to eliminate the trampoline in mce_thermal.c, but > > no one has responded to my proposed disgusting hack on entry_64.S in > > order to do so. > > There are two ways to do it: > > either duplicate the entry point in entry_64.S and set different > vectors or let the asm glue jump through a call vector (use > apicinterrupt ...,*thermal_vector(%rip) ) Later is probably better. OK, I did it the latter way. Your thermal_vector is my smp_thermal_interrupt, which I have converted from a function to a pointer to the CPU-specific function. > > > > > 2. Ingo pointed out that a given config file did not build. But when > > The patch that was in git-x86 didn't build on 32bit. Perhaps it was a > 32bit config file? Run it under "linux32" or equivalent on your distro. I _think_ it's fixed now. I'll let him rerun it at his end for verification. > > > + */ > > + if (therm_throt_process(1)) > > + mce_log_therm_throt_event(cpu, 1); > > + /* > > + * We'll still get subsequent interrupts even if we don't clear the > > + * status bit in THERM_CTL_F3X64. Take advantage of this fact to avoid > > + * touching PCI space. (If this assumption fails at some point, we'll > > + * need to schedule_work() in order to enter a process context, so that > > + * PCI locks can be asserted for proper access. This requirement, in > > PCI locks are spinlocks so they don't need process context. In PREEMPT-RT > kernels they can sleep, but there the handler will be likely already > a thread. Touching config space from interrupt context is legal, although > not very popular because it tends to be slow (but a few drivers do it) But if PCI locks are spinlocks, then how can one access config space in an interrupt handler, as it might be locked by the foreground? (No locks would be required at all, if everyone just saved 0xCF8 and 0xCFC, but I digress.) And it's one thing to be "likely" already in a thread, and another to be sure. If you can address these issues, I'll change or remove the comment. I just want to prevent a reasonable-looking but bad coding change from happening in the future. > > > + /* > > + * If any of the northbridges has PCI ID 0x1103, then its thermal > > + * hardware suffers from an erratum which prevents this code from > > + * working, so abort. > > Please add > > * This implies it only works on Family 10h aka AMD Quad Core. > > Otherwise I can just see the support questions of people asking why this > doesn't work for them. Agreed. I had it at the top of the function, but now I've worked it into both places. > > Anyways I'm unsure about the blacklist here -- white list would > probably have been better. k8_northbridges[] will certainly include > Griffin northtbridges and who knows if TT will work there or not. > [sorry for mentioning that not earlier] Ideally, every ID in the k8_northbridges[] whitelist would have functional thermal throttling. If more IDs than 0x1103 turn out to have this feature broken, then we may need to add a blacklist as well. But I expect that most future IDs will function correctly, hence my reliance on the whitelist. In my view, anyone who adds an ID to a whitelist (or just a list, for that matter) is obligated to perform a static analysis (i.e. grep for "k8_northbridges") of the implications of such act; therefore, I'm not too concerned about Griffin. I've attached an updated patch. In the unlikely event that you want to check this in, let me know so I can give it a final test. -- Russell Leidich ------=_Part_4287_27926462.1199494405489 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fb1f4q2g1 Content-Disposition: attachment; filename=patch.txt ZGlmZiAtdXByTiBsaW51eC0yLjYuMjQtcmM1Lm9yaWcvYXJjaC94ODYva2VybmVsL2NwdS9tY2hl Y2svTWFrZWZpbGUgbGludXgtMi42LjI0LXJjNS9hcmNoL3g4Ni9rZXJuZWwvY3B1L21jaGVjay9N YWtlZmlsZQotLS0gbGludXgtMi42LjI0LXJjNS5vcmlnL2FyY2gveDg2L2tlcm5lbC9jcHUvbWNo ZWNrL01ha2VmaWxlCTIwMDctMTItMTEgMTQ6MzA6NTMuNTMzMjk3MDAwIC0wODAwCisrKyBsaW51 eC0yLjYuMjQtcmM1L2FyY2gveDg2L2tlcm5lbC9jcHUvbWNoZWNrL01ha2VmaWxlCTIwMDctMTIt MTEgMTE6NTY6MjAuNTQ5MTg1MDAwIC0wODAwCkBAIC0xLDQgKzEsNCBAQAotb2JqLXkJCQkJPSAg bWNlXyQoQklUUykubyB0aGVybV90aHJvdC5vCitvYmoteQkJCQk9ICBtY2VfJChCSVRTKS5vIHRo ZXJtX3Rocm90Lm8gbWNlX3RoZXJtYWwubwogCiB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ydXB0KQo= ------=_Part_4287_27926462.1199494405489-- -- 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/