]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd the SVC_RELEASE(xprt), as required by r194407.
rmacklem [Wed, 17 Jun 2009 22:55:59 +0000 (22:55 +0000)]
Add the SVC_RELEASE(xprt), as required by r194407.

Approved by: kib (mentor)

15 years agoSince svc_[dg|vc|tli|tp]_create() did not hold a reference count on the
rmacklem [Wed, 17 Jun 2009 22:50:26 +0000 (22:50 +0000)]
Since svc_[dg|vc|tli|tp]_create() did not hold a reference count on the
SVCXPTR structure returned by them, it was possible for the structure
to be free'd before svc_reg() had been completed using the structure.
This patch acquires a reference count on the newly created structure
that is returned by svc_[dg|vc|tli|tp]_create(). It also
adds the appropriate SVC_RELEASE() calls to the callers, except the
experimental nfs subsystem. The latter will be committed separately.

Submitted by: dfr
Tested by: pho
Approved by: kib (mentor)

15 years agoProperly flush input after an error in backquotes in interactive mode.
jilles [Wed, 17 Jun 2009 21:58:32 +0000 (21:58 +0000)]
Properly flush input after an error in backquotes in interactive mode.

For parsing an old-style backquote substitution (`...`),
a string "file" is used to store the contents of the
substitution (with the special backslash processing done).
If an error occurs, the shell cleans up all these files
(returning to the top level) and flush the top level
file. Erroneously, it first flushed the current file and
then cleaned up all extra files, so that the top level
file (i.e. the terminal) was not flushed.

Example (in interactive mode):
  echo `for` echo This should not be printed

Also noticeable in (in interactive mode):
  echo `(`
The old version prints an extraneous prompt.

Approved by: ed (mentor)

15 years agoEliminate unnecessary forward declarations.
alc [Wed, 17 Jun 2009 20:12:23 +0000 (20:12 +0000)]
Eliminate unnecessary forward declarations.

15 years agoRegen.
jhb [Wed, 17 Jun 2009 19:53:47 +0000 (19:53 +0000)]
Regen.

15 years agoRegen for added flags field.
jhb [Wed, 17 Jun 2009 19:53:20 +0000 (19:53 +0000)]
Regen for added flags field.

15 years ago- Add the ability to mix multiple flags seperated by pipe ('|') characters
jhb [Wed, 17 Jun 2009 19:50:38 +0000 (19:50 +0000)]
- Add the ability to mix multiple flags seperated by pipe ('|') characters
  in the type field of system call tables.  Specifically, one can now use
  the 'NO*' types as flags in addition to the 'COMPAT*' types.  For example,
  to tag 'COMPAT*' system calls as living in a KLD via NOSTD.  The COMPAT*
  type is required to be listed first in this case.
- Add new functions 'type()' and 'flag()' to the embedded awk script in
  makesyscalls.sh that return true if a requested flag is found in the
  type field ($3).  The flag() function checks all of the flags in the
  field, but type() only checks the first flag.  type() is meant to be
  used in the top-level "switch" statement and flag() should be used
  otherwise.
- Retire the CPT_NOA type, it is now replaced with "COMPAT|NOARGS" using
  the flags approach.
- Tweak the comment descriptions of COMPAT[46] system calls so that they
  say "freebsd[46] foo" rather than "old foo".
- Document the COMPAT6 type.
- Sync comments in compat32 syscall table with the master table.

15 years agoKeep dirhash tailq locked throughout the entirety of ufsdirhash_destroy() to fix
snb [Wed, 17 Jun 2009 18:55:29 +0000 (18:55 +0000)]
Keep dirhash tailq locked throughout the entirety of ufsdirhash_destroy() to fix
a potential race pointed out by pjd. Also use TAILQ_FOREACH_SAFE to iterate over
dirhashes in ufsdirhash_lowmem(), so that we can continue iterating even after a
dirhash is destroyed.

Suggested by: pjd
Tested by:      pho
Approved by: dwmalone (mentor)

15 years agoRetire the unused stub for the nfsclnt() system call.
jhb [Wed, 17 Jun 2009 18:52:42 +0000 (18:52 +0000)]
Retire the unused stub for the nfsclnt() system call.

15 years agoRemove the now-unused NOIMPL flag. It serves no useful purpose given the
jhb [Wed, 17 Jun 2009 18:46:14 +0000 (18:46 +0000)]
Remove the now-unused NOIMPL flag.  It serves no useful purpose given the
existing UNIMPL and NOSTD types.

15 years ago- NOSTD results in lkmressys being used instead of lkmssys.
jhb [Wed, 17 Jun 2009 18:44:15 +0000 (18:44 +0000)]
- NOSTD results in lkmressys being used instead of lkmssys.
- Mark nfsclnt as UNIMPL.  It should have been NOSTD instead of NOIMPL back
  when it lived in nfsclient.ko, but it was removed from that a long time
  ago.

