Commit Graph

8 Commits

Author SHA1 Message Date
Jung-uk Kim
fdfa6079a2 Restore (undocumented) support for early revisions and add more comments.
Reported by:	kris
2009-09-14 23:08:19 +00:00
Jung-uk Kim
7ca2d97bbd Fix typos in comments from the previous commit. 2009-09-11 22:05:59 +00:00
Jung-uk Kim
a4165bba6f Improve amdtemp(4) significantly:
- Improve newer AMD processor support (Family 0Fh Revision F and later).
- Adjust offset if DiodeOffet is set and valid.  Note it is experimental
but it seems to give us more realistic temperatures.  Newer Linux driver
blindly adds 21C for Family 0Fh desktop processors, however.
- Always populate dev.cpu and dev.amdtemp sysctl trees regardless of probe
order for consistency.  Previously, dev.cpu.N.temperature was not populated
if amdtemp was loaded later than ACPI CPU driver and temperatures were not
accessible from dev.amdtemp.N.sensor0 tree for Family 10h/11h processors.
- Read the CPUID from PCI register instead of CPUID instruction to prevent
possible revision mismatches on multi-socket system.
- Change macros and variables to make them closer to AMD documents.
- Fix style(9) nits and improve comments.
2009-09-11 21:47:44 +00:00
John Baldwin
a56fe095f0 Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio
2009-08-20 19:17:53 +00:00
Attilio Rao
444b91868b Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)
2009-08-02 14:28:40 +00:00
Rui Paulo
869041cd77 Fix comment explaining where this driver came from.
MFC after:	2 weeks
2009-03-13 16:43:31 +00:00
Rui Paulo
454e82d77e Rename all the variables/function names/structs/etc. to reflect the
driver name change.
While there, update copyright.

MFC after:	2 weeks
2009-03-13 16:28:25 +00:00
Rui Paulo
fc1f75e512 Rename the k8temp driver to amdtemp.
MFC after:	2 weeks
2009-03-13 16:08:08 +00:00