]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoMerge unp_bind() into uipc_bind(), as it is called only from uipc_bind().
rwatson [Sun, 23 Jul 2006 11:02:12 +0000 (11:02 +0000)]
Merge unp_bind() into uipc_bind(), as it is called only from uipc_bind().

18 years agoSince unp_attach() and unp_detach() are now called only from uipc_attach()
rwatson [Sun, 23 Jul 2006 10:25:28 +0000 (10:25 +0000)]
Since unp_attach() and unp_detach() are now called only from uipc_attach()
and uipc_detach(), merge them into their calling functions.

18 years agoMove various UNIX socket global variables and sysctls from the middle of
rwatson [Sun, 23 Jul 2006 10:19:04 +0000 (10:19 +0000)]
Move various UNIX socket global variables and sysctls from the middle of
the file to the top.

18 years agostop use of mutex lock in ICMP lookup.
ume [Sun, 23 Jul 2006 07:07:49 +0000 (07:07 +0000)]
stop use of mutex lock in ICMP lookup.

MFC after: 1 week

18 years agoExport the number of object bypasses and collapses through sysctl.
alc [Sat, 22 Jul 2006 22:31:57 +0000 (22:31 +0000)]
Export the number of object bypasses and collapses through sysctl.

18 years agoIn uipc_send() and uipc_rcvd(), store unp->unp_conn pointer in unp2
rwatson [Sat, 22 Jul 2006 18:41:42 +0000 (18:41 +0000)]
In uipc_send() and uipc_rcvd(), store unp->unp_conn pointer in unp2
while working with the second unpcb to make the code more clear.

18 years agoRe-wrap and other minor formatting and punctuation fixes for UNIX domain
rwatson [Sat, 22 Jul 2006 17:24:55 +0000 (17:24 +0000)]
Re-wrap and other minor formatting and punctuation fixes for UNIX domain
socket comments.

18 years agoImplement support for HMAC/SHA1 and HMAC/SHA256 acceleration found in
pjd [Sat, 22 Jul 2006 16:18:47 +0000 (16:18 +0000)]
Implement support for HMAC/SHA1 and HMAC/SHA256 acceleration found in
new VIA CPUs.
For older CPUs HMAC/SHA1 and HMAC/SHA256 (and others) will still be done
in software.

Move symmetric cryptography (currently only AES-CBC 128/192/256) to
padlock_cipher.c file. Move HMAC cryptography to padlock_hash.c file.

Hardware from: Centaur Technologies

18 years agoAdd initial platform support.
obrien [Sat, 22 Jul 2006 15:27:18 +0000 (15:27 +0000)]
Add initial platform support.

Submitted by: cognet

18 years agoAdd ARM platform Makefile for building disassembler.
obrien [Sat, 22 Jul 2006 14:59:50 +0000 (14:59 +0000)]
Add ARM platform Makefile for building disassembler.
(rev 1.1 was an accidental commit)

18 years agoAdd ARM platform Makefile for building BFD. We include the New ARM ABI only.
obrien [Sat, 22 Jul 2006 14:55:55 +0000 (14:55 +0000)]
Add ARM platform Makefile for building BFD.  We include the New ARM ABI only.
(rev 1.1 was an accidental commit)

18 years agoBe consistent in quoting.
obrien [Sat, 22 Jul 2006 14:37:17 +0000 (14:37 +0000)]
Be consistent in quoting.

18 years agoremove obsolete comments.
ume [Sat, 22 Jul 2006 14:36:56 +0000 (14:36 +0000)]
remove obsolete comments.

MFC after: 3 days

18 years agoCreate a genscripts driver based on the PowerPC one.
obrien [Sat, 22 Jul 2006 14:36:15 +0000 (14:36 +0000)]
Create a genscripts driver based on the PowerPC one.

18 years agoThe platform name is ARM not StrongARM.
obrien [Sat, 22 Jul 2006 14:12:02 +0000 (14:12 +0000)]
The platform name is ARM not StrongARM.

Submitted by: cognet

18 years agoTell when a .include is processed with '-dd'.
obrien [Sat, 22 Jul 2006 14:00:31 +0000 (14:00 +0000)]
Tell when a .include is processed with '-dd'.