15 years agoupdate usb config; the old stack is gone
sam [Wed, 17 Jun 2009 17:59:36 +0000 (17:59 +0000)]
update usb config; the old stack is gone

15 years agoenable npe-a now that it works
sam [Wed, 17 Jun 2009 17:58:18 +0000 (17:58 +0000)]
enable npe-a now that it works

15 years agoAdd workaround to get IXP435 NPE-A working: reseting NPE-A after NPE-C
sam [Wed, 17 Jun 2009 17:57:52 +0000 (17:57 +0000)]
Add workaround to get IXP435 NPE-A working: reseting NPE-A after NPE-C
causes both to become inoperative; this apparently was done by the original
IAL code as a workaround for IMEM parity errors which we've not seen so
just disable the reset.

Note this problem does not occur on IXP425 boards. The linux driver does
fuse-resets on each NPE but in the order NPE-A < NPE-B < NPE-C (when probing
for which NPE's are present/operational); we may want to switch to a similar
scheme but for now disable the resets until we see an issue.

15 years agoRefactor contigmalloc() into two functions: a simple front-end that deals
alc [Wed, 17 Jun 2009 17:19:48 +0000 (17:19 +0000)]
Refactor contigmalloc() into two functions: a simple front-end that deals
with the malloc tag and calls a new back-end, kmem_alloc_contig(), that
allocates the pages and maps them.

The motivations for this change are two-fold: (1) A cache mode parameter
will be added to kmem_alloc_contig().  In other words, kmem_alloc_contig()
will be extended to support the allocation of memory with caller-specified
caching. (2) The UMA allocation function that is used by the two jumbo
frames zones can use kmem_alloc_contig() in place of contigmalloc() and
thereby avoid having free jumbo frames held by the zone counted as live
malloc()ed memory.

15 years agoTeach cpu_est_clockrate() about the G5's slightly different PMC. This
nwhitehorn [Wed, 17 Jun 2009 16:34:40 +0000 (16:34 +0000)]
Teach cpu_est_clockrate() about the G5's slightly different PMC. This
allows the boot messages to include the CPU speed and makes possible
the forthcoming cpufreq support for the PPC 970.

15 years agoAdd explicit includes for jail.h to the files that need them and
bz [Wed, 17 Jun 2009 15:01:01 +0000 (15:01 +0000)]
Add explicit includes for jail.h to the files that need them and
remove the "hidden" one from vimage.h.

15 years agoFix column width of weekday names for multibyte locales.
ume [Wed, 17 Jun 2009 14:47:06 +0000 (14:47 +0000)]
Fix column width of weekday names for multibyte locales.

Noticed by: nyan
Discussed with: matusita, takawata
MFC after: 1 week

15 years agoUse the right jail parameters for -v (cpuset has changed to cpuset.id).
jamie [Wed, 17 Jun 2009 14:32:08 +0000 (14:32 +0000)]
Use the right jail parameters for -v (cpuset has changed to cpuset.id).

Reported by: netchild
Approved by: bz (mentor)

15 years agoFix handling of ".." in nfs_lookup() for the forced dismount case
rmacklem [Wed, 17 Jun 2009 14:10:18 +0000 (14:10 +0000)]
Fix handling of ".." in nfs_lookup() for the forced dismount case
by cribbing the change made to the regular nfs client in r194358.

Approved by: kib (mentor)

15 years agoFor dotdot lookup in nfs_lookup, inline the vn_vget_ino() to prevent
kib [Wed, 17 Jun 2009 12:47:27 +0000 (12:47 +0000)]
For dotdot lookup in nfs_lookup, inline the vn_vget_ino() to prevent
operating on the unmounted mount point and freed mount data in case of
forced unmount performed while dvp is unlocked to nget the target vnode.

Add missed calls to m_freem(mrep) there on error exits [1].

Submitted by: rmacklem [1]
Tested by: pho
MFC after: 2 weeks

15 years agoAdd the explicit include of vimage.h to another five .c files still
bz [Wed, 17 Jun 2009 12:44:11 +0000 (12:44 +0000)]
Add the explicit include of vimage.h to another five .c files still
missing it.

Remove the "hidden" kernel only include of vimage.h from ip_var.h added
with the very first Vimage commit r181803 to avoid further kernel poisoning.

15 years agoDecrement state->ls_threads when vnode appeared to be doomed.
kib [Wed, 17 Jun 2009 12:43:04 +0000 (12:43 +0000)]
Decrement state->ls_threads when vnode appeared to be doomed.

Reported and tested by: pho

15 years agoChanges to the NR-Sack code so that:
rrs [Wed, 17 Jun 2009 12:34:56 +0000 (12:34 +0000)]
Changes to the NR-Sack code so that:
1) All bit disappears
2) The two sets of gaps (nr and non-nr) are
   disjointed, you don't have gaps struck in
   both places.

