Commit Graph

135102 Commits

Author SHA1 Message Date
John Baldwin
9dddab6fc1 Change the roundrobin implementation in the 4BSD scheduler to trigger a
userland preemption directly from hardclock() via sched_clock() when a
thread uses up a full quantum instead of using a periodic timeout to cause
a userland preemption every so often.  This fixes a potential deadlock
when IPI_PREEMPTION isn't enabled where softclock blocks on a lock held
by a thread pinned or bound to another CPU.  The current thread on that
CPU will never be preempted while softclock is blocked.

Note that ULE already drives its round-robin userland preemption from
sched_clock() as well and always enables IPI_PREEMPT.

MFC after:	1 week
2007-10-27 22:07:40 +00:00
Maxim Konovalov
f5800732ef o Fix indentation. No functional changes. 2007-10-27 22:04:19 +00:00
John Baldwin
6b76a4c77a Make the examine command honor db_pager_quit so you can use 'q' or 'x'
at the pager prompt to abort an examine command that spans multiple pages.

MFC after:	1 week
2007-10-27 20:19:11 +00:00
Yaroslav Tykhiy
68b11e74f4 Add a comment explaining why disc(4) bears the IFF_LOOPBACK flag.
It should be the final follow-up to an old yet unfinished discussion
on whether IFF_LOOPBACK is necessary for disc(4) and why.
2007-10-27 19:57:41 +00:00
Yaroslav Tykhiy
a39cea66f4 Allow the shell used by make(1) to be changed early via the
__MAKE_SHELL variable.  This feature isn't supposed to be in wide
use, but it's needed now to make `installworld' independent of the
stock binaries and libs so that radical ABI changes can go in safely.

Reviewed by:	ru
2007-10-27 18:40:34 +00:00
Yaroslav Tykhiy
cf91120f8b if_loop doesn't need to keep the list of lo(4) interfaces. Today
a private softc list is needed neither for tracking clones in general
nor for destroying all clones before the module unload -- if_clone
takes care of all that.  (Note that some other interface drivers do
need a softc list to be able to scan it for their private purposes.)
2007-10-27 18:25:53 +00:00
Yaroslav Tykhiy
eb4e404868 Add some essential tools to rescue(8) in order to make it
a versatile emergency tool:

o sed(1) as a multi-purpose text filter -- can do grep's job and much more.
o head(1), tail(1), and tee(1) as idiomatic text filters.
o mt(1) to control tape drives (PR misc/98383).
o chown(8) aka chgrp(8) to complement the ch* subset.
o pkill(1) aka pgrep(1) to control running processes easily and thus to be
  able to recover from a serious problem or a fatal typo in an otherwise live
  system w/o a reboot.  (It also deserves adding to rescue(8) for its having
  triggered a latent bug in crunchgen(1), but we had better add a regression
  test for that. :-)

The resulting change in rescue(8) size has the following order of magnitude
on i386: 3787656 - 3727872 = 59784, i.e. just a tad.

Discussed on:   -hackers (I seem to have wearied all opponents :-)
PR:             misc/98383
2007-10-27 18:18:58 +00:00
Craig Rodrigues
fab2013cb7 Add the following mount options to the nfs_opts array:
noatime, noexec, suiddir, nosuid, nosymfollow, union,
noclusterr, noclusterw, multilabel, acls, force, update,
async.  These options correspond to MOPT_STDOPTS, MOPT_FORCE, MOPT_UPDATE,
and MOPT_ASYNC.

Currently, mount_nfs converts these "-o" options from strings
to MNT_ flags via getmntopts(),
and passes the flags from userspace to the kernel.
This change will allow us in future to pass these mount options
as strings directly to the kernel via nmount() when doing NFS mounts.
2007-10-27 16:28:05 +00:00
Yaroslav Tykhiy
5e8bbdf131 Include <stdlib.h> for the right prototype for exit(3). 2007-10-27 16:16:02 +00:00
Craig Rodrigues
d2169cb67d Remove duplicate "union" from ext2_opts.
Noticed by:	bde
2007-10-27 16:14:33 +00:00
Yaroslav Tykhiy
a7aebe893d Set the program name if the crunched program is selected through
argv[1] to mimic crt0 behaviour.  Do the job by a direct assignment
to __progname in order to stay compatible with NetBSD, whose
setprogname() is a deliberate no-op.

The reason for this change is that some programs (usually those
imported from NetBSD) use getprogname() to distinguish between their
aliases.  (See pkill aka pgrep for example.)

