Commit Graph

112383 Commits

Author SHA1 Message Date
glebius
7e2ef7ec89 Use if_link_state_change() instead of rt_ifmsg(). Remove include net/route.h.
Reviewed by:	wpaul, sam
2005-02-07 19:39:29 +00:00
jhb
3c3db95194 - Use kern_{l,f,}stat() and kern_{f,}statfs() functions rather than
duplicating the contents of the same functions inline.
- Consolidate common code to convert a BSD statfs struct to a Linux struct
  into a static worker function.
2005-02-07 18:47:28 +00:00
jhb
6fab308776 Make linux_emul_convpath() a simple wrapper for kern_alternate_path(). 2005-02-07 18:46:05 +00:00
jhb
71c05d27c0 - Tweak kern_msgctl() to return a copy of the requested message queue id
structure in the struct pointed to by the 3rd argument for IPC_STAT and
  get rid of the 4th argument.  The old way returned a pointer into the
  kernel array that the calling function would then access afterwards
  without holding the appropriate locks and doing non-lock-safe things like
  copyout() with the data anyways.  This change removes that unsafeness and
  resulting race conditions as well as simplifying the interface.
- Implement kern_foo wrappers for stat(), lstat(), fstat(), statfs(),
  fstatfs(), and fhstatfs().  Use these wrappers to cut out a lot of
  code duplication for freebsd4 and netbsd compatability system calls.
- Add a new lookup function kern_alternate_path() that looks up a filename
  under an alternate prefix and determines which filename should be used.
  This is basically a more general version of linux_emul_convpath() that
  can be shared by all the ABIs thus allowing for further reduction of
  code duplication.
2005-02-07 18:44:55 +00:00
jhb
2cfc33f9b1 Various and sundry style fixes. 2005-02-07 18:38:29 +00:00
jhb
d92d6a0f9f Use linux_emul_convpath() rather than linux_emul_find() as
linux_emul_find() is going away.
2005-02-07 18:37:51 +00:00
jhb
2e8b9720fa Use the LCONVPATHEXIST() macro rather than it's exact expansion to be
consistent.
2005-02-07 18:37:13 +00:00
jhb
6e2f7d4c8e Use kern_setitimer() to implement linux_alarm() instead of fondling the
real interval timer directly.
2005-02-07 18:36:21 +00:00
jhb
96fc58f2b2 Use kern_open() directly rather than a stackgap detour via open(). 2005-02-07 18:22:20 +00:00
jhb
685dd13b54 Drop Giant before calling kthread_exit(). 2005-02-07 18:21:50 +00:00
mdodd
dbd1fe8138 Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.

This allows my Thinkpad to resume successfully with APM.

Approved by:	 sos
MFC after:	 2 weeks
2005-02-07 17:14:42 +00:00
harti
3d0eb6600e Remove an unneeded check. 2005-02-07 16:33:57 +00:00
harti
15f29409ba Introduce a typedef for variable value modifation functions and use it
where appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 16:27:19 +00:00
harti
c300f77198 Make the intention of a loop clearer.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 15:51:51 +00:00
phk
1641f9a9ed Add VNASSERT() which is just like KASSERT() but takes a vnode argument
which it will vn_printf() if it triggers.
2005-02-07 12:56:19 +00:00
nyan
ea8ee72b74 Remove unused defines. 2005-02-07 12:23:07 +00:00
mlaier
8b6d2b4fe7 Be more verbose about altq SYNOPSIS and add more linkage in the relating pf
documents.

Inspired by:	scottl
Reviewed by:	Brad Davis <so14kNOso14kSPAMcom>
MFC after:	3 days
2005-02-07 11:46:36 +00:00
sobomax
72740fc657 Fix the problem with incorrect throttling level reported immediately after
reboot. Safter the reboot the TCC is usually in the Automatic mode, in which
reading current performance level is likely to produce bogus results make sure
to switch it to the On-Demand mode and set to some known performance level.
Unfortunately there is no reliable way to check that TCC is in the Automatic
mode. Reading bit 4 of ACPI Thermal Monitor Control Register produces 0
regardless of the current mode.

MFC after:	1 week
2005-02-07 11:35:24 +00:00
harti
4dd5217a47 Introduce Buf_StripNewLines() and use it where appropriate.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 11:27:47 +00:00
obrien
1a1fea70de Fix "to a file" example so it works (one must touch(1) the file first). 2005-02-07 11:26:53 +00:00
glebius
54eb35fe43 Improve parsing of hook name.
Submitted by:	ru
2005-02-07 11:16:07 +00:00
phk
628952636c Access vmobject via the bufobj instead of the vnode 2005-02-07 10:04:06 +00:00
phk
e0b8a475a8 VOP_DESTROYVOBJECT() is no more. 2005-02-07 09:26:58 +00:00
phk
cf44cd72d6 Remove vop_stddestroyvobject() 2005-02-07 09:26:39 +00:00
phk
5623742860 Remove vop_destroyvobject() 2005-02-07 09:23:34 +00:00
ru
4294e1e61b Fix disorder. 2005-02-07 09:15:52 +00:00
glebius
319ffb2bd2 Sort SEE ALSO.
Submitted by:	ru
2005-02-07 08:51:34 +00:00
ru
3fd2ef4cd3 Fix bugs in the previous commit. 2005-02-07 08:44:34 +00:00
phk
b69dca29ec Deimplement vop_destroyvobject() 2005-02-07 08:23:36 +00:00
phk
275ba1001d Add missing isa_dmatc() function.
This may or may not be correct,  Only the pcii driver would notice and
it doesn't support PC98 yet.
2005-02-07 08:19:53 +00:00
glebius
2de4f11609 English and mdoc(7) cleanup.
Submitted by:	ru
2005-02-07 08:17:51 +00:00
phk
9c17a17dac Remove vop_destroyvobject() initialization. 2005-02-07 08:04:24 +00:00
des
9ecd4e2559 Sort branches in correct numeric order. 2005-02-07 07:55:00 +00:00
harti
92a5e4fdd6 Invent a Buf_AppendRange function that appends a non-NUL-terminated string
given by a pointer to the start of the string and a pointer one behind
the end.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 07:54:23 +00:00
harti
c45831f7c6 Invent a Buf_Append function to append a NUL-terminated string
and use it thoughout the code.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 07:49:16 +00:00
phk
d2bbb620e9 Don't call VOP_DESTROYVOBJECT(), trust that VOP_RECLAIM() did what
was necessary.
2005-02-07 07:48:03 +00:00
phk
720f0b5181 Add a missing prefix to a struct field for consistency. 2005-02-07 07:40:39 +00:00
delphij
74be882c0e Revamp several Makefile nits:
- .PATH: is spelled ``.PATH: ''
	- Don't forget to use DPADD so ``make checkdpadd'' is
	  not broken.
	- LDADD should not come with + as it's empty in the
	  first place

Suggested by:	ru
2005-02-07 05:45:38 +00:00
delphij
dbc0713b05 Undo the VCS tag move to reduce diff hunks.
Pointed out by:	ru
2005-02-07 05:34:35 +00:00
obrien
9f12546f8e Remove /stand when we are done with it.
Submitted by:	Ryan Sommers <ryans@gamersimpact.com>
2005-02-07 04:25:34 +00:00
njl
cea0f16528 Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them. 2005-02-07 04:03:06 +00:00
iedowse
885a9694bc Add a mechanism for associating a mutex with a callout when the
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
2005-02-07 02:47:33 +00:00
ticso
5592598fa8 Enable interrupt routing as first choice on alpha.
The alpha default handler knows how to trigger a fallback.
2005-02-07 00:43:14 +00:00
phk
8358b3b901 Allocate more space for softc. Amazing my machine survived this. 2005-02-06 22:45:12 +00:00
rwatson
35d0929825 Remove a comment from the raw IPv6 output function regarding
M_TRYWAIT allocations: M_PREPEND() now uses M_DONTWAIT.

MFC after:	3 days
2005-02-06 21:43:55 +00:00
njl
044b41bb7e Note changes to throttling sysctls and new power_profile(8) cpufrq support. 2005-02-06 21:31:41 +00:00
njl
dfde93d0fb Note the cpufreq import and acpi throttling changes. 2005-02-06 21:24:50 +00:00
imp
8b5bf29046 Move the $NetBSD$ tag to the top of the file, per standard NetBSD
practice (which we seem to mostly follow in the tree).  Move the
$FreeBSD$ tag to its more proper place after all copyright and license
notices.  Add '-' to the copyright notice for Christian E. Hopps so my
copyright script picks it up.
2005-02-06 21:15:19 +00:00
njl
e4e0cab9b7 Hook acpi_throttle(4) up to the build. It's currently part of acpi_perf.ko
although this may change.
2005-02-06 21:13:41 +00:00
njl
944b15ac74 Add support for cpufreq to power_profile(8). Values for on/offline cpu
frequencies are specified with performance_cpu_freq and economy_cpu_freq.
Of course, special values LOW and HIGH are also supported.  Also, remove
old throttling support.
2005-02-06 21:12:25 +00:00