18 years agoCorrect few bzero()s.
pjd [Sat, 22 Jul 2006 13:14:11 +0000 (13:14 +0000)]
Correct few bzero()s.

MFC after: 3 days

18 years agoNote the overhaul of asf(8).
yar [Sat, 22 Jul 2006 12:52:51 +0000 (12:52 +0000)]
Note the overhaul of asf(8).

18 years agoDon't forget to initialize crp_olen field, which is used to calculate
pjd [Sat, 22 Jul 2006 10:05:55 +0000 (10:05 +0000)]
Don't forget to initialize crp_olen field, which is used to calculate
bio_completed value.

18 years agoSet ses_ictx and ses_octx to NULL after freeing them, so we won't free
pjd [Sat, 22 Jul 2006 10:04:47 +0000 (10:04 +0000)]
Set ses_ictx and ses_octx to NULL after freeing them, so we won't free
them twice.
This is possible for example in situation when session is used in
authentication context, then freed and then used in encryption context
and freed - in encryption context ses_ictx and ses_octx are not touched
at newsession time, but padlock_freesession could still try to free them
when they are not NULL.

18 years agoFix build breakage from previous commit which confused key_abort and key_close.
gnn [Sat, 22 Jul 2006 09:18:02 +0000 (09:18 +0000)]
Fix build breakage from previous commit which confused key_abort and key_close.

18 years agoThe month name in .Dd should be spelled in full.
yar [Sat, 22 Jul 2006 07:23:46 +0000 (07:23 +0000)]
The month name in .Dd should be spelled in full.

Pointed out by: ru

18 years agoThe KAME project ceased work on IPv6 and IPSec in March of 2006.
gnn [Sat, 22 Jul 2006 02:32:32 +0000 (02:32 +0000)]
The KAME project ceased work on IPv6 and IPSec in March of 2006.
Remove the README file which warns against cosmetic or local only
changes.  FreeBSD committers should now feel free to work on the
IPv6 and IPSec code without fetters.  The KAME mailing lists still
exist and it is always a good idea to ask questions about this code
on the snap-users@kame.net mailing list.

Reviewed by: rwatson, brooks

18 years agoRetire debug.mpsafevm. None of the architectures supported in CVS require
alc [Fri, 21 Jul 2006 23:22:49 +0000 (23:22 +0000)]
Retire debug.mpsafevm.  None of the architectures supported in CVS require
it any longer.

18 years agoRemove mention of the `W' flag, which has been turned to no-op by the
sobomax [Fri, 21 Jul 2006 22:13:06 +0000 (22:13 +0000)]
Remove mention of the `W' flag, which has been turned to no-op by the
neworder change. Keep the option in a config file parser, to not
violate POLA.

MFC after: 2 weeks

18 years agoRegen.
jhb [Fri, 21 Jul 2006 20:41:33 +0000 (20:41 +0000)]
Regen.

18 years agoClean up the svr4 socket cache and streams code some to make it more easily
jhb [Fri, 21 Jul 2006 20:40:13 +0000 (20:40 +0000)]
Clean up the svr4 socket cache and streams code some to make it more easily
locked.
- Move all the svr4 socket cache code into svr4_socket.c, specifically
  move svr4_delete_socket() over from streams.c.  Make the socket cache
  entry structure and svr4_head private to svr4_socket.c as a result.
- Add a mutex to protect the svr4 socket cache.
- Change svr4_find_socket() to copy the sockaddr_un struct into a
  caller-supplied sockaddr_un rather than giving the caller a pointer to
  our internal one.  This removes the one case where code outside of
  svr4_socket.c could access data in the cache.
- Add an eventhandler for process_exit and process_exec to purge the cache
  of any entries for the exiting or execing process.
- Add methods to init and destroy the socket cache and call them from the
  svr4 ABI module's event handler.
- Conditionally grab Giant around socreate() in streamsopen().
- Use fdclose() instead of inlining it in streamsopen() when handling
  socreate() failure.
- Only allocate a stream structure and attach it to a socket in
  streamsopen().  Previously, if a svr4 program performed a stream
  operation on an arbitrary socket not opened via the streams device,
  we would attach streams state data to it and change f_ops of the
  associated struct file while it was in use.  The latter was especially
  not safe, and if a program wants a stream object it should open it via
  the streams device anyway.
