Commit Graph

106288 Commits

Author SHA1 Message Date
jruoho
dd6aeafa08 Check the status of P- and T-state transformations on all CPUs. This is
still not ideal, as ACPI gives us information about "cross logical processor
dependencies". For instance, a single MSR call on one CPU may cause all other
CPUs in the same domain to follow the state shift. Thus, rather than using
xc_broadcast(9), we should xc_unicast(9) on per-domain or per-CPU-set basis.
2010-08-18 16:08:50 +00:00
jruoho
8302489936 Add MD support for the vendor-independent extended PSS. Some conforming AMD
systems are known to work. Alas, not all of them. We still need to deal with
the variety of different PowerNow! revisions.
2010-08-18 04:12:29 +00:00
jruoho
46457f068f Fix fix of a bug: first initialize sc, check sc != NULL, then KASSERT(9). 2010-08-18 02:01:45 +00:00
pgoyette
a5e851409f Use SYSCTL_DESCR() 2010-08-17 23:36:51 +00:00
jym
4d0d2a4c7b Use SYSCTL_DESCR() 2010-08-17 22:24:04 +00:00
pooka
942c727880 Prefault bus pages in driver attachment. This seems to work around
weird corruption I've been seeing (most likely a host kernel bug).

For more details, see thread at:
http://mail-index.netbsd.org/tech-kern/2010/08/17/msg008749.html
2010-08-17 20:42:47 +00:00
macallan
3bc68298fb - fix 8 bit support and run the console in 8 bit for a little extra speed
- fix colour oddities seen occasionally on sparc64
- try to use firmware DAC wiring until we figure out what's wrong
TODO:
- find out why radeonfb gets the DAC wiring ass-backwards on my xvr-100
  while Xorg's radeon driver gets it right
- find out why reverse characters aren't drawn in reverse

tested on macppc and sparc64
2010-08-17 18:53:16 +00:00
cegger
63f1e79c2b build fix: first initialize sc then KASSERT 2010-08-17 18:49:28 +00:00
hannken
863afee91a Now that ffs on disk inodes get freed in the reclaim routine it is no longer
necessary for vget() to handle VI_INACTNOW as a special case.  Remove this
check and its support in vrelel().

Getting another reference while the freelist is locked is an error.  Replace
the check with a KASSERT.
2010-08-17 13:17:47 +00:00
pooka
c2fbfedc83 Fix hopefully last off-by-one: if we fill the bus, we must also
advance the "first" pointer.  This problem triggered only if the
bus was filled in the first round, since the first pointer is at
the end-of-bus only for the bootstrap round.
2010-08-17 12:59:53 +00:00
pooka
86ea9bb1a9 * fix off-by-wrap case where current datagram aligns exactly with
the end of the bus
* clarify the "can we still use the device's next pointer" calculation
  and move it to its own routine
* sprinkle dprintf
2010-08-17 11:35:23 +00:00
jruoho
6846d4aa28 Adjust locking for previous. 2010-08-17 10:57:30 +00:00
jruoho
99f8ada841 Clarify the initialization of the dynamic maximums/minimums. Reset these to
defaults upon suspend. As we do not know how well the firmware maintains
state, do not run the callbacks that evaluate the maximum/minimum on resume.
2010-08-17 10:35:22 +00:00
jruoho
e70b5284eb Add support for the optional dynamic minimum (in terms of MHz) via _PDL.
Comparable to T-states, this gives effectively a window of available
performance states for passive cooling. An example:

Init:		max = 0, min = Pn.

		Time j.				Time j + 1.
		-----------			-----------
2000 MHz	P0	max			P0
		P1				P1	max
		P2		   ==>		P2
		P3				P3	min
		P4				P4
		P5	min			P5
 500 Mhz	Pn				Pn
		-----------			-----------

Search:		repeat (i = P0; i <= P5)	repeat (i = P1; i <= P3)
2010-08-17 10:17:52 +00:00
jakllsch
3e117bf430 Match ichlpcib(4) on ICH0 (82801AB_LPC). 2010-08-17 01:45:51 +00:00
dyoung
f8c8042a13 Add pseudo-device drvctl. 2010-08-17 00:02:28 +00:00
jruoho
f3e239e7c7 Fix comments. 2010-08-16 20:20:44 +00:00
jruoho
c1f0324ceb Two changes:
1.	Initialize P-states properly to P0. It is processor-specific
   	what value we might get without initialization. (Some AMD CPUs
	have even specific registers for the state after cold reset.)

  2.	Following design notes for Windows, set the lowest-power P-state
	upon suspend and restore the saved state after resume.
2010-08-16 20:07:57 +00:00
jym
df8a7061db Add machdep.pae sysctl(7) for i386. Thanks to Paul and Joerg for their
reviews.

In kernel, it matches the 'i386_use_pae' variable (0: kernel does not use
PAE, 1: kernel uses PAE). Will be used by i386 kvm(3) to know the functions
that should get called for VA => PA translations.
2010-08-16 19:39:06 +00:00
jruoho
2510a0e220 Now that the deferred configuration actually works as expected and documented,
use config_defer(9) instead of config_finalize_register(9), and simplify the
code paths around the initialization.
2010-08-16 17:58:42 +00:00
pooka
1108237392 simplify, improve, etc. 2010-08-16 17:33:52 +00:00
jruoho
795224299a From jmcneill@: call config_deferred(9) in rescan_with_cfdata(). 2010-08-16 17:29:52 +00:00
tsutsui
b1321efa54 Misc cleanup:
- no need to keep TX/RX mbufs during xfers in struct kue_chain
- check RX packet length more strictly in kue_rxeof()
- make some TX/RX handling in kue_send() and kue_rxeof() more readable
  with proper functions