This adjusts us to coorespond to the new draft. Still
to-do, cleanup the code so that there are only one set
of sack routines (original NR-Sack done by E cloned all
sack code).

15 years agoAdd a .cvsignore file and along with that put an svn:ignore proprty
bz [Wed, 17 Jun 2009 10:48:32 +0000 (10:48 +0000)]
Add a .cvsignore file and along with that put an svn:ignore proprty
on the directory like we have for all other target architectures.

Discussed with: imp (kind of)

15 years agoMake compile again using proper protoypes for
bz [Wed, 17 Jun 2009 10:26:37 +0000 (10:26 +0000)]
Make compile again using proper protoypes for
pcib_read/write_config DEVMETHOD.

15 years agoMake compile again using the correct prototype for the
bz [Wed, 17 Jun 2009 10:23:25 +0000 (10:23 +0000)]
Make compile again using the correct prototype for the
device shutdown method.

15 years agoPass the size of the mapping to contigmapping() as a "vm_size_t" rather
alc [Wed, 17 Jun 2009 07:11:38 +0000 (07:11 +0000)]
Pass the size of the mapping to contigmapping() as a "vm_size_t" rather
than a "vm_pindex_t".  A "vm_size_t" is more convenient for it to use.

15 years ago- Allow a higher value for the number of heads. Its better to do this and allow
lulf [Wed, 17 Jun 2009 06:47:05 +0000 (06:47 +0000)]
- Allow a higher value for the number of heads. Its better to do this and allow
  a few bad systems to run than to be completely strict about it.

15 years ago- Back out the previous change in order to maintain compatibility.
lulf [Wed, 17 Jun 2009 06:41:10 +0000 (06:41 +0000)]
- Back out the previous change in order to maintain compatibility.

15 years agoWhen copy+paste goes wrong... Remove duplicate "expr".
edwin [Wed, 17 Jun 2009 06:25:45 +0000 (06:25 +0000)]
When copy+paste goes wrong... Remove duplicate "expr".

Submitted by: danfe@

15 years agoMake the maintenance of a page's valid bits by contigmalloc() more like
alc [Wed, 17 Jun 2009 04:57:32 +0000 (04:57 +0000)]
Make the maintenance of a page's valid bits by contigmalloc() more like
kmem_alloc() and kmem_malloc().  Specifically, defer the setting of the
page's valid bits until contigmapping() when the mapping is known to be
successful.

15 years agoadds opt_inet6.h to fix a error during compiling wlan as a module.
weongyo [Wed, 17 Jun 2009 04:23:37 +0000 (04:23 +0000)]
adds opt_inet6.h to fix a error during compiling wlan as a module.

Reviewed by: sam

15 years agoreorders the sequence when the device is detached. After detaching the
weongyo [Wed, 17 Jun 2009 04:15:19 +0000 (04:15 +0000)]
reorders the sequence when the device is detached.  After detaching the
interface is completed then it'll process other parts to avoid a race
condition.

Pointed by: jhb