- Don't bother locking so_emuldata in the streams code now that we only
  touch it right after creating a socket (in streamsopen()) or when
  tearing it down when the file is closed.
- Remove D_NEEDGIANT from the streams device as it is no longer needed.

18 years agoAdd conditional VFS Giant locking to svr4_sys_fchroot() and mark it MPSAFE.
jhb [Fri, 21 Jul 2006 20:28:56 +0000 (20:28 +0000)]
Add conditional VFS Giant locking to svr4_sys_fchroot() and mark it MPSAFE.
Also, call change_dir() instead of doing part of it inline (this now adds
a mac_check_vnode_chdir() call) to match fchdir() and call
mac_check_vnode_chroot() to match chroot().  Also, use the change_root()
function to do the actual change root to match chroot().

Reviewed by: rwatson

18 years agoAdd a comment to explain what fdclose() does and what it's purpose is
jhb [Fri, 21 Jul 2006 20:24:00 +0000 (20:24 +0000)]
Add a comment to explain what fdclose() does and what it's purpose is
since the subtlety eluded me when I looked at it last week.

18 years ago- Pass the MPSAFE flag to namei() in linux_uselib() and handle conditional
jhb [Fri, 21 Jul 2006 20:22:13 +0000 (20:22 +0000)]
- Pass the MPSAFE flag to namei() in linux_uselib() and handle conditional
  Giant VFS locking in that function.
- Remove bogus code to handle the case where namei() returns success but a
  NULL vnode pointer.
- Note that this code duplicates exec_check_permissions() and annotate
  where it differs.
- Hold the vnode lock longer to protect the write to set VV_TEXT in
  v_vflag.
- Mark linux_uselib() MPSAFE.

Reviewed by: rwatson

18 years agoIf we get an error w/o atapi sense information, just print a newline
imp [Fri, 21 Jul 2006 19:13:05 +0000 (19:13 +0000)]
If we get an error w/o atapi sense information, just print a newline
to terminate the message we started.  I get non-terminated messages
when reading audio tracks w/o this patch.

18 years agosimplification in explore_numeric: unified the post-process with
ume [Fri, 21 Jul 2006 19:02:28 +0000 (19:02 +0000)]
simplification in explore_numeric: unified the post-process with
GET_AI and GET_PORT.  Commented on an impossible case.

Obtained from: KAME
MFC after: 1 week

18 years agoRFC3493 requires use of inet_aton for AF_INET.
ume [Fri, 21 Jul 2006 19:00:22 +0000 (19:00 +0000)]
RFC3493 requires use of inet_aton for AF_INET.

Obtained from: KAME
MFC after: 1 week

18 years agoclean-up: rewrote explore_null and explore_numeric without using sentinel.
ume [Fri, 21 Jul 2006 18:57:44 +0000 (18:57 +0000)]
clean-up: rewrote explore_null and explore_numeric without using sentinel.
we do not need it since we make (at most) a single addrinfo entry in these
cases.

Obtained from: KAME
MFC after: 1 week

18 years ago- draft-ietf-ipngwg-icmp-namelookups-09
ume [Fri, 21 Jul 2006 18:55:51 +0000 (18:55 +0000)]
- draft-ietf-ipngwg-icmp-namelookups-09
- make it compilable

It still requires root privilege and is experimental.

Obtained from: KAME
MFC after: 1 week

18 years agoChange semantics of socket close and detach. Add a new protocol switch
rwatson [Fri, 21 Jul 2006 17:11:15 +0000 (17:11 +0000)]
Change semantics of socket close and detach.  Add a new protocol switch
function, pru_close, to notify protocols that the file descriptor or
other consumer of a socket is closing the socket.  pru_abort is now a
notification of close also, and no longer detaches.  pru_detach is no
longer used to notify of close, and will be called during socket
tear-down by sofree() when all references to a socket evaporate after
an earlier call to abort or close the socket.  This means detach is now
an unconditional teardown of a socket, whereas previously sockets could
persist after detach of the protocol retained a reference.

This faciliates sharing mutexes between layers of the network stack as
the mutex is required during the checking and removal of references at
the head of sofree().  With this change, pru_detach can now assume that
the mutex will no longer be required by the socket layer after
completion, whereas before this was not necessarily true.

Reviewed by: gnn

