Commit 8ce78470 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

acpi_idle: Remove tracing

All the idle routines are called with RCU disabled, as such there must
not be any tracing inside.

While there; clean-up the io-port idle thing.
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20230112195540.251666856@infradead.org
parent 924aed16
...@@ -109,8 +109,8 @@ static const struct dmi_system_id processor_power_dmi_table[] = { ...@@ -109,8 +109,8 @@ static const struct dmi_system_id processor_power_dmi_table[] = {
static void __cpuidle acpi_safe_halt(void) static void __cpuidle acpi_safe_halt(void)
{ {
if (!tif_need_resched()) { if (!tif_need_resched()) {
safe_halt(); raw_safe_halt();
local_irq_disable(); raw_local_irq_disable();
} }
} }
...@@ -523,8 +523,11 @@ static int acpi_idle_bm_check(void) ...@@ -523,8 +523,11 @@ static int acpi_idle_bm_check(void)
return bm_status; return bm_status;
} }
static void wait_for_freeze(void) static __cpuidle void io_idle(unsigned long addr)
{ {
/* IO port based C-state */
inb(addr);
#ifdef CONFIG_X86 #ifdef CONFIG_X86
/* No delay is needed if we are in guest */ /* No delay is needed if we are in guest */
if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
...@@ -569,9 +572,7 @@ static void __cpuidle acpi_idle_do_entry(struct acpi_processor_cx *cx) ...@@ -569,9 +572,7 @@ static void __cpuidle acpi_idle_do_entry(struct acpi_processor_cx *cx)
} else if (cx->entry_method == ACPI_CSTATE_HALT) { } else if (cx->entry_method == ACPI_CSTATE_HALT) {
acpi_safe_halt(); acpi_safe_halt();
} else { } else {
/* IO port based C-state */ io_idle(cx->address);
inb(cx->address);
wait_for_freeze();
} }
perf_lopwr_cb(false); perf_lopwr_cb(false);
...@@ -593,8 +594,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index) ...@@ -593,8 +594,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
if (cx->entry_method == ACPI_CSTATE_HALT) if (cx->entry_method == ACPI_CSTATE_HALT)
safe_halt(); safe_halt();
else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) { else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
inb(cx->address); io_idle(cx->address);
wait_for_freeze();
} else } else
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment