History log of /haiku/src/add-ons/kernel/drivers/power/x86_cpuidle/acpi_cpuidle.cpp
Revision Date Author Comments
# 215b685f 11-Dec-2022 X512 <danger_mail@list.ru>

kernel: Drop non-standard GNU inline assignment syntax

* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 93930f33 06-Aug-2018 Murai Takashi <tmurai01@gmail.com>

Replace B_MAX_CPU_COUNT with SMP_MAX_CPUS

Change-Id: I55c53ab35e9645e20466b09407a251571c589958
Reviewed-on: https://review.haiku-os.org/447
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# c7fad27a 21-Apr-2018 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Free ci on error


# a83983a2 27-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_cpuidle: Fix driver initialization

* For some reason the code in acpi_processor_init() assumed that the
CPU index returned by ACPI was 1-based. On my machines it is 0-based
and the syslogs on Trac from the last months don't show any
exception. The code even contained a hack to force satisifying that
assumption for a single-CPU machine.
* Instead of calling intel_cpuidle_init()/acpi_cpuidle_init() when
initializing the driver for the device node for CPU 0 -- thus
depending on the order the device manager iterates through the CPU
device nodes -- rather check whether all CPU nodes have indeed been
encountered.
* acpi_cpuidle_init_driver(): Don't leak the cookie in error case.
* acpi_cpuidle_uninit_driver(): Clear the sAcpiProcessor element for
the uninitialized CPU node. We'd also have to unregister the idle
callback when acpi_cpuidle_uninit_driver() is called for the first
CPU device node, but there isn't any API for it ATM.

Fixes a crash on machines with multiple CPUs where acpi_cpuidle_setup()
wouldn't already fail early (apparently only mine).


# b28421c9 27-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_cpuidle.cpp: Some style cleanup

Just what I spotted at the first glance. There's more general cleanup
to be done, e.g. regarding the public API.


# 8073227c 23-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

x86_cpuidle: use module_dependencies rather than get_module()

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 0138a95e 19-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

cpuidle: implement acpi cpuidle driver

we prefer intel native cpuidle driver on newer intel platforms --
sandybridge or later. we'll fall back to acpi cpuidle driver for other
platforms.

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 71d9d375 04-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

cpuidle: move generic cpuidle to generic

After this change, low level cpuidle drivers load the generic cpuidle
module if they can support the underlying platform.

change the intel cpuidle driver accordingly, now it's loaded by acpi
bus manager during boot, although it doesn't depend on acpi

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# a83983a2cd63bcac884f3b70f1d7cefb3adc5c20 27-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_cpuidle: Fix driver initialization

* For some reason the code in acpi_processor_init() assumed that the
CPU index returned by ACPI was 1-based. On my machines it is 0-based
and the syslogs on Trac from the last months don't show any
exception. The code even contained a hack to force satisifying that
assumption for a single-CPU machine.
* Instead of calling intel_cpuidle_init()/acpi_cpuidle_init() when
initializing the driver for the device node for CPU 0 -- thus
depending on the order the device manager iterates through the CPU
device nodes -- rather check whether all CPU nodes have indeed been
encountered.
* acpi_cpuidle_init_driver(): Don't leak the cookie in error case.
* acpi_cpuidle_uninit_driver(): Clear the sAcpiProcessor element for
the uninitialized CPU node. We'd also have to unregister the idle
callback when acpi_cpuidle_uninit_driver() is called for the first
CPU device node, but there isn't any API for it ATM.

Fixes a crash on machines with multiple CPUs where acpi_cpuidle_setup()
wouldn't already fail early (apparently only mine).


# b28421c927fc73047f04d99bf9bc8cbc257711f4 27-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_cpuidle.cpp: Some style cleanup

Just what I spotted at the first glance. There's more general cleanup
to be done, e.g. regarding the public API.


# 8073227c1d0deeb4fc7aece63b893e401f815442 23-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

x86_cpuidle: use module_dependencies rather than get_module()

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 0138a95ebac947f56c39ff2a148d3380ad5db1cc 19-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

cpuidle: implement acpi cpuidle driver

we prefer intel native cpuidle driver on newer intel platforms --
sandybridge or later. we'll fall back to acpi cpuidle driver for other
platforms.

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 71d9d375b82be4c5c336831042bc7401b9ed0e07 04-Aug-2012 Yongcong Du <ycdu.vmcore@gmail.com>

cpuidle: move generic cpuidle to generic

After this change, low level cpuidle drivers load the generic cpuidle
module if they can support the underlying platform.

change the intel cpuidle driver accordingly, now it's loaded by acpi
bus manager during boot, although it doesn't depend on acpi

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>