18 years agoTouch document date (Dd).
yar [Fri, 21 Jul 2006 15:57:12 +0000 (15:57 +0000)]
Touch document date (Dd).

18 years agoSince Alpha support isn't in HEAD anymore, remove Alpha-specific
yar [Fri, 21 Jul 2006 15:55:18 +0000 (15:55 +0000)]
Since Alpha support isn't in HEAD anymore, remove Alpha-specific
rc.conf(5) knobs, too: osf1_enable, unaligned_print.

18 years agoGrr we also need to set -mbig-endian to LDFLAGS. Now I can build a
cognet [Fri, 21 Jul 2006 14:07:48 +0000 (14:07 +0000)]
Grr we also need to set -mbig-endian to LDFLAGS. Now I can build a
big-endian arm world.

18 years agoImport from OpenBSD 1.168, dhartmei:
mlaier [Fri, 21 Jul 2006 09:48:13 +0000 (09:48 +0000)]
Import from OpenBSD 1.168, dhartmei:
  fix a bug in the input sanity check of DIOCCHANGERULE (not used by pfctl,
  but third-party tools). a rule must have a non-empty replacement address
  list when it's a translation rule but not an anchor call (i.e. "nat ...
  ->" needs a replacement address, but "nat-anchor ..." doesn't). the check
  confused "rule is an anchor call" with "rule is defined within an anchor".
  report from Michal Mertl, Max Laier.

Obtained from: OpenBSD
MFC after: 2 weeks

18 years agoThe contents pointed by ssi_cables[] is never changed so explicitly
delphij [Fri, 21 Jul 2006 08:45:00 +0000 (08:45 +0000)]
The contents pointed by ssi_cables[] is never changed so explicitly
declare it as const char * instead of char *.

This change have no side impact to the code itself, and is a step
forward to WARNS=6 truss(1).

18 years agoEliminate OBJ_WRITEABLE. It hasn't been used in a long time.
alc [Fri, 21 Jul 2006 06:40:29 +0000 (06:40 +0000)]
Eliminate OBJ_WRITEABLE.  It hasn't been used in a long time.

18 years agoImplement pmap_clear_write().
alc [Thu, 20 Jul 2006 23:26:22 +0000 (23:26 +0000)]
Implement pmap_clear_write().

Discussed with: cognet@

18 years agoRemove ALPHA optimization pointer for gcc flags.
imp [Thu, 20 Jul 2006 22:42:48 +0000 (22:42 +0000)]
Remove ALPHA optimization pointer for gcc flags.
Add ARM optimization pointer for gcc flags.

18 years agoOops LDFLAGS can be used to invoke gcc, so directly add -EB to {LD}.
cognet [Thu, 20 Jul 2006 22:13:59 +0000 (22:13 +0000)]
Oops LDFLAGS can be used to invoke gcc, so directly add -EB to {LD}.

18 years agoHonor ARM_BIG_ENDIAN by adding -mbig-endian to CFLAGS and -EB to LDFLAGS if
cognet [Thu, 20 Jul 2006 21:28:07 +0000 (21:28 +0000)]
Honor ARM_BIG_ENDIAN by adding -mbig-endian to CFLAGS and -EB to LDFLAGS if
it is defined.

18 years agoFix ALT_BREAK_TO_DEBUGGER on the AT91 :
cognet [Thu, 20 Jul 2006 21:03:43 +0000 (21:03 +0000)]
Fix ALT_BREAK_TO_DEBUGGER on the AT91 :
The core uart code expects the receive method to actually puts the
characters read into its buffers. For AT91, it's done in the ipend routine,
so also check if we have the alternate break sequence here.

MFC after: 3 days

18 years agoExpand locking coverage slightly to cover if_drv_flags in a few places
jhb [Thu, 20 Jul 2006 18:41:00 +0000 (18:41 +0000)]
Expand locking coverage slightly to cover if_drv_flags in a few places
where it wasn't locked.

MFC after: 3 days
Reviewed by: davidch

18 years agoAdd pmap_clear_write() to the interface between the virtual memory
alc [Thu, 20 Jul 2006 17:48:41 +0000 (17:48 +0000)]
Add pmap_clear_write() to the interface between the virtual memory
system's machine-dependent and machine-independent layers.  Once
pmap_clear_write() is implemented on all of our supported
architectures, I intend to replace all calls to pmap_page_protect() by
calls to pmap_clear_write().  Why?  Both the use and implementation of
pmap_page_protect() in our virtual memory system has subtle errors,
specifically, the management of execute permission is broken on some
architectures.  The "prot" argument to pmap_page_protect() should
behave differently from the "prot" argument to other pmap functions.
Instead of meaning, "give the specified access rights to all of the
physical page's mappings," it means "don't take away the specified
access rights from all of the physical page's mappings, but do take
away the ones that aren't specified."  However, owing to our i386
legacy, i.e., no support for no-execute rights, all but one invocation
of pmap_page_protect() specifies VM_PROT_READ only, when the intent
is, in fact, to remove only write permission.  Consequently, a
faithful implementation of pmap_page_protect(), e.g., ia64, would
remove execute permission as well as write permission.  On the other
hand, some architectures that support execute permission have
basically ignored whether or not VM_PROT_EXECUTE is passed to
pmap_page_protect(), e.g., amd64 and sparc64.  This change represents
the first step in replacing pmap_page_protect() by the less subtle
pmap_clear_write() that is already implemented on amd64, i386, and
sparc64.

Discussed with: grehan@ and marcel@

18 years ago- Remove hardcoded /etc/ntp.conf configuration file from ntpdate rc.d script
flz [Thu, 20 Jul 2006 10:07:34 +0000 (10:07 +0000)]
- Remove hardcoded /etc/ntp.conf configuration file from ntpdate rc.d script
and replace it with a new ntpdate_config variable.
- Document it in defaults/rc.conf and rc.conf.5.
- Document ntpdate_hosts in defaults/rc.conf.

Requested by: Chris Timmons <cwt@networks.cwu.edu>
Approved by: cperciva (mentor, implicit)
MFC after: 1 week

18 years agoConvert macros to use C99's syntax for macros with a variable number of
stefanf [Thu, 20 Jul 2006 09:47:15 +0000 (09:47 +0000)]
Convert macros to use C99's syntax for macros with a variable number of
arguments.

18 years agoRemove unused variables.
stefanf [Thu, 20 Jul 2006 09:38:46 +0000 (09:38 +0000)]
Remove unused variables.

18 years agoDon't use "implicit int". Move the opening { of the functions to the next
stefanf [Thu, 20 Jul 2006 09:11:08 +0000 (09:11 +0000)]
Don't use "implicit int".  Move the opening { of the functions to the next
line while there.

18 years agoSince resetting hardware takes a very long time and results in link
yongari [Thu, 20 Jul 2006 04:18:45 +0000 (04:18 +0000)]
Since resetting hardware takes a very long time and results in link
renegotiation, we only initialize the hardware only when it is
absolutely required. Process SIOCGIFADDR ioctl in em(4) when we know
an IPv4 address is added. Handling SIOCGIFADDR in a driver is
layering violation but it seems that there is no easy way without
rewritting hardware initialization code to reduce settle time after
reset.

This should fix a long standing bug which didn't send ARP packet when
interface address is changed or an alias address is added. Another
effect of this fix is it doesn't need additional delays anymore when
adding an alias address to the interface.
While I'm here add a new if_flags into softc which remembers current
prgroammed interface flags and make use of it when we have to program
promiscuous mode.

Tested by: Atanas <atanas AT asd DOT aplus DOT net>
Analyzed by: rwatson
Discussed with: -stable

18 years agoProtect EEPROM access with the driver lock.
yongari [Thu, 20 Jul 2006 04:01:54 +0000 (04:01 +0000)]
Protect EEPROM access with the driver lock.

18 years agoHonor IFF_DRV_OACTIVE in em_start_locked().
yongari [Thu, 20 Jul 2006 03:57:58 +0000 (03:57 +0000)]
Honor IFF_DRV_OACTIVE in em_start_locked().

18 years agoRegen.
jhb [Wed, 19 Jul 2006 19:03:21 +0000 (19:03 +0000)]
Regen.

18 years agoAdd conditional VFS Giant locking to svr4_sys_resolvepath() and mark it
jhb [Wed, 19 Jul 2006 19:03:03 +0000 (19:03 +0000)]
Add conditional VFS Giant locking to svr4_sys_resolvepath() and mark it
MPSAFE.