This change can be useful, and applicable, to NetBSD, too.
2007-10-27 16:13:31 +00:00
Craig Rodrigues
b4b5bf359b In nmount(), if MNT_ROOT is in the mount flags, filter it
out instead of returning an error.
(1)  This makes the behavior consistent with mount(2).
(2)  This makes update mounts on the root file system work properly.
(3)  The explicit checks for MNT_ROOTFS in src/sbin/fsck_ffs/main.c
     and src/usr.sbin/mountd/mountd.c which were put in to
     eliminate errors during update mounts on the root file system
     can be removed.

The only place were MNT_ROOTFS can be validly set
is inside the kernel, i.e. with vfs_mountroot_try().

Reviewed by:	phk
MFC after:	3 days
2007-10-27 15:59:18 +00:00
Sam Leffler
8bb84cef37 fix build 2007-10-27 15:31:50 +00:00
John Baldwin
3052da8bb3 Don't destroy an ACPI device_t for a PCI device and reassign the ACPI
handle to the PCI device_t if the ACPI device_t is already attached to a
driver.  This happens on the Tablet TC1000 which for some reason includes
two PCI-ISA bridges and treats the second bridge as an ACPI system resource
device.

Reviewed by:	njl (a while ago)
MFC after:	3 days
2007-10-27 14:54:43 +00:00
John Baldwin
54a3fb6f8f Don't test the APIC flag in the cpuid features for amd64 to see if a
local APIC is present or not.  All amd64 CPUs have a local APIC and some
BIOSen don't set the CPUID_APIC flag.

MFC after:	1 week
2007-10-27 13:34:53 +00:00
John Baldwin
4d6c5bef39 Missed in the previous commit to this file:
Actually support the new HT capability type from HT 2.00b.

MFC after:	3 days
2007-10-27 13:16:25 +00:00
John Baldwin
2445af1a8a Don't always re-route IRQs on resume. If this link hasn't been used, then
disable it with _DIS rather than assigning it an IRQ on resume.

MFC after:	1 week
2007-10-27 13:12:29 +00:00
John Baldwin
d9cec0a09e Bump up the limit for when to print the resources for a given resource
manager in hex vs decimal to 1000 from 100 so that IRQs are printed in
decimal.

MFC after:	3 days
2007-10-27 13:06:15 +00:00
Simon L. B. Nielsen
89ca9145fb Use the correct variable to check for a malloc failing. This fixes a
case where mountd would fail to start with "out of memory" logged to
syslog.
2007-10-27 12:24:47 +00:00
Robert Watson
438aeadf27 Give each posixsem MAC Framework entry point its own counter and test case
in the mac_test policy, rather than sharing a single function for all of
the access control checks.

Obtained from:	TrustedBSD Project
2007-10-27 10:38:57 +00:00
Andrey A. Chernov
eb75c0a0d0 Small improvement for __isctype(): don't use __mb_sb_limit but
hardcode 128 here instead, since default locale never define anything
above 127 char.
2007-10-27 09:32:32 +00:00
Julian Elischer
6a564b46b6 Add support for the pre-exisiting module shutdoen handshake.
Fix some comments.
2007-10-27 00:54:16 +00:00
Julian Elischer
9ef95d0105 rename the process to 'idle' and 'intr' as per jhb. 2007-10-27 00:52:26 +00:00
Julian Elischer
fbf7046447 Initialise the initial process pointer to NULL so that we know we don't
have an idle process yet.
I'm guessing that on my system this was always 0 already.

found by: Ed Schouten
2007-10-27 00:42:40 +00:00
Alan Cox
21f7958604 Change vm_page_cache_transfer() such that it does not transfer pages
that would have an offset beyond the end of the target object.  Such
pages should remain in the source object.

MFC after:	3 days
Diagnosed and reviewed by:	Kostik Belousov
Reported and tested by:		Peter Holm
2007-10-27 00:09:30 +00:00
Julian Elischer
6bc3d1dc09 If kthread_exit() is called on the last kthread in a kproc, then
all the work in kproc_exit must be done.
We don't actually have a user of this yet but why leave it to chance.
2007-10-26 22:18:20 +00:00
Julian Elischer
ca9a0ddf31 if one changes a function's arguments, one must also change the callers. 2007-10-26 22:03:19 +00:00
Robert Watson
6683b28d78 Update comment following MAC Framework entry point renaming and
reorganization.

