History log of /freebsd-11.0-release/sys/dev/acpica/acpi_perf.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 299353 10-May-2016 trasz

Remove misc NULL checks after M_WAITOK allocations.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


# 246128 30-Jan-2013 sbz

Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays

Reviewed by: cognet
Approved by: cognet


# 241885 22-Oct-2012 eadler

This isn't functionally identical. In some cases a hint to disable
unit 0 would in fact disable all units.

This reverts r241856

Approved by: cperciva (implicit)


# 241856 22-Oct-2012 eadler

Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.

Reviewed by: des
Approved by: cperciva
MFC after: 1 week


# 227293 07-Nov-2011 ed

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# 193530 05-Jun-2009 jkim

Import ACPICA 20090521.


# 167814 22-Mar-2007 jkim

Catch up with ACPI-CA 20070320 import.


# 165875 07-Jan-2007 njl

Re-work Cx handling to be per-cpu and asymmetrical, fixing support on
modern dual-core systems as well.

- Parse the _CST packages for each cpu and track all the states individually,
on a per-cpu basis.

- Revert to generic FADT/P_BLK based Cx control if the _CST package
is not present on all cpus. In that case, the new driver will
still support per-cpu Cx state handling. The driver will determine the
highest Cx level that can be supported by all the cpus and configure the
available Cx state based on that.

- Fixed the case where multiple cpus in the system share the same
registers for Cx state handling. To do that, added a new flag
parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that
enable the caller to add the RF_SHAREABLE flag. This flag could also be
useful to other callers (acpi_throttle?) in the tree but this change is
not yet made.

- For Core Duo cpus, both cores seems to be taken out of C3 state when
any one of the cores need to transition out. This broke the short sleep
detection logic. It is disabled now if there is more than one cpu in
the system for now as it fixed it in my case. This quirk may need to
be re-enabled later differently.

- Added support to control cx_lowest on a per-cpu basis. There is still
a generic cx_lowest to enable changing cx_lowest for all cpus with a single
sysctl and for ease of use. Sample output for the new sysctl:

dev.cpu.0.cx_supported: C1/1 C2/1 C3/57
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 0.00% 43.16% 56.83%
dev.cpu.1.cx_supported: C1/1 C2/1 C3/57
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 0.00% 45.65% 54.34%
hw.acpi.cpu.cx_lowest: C3

This work was done by Stephane E. Potvin with some simple reworking by
myself. Thank you.

Submitted by: Stephane E. Potvin <sepotvin / videotron.ca>
MFC after: 2 weeks


# 160381 15-Jul-2006 bruno

Eliminate duplicate p-states entries

Reported and tested by: ales dot rom at kabelnet dot net
Reviewed by: njl
Approved by: njl, imp (mentor)
MFC after: 3 days


# 153336 12-Dec-2005 bruno

Don't flood kernel logs with "invalid _PSS package" messages.

Approved by: njl, imp (mentor)


# 150003 11-Sep-2005 obrien

Canonize the include of acpi.h.


# 146734 29-May-2005 nyan

Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.

Reviewed by: -arch (imp, marcel, dfr)


# 144752 07-Apr-2005 njl

Revert part of 1.19. We do want to set the count to 0 since otherwise
it would give false info to other parts of the driver.


# 144684 05-Apr-2005 jhb

Don't free the _PSS buffer until after we check to see if we have no valid
states as otherwise we will try to free the buffer twice.


# 144197 27-Mar-2005 njl

Clean up resources properly if acpi_perf fails to attach. First, change
acpi_bus_alloc_gas() to delete the resource it set if alloc fails. Then,
change acpi_perf to delete the resource after releasing it if alloc fails.
This should make probe and attach both fully restartable if either fails.


# 144145 26-Mar-2005 njl

Check for invalid frequencies after parsing the package. Keep a running
count of valid frequencies and use that as the final package count, don't
give up when the first invalid state is found. Also, add 0x9999 and expand
our upper check to >= 0xffff Mhz [2].

Submitted by: Bruno Ducrot, Jung-uk Kim [2]