18 years agoMake svr4_sys_waitsys() a lot less ugly and mark it MPSAFE.
jhb [Wed, 19 Jul 2006 19:01:10 +0000 (19:01 +0000)]
Make svr4_sys_waitsys() a lot less ugly and mark it MPSAFE.
- If the WNOWAIT flag isn't specified and either of WEXITED or WTRAPPED is
  set, then just call kern_wait() and let it do all the work.  This means
  that this function no longer has to duplicate the work to teardown
  zombies that is done in kern_wait().  Instead, if the above conditions
  aren't true, then it uses a simpler loop to implement WNOWAIT and/or
  tracing for only stopped or continued processes.  This function still
  has to duplicate code from kern_wait() for the latter two cases, but
  those are much simpler.
- Sync the code to handle the WCONTINUED and WSTOPPED cases with the
  equivalent code in kern_wait().
- Fix several places that would return with the proctree lock still held.
- Lock the current process to prevent lost wakeup races when blocking.

18 years agoAdd a mutex to protect the list of interrupt config hooks. We do assume
jhb [Wed, 19 Jul 2006 18:53:56 +0000 (18:53 +0000)]
Add a mutex to protect the list of interrupt config hooks.  We do assume
that the only remove hook operation that can occur while processing the
hooks is to remove the currently executing hook.  This should be safe as
the existing code has assumed this already for a long time now.

Reviewed by: scottl
MFC after: 1 week

18 years agoWhitespace fix after s/dev_t/struct cdev */.
jhb [Wed, 19 Jul 2006 18:52:33 +0000 (18:52 +0000)]
Whitespace fix after s/dev_t/struct cdev */.

18 years agoCall change_dir() instead of duplicating the code in fchdir().
jhb [Wed, 19 Jul 2006 18:30:33 +0000 (18:30 +0000)]
Call change_dir() instead of duplicating the code in fchdir().

18 years agoDon't free the sockaddr in kern_bind() and kern_connect() as not all
jhb [Wed, 19 Jul 2006 18:28:52 +0000 (18:28 +0000)]
Don't free the sockaddr in kern_bind() and kern_connect() as not all
callers pass a sockaddr allocated via malloc() from M_SONAME anymore.
Instead, free it in the callers when necessary.

18 years agoDisable the pager for 'panic' and 'call' to be paranoid.
jhb [Wed, 19 Jul 2006 18:26:53 +0000 (18:26 +0000)]
Disable the pager for 'panic' and 'call' to be paranoid.

18 years agoInitialize svr4_head during MOD_LOAD rather than on demand.
jhb [Wed, 19 Jul 2006 18:26:09 +0000 (18:26 +0000)]
Initialize svr4_head during MOD_LOAD rather than on demand.

18 years agoReflect the additional support of C7 CPU's in padlock(4).
mr [Wed, 19 Jul 2006 16:31:09 +0000 (16:31 +0000)]
Reflect the additional support of C7 CPU's in padlock(4).

Submitted by: brueffer
MFC after: 1 day

18 years agoAdd a test case for closing a UDPv6 socket that has been connected to
rwatson [Wed, 19 Jul 2006 12:54:14 +0000 (12:54 +0000)]
Add a test case for closing a UDPv6 socket that has been connected to
the IPv6 loopback address.

Warns ?= 2.

18 years agoAdd very basic regression test for netinet6: create and close raw,
rwatson [Wed, 19 Jul 2006 12:10:33 +0000 (12:10 +0000)]
Add very basic regression test for netinet6: create and close raw,
UDP, and TCP IPv6 sockets.

18 years agoThe pcn does not work on NEC SV-98/2-B05 and B06.
nyan [Wed, 19 Jul 2006 11:49:22 +0000 (11:49 +0000)]
The pcn does not work on NEC SV-98/2-B05 and B06.

Submitted by: Chiharu Shibata
MFC after: 3 days

18 years agoAdd CPUTYPE support for Via C3 and C3-2 processors.
des [Wed, 19 Jul 2006 11:27:19 +0000 (11:27 +0000)]
Add CPUTYPE support for Via C3 and C3-2 processors.

MFC after: 2 weeks