Obtained from:	TrustedBSD Project
2007-10-26 21:16:34 +00:00
John Baldwin
fd6d060f0d Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined.  This lets each boot program choose which version of cgbase() it
wants to use rather than forcing ufsread.c to have that knowledge.

MFC after:	1 week
Discussed with:	imp
2007-10-26 21:02:31 +00:00
Ariff Abdullah
554314911c Remap and virtualize mixer controls for HP nx6110 with
AD1981B AC97 codec, unifying master volume control.

  * Remap "phout" --> SOUND_MIXER_VOLUME (internal speakers)
  * Virtual "vol" --> { "phout", "ogain" (headphone) }

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:59 +00:00
Ariff Abdullah
f29120c085 Enable headphone jack-sense for HP nx6100 with AD1981B AC'97 codec,
automuting internal speakers.

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:23 +00:00
Julian Elischer
5f66cfca51 oops, over optimised and broke non-SMP builds 2007-10-26 20:32:33 +00:00
Martin Wilke
dfe03c8c44 - Add myself as a new doc/www committer.
Approved by:	jkois (mentor)
2007-10-26 18:46:52 +00:00
Julian Elischer
dd1b3ff97e kthread_exit needs no stinkin argument. 2007-10-26 17:03:22 +00:00
Julian Elischer
39b920eb0c Doc police fixes
thanks to: ru@
2007-10-26 16:50:21 +00:00
David E. O'Brien
ef44c8d2a3 style(9) 2007-10-26 16:33:47 +00:00
Simon L. B. Nielsen
e9d5ba06c9 Document the '-P pidfile' command line argument.
PR:		docs/116658
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after:	3 days
2007-10-26 16:12:32 +00:00
John Baldwin
150b476d94 Add . to the include path so that we follow the 'machine' symlink we create
during depend on amd64.

Reported by:	rwatson
2007-10-26 15:56:22 +00:00
Julian Elischer
cfe127f5bc Aparrently MACXOCOMLEN exisrts only on my machine 2007-10-26 15:25:28 +00:00
Warner Losh
8d7b90cdd7 The arm boot code uses this function as well. Redefining cgbase()
saves about 500 bytes in the boot code.  While the AT91RM9200 has 12k
of space for the boot loader, which is more than i386's 8k, the code
generated by gcc is a bit bigger.

I've had this in p4 for about two years now.
2007-10-26 15:00:34 +00:00
Johann Kois
6b4fc55d4f Forced commit:
- Note that my last commit was discussed with remko@.
- Note that my first mentee will be miwi@.
2007-10-26 13:49:44 +00:00
Johann Kois
4430c98036 Fill in my data:
- add my entry
- mheinen@ was my mentor for de_DE (doc/www)
- remko@ was my mentor for full doc/www
2007-10-26 13:44:46 +00:00
Yoshihiro Takahashi
c2a6fe6133 Disable the coretemp and nvram on pc98. 2007-10-26 13:42:17 +00:00
Yoshihiro Takahashi
b493fda6e0 MFi386: revision 1.476
Add more (commented-out) usb devices.
2007-10-26 13:38:00 +00:00
Yoshihiro Takahashi
69c40fc504 Reduce diffs against i386. 2007-10-26 13:32:01 +00:00
Robert Watson
8640764682 Rename 'mac_mbuf_create_from_firewall' to 'mac_netinet_firewall_send' as
we move towards netinet as a pseudo-object for the MAC Framework.

Rename 'mac_create_mbuf_linklayer' to 'mac_mbuf_create_linklayer' to
reflect general object-first ordering preference.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-26 13:18:38 +00:00
Ruslan Ermilov
4064334ff6 Add a period for yar@. 2007-10-26 11:07:25 +00:00
Ruslan Ermilov
5d40d4a597 Sort MLINKS. 2007-10-26 11:01:17 +00:00
Simon L. B. Nielsen
387f26f9e1 If the INDEX file cannot be opened, print the actual filename / path
pkg_version tried to open instead of just "INDEX" to make the actual
problem more clear (e.g. missing INDEX-8).

MFC after:	3 days
Reviewed by:	portmgr (pav)
2007-10-26 10:12:26 +00:00
Yaroslav Tykhiy
8fe516386c o Add a note that checkyesno takes a variable by its name, not value.
o Improve mdoc(7) markup and style of the paragraph on stop_boot.
2007-10-26 09:38:54 +00:00