Tested on:
kue0: LINKSYS USB  Network Adapter, rev 1.00/2.02, addr 5
2010-08-16 11:21:43 +00:00
jmcneill
81c69bbce9 make it compile again 2010-08-16 10:23:25 +00:00
jruoho
c4a7ea78bd If XPSS is used, only invalidate P-states if the control MSR address is zero.
If the status address is zero, we will bluntly bypass the transition check.
2010-08-16 10:07:09 +00:00
tsutsui
67a0da11d8 Static -> static
We can still preserve static function symbols for debug.
(they're also likely inlined but we can specify -fno-inline on debug)
2010-08-16 09:52:11 +00:00
tsutsui
103c7b2a22 - u_intNN_t -> uintNN_t
- use uint8_t for binary data
- use bool for boolean vaules
No binary change.
2010-08-16 09:44:01 +00:00
tsutsui
0d465ab0de Unifdef defined(__NetBSD__) part. No binary change. 2010-08-16 09:34:43 +00:00
jruoho
6c06255cee Add support for Extended PSS ACPI Method Specification from Microsoft.
This will greatly simplify supporting PowerNow! on conforming systems.
2010-08-16 07:38:38 +00:00
cegger
d546ccf4b9 do not hold mutexes when calling tsleep(9).
Fixes LOCKDEBUG panics
2010-08-16 06:05:07 +00:00
jruoho
b5e3d393b9 Do not error out neither in P-states nor in T-states if the method for the
dynamic maximum is nonexistent. Unsurprisingly, there is vagueness in the
standards; in ACPI 3.0 and 4.0 it is clearly indicated that also these methods
must be present, but the earlier standards are less stringent. Without too
much effort, at least one old P4-system was located that lacks _PPC.
2010-08-16 04:31:21 +00:00
yamt
86b3a16608 sys_mremap: unwrap a short line 2010-08-16 01:21:10 +00:00
jmcneill
359c089365 kern/43542: 32kHz playback sounds like hissing analog TV snow
Instead of specifying a range of supported sample rates based on the lowest
and highest available frequencies, only advertise rates that the codec reports
as working. Let aurateconv take care of the rest.
2010-08-15 22:32:02 +00:00
pooka
d2a293bcc2 reset pktsize each loop 2010-08-15 21:57:58 +00:00
pooka
962bc2f851 reset wrap where necessary 2010-08-15 21:41:39 +00:00
pooka
57245467f6 Implement softints properly: they need to have a schedulable entity
per cpu.
2010-08-15 21:28:33 +00:00
pooka
e46b5d009d Increment lwp's context switch counter when it is scheduled onto
a CPU.  This fixes some heavy-load problems with the pool code when
rump kernels essentially lied and caused the pool code not to do
a proper backdown from the fastpath when a context switch happened
when taking a lock.
2010-08-15 20:23:04 +00:00
jmcneill
de738a3dd4 be less spammy when dumping assocs. extra details can be had with boot -x 2010-08-15 19:39:56 +00:00
pooka
50fa67ff5f Move the lockops together with the interface -- they are needed
only at runtime.
2010-08-15 18:55:03 +00:00
pooka
9ae53a340e Take kernel lock before passing data to if_input. This is in line
with IPL_NET interrupts generally not being MPSAFE.
2010-08-15 18:48:38 +00:00
pooka
dc24e61692 introduce a sleep to trying to grab the bus 2010-08-15 18:47:38 +00:00
pooka
b1559dbb99 Don't do timestamping with buslock held. it's the little things ... 2010-08-15 18:40:41 +00:00
jmcneill
3b73c6d5a8 properly round block and buffer sizes -- nvidia HDA controllers work now 2010-08-15 16:21:46 +00:00
jruoho
01066e7b7b Add comments and raise the minimum allowed T-state duty cycle to 10 %. 2010-08-15 08:53:19 +00:00
mrg
78b04d8f54 only attach on SMT ID 0 cpus.
on my i7, cpus 0/4, 1/5, 2/6 and 3/7 have identical information and the
processor manual says that there are only 4 actual sensors.


this still doesn't attach (yet) on that system, due to a core solo/duo
errata being wrongly applied, but i haven't figured out the right way
to do that.
2010-08-15 08:45:20 +00:00
jruoho
46bba1f374 Properly deal with the previous FADT-issue. 2010-08-15 04:35:16 +00:00
jym
59f63c5a24 Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.
2010-08-14 21:01:26 +00:00
jym
9600194c60 Flush tty only when K_TXBUSY is not set.
'!' takes precedence over bitwise operation '&', so use parenthesis.
2010-08-14 20:52:05 +00:00
jym
c44a6702cd Fix the while condition: sleep while the SPI_F_DONE bit is not set.
'!' takes precedence over bitwise operation '&', so use parenthesis.
2010-08-14 20:49:21 +00:00
jym
f3fb0a5620 Fix some code paths where pointers are dereferenced after checking that
they are NULL (oops?)

XXX pull-ups for NetBSD-4 and NetBSD-5.
2010-08-14 18:28:59 +00:00