18 years ago- Bring kern.random output closer to reality
brueffer [Wed, 19 Jul 2006 10:49:43 +0000 (10:49 +0000)]
- Bring kern.random output closer to reality
- Remove kern.random.sys.burst, it's no longer available
- Document kern.random.sys.harvest.swi (1)

PR: 100167 (1)
MFC after: 3 days

18 years agoRemove an unused variable.
stefanf [Wed, 19 Jul 2006 10:46:38 +0000 (10:46 +0000)]
Remove an unused variable.

18 years agoConvert sk(4) to use the new bus_alloc_resources() API and
yongari [Wed, 19 Jul 2006 04:12:59 +0000 (04:12 +0000)]
Convert sk(4) to use the new bus_alloc_resources() API and
bus_{read,write}_* macros.

Submitted by: Antoine Brodin <antoine.brodin AT laposte DOT net>
Reviewed by: imp (initial version)

18 years agoFix race conditions on enumerating pcb lists by moving the initialization
ups [Tue, 18 Jul 2006 22:34:27 +0000 (22:34 +0000)]
Fix race conditions on enumerating pcb lists by moving the initialization
( and where appropriate the destruction) of the pcb mutex to the init/finit
functions of the pcb zones.
This allows locking of the pcb entries and race condition free comparison
of the generation count.
Rearrange locking a bit to avoid extra locking operation to update the generation
count in in_pcballoc(). (in_pcballoc now returns the pcb locked)

I am planning to convert pcb list handling from a type safe to a reference count
model soon. ( As this allows really freeing the PCBs)

Reviewed by: rwatson@, mohans@
MFC after: 1 week

18 years agoRemove unnecessary locking for td_dupfd (it requires no locks).
jhb [Tue, 18 Jul 2006 22:31:33 +0000 (22:31 +0000)]
Remove unnecessary locking for td_dupfd (it requires no locks).

18 years agoUpdate comment.
jhb [Tue, 18 Jul 2006 22:29:54 +0000 (22:29 +0000)]
Update comment.

18 years agoAdd -EB to ${LD} too if we're making a big endian kernel, not anything in
cognet [Tue, 18 Jul 2006 21:16:39 +0000 (21:16 +0000)]
Add -EB to ${LD} too if we're making a big endian kernel, not anything in
kernel makefiles uses SYSTEM_LD.

18 years agoAdd new kernel config option. NO_SYSCTL_DESCR to omit the descriptions for
imp [Tue, 18 Jul 2006 17:00:51 +0000 (17:00 +0000)]
Add new kernel config option.  NO_SYSCTL_DESCR to omit the descriptions for
the sysctls.  This saves a lot of space in the resulting kernel which is
important for embedded systems.  This change was done in a ABI compatible
way.  The pointer is still there, it just points to an empty string instead
of the description.

MFC After: 3 days

18 years agoRemove break after return.
stefanf [Tue, 18 Jul 2006 10:19:46 +0000 (10:19 +0000)]
Remove break after return.

18 years agoDocument that the pathname(s) following the options need not be given if
stefanf [Tue, 18 Jul 2006 07:39:22 +0000 (07:39 +0000)]
Document that the pathname(s) following the options need not be given if
-f pathname was specified.

18 years agoFix type mismatch between char * and unsigned char *. C guarantees that
stefanf [Tue, 18 Jul 2006 07:29:42 +0000 (07:29 +0000)]
Fix type mismatch between char * and unsigned char *.  C guarantees that
the values of the characters here are positive, so it's safe to index arrays
with them.

18 years agoThe variables i and tot don't need to be static.
stefanf [Tue, 18 Jul 2006 07:16:25 +0000 (07:16 +0000)]
The variables i and tot don't need to be static.

18 years agoRemove break after return.
stefanf [Tue, 18 Jul 2006 07:10:30 +0000 (07:10 +0000)]
Remove break after return.

18 years agoDrop two unnecessary casts.
stefanf [Tue, 18 Jul 2006 07:03:43 +0000 (07:03 +0000)]
Drop two unnecessary casts.

18 years agoMFamd64
alc [Tue, 18 Jul 2006 03:17:12 +0000 (03:17 +0000)]
MFamd64
 pmap_clear_ptes() is already convoluted.  This will worsen with the
 implementation of superpages.  Eliminate it and add pmap_clear_write().

There are no functional changes.  Checked by: md5

