linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] x86/mce/therm_throt: remove unused platform_thermal_notify function pointer
@ 2020-04-07  6:33 Jason A. Donenfeld
  2020-04-07  6:33 ` [PATCH 2/3] x86/mce/therm_throt: allow disabling verbose logging Jason A. Donenfeld
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Jason A. Donenfeld @ 2020-04-07  6:33 UTC (permalink / raw)
  To: linux-kernel, linux-edac, x86, arnd, srinivas.pandruvada, bberg, bp
  Cc: Jason A. Donenfeld

A long time ago platform_thermal_notify was added as some generic
mechanism for platform drivers to hook thermal events. It seems as
though this has been entirely superseded, and nothing uses it. Remove
the plumbing for this, since this code runs in an interrupt hot path.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 arch/x86/include/asm/mce.h            |  3 ---
 arch/x86/kernel/cpu/mce/therm_throt.c | 25 -------------------------
 2 files changed, 28 deletions(-)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 4359b955e0b7..ee30cb60ad36 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -257,9 +257,6 @@ extern void (*deferred_error_int_vector)(void);
 
 void intel_init_thermal(struct cpuinfo_x86 *c);
 
-/* Interrupt Handler for core thermal thresholds */
-extern int (*platform_thermal_notify)(__u64 msr_val);
-
 /* Interrupt Handler for package thermal thresholds */
 extern int (*platform_thermal_package_notify)(__u64 msr_val);
 
diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index f36dc0742085..f904e85eb68f 100644
--- a/arch/x86/kernel/cpu/mce/therm_throt.c
+++ b/arch/x86/kernel/cpu/mce/therm_throt.c
@@ -105,10 +105,6 @@ struct thermal_state {
 	struct _thermal_state pkg_thresh1;
 };
 
-/* Callback to handle core threshold interrupts */
-int (*platform_thermal_notify)(__u64 msr_val);
-EXPORT_SYMBOL(platform_thermal_notify);
-
 /* Callback to handle core package threshold_interrupts */
 int (*platform_thermal_package_notify)(__u64 msr_val);
 EXPORT_SYMBOL_GPL(platform_thermal_package_notify);
@@ -551,24 +547,6 @@ static void notify_package_thresholds(__u64 msr_val)
 		platform_thermal_package_notify(msr_val);
 }
 
-static void notify_thresholds(__u64 msr_val)
-{
-	/* check whether the interrupt handler is defined;
-	 * otherwise simply return
-	 */
-	if (!platform_thermal_notify)
-		return;
-
-	/* lower threshold reached */
-	if ((msr_val & THERM_LOG_THRESHOLD0) &&
-			thresh_event_valid(CORE_LEVEL, 0))
-		platform_thermal_notify(msr_val);
-	/* higher threshold reached */
-	if ((msr_val & THERM_LOG_THRESHOLD1) &&
-			thresh_event_valid(CORE_LEVEL, 1))
-		platform_thermal_notify(msr_val);
-}
-
 /* Thermal transition interrupt handler */
 static void intel_thermal_interrupt(void)
 {
@@ -579,9 +557,6 @@ static void intel_thermal_interrupt(void)
 
 	rdmsrl(MSR_IA32_THERM_STATUS, msr_val);
 
-	/* Check for violation of core thermal thresholds*/
-	notify_thresholds(msr_val);
-
 	therm_throt_process(msr_val & THERM_STATUS_PROCHOT,
 			    THERMAL_THROTTLING_EVENT,
 			    CORE_LEVEL);
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-04-14 21:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07  6:33 [PATCH 1/3] x86/mce/therm_throt: remove unused platform_thermal_notify function pointer Jason A. Donenfeld
2020-04-07  6:33 ` [PATCH 2/3] x86/mce/therm_throt: allow disabling verbose logging Jason A. Donenfeld
2020-04-07  6:33 ` [PATCH 3/3] x86/mce/therm_throt: allow disabling the thermal vector altogether Jason A. Donenfeld
2020-04-14  3:38   ` Srinivas Pandruvada
2020-04-14  4:21     ` Jason A. Donenfeld
2020-04-14 14:45       ` Srinivas Pandruvada
2020-04-14 19:41         ` Jason A. Donenfeld
2020-04-14 19:58           ` Srinivas Pandruvada
2020-04-14 20:09             ` Jason A. Donenfeld
2020-04-14 20:23           ` Borislav Petkov
2020-04-14 20:49             ` Srinivas Pandruvada
2020-04-14 21:07               ` Jason A. Donenfeld
2020-04-14 21:51                 ` Srinivas Pandruvada
2020-04-14 21:40   ` Peter Zijlstra
2020-04-14 21:44     ` Srinivas Pandruvada
2020-04-13 21:09 ` [PATCH 1/3] x86/mce/therm_throt: remove unused platform_thermal_notify function pointer Jason A. Donenfeld
2020-04-14  3:55 ` Srinivas Pandruvada
2020-04-14  4:21   ` Jason A. Donenfeld
2020-04-14 14:49     ` Srinivas Pandruvada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).