# 143865 20-Mar-2005 njl

Attach acpi_perf early. Especially when it is being used to provide info
to other devices, it needs to be attached first. (Multi-pass newbus
probes would be a better solution.)


# 143119 04-Mar-2005 njl

Check for some impossible frequencies that some systems use to indicate
they don't actually support Px states.


# 142625 27-Feb-2005 njl

Make a pass through all drivers checking specs for desired behavior on
SMP systems. It appears all drivers except ichss should attach to each
CPU and that settings should be performed on each CPU. Add comments about
this. Also, add a guard for p4tcc's identify method being called more than
once.


# 142587 26-Feb-2005 njl

Don't bother with cpufreq_register if we're info-only.

Suggested by: Jung-uk Kim


# 142204 22-Feb-2005 njl

Increase the maximum to wait for a transition from 1 to 10 ms. In some
modes, systems may take longer. If the status values don't match, try
matching just the lowest 8 bits if no bits above 8 are set in the desired
value. The IBM R32 has other bits set in the status register that are
irrelevant to the expected value.


# 142203 22-Feb-2005 njl

Support disabling individual cpufreq drivers with hints, e.g.,
hint.ichss.0.disabled="1"


# 142073 19-Feb-2005 njl

Add a new field to struct cf_setting for special values. These are driver-
specific values that other components may want to use. Add support to
acpi_perf(4) to export the control and status values via this field.


# 142032 18-Feb-2005 njl

Introduce a new method, cpufreq_drv_type(), that returns the type of the
driver. This used to be handled by cpufreq_drv_settings() but it's
useful to get the type/flags separately from getting the settings.
(For example, you don't have to pass an array of cf_setting just to find
the driver type.)

Use this new method in our in-tree drivers to detect reliably if acpi_perf
is present and owns the hardware. This simplifies logic in drivers as well
as fixing a bug introduced in my last commit where too many drivers attached.


# 142003 17-Feb-2005 njl

The correct error value for not having enough storage is E2BIG, not
ENOMEM. The manpage and ichss(4) are correct.


# 141824 13-Feb-2005 njl

Add support for the CPUFREQ_FLAG_INFO_ONLY flag. Devices that report this
are not added to the list(s) of available settings. However, other drivers
can call the CPUFREQ_DRV_SETTINGS() method on those devices directly to
get info about available settings.

Update the acpi_perf(4) driver to use this flag in the presence of
"functional fixed hardware." Thus, future drivers like Powernow can
query acpi_perf for platform info but perform frequency transitions
themselves.


# 141779 13-Feb-2005 njl

Attach an acpi_perf device for every processor that offers the right
methods.


# 141429 07-Feb-2005 njl

Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them.


# 141411 06-Feb-2005 njl

Notify the OS that we're taking over Px states in acpi_perf(4) instead of
doing it in the cpu driver. The previous code was incorrect anyway since
this value controls Px states, not throttling as the comment said. Since
we didn't support Px states before, there was no impact. Also, note that
we delay the write to SMI_CMD until after booting is complete since it
sometimes triggers a change in the frequency and we want to have all
drivers ready to detect/handle this.


# 141373 05-Feb-2005 njl

Convert to the new GAS APIs to allow for detach in the future. Also, check
the PERF_CTRL register in our probe method so that we can tell earlier
that another driver should handle this device due to FFixedHW. This avoids
scaring users when attach failed when we really wanted probe to fail.


# 141295 04-Feb-2005 njl

Don't print out a failure message when an attach for FFixedHW fails.
Instead, just fail to attach so another hardware-specific driver can
claim the device. Also, clean up some small memory leaks in the failure
case.


# 141242 04-Feb-2005 njl

Add the ACPI Performance states driver. This driver offers two or more
settings as exported via the ACPI _PSS method. OEMs use this interface
to encapsulate chipset or processor-specific methods (e.g., SpeedStep or
Powernow) and export their settings in a standard way. On systems that
have valid ACPI Performance states and a hardware-specific driver (e.g.,
ichss), acpi_perf(4) is preferred.