15 years agocorrect data/instruction memory sizes for non-ixp425 parts (these
sam [Wed, 17 Jun 2009 03:09:13 +0000 (03:09 +0000)]
correct data/instruction memory sizes for non-ixp425 parts (these
are only used to bounds-check writes when loading firmware)

15 years agoremove IAL vestige for defining the max data/instruction memory size;
sam [Wed, 17 Jun 2009 02:55:53 +0000 (02:55 +0000)]
remove IAL vestige for defining the max data/instruction memory size;
instead of defining them according to ixp46x add new defines so we can
do this at run time

15 years agoo correct default miibase for NPE-B and NPE-C; these values are
sam [Wed, 17 Jun 2009 02:53:05 +0000 (02:53 +0000)]
o correct default miibase for NPE-B and NPE-C; these values are
  normally taken from the hints file so this should have no effect
o set the port address "just in case"
o add NPE-A support to the tx done qmgr callback

15 years agoadd ixp4xx_write_feature_bits
sam [Wed, 17 Jun 2009 02:51:16 +0000 (02:51 +0000)]
add ixp4xx_write_feature_bits

15 years agoIntroduce support for adaptive spinning in lockmgr.
attilio [Wed, 17 Jun 2009 01:55:42 +0000 (01:55 +0000)]
Introduce support for adaptive spinning in lockmgr.
Actually, as it did receive few tuning, the support is disabled by
default, but it can opt-in with the option ADAPTIVE_LOCKMGRS.
Due to the nature of lockmgrs, adaptive spinning needs to be
selectively enabled for any interested lockmgr.
The support is bi-directional, or, in other ways, it will work in both
cases if the lock is held in read or write way.  In particular, the
read path is passible of further tunning using the sysctls
debug.lockmgr.retries and debug.lockmgr.loops .  Ideally, such sysctls
should be axed or compiled out before release.

Addictionally note that adaptive spinning doesn't cope well with
LK_SLEEPFAIL.  The reason is that many (and probabilly all) consumers
of LK_SLEEPFAIL are mainly interested in knowing if the interlock was
dropped or not in order to reacquire it and re-test initial conditions.
This directly interacts with adaptive spinning because lockmgr needs
to drop the interlock while spinning in order to avoid a deadlock
(further details in the comments inside the patch).

Final note: finding someone willing to help on tuning this with
relevant workloads would be either very important and appreciated.

Tested by: jeff, pho
Requested by: many

15 years agoFix a typo from the previous commit.
jkim [Tue, 16 Jun 2009 23:02:46 +0000 (23:02 +0000)]
Fix a typo from the previous commit.

15 years agoSync acpi(4) kld module Makefile with conf/options.
jkim [Tue, 16 Jun 2009 23:00:26 +0000 (23:00 +0000)]
Sync acpi(4) kld module Makefile with conf/options.

15 years agoiiin -> in
edwin [Tue, 16 Jun 2009 22:45:33 +0000 (22:45 +0000)]
iiin -> in

Submitted by:   "N.J. Mann" <njm@njm.me.uk>

15 years agoTrim extra sets of ()'s.
jhb [Tue, 16 Jun 2009 19:00:48 +0000 (19:00 +0000)]
Trim extra sets of ()'s.

Requested by: bde

15 years agoFix edge cases with ticks wrapping from INT_MAX to INT_MIN in the handling
jhb [Tue, 16 Jun 2009 19:00:12 +0000 (19:00 +0000)]
Fix edge cases with ticks wrapping from INT_MAX to INT_MIN in the handling
of the per-tcpcb t_badtrxtwin.

Submitted by: bde

15 years ago- Change members of tcpcb that cache values of ticks from int to u_int:
jhb [Tue, 16 Jun 2009 18:58:50 +0000 (18:58 +0000)]
- Change members of tcpcb that cache values of ticks from int to u_int:
  t_rcvtime, t_starttime, t_rtttime, t_bw_rtttime, ts_recent_age,
  t_badrxtwin.
- Change t_recent in struct timewait from u_long to u_int32_t to match
  the type of the field it shadows from tcpcb: ts_recent.
- Change t_starttime in struct timewait from u_long to u_int to match
  the t_starttime field in tcpcb.

Requested by: bde (1, 3)

15 years agoRemove confusing mergeinfo caused by renaming files.
jhb [Tue, 16 Jun 2009 17:48:08 +0000 (17:48 +0000)]
Remove confusing mergeinfo caused by renaming files.

15 years agoFreeBSD returns main object handle from dlopen(NULL, ...) calls.
kan [Tue, 16 Jun 2009 16:38:54 +0000 (16:38 +0000)]
FreeBSD returns main object handle from dlopen(NULL, ...) calls.
dlsym seaches using this handle are expected to look for symbol
definitions in all objects loaded at the program start time along
with all objects currently in RTLD_GLOBAL scope.

Discussed with: kib
Reported by: Maho NAKATA
MFC after: 2 weeks

15 years agoUse the closefrom(2) system call.
jhb [Tue, 16 Jun 2009 15:30:10 +0000 (15:30 +0000)]
Use the closefrom(2) system call.

Reviewed by: des

15 years agoDo not use casts (int *)0 and (struct thread *)0 for the arguments of
kib [Tue, 16 Jun 2009 15:13:45 +0000 (15:13 +0000)]
Do not use casts (int *)0 and (struct thread *)0 for the arguments of
vn_rdwr, use NULL.

Reviewed by: jhb
MFC after: 1 week

15 years agoMove (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.
jhb [Tue, 16 Jun 2009 15:13:18 +0000 (15:13 +0000)]
Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.
specialreg.h now consists solely of register-related macros.

15 years agoSmall fixes to Unicode handling:
ed [Tue, 16 Jun 2009 14:55:13 +0000 (14:55 +0000)]
Small fixes to Unicode handling:

- Add more mappings for Greek characters and the Euro sign.
- Print UTF-8 characters in the log file as hexadecimal.

15 years agoRemove the "int *" typecast for the aresid argument to vn_rdwr()
rmacklem [Tue, 16 Jun 2009 13:52:21 +0000 (13:52 +0000)]
Remove the "int *" typecast for the aresid argument to vn_rdwr()
and change the type of the argument from size_t to int. This
should avoid issues on 64bit architectures.

Suggested by: kib
Approved by: kib (mentor)

15 years agoFix a typo that causes the for loop to exit immediately. There's
rdivacky [Tue, 16 Jun 2009 13:31:01 +0000 (13:31 +0000)]
Fix a typo that causes the for loop to exit immediately. There's
identical loop a few lines above.

Reviewed by: sam
Approved by: ed (mentor)
Silence from: darrenr (maintainer)

15 years agoFix NanoBSD when the data partition size is defined as a negative
edwin [Tue, 16 Jun 2009 12:33:38 +0000 (12:33 +0000)]
Fix NanoBSD when the data partition size is defined as a negative
number.

It is possible to ask nanobsd.sh to create a 'data' partition,
separate from the system or configuration partitions, and
furthermore, by specifying a negative value for its size
to request that it use all space unused by those partitions
for its own size.

Because the two lines of code that calculate how much space
is available for this data partition are written in perl-like
syntax, the awk code that does the processing performs the
calculation incorrectly.
[note - this was already fixed by r174936]

Furthermore, a comparison later down fails to newfs the
partition when the size is negative.

PR: misc/127759
Submitted by: Cyrus Rahman <crahman@gmail.com>
MFC after: 1 week

15 years agoSupport for 64 Mb Kodak flash device.
edwin [Tue, 16 Jun 2009 12:09:12 +0000 (12:09 +0000)]
Support for 64 Mb Kodak flash device.

PR: misc/115025
Submitted by: Michael W Lucas <mwlucas@freebsd.org>
MFC after: 1 week

15 years agoAdd support for 256MB Hitachi CF card and 256MB Silicon Systems CF card
edwin [Tue, 16 Jun 2009 12:05:04 +0000 (12:05 +0000)]
Add support for 256MB Hitachi CF card and 256MB Silicon Systems CF card

This patch against RELENG_6 adds two more entries to
src/tools/tools/nanobsd/FlashDevice.sub - one for a 256MB
Hitachi CF card and one for a 256MB Silicon Systems CF card.

Both entries have been verified to work with a Soekris net4801.

PR: kern/101228
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after: 1 week

15 years agoDisconnect closefrom.c as we have it as a system call.
delphij [Tue, 16 Jun 2009 00:09:06 +0000 (00:09 +0000)]
Disconnect closefrom.c as we have it as a system call.

15 years agoNow we have closefrom().
delphij [Mon, 15 Jun 2009 23:03:38 +0000 (23:03 +0000)]
Now we have closefrom().

15 years agoFix usb2_find_descriptor function name.
thompsa [Mon, 15 Jun 2009 22:38:05 +0000 (22:38 +0000)]
Fix usb2_find_descriptor function name.

15 years agoI have several machines where the following warning is printed:
ps [Mon, 15 Jun 2009 21:55:29 +0000 (21:55 +0000)]
I have several machines where the following warning is printed:
warning: no time-of-day clock registered, system time will not be set accurately

Provide hints to atrtc on amd64 since it's not being described in
ACPI on some systems.

Reviewed by: jhb

15 years agoAdd revoke(1).
ed [Mon, 15 Jun 2009 21:52:27 +0000 (21:52 +0000)]
Add revoke(1).

While hacking on TTY code, I often miss a small utility to revoke my own
(pseudo-)terminals. This small utility is just a small wrapper around
the revoke(2) call, so you can destroy your very own login sessions.

Approved by: re

15 years agoMake the chpass Makefile honour NO_FSCHG.
ed [Mon, 15 Jun 2009 21:05:00 +0000 (21:05 +0000)]
Make the chpass Makefile honour NO_FSCHG.

The chpass Makefile tried to set the fschg flag on the binaries, even if
NO_FSCHG was passed to the installworld. This meant that if I installed
FreeBSD into a Jail, I couldn't installworld from within the Jail
anymore.

Now that it listens to NO_FSCHG, we can just make it bail out when it
fails, just like PRECIOUSPROG does.

15 years agoPerform some more cleanups to in-kernel session handling.
ed [Mon, 15 Jun 2009 20:45:51 +0000 (20:45 +0000)]
Perform some more cleanups to in-kernel session handling.

The code that was in place in exit1() was mainly based on code from the
old TTY layer. The main reason behind this, was because at one moment I
ran a system that had two TTY layers in place at the same time. It is
now sufficient to do the following:

- Remove references from the session structure to the TTY vnode and the
  session leader.

- If we have a controlling TTY and the session used by the TTY is equal
  to our session, send the SIGHUP.

- If we have a vnode to the controlling TTY which has not been revoked,
  revoke it.

While there, change sys/kern/tty.c to use s_ttyp in the comparison
instead of s_ttyvp. It should not make any difference, because s_ttyvp
can only become null when the session leader already left, but it's
nicer to compare against the proper value.

15 years agoRegen.
jhb [Mon, 15 Jun 2009 20:40:23 +0000 (20:40 +0000)]
Regen.

15 years agoAdd a new 'void closefrom(int lowfd)' system call. When called, it closes
jhb [Mon, 15 Jun 2009 20:38:55 +0000 (20:38 +0000)]
Add a new 'void closefrom(int lowfd)' system call.  When called, it closes
any open file descriptors >= 'lowfd'.  It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD.  One difference from other *BSD is that this closefrom() does not
fail with any errors.  In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR.  DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads.  As such, it is not
multithread safe.

Submitted by: rwatson (initial version)
Reviewed by: rwatson
MFC after: 2 weeks

15 years agor193336 moved ifq_detach to if_free which broke if_alloc followed
sam [Mon, 15 Jun 2009 19:50:03 +0000 (19:50 +0000)]
r193336 moved ifq_detach to if_free which broke if_alloc followed
by if_free (w/o doing if_attach); move ifq_attach to if_alloc and
rename ifq_attach/detach to ifq_init/ifq_delete to better identify
their purpose

Reviewed by: jhb, kmacy

15 years agoRemove redundant code from runshutdown() now tcsetsid(3) works reliably.
ed [Mon, 15 Jun 2009 19:24:47 +0000 (19:24 +0000)]
Remove redundant code from runshutdown() now tcsetsid(3) works reliably.

We can now just call setctty() without any problems. This means the
shell running the shutdown script is now the session leader, just like
on startup.

15 years agoMake tcsetsid(3) work on revoked TTYs.
ed [Mon, 15 Jun 2009 19:17:52 +0000 (19:17 +0000)]
Make tcsetsid(3) work on revoked TTYs.

Right now the only way to make tcsetsid(3)/TIOCSCTTY work, is by
ensuring the session leader is dead. This means that an application that
catches SIGHUPs and performs a sleep prevents us from assigning a new
session leader.

Change the code to make it work on revoked TTYs as well. This allows us
to change init(8) to make the shutdown script run in a more clean
environment.

15 years agoGet vnets from creds instead of threads where they're available, and from
jamie [Mon, 15 Jun 2009 19:01:53 +0000 (19:01 +0000)]
Get vnets from creds instead of threads where they're available, and from
passed threads instead of curthread.

Reviewed by: zec, julian
Approved by: bz (mentor)

15 years agoManage vnets via the jail system. If a jail is given the boolean
jamie [Mon, 15 Jun 2009 18:59:29 +0000 (18:59 +0000)]
Manage vnets via the jail system.  If a jail is given the boolean
parameter "vnet" when it is created, a new vnet instance will be created
along with the jail.  Networks interfaces can be moved between prisons
with an ioctl similar to the one that moves them between vimages.
For now vnets will co-exist under both jails and vimages, but soon
struct vimage will be going away.

Reviewed by: zec, julian
Approved by: bz (mentor)

15 years agoLong long time ago, several utilities in base used to parse %c output and
jkim [Mon, 15 Jun 2009 18:49:06 +0000 (18:49 +0000)]
Long long time ago, several utilities in base used to parse %c output and
we were not able to change c_fmt without breaking these utilities.  Since
ache fixed all known issues 8 years ago, now we make ko_KR more usable.
Better late than never...

15 years agoAdd cas(4).
marius [Mon, 15 Jun 2009 18:27:27 +0000 (18:27 +0000)]
Add cas(4).

Approved by: re (kib)
MFC after: 2 weeks

15 years agoAdd cas(4).
marius [Mon, 15 Jun 2009 18:25:10 +0000 (18:25 +0000)]
Add cas(4).

Approved by: re (kib)
MFC after: 2 weeks

15 years agoAdd a man page for cas(4) and reference it as appropriate.
marius [Mon, 15 Jun 2009 18:24:04 +0000 (18:24 +0000)]
Add a man page for cas(4) and reference it as appropriate.

Approved by: re (kib)
MFC after: 2 weeks

15 years agoAdd cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor
marius [Mon, 15 Jun 2009 18:22:41 +0000 (18:22 +0000)]
Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor
DP83065 Saturn Gigabit Ethernet controllers. These are the successors
of the Sun GEM controllers and still have a similar but extended transmit
logic. As such this driver is based on gem(4).
Thanks to marcel@ for providing a Sun Quad GigaSwift Ethernet UTP (QGE)
card which was vital for getting this driver to work on architectures
not using Open Firmware.

Approved by: re (kib)
MFC after: 2 weeks

15 years agoSince dn_pipe.numbytes is int64_t now - remove unnecessary overflow detection
oleg [Mon, 15 Jun 2009 17:14:47 +0000 (17:14 +0000)]
Since dn_pipe.numbytes is int64_t now - remove unnecessary overflow detection
code in ready_event_wfq().

15 years ago- The maximum number of heads is 255, not 256.
lulf [Mon, 15 Jun 2009 16:51:07 +0000 (16:51 +0000)]
- The maximum number of heads is 255, not 256.

Pointed out by: marcel

15 years ago- Remove old and add new valid flags for the chunk structure.
lulf [Mon, 15 Jun 2009 16:42:08 +0000 (16:42 +0000)]
- Remove old and add new valid flags for the chunk structure.

Submitted by: randi

15 years agoAM/PM should come first in korean.
jkim [Mon, 15 Jun 2009 16:32:17 +0000 (16:32 +0000)]
AM/PM should come first in korean.

15 years ago- Relax sanitazion requirements in libdisk, as a previous commit enabling this
lulf [Mon, 15 Jun 2009 16:18:24 +0000 (16:18 +0000)]
- Relax sanitazion requirements in libdisk, as a previous commit enabling this
  sanitization broke sysinstall on some disks.  This was due to the disks
  reporting a geometry that was incorrectly sanitized by sysinstall. This makes
  the sanitization consistent with fdisk.

Tested by: randi

15 years agoNote that the structures are defined in <sys/user.h> in the text (using
jhb [Mon, 15 Jun 2009 15:43:00 +0000 (15:43 +0000)]
Note that the structures are defined in <sys/user.h> in the text (using
language from stat(2)) rather than in the synopsis.

Requested by: bde

15 years agoReplace the global references to "hostid" in svc_rpcsec_gss.c to local
rmacklem [Mon, 15 Jun 2009 14:44:55 +0000 (14:44 +0000)]
Replace the global references to "hostid" in svc_rpcsec_gss.c to local
variables set via the getcredhostid() function. I also changed the type
of ci_hostid to "unsigned long" so that it matches what is returned by
getcredhostid(). Although "struct svc_rpc_gss_clientid" goes on the wire
during RPCSEC_GSS, it is just a variable # of opaque bytes to the client,
so it doesn't matter how much storage ci_hostid uses.

Approved by: kib (mentor)

15 years agoForbid multi-vector MSI interrupt vectors migration to another CPU once
mav [Mon, 15 Jun 2009 13:47:49 +0000 (13:47 +0000)]
Forbid multi-vector MSI interrupt vectors migration to another CPU once
allocated. MSI have strict vectors allocation requirements, which are not
satisfied now during reallocation. This is not the best possible solution,
but better then just broken, as it was.

No objections: current@, arch@, jhb@

15 years ago- Add a way to change filter oversampling factor through
ariff [Mon, 15 Jun 2009 04:31:34 +0000 (04:31 +0000)]
- Add a way to change filter oversampling factor through
  FEEDER_RATE_PRESET "OVERSAMPLING_FACTOR:X .. .." where
  X = log2(oversampling factor).

- Lower down default filter oversampling factor from 128
  (log2 = 7) to 32 (log2 = 5), saving worth of 80 Kb.
  The use of better polynomial interpolator will raise
  its conversion quality/accuracy to match (or slightly
  better) with previous settings.

- Bump driver version.

15 years agoRemap type of polynomial interpolators for better polyphase
ariff [Mon, 15 Jun 2009 04:05:38 +0000 (04:05 +0000)]
Remap type of polynomial interpolators for better polyphase
coefficients quality:
- Linear interpolator for oversampling factor larger and equal
  than 4096 (log2 = 12).
- Quadratic interpolator for oversampling factor larger and equal
  than 256 (log2 = 8).

Default oversampling factor (128 ~ log2 = 7) will use OPT32X, which
provides better accuracy.

15 years agoUndo the change in r193688 as suggested in conf/72076.
edwin [Mon, 15 Jun 2009 02:17:10 +0000 (02:17 +0000)]
Undo the change in r193688 as suggested in conf/72076.

People on IRC and the -doc mailinglist (June 2009) showed that this
new format wasn't used or known widely enough to justify the change.

15 years agoFix _USB2_* refernces in the header protection defines.
thompsa [Mon, 15 Jun 2009 01:09:19 +0000 (01:09 +0000)]
Fix _USB2_* refernces in the header protection defines.

15 years agoFix compile with changes to the usb_config struct.
thompsa [Mon, 15 Jun 2009 01:05:46 +0000 (01:05 +0000)]
Fix compile with changes to the usb_config struct.

15 years agos/usb2_/usb_|usbd_/ on all function names for the USB stack.
thompsa [Mon, 15 Jun 2009 01:02:43 +0000 (01:02 +0000)]
s/usb2_/usb_|usbd_/ on all function names for the USB stack.

15 years agoRemove usb2_cv_* and just use the kernel condvar implementation, it was needed
thompsa [Mon, 15 Jun 2009 00:33:18 +0000 (00:33 +0000)]
Remove usb2_cv_* and just use the kernel condvar implementation, it was needed
earlier since condition variables didnt work with Giant but this was fixed 10
months ago.

15 years agoEd forgot this in r190751.
des [Sun, 14 Jun 2009 23:44:06 +0000 (23:44 +0000)]
Ed forgot this in r190751.

15 years agoEd forgot this in r190751.
des [Sun, 14 Jun 2009 23:27:09 +0000 (23:27 +0000)]
Ed forgot this in r190751.

15 years agoRemove the note about using vt220, which makes no sense at all.
ed [Sun, 14 Jun 2009 22:35:33 +0000 (22:35 +0000)]
Remove the note about using vt220, which makes no sense at all.

vt220 will not work better. Even though it probably will remove warnings
about unknown terminal types, a cons25 emulator is not compatible with
vt220 at all.

15 years agoAdd volatile to sig_atomic_t where it was missing.
des [Sun, 14 Jun 2009 21:39:52 +0000 (21:39 +0000)]
Add volatile to sig_atomic_t where it was missing.

MFC after: 1 week

15 years agoBump __FreeBSD_version for OpenSSL 0.9.8k import.
simon [Sun, 14 Jun 2009 19:53:52 +0000 (19:53 +0000)]
Bump __FreeBSD_version for OpenSSL 0.9.8k import.

15 years agoLong, long ago in r27464 special case code for mapping device-backed
alc [Sun, 14 Jun 2009 19:51:43 +0000 (19:51 +0000)]
Long, long ago in r27464 special case code for mapping device-backed
memory with 4MB pages was added to pmap_object_init_pt().  This code
assumes that the pages of a OBJT_DEVICE object are always physically
contiguous.  Unfortunately, this is not always the case.  For example,
jhb@ informs me that the recently introduced /dev/ksyms driver creates
a OBJT_DEVICE object that violates this assumption.  Thus, this
revision modifies pmap_object_init_pt() to abort the mapping if the
OBJT_DEVICE object's pages are not physically contiguous.  This
revision also changes some inconsistent if not buggy behavior.  For
example, the i386 version aborts if the first 4MB virtual page that
would be mapped is already valid.  However, it incorrectly replaces
any subsequent 4MB virtual page mappings that it encounters,
potentially leaking a page table page.  The amd64 version has a bug of
my own creation.  It potentially busies the wrong page and always an
insufficent number of pages if it blocks allocating a page table page.

To my knowledge, there have been no reports of these bugs, hence,
their persistance.  I suspect that the existing restrictions that
pmap_object_init_pt() placed on the OBJT_DEVICE objects that it would
choose to map, for example, that the first page must be aligned on a 2
or 4MB physical boundary and that the size of the mapping must be a
multiple of the large page size, were enough to avoid triggering the
bug for drivers like ksyms.  However, one side effect of testing the
OBJT_DEVICE object's pages for physical contiguity is that a dubious
difference between pmap_object_init_pt() and the standard path for
mapping devices pages, i.e., vm_fault(), has been eliminated.
Previously, pmap_object_init_pt() would only instantiate the first
PG_FICTITOUS page being mapped because it never examined the rest.
Now, however, pmap_object_init_pt() uses the new function
vm_object_populate() to instantiate them all (in order to support
testing their physical contiguity).  These pages need to be
instantiated for the mechanism that I have prototyped for
automatically maintaining the consistency of the PAT settings across
multiple mappings, particularly, amd64's direct mapping, to work.
(Translation: This change is also being made to support jhb@'s work on
the Nvidia feature requests.)

Discussed with: jhb@

15 years agoRegenerate manual pages for OpenSSL 0.9.8k.
simon [Sun, 14 Jun 2009 19:51:05 +0000 (19:51 +0000)]
Regenerate manual pages for OpenSSL 0.9.8k.

15 years agoUpdate build infrastructure for OpenSSL 0.9.8k.
simon [Sun, 14 Jun 2009 19:46:18 +0000 (19:46 +0000)]
Update build infrastructure for OpenSSL 0.9.8k.

15 years agoMerge OpenSSL 0.9.8k into head.
simon [Sun, 14 Jun 2009 19:45:16 +0000 (19:45 +0000)]
Merge OpenSSL 0.9.8k into head.

Approved by: re

15 years agoEnable PRINTF_BUFR_SIZE on i386 and amd64 by default.
ed [Sun, 14 Jun 2009 18:01:35 +0000 (18:01 +0000)]
Enable PRINTF_BUFR_SIZE on i386 and amd64 by default.

In the past there have been some reports of PRINTF_BUFR_SIZE not
functioning correctly. Instead of having garbled console messages, we
should just see whether the issues are still there and analyze them.

Approved by: re