Commit graph

110578 commits

Author SHA1 Message Date
Warner Losh 2c3bc7b9f4 Call usbdevs2h with -h for .h file
Explicitly generate usbdevs_data.h for usb kernels with new -d switch
2004-12-30 23:19:40 +00:00
Warner Losh 2fe2cbd59b Allow -d and -h as command line flags. These are used to generate
only the .h or _data.h files respectively.  Restructure code to allow
for this.
2004-12-30 23:18:34 +00:00
John Baldwin 50aaa791ba Fix a typo and two whitespace nits. 2004-12-30 22:17:00 +00:00
John Baldwin f5c157d986 Rework the interface between priority propagation (lending) and the
schedulers a bit to ensure more correct handling of priorities and fewer
priority inversions:
- Add two functions to the sched(9) API to handle priority lending:
  sched_lend_prio() and sched_unlend_prio().  The turnstile code uses these
  functions to ask the scheduler to lend a thread a set priority and to
  tell the scheduler when it thinks it is ok for a thread to stop borrowing
  priority.  The unlend case is slightly complex in that the turnstile code
  tells the scheduler what the minimum priority of the thread needs to be
  to satisfy the requirements of any other threads blocked on locks owned
  by the thread in question.  The scheduler then decides where the thread
  can go back to normal mode (if it's normal priority is high enough to
  satisfy the pending lock requests) or it it should continue to use the
  priority specified to the sched_unlend_prio() call.  This involves adding
  a new per-thread flag TDF_BORROWING that replaces the ULE-only kse flag
  for priority elevation.
- Schedulers now refuse to lower the priority of a thread that is currently
  borrowing another therad's priority.
- If a scheduler changes the priority of a thread that is currently sitting
  on a turnstile, it will call a new function turnstile_adjust() to inform
  the turnstile code of the change.  This function resorts the thread on
  the priority list of the turnstile if needed, and if the thread ends up
  at the head of the list (due to having the highest priority) and its
  priority was raised, then it will propagate that new priority to the
  owner of the lock it is blocked on.

Some additional fixes specific to the 4BSD scheduler include:
- Common code for updating the priority of a thread when the user priority
  of its associated kse group has been consolidated in a new static
  function resetpriority_thread().  One change to this function is that
  it will now only adjust the priority of a thread if it already has a
  time sharing priority, thus preserving any boosts from a tsleep() until
  the thread returns to userland.  Also, resetpriority() no longer calls
  maybe_resched() on each thread in the group. Instead, the code calling
  resetpriority() is responsible for calling resetpriority_thread() on
  any threads that need to be updated.
- schedcpu() now uses resetpriority_thread() instead of just calling
  sched_prio() directly after it updates a kse group's user priority.
- sched_clock() now uses resetpriority_thread() rather than writing
  directly to td_priority.
- sched_nice() now updates all the priorities of the threads after the
  group priority has been adjusted.

Discussed with:	bde
Reviewed by:	ups, jeffr
Tested on:	4bsd, ule
Tested on:	i386, alpha, sparc64
2004-12-30 20:52:44 +00:00
John Baldwin 99b808f461 Whitespace fix. 2004-12-30 20:30:58 +00:00
John Baldwin 63710c4d35 Stop explicitly touching td_base_pri outside of the scheduler and simply
set a thread's priority via sched_prio() when that is the desired action.
The schedulers will start managing td_base_pri internally shortly.
2004-12-30 20:29:58 +00:00
John Baldwin 753d1af165 Use NULL instead of 0 in a few places as well as various whitespace fixes. 2004-12-30 19:26:23 +00:00
John Baldwin 9e6c867ccc Call tty_close() at the very end of ttyclose() since otherwise NULL
deferences can occur since tty_close() may end up freeing the tty structure
if it drops the last reference to it.

Glanced at by:	phk
2004-12-30 19:24:49 +00:00
John Baldwin 1c622ae41e Small whitespace fixes. 2004-12-30 19:14:48 +00:00
John Baldwin 118ef86edc Minor sync to i386 GENERIC in the form of comments and whitespace. 2004-12-30 18:51:23 +00:00
John Baldwin 944039bc08 Minor sync to alpha and i386:
- Add ADAPTIVE_GIANT and AHC_REG_PRETTY_PRINT.
- Indent SMP to match other options.
2004-12-30 18:31:53 +00:00
Robert Watson 08e044cb89 Use a global variable, ipxpcb_lport_cache, to cache the most recently
used IPX port number, rather than using the global ipxpcb list head.
2004-12-30 17:54:53 +00:00
Robert Watson 80a4dabe7d Convert netipx to use queue(9) doubly-linked lists instead of home-brew
linked lists for ipxpcb's.
2004-12-30 17:49:40 +00:00
Robert Watson ffeb1a497a Garbage collect unused (and incompletely implemented) functions:
- ipx_pcbnotify(), which is never called.
- ipx_rtchange(), which is never called, is incomplete inplemented, and
  also #ifdef notdef.