18 years agoFix build of uma_core.c when DDB is not compiled into the kernel by
rwatson [Tue, 18 Jul 2006 01:13:18 +0000 (01:13 +0000)]
Fix build of uma_core.c when DDB is not compiled into the kernel by
making uma_zone_sumstat() ifdef DDB, as it's only used with DDB now.

Submitted by: Wolfram Fenske <Wolfram.Fenske at Student.Uni-Magdeburg.DE>

18 years agoMake sure we use REDUCE32 on the result of do_cksum(), as in_cksum_skip()
cognet [Tue, 18 Jul 2006 00:07:05 +0000 (00:07 +0000)]
Make sure we use REDUCE32 on the result of do_cksum(), as in_cksum_skip()
expects this. If we do not, this could result in wrong checksums.

MFC after: 1 day

18 years agoFirmware loading improvements:
gallatin [Mon, 17 Jul 2006 22:17:05 +0000 (22:17 +0000)]
Firmware loading improvements:

- Copy ethernet firmware down in small chunks so as to avoid bugs
  in early versions of the bootstrap firmware.
- Attempt to "adopt" the running firmware if we cannot load a suitable
  firmware image via firmware(9).
- Separate firmware validation into its own routine, and check the
  major/minor driver/firmware ABI version.

18 years agoIf we can't defrag a packet, re-queue it instead of dropping it.
cognet [Mon, 17 Jul 2006 21:36:08 +0000 (21:36 +0000)]
If we can't defrag a packet, re-queue it instead of dropping it.

18 years ago#if => #ifdef
cognet [Mon, 17 Jul 2006 21:20:00 +0000 (21:20 +0000)]
#if => #ifdef

18 years agoFix comments.
cognet [Mon, 17 Jul 2006 21:18:03 +0000 (21:18 +0000)]
Fix comments.

18 years agoat91_spi won't compile without spibus, so add it.
cognet [Mon, 17 Jul 2006 21:17:20 +0000 (21:17 +0000)]
at91_spi won't compile without spibus, so add it.

18 years agoVarAdd() already does the debug printing, so Var_Set() only needs to do it
obrien [Mon, 17 Jul 2006 21:05:27 +0000 (21:05 +0000)]
VarAdd() already does the debug printing, so Var_Set() only needs to do it
in the case the var already exists.

18 years agoSeparate functions with a newline.
stefanf [Mon, 17 Jul 2006 21:00:42 +0000 (21:00 +0000)]
Separate functions with a newline.

18 years agostyle.Makefile(5): Remove -Wall from CFLAGS.
stefanf [Mon, 17 Jul 2006 20:53:25 +0000 (20:53 +0000)]
style.Makefile(5): Remove -Wall from CFLAGS.

18 years agoRemove duplicated assignment.
stefanf [Mon, 17 Jul 2006 20:48:36 +0000 (20:48 +0000)]
Remove duplicated assignment.

18 years agoUse variadic macros that comply with C99. Keep the GCC-style ones if
stefanf [Mon, 17 Jul 2006 20:39:08 +0000 (20:39 +0000)]
Use variadic macros that comply with C99.  Keep the GCC-style ones if
DEBUG is defined and GCC is used.

18 years agoMove default GEOM classes from files.ia64, where they were marked
marcel [Mon, 17 Jul 2006 20:02:51 +0000 (20:02 +0000)]
Move default GEOM classes from files.ia64, where they were marked
standard, to the DEFAULTS file.

18 years agoChain the bus_dmamap_load() calls when mapping a command with a data CCB
jhb [Mon, 17 Jul 2006 19:45:47 +0000 (19:45 +0000)]
Chain the bus_dmamap_load() calls when mapping a command with a data CCB
instead of doing the first load with the BUS_DMA_NOWAIT flag.  On 4.x with
PAE and > 4gb of RAM this proved disastrous if there weren't enough bounce
pages as amr_mapcmd() would return failure but the callback would later
fire once enough bounce pages were available and would then overwrite
another command's S/G list.

MFC after: 3 days
Submitted by: scottl (4.x version)
Reviewed by: scottl (port from 4.x to HEAD)

18 years agowhitespace fixing
obrien [Mon, 17 Jul 2006 19:16:12 +0000 (19:16 +0000)]
whitespace fixing