- spx_fixmtu(), which is never called, is incompletely implemented, and
  also #ifdef notdef.
2004-12-30 17:21:07 +00:00
Robert Watson 05b4b08b61 Constify ipx_zeronet, ipx_zerohost, ipx_broadnet, ipx_broadhost.
Remove 'allones' since the values of the broadcast network and
host variables are set statically.
2004-12-30 16:56:07 +00:00
Robert Watson 7665f445d0 Enable NCP build in NOTES so that it is visible in LINT. 2004-12-30 16:53:20 +00:00
Gleb Smirnoff 9657520621 Make syslog(3) thread safe.
PR:		bin/72394
Submitted by:	Dan Nelson
Reviewed by:	deischen
MFC after:	2 weeks
2004-12-30 16:05:11 +00:00
John Baldwin a0ede505d3 Sync with i386 GENERIC some:
- Update comments to newer style (space after #)
- Bring across various comment updates.
- Add AHC_REG_PRETTY_PRINT, ADAPTIVE_GIANT, and rue(4).
2004-12-30 15:32:31 +00:00
John Baldwin 7174b63b19 - Indent the comments beside the SMP options to the same level as all the
other comments.  Clarify that the next two things needed for SMP are
  two lines.
- Expand mii abbreviation to miibus for clarity in the USB ethernet
  comment.
2004-12-30 15:30:23 +00:00
Diomidis Spinellis c7ce9e21f8 Plug memory leak.
PR:		bin/75656
MFC after:	2 weeks
2004-12-30 14:27:57 +00:00
Robert Watson b36aab857b Make the sysctls kern.ipc.msgmnb and kern.ipc.msgtql into tunables as
is the case for most other sysctls in the System V IPC message queue
implementation.

PR:		75541
Submitted by:	Sergiy Vyshnevetskiy <serg at vostok dot net>
MFC after:	2 weeks
2004-12-30 13:56:34 +00:00
Robert Watson d7df32073b mac_portacl.c no longer references vnode_if.h. 2004-12-30 13:49:01 +00:00
Kirill Ponomarev d8c9fa8327 Add LOG_NTP facility.
Submitted by:	Kurt Jaeger <pi at complx dot LF dot net>
Approved by:	ru
MFC after:	3 days
2004-12-30 13:09:34 +00:00
Gleb Smirnoff 3cbbee76f8 Remove a check that never returns true, because in this case we have panic
before the check.
2004-12-30 12:22:51 +00:00
Jens Schweikhardt 895e960f4c Correct two typos; remove a duplicate. 2004-12-30 12:18:30 +00:00
Eric Anholt 124cfec04a [1] Remove the generic bridge support from those drivers that had it. The
generic bridge support was biting us more than it helped, whenever a new chipset
came out from a vendor and misprogramming it caused strange hangs or corruption.
[2] Add a large number of PCI IDs based on what the linux drivers support.
Note that the new PCI IDs haven't been tested, they're just *likely* to work.
In particular the VIA AGP 8x chipsets are concerning, due to lack of testing,
possible issues (kern/69953), and not having a nice "does this bridge say it
would do 8x" function.  However, this shouldn't make the situation worse, since
these chips would have probed in the past anyway.
2004-12-30 07:18:58 +00:00
David Xu cc1000ac5b Make umtx_wait and umtx_wake more like linux futex does, it is
more general than previous. It also lets me implement cancelable point
in thread library. Also in theory, umtx_lock and umtx_unlock can
be implemented by using umtx_wait and umtx_wake, all atomic operations
can be done in userland without kernel's casuptr() function.
2004-12-30 02:56:17 +00:00
Christian Brueffer cf366589b1 Fix typos.
PR:		75616
Submitted by:	n-kogane@syd.odn.ne.jp
2004-12-30 01:48:12 +00:00
David E. O'Brien 70a74c07ec Clearer va-args usage.
Submitted by:	bde
2004-12-30 00:53:56 +00:00
Tim Kientzle 0d5a38b993 Rewrite the code that hacks a short names to use in
the regular ustar entry.  The old code sometimes created
a too-long name that overflowed the ustar fields and triggered
an internal assertion failure.  This version should be more
robust.

Thanks to: Michal Listos
Fixes: bin/74385
MFC after: 15 days
2004-12-29 23:26:18 +00:00
David E. O'Brien 1ab9fa6c26 Remove vnode_if.h for rev 1.14. 2004-12-29 21:50:44 +00:00
Julian Elischer 3331831fd8 Don't call ugen_destroy_devnodes(). it is called from ugen_set_config()
which is the very next line.

Submitted by:	stefanf
MFC after: 3 days
2004-12-29 21:36:43 +00:00
Tom Rhodes a51d79c1d3 Catch up with stat.h a bit:
o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
2004-12-29 20:00:29 +00:00
Giorgos Keramidas 678a5ffdd8 Mark up SIGSTOP with .Dv and use .Nm in HISTORY for marking up `signal'.
PR:		docs/75615
Submitted by:	n-kogane@syd.odn.ne.jp
2004-12-29 19:40:56 +00:00
David E. O'Brien 4e6242dfa7 Remove the special sparc64 time_t support.
If someone isn't running with a 64-bit time_t by now, they don't
track -CURRENT and would probably go to RELENG_5 vs. 6-CURRENT.
2004-12-29 19:39:06 +00:00
Giorgos Keramidas 2b45dd45cb A lot of people may want to submit PRs from systems that are not
connected to the Internet or systems that do not have a correctly
configured email subsystem.  Now that the send-pr web interface has
antispam protection, mention that it is ok to use it for submitting
problem reports.

Ok by:		linimon
Submitted by:	Rob <spamrefuse@yahoo.com> on freebsd-doc
2004-12-29 19:32:21 +00:00
Hiroki Sato b7148acc03 Merge the following from the English version:
1.17  -> 1.21 	early-adopter/article.sgml
	1.261 -> 1.269	hardware/common/dev.sgml
	1.6   -> 1.7  	hardware/common/intro.sgml
	1.13  -> 1.14 	hardware/i386/proc-i386.sgml
	1.7   -> 1.9  	hardware/ia64/proc-ia64.sgml
	1.4   -> 1.5  	hardware/pc98/proc-pc98.sgml
	1.7   -> 1.8  	share/sgml/release.dsl
2004-12-29 17:11:02 +00:00
Christian Brueffer a6e3bfd9e4 SMC SMC2536W-AG verified as working.
MFC after:	3 days
2004-12-29 16:57:11 +00:00
Christian Brueffer 5a93db3dd8 Autogenerate device listings for bktr(4).
MFC after:	1 week
2004-12-29 14:38:37 +00:00
Christian Brueffer 471182e42f - call the driver 'bktr' instead of 'brooktree' throughout the document
- add a HARDWARE section
- add a more descriptive NAME section
- update for recently imported Pinnacle PCTV support
- add Branko Lankester, the original author of the PCTV patches,
  to the AUTHORS section
- bump .Dd

Thanks to all multimedia@ readers who sent me information about
their supported hardware!

MFC after:	1 week
2004-12-29 14:25:41 +00:00
Peter Grehan 22f2fe59b9 Correctly initialise the 2nd kernel segment, and don't
forget to actually install it in the segment register.
This may fix some of the weird panics seen when kernel VM
is heavily used.
2004-12-29 09:41:40 +00:00
Warner Losh a4aef7f9a4 We don't need to generate vnode_if.h anymore 2004-12-29 08:50:35 +00:00
Warner Losh 4c16ce4d87 No need to generate vnode_if.h anymore 2004-12-29 08:44:30 +00:00
Andrey A. Chernov d56162c180 NO_NIS cleanup: LINKS and MLINKS 2004-12-29 08:16:39 +00:00
Andrey A. Chernov aee042045b More NO_NIS cleanup: LINKS and MLINKS 2004-12-29 08:13:20 +00:00
Gleb Smirnoff e5f8af4e5c Document callout_pending() macro.
MFC after:	1 week
2004-12-29 08:01:24 +00:00
Warner Losh 7fcb3efbe0 Move WINBOND 4 port hub to its proper location in the file. It belongs
in a section of its own, not arbitrarily grouped in the hawking section
just because hawking sells it...
2004-12-29 06:21:41 +00:00
Alan Cox 956d03da83 Eliminate (now) unnecessary acquisition and release of the global page
queues lock.
2004-12-29 04:49:10 +00:00
Joseph Koshy 68ca7644cf Make an argument name in the synopsis match that in the text. Correct
an mdoc error.
2004-12-29 04:29:06 +00:00
Alan Cox 7aa2190c8e Access to the page's busy field is (now) synchronized by the containing
object's lock.  Therefore, the assertion that the page queues lock is held
can be removed from vm_page_io_start().
2004-12-29 04:18:22 +00:00