]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoLeave out a header file.
jb [Sat, 26 Apr 2008 04:54:58 +0000 (04:54 +0000)]
Leave out a header file.

16 years agoMerge FreeBSD include file changes with some code that should have come
jb [Sat, 26 Apr 2008 04:53:24 +0000 (04:53 +0000)]
Merge FreeBSD include file changes with some code that should have come
in on the vendor branch.

16 years ago* Use FreeBSD's process library instead of the Solaris one.
jb [Sat, 26 Apr 2008 04:51:45 +0000 (04:51 +0000)]
* Use FreeBSD's process library instead of the Solaris one.
* There are a few placeholders in here for which there isn't libproc
  support code yet. This is relevent to userland tracing. This set of
  commits is designed to get kernel tracing up and running, with the
  userland stuff to follow later.

16 years agoLeave out the hook that Solaris has into it's rtld.
jb [Sat, 26 Apr 2008 04:49:02 +0000 (04:49 +0000)]
Leave out the hook that Solaris has into it's rtld.

16 years ago* Add a couple of action definitions for FreeBSD extensions.
jb [Sat, 26 Apr 2008 04:47:16 +0000 (04:47 +0000)]
* Add a couple of action definitions for FreeBSD extensions.
* Handle the different ioctl design.
* Add support for the get and set error location.
* Add support for freopen().

16 years ago* Handle the different ioctl design.
jb [Sat, 26 Apr 2008 04:44:34 +0000 (04:44 +0000)]
* Handle the different ioctl design.
* Make the file compile cleanly.

16 years agoThere are many places in libdtrace where errno can be set. When an
jb [Sat, 26 Apr 2008 04:43:19 +0000 (04:43 +0000)]
There are many places in libdtrace where errno can be set. When an
error is returned all the way back to the dtrace app, it's hard to
figure out where that error came from.

Add a couple of functions to get and set the error location which can
be optionally compiled into the library.

16 years agoAdd some error definitions for FreeBSD action extensions.
jb [Sat, 26 Apr 2008 04:40:38 +0000 (04:40 +0000)]
Add some error definitions for FreeBSD action extensions.

16 years ago* Make this file compile cleanly.
jb [Sat, 26 Apr 2008 04:39:26 +0000 (04:39 +0000)]
* Make this file compile cleanly.
* Use FreeBSD's kld syscalls to get kernel module information instead
  of using an object file system like Solaris uses.

16 years ago* Handle the different ioctl design.
jb [Sat, 26 Apr 2008 04:37:01 +0000 (04:37 +0000)]
* Handle the different ioctl design.
* Use FreeBSD's process library API.
* Make the file compile cleanly.

16 years agoJust leave out a few includes to compile this on FreeBSD.
jb [Sat, 26 Apr 2008 04:34:50 +0000 (04:34 +0000)]
Just leave out a few includes to compile this on FreeBSD.

16 years ago* Get the maximum number of CPUs via a sysctl.
jb [Sat, 26 Apr 2008 04:33:15 +0000 (04:33 +0000)]
* Get the maximum number of CPUs via a sysctl.
* Handle the different ioctl design.
* Support the freopen() changes.
* Use functions in FreeBSD's process library rather than the CDDL
  library that Solaris has which sits on top of their process file
  system and is therefore unsuitable for use on FreeBSD. The libproc
  API for FreeBSD is deliberately different to that on Solaris because
  Sun wouldn't release the libproc.h header under a BSD license.

16 years ago* Define YY_INPUT for flex since input() can't be re-defined.
jb [Sat, 26 Apr 2008 04:26:23 +0000 (04:26 +0000)]
* Define YY_INPUT for flex since input() can't be re-defined.
* On FreeBSD define both LITTLE_ENDIAN and BIG_ENDIAN and then set the
  BYTE_ORDER to the one we are using. On Solaris they define one or
  the other but not both. For us to keep using FreeBSD header files,
  we need to use endian definitions the same way we do in pure BSD
  code.

16 years agoMake this compile cleanly.
jb [Sat, 26 Apr 2008 04:22:32 +0000 (04:22 +0000)]
Make this compile cleanly.

16 years agoHandle the different level of indirection between ioctl on SYSV vs BSD.
jb [Sat, 26 Apr 2008 04:20:11 +0000 (04:20 +0000)]
Handle the different level of indirection between ioctl on SYSV vs BSD.

16 years agofreopen() on FreeBSD behaves differently to the Solaris one.
jb [Sat, 26 Apr 2008 04:18:35 +0000 (04:18 +0000)]
freopen() on FreeBSD behaves differently to the Solaris one.

16 years ago* Use a portable POSIX timed wait.
jb [Sat, 26 Apr 2008 04:16:17 +0000 (04:16 +0000)]
* Use a portable POSIX timed wait.
* Handle the different ioctl format.

16 years ago* Fix a function prototype.
jb [Sat, 26 Apr 2008 04:13:23 +0000 (04:13 +0000)]
* Fix a function prototype.
* Allow for the different level of indirection between SYSV's ioctl and BSD's.
* Map a couple of sysconf definitions to one that FreeBSD has.

16 years agoSimplify for FreeBSD for now, bypassing the multibyte char variables
jb [Sat, 26 Apr 2008 04:11:16 +0000 (04:11 +0000)]
Simplify for FreeBSD for now, bypassing the multibyte char variables
that Solaris has. We may need to revisit this issue later.

16 years agoSolaris has code which makes zlib optional, so they have to jump through
jb [Sat, 26 Apr 2008 04:09:13 +0000 (04:09 +0000)]
Solaris has code which makes zlib optional, so they have to jump through
some hoops to get the compression functions. On FreeBSD have libz and
can just link against it.

16 years ago'echo' behaviour differs between SYSV and BSD.
jb [Sat, 26 Apr 2008 04:03:58 +0000 (04:03 +0000)]
'echo' behaviour differs between SYSV and BSD.

16 years agoA lot of changes to make this code compile cleanly on FreeBSD.
jb [Sat, 26 Apr 2008 04:01:35 +0000 (04:01 +0000)]
A lot of changes to make this code compile cleanly on FreeBSD.

16 years agoUse FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one that
jb [Sat, 26 Apr 2008 03:59:24 +0000 (03:59 +0000)]
Use FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one that
is used in Solaris.

16 years agoWe need to be consistent with prototype definitions. It isn't OK to
jb [Sat, 26 Apr 2008 03:56:49 +0000 (03:56 +0000)]
We need to be consistent with prototype definitions. It isn't OK to
use 'const' and just override it whenever we feel like it. If we use
it at all, then we need to do it properly.

Add a couple of functions that were useful in getting this code ported.

16 years agoMake this file compile cleanly.
jb [Sat, 26 Apr 2008 03:54:23 +0000 (03:54 +0000)]
Make this file compile cleanly.

16 years agoApply FreeBSD changes.
jb [Sat, 26 Apr 2008 03:47:34 +0000 (03:47 +0000)]
Apply FreeBSD changes.

16 years agoOn FreeBSD we can't afford to have a build fail simply because there
jb [Sat, 26 Apr 2008 03:44:47 +0000 (03:44 +0000)]
On FreeBSD we can't afford to have a build fail simply because there
was some sort of CTF conversion error.

16 years agoAdd a missing include file. We care about function prototype definitions.
jb [Sat, 26 Apr 2008 03:40:56 +0000 (03:40 +0000)]
Add a missing include file. We care about function prototype definitions.

16 years agoApply FreeBSD changes.
jb [Sat, 26 Apr 2008 03:39:02 +0000 (03:39 +0000)]
Apply FreeBSD changes.

There is an incomplete piece of code in here which requires the process
handling library which is still under development.

16 years ago* Set the path to perl on FreeBSD.
jb [Sat, 26 Apr 2008 03:36:28 +0000 (03:36 +0000)]
* Set the path to perl on FreeBSD.
* Use the FreeBSD shell.
* On FreeBSD the tests run from the OBJDIR, so output files go there
  rather than in the source tree like they do on Solaris.
* FreeBSD doesn't need a special path to the compiler.

16 years agoSet the path to perl on FreeBSD.
jb [Sat, 26 Apr 2008 03:34:22 +0000 (03:34 +0000)]
Set the path to perl on FreeBSD.

16 years agoPort these test files to work under FreeBSD.
jb [Sat, 26 Apr 2008 03:32:20 +0000 (03:32 +0000)]
Port these test files to work under FreeBSD.

16 years agoHave the man page catch up with the namespace pollution cleanup that
scf [Sat, 26 Apr 2008 02:33:53 +0000 (02:33 +0000)]
Have the man page catch up with the namespace pollution cleanup that
occurred between 2001-2003.  Thanks to bde for the history lesson[1]
concerning sys/types.h and the many system calls that at one time
(pre-2001) were required by POSIX to include it.

1. http://lists.freebsd.org/pipermail/freebsd-arch/2008-April/008126.html

MFC after: 3 days

16 years agoOpps,missed line in the fix...
jfv [Sat, 26 Apr 2008 02:15:40 +0000 (02:15 +0000)]
Opps,missed line in the fix...

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178528,
jb [Sat, 26 Apr 2008 00:54:52 +0000 (00:54 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178528,
which included commits to RCS files with non-trunk default branches.

16 years agoVendor import of the full userland contrib part of DTrace support from
jb [Sat, 26 Apr 2008 00:54:52 +0000 (00:54 +0000)]
Vendor import of the full userland contrib part of DTrace support from
OpenSolaris. This commit resets files to match the versions in the
OpenSolaris tree as of 2008/04/10.

The changes in this import from the previous import are the ones that
will subsequently re-applied to take files off the vendor branch. This
is unfortunately necessary because the Solaris developers won't allow
FreeBSD support #ifdefs in their source code because that creates
'dead code' (stuff that they never compile).

16 years agoReplace the prototype vaps_<ifn> and vap_create_<ifn> variables with
brooks [Fri, 25 Apr 2008 23:50:49 +0000 (23:50 +0000)]
Replace the prototype vaps_<ifn> and vap_create_<ifn> variables with
more wlans_<ifn> and create_args_<ifn>

Add documentation for these variants and generally update the wireless
device example.

There is are very short lived shim from vaps_<ifn> which produces
a warning and vap_create_<ifn> which does not.  Misuse the MFC
notification service to remind me to remove them.

MFC after: 3 weeks

16 years agoVendor import of DTrace support files from OpenSolaris.
jb [Fri, 25 Apr 2008 23:33:18 +0000 (23:33 +0000)]
Vendor import of DTrace support files from OpenSolaris.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178525,
jb [Fri, 25 Apr 2008 23:33:18 +0000 (23:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178525,
which included commits to RCS files with non-trunk default branches.

16 years agoA change got dropped in the merge, add back
jfv [Fri, 25 Apr 2008 23:22:01 +0000 (23:22 +0000)]
A change got dropped in the merge, add back

16 years agoThis delta has a few important items:
jfv [Fri, 25 Apr 2008 21:19:41 +0000 (21:19 +0000)]
This delta has a few important items:

PR 122839 is fixed in both em and in igb

Second, the issue on building modules since the static kernel
build changes is now resolved. I was not able to get the fancier
directory hierarchy working, but this works, both em and igb
build as modules now.

Third, there is now support in em for two new NICs, Hartwell
(or 82574) is a low cost PCIE dual port adapter that has MSIX,
for this release it uses 3 vectors only, RX, TX, and LINK. In
the next release I will add a second TX and RX queue. Also, there
is support here for ICH10, the followon to ICH9. Both of these are
early releases, general availability will follow soon.

Fourth: On Hartwell and ICH10 we now have IEEE 1588 PTP support,
I have implemented this in a provisional way so that early adopters
may try and comment on the functionality. The IOCTL structure may
change. This feature is off by default, you need to edit the Makefile
and add the EM_TIMESYNC define to get the code.

Enjoy all!!

16 years agoadd rules for statically embedding ipw, iwi, ral, and wpi firmware modules
sam [Fri, 25 Apr 2008 20:42:48 +0000 (20:42 +0000)]
add rules for statically embedding ipw, iwi, ral, and wpi firmware modules

16 years agohookup the parent device's if_input and if_output to stub routines
sam [Fri, 25 Apr 2008 19:45:42 +0000 (19:45 +0000)]
hookup the parent device's if_input and if_output to stub routines
to catch unintended use (one might argue about if_output but it's
behaviour is ill-defined without vap context)

Noticed by: Paul B. Mahol

16 years agoremove scan task on state change so it doesn't unexpectedly fire
sam [Fri, 25 Apr 2008 19:13:38 +0000 (19:13 +0000)]
remove scan task on state change so it doesn't unexpectedly fire

Noticed by: Paul B. Mahol

16 years agoAdd "ddb capture print" and "ddb capture status" commands do ddb(8),
rwatson [Fri, 25 Apr 2008 17:34:09 +0000 (17:34 +0000)]
Add "ddb capture print" and "ddb capture status" commands do ddb(8),
alowing the DDB output capture buffer to be easily extracted from
user space.  Both of these commands include -M/-N arguments, allowing
them to be used with kernel crash dumps (or /dev/mem).

This makes it easier to use DDB scripting and output capture with
minidumps or full dumps rather than with text dumps, allowing DDB
output (scripted or otherwise) to be easily extracted from a crash
dump.

MFC after: 1 week
Discussed with: brooks, jhb

16 years agoInitialize tz_active to a new constant TZ_ACTIVE_UNKNOWN and make no
rpaulo [Fri, 25 Apr 2008 16:45:13 +0000 (16:45 +0000)]
Initialize tz_active to a new constant TZ_ACTIVE_UNKNOWN and make no
assumptions about the state of the cooling devices. Instead, switch them
off on init and, only after that, we are in TZ_ACTIVE_NONE.

Submited by: Andriy Gapon <avg at icyb.net.ua>
Reviewed by: njl

16 years agoUnbreak previous commit. While here, refactor the code a bit.
marcel [Fri, 25 Apr 2008 16:09:03 +0000 (16:09 +0000)]
Unbreak previous commit. While here, refactor the code a bit.

16 years agoAlways use PG_PS_FRAME to extract the physical address of a 2/4MB page
alc [Fri, 25 Apr 2008 16:00:39 +0000 (16:00 +0000)]
Always use PG_PS_FRAME to extract the physical address of a 2/4MB page
from a PDE.

16 years agoRename debug.ddb.capture.bytes sysctl to debug.ddb.capture.bufoff in
rwatson [Fri, 25 Apr 2008 13:23:36 +0000 (13:23 +0000)]
Rename debug.ddb.capture.bytes sysctl to debug.ddb.capture.bufoff in
order to match the internal variable name.

Add a new sysctl debug.ddb.capture.inprogress to export the inprogress
variable.

MFC after: 3 days

16 years agoo Fixed multi thread access issue reported by Alexander V. Chernikov
daichi [Fri, 25 Apr 2008 11:37:20 +0000 (11:37 +0000)]
o Fixed multi thread access issue reported by Alexander V. Chernikov
    (admin@su29.net)
  fixed: kern/109950

PR: kern/109950
Submitted by: Alexander V. Chernikov (admin@su29.net)
Reviewed by: Masanori OZAWA (ozawa@ongs.co.jp)
MFC after: 1 week

16 years agoo Improved unix socket connection issue
daichi [Fri, 25 Apr 2008 09:53:52 +0000 (09:53 +0000)]
o Improved unix socket connection issue
  fixed: kern/118346

PR: kern/118346
Submitted by: Masanori OZAWA (ozawa@ongs.co.jp)
MFC after: 1 week

16 years agoo Fixed rename panic issue
daichi [Fri, 25 Apr 2008 09:44:47 +0000 (09:44 +0000)]
o Fixed rename panic issue

Submitted by: Masanori OZAWA (ozawa@ongs.co.jp)
MFC after: 1 week

16 years ago o Fixed inaccessible issue especially including devfs on unionfs case.
daichi [Fri, 25 Apr 2008 09:38:48 +0000 (09:38 +0000)]
  o Fixed inaccessible issue especially including devfs on unionfs case.
    fixed also: kern/117829

PR: kern/117829
Submitted by: Masanori OZAWA (ozawa@ongs.co.jp)
MFC after: 1 week

16 years agoVendor import of the CTF (Compact C Type Format) code used by DTrace
jb [Fri, 25 Apr 2008 09:07:28 +0000 (09:07 +0000)]
Vendor import of the CTF (Compact C Type Format) code used by DTrace
from OpenSolaris.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178481,
jb [Fri, 25 Apr 2008 09:07:28 +0000 (09:07 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178481,
which included commits to RCS files with non-trunk default branches.

16 years agoVendor import of libraries for DTrace from OpenSolaris.
jb [Fri, 25 Apr 2008 09:04:09 +0000 (09:04 +0000)]
Vendor import of libraries for DTrace from OpenSolaris.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178479,
jb [Fri, 25 Apr 2008 09:04:09 +0000 (09:04 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178479,
which included commits to RCS files with non-trunk default branches.

16 years agoo Added system hang-up process when VOP_READDIR of unionfs_nodeget()
daichi [Fri, 25 Apr 2008 07:58:19 +0000 (07:58 +0000)]
o Added system hang-up process when VOP_READDIR of unionfs_nodeget()
  returns not end of the file status on debug mode (DIAGNOSTIC defined)
  kernel.

Submitted by: Masanori OZAWA (ozawa@ongs.co.jp)
MFC after: 1 week

16 years agoVendor import of the DTrace app and test suite from OpenSolaris.
jb [Fri, 25 Apr 2008 06:56:31 +0000 (06:56 +0000)]
Vendor import of the DTrace app and test suite from OpenSolaris.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178476,
jb [Fri, 25 Apr 2008 06:56:31 +0000 (06:56 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178476,
which included commits to RCS files with non-trunk default branches.

16 years ago - Add an integer argument to idle to indicate how likely we are to wake
jeff [Fri, 25 Apr 2008 05:18:50 +0000 (05:18 +0000)]
 - Add an integer argument to idle to indicate how likely we are to wake
   from idle over the next tick.
 - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are
   suspended in cpu specific states.  This function can fail and cause the
   scheduler to fall back to another mechanism (ipi).
 - Implement support for mwait in cpu_idle() on i386/amd64 machines that
   support it.  mwait is a higher performance way to synchronize cpus
   as compared to hlt & ipis.
 - Allow selecting the idle routine by name via sysctl machdep.idle.  This
   replaces machdep.cpu_idle_hlt.  Only idle routines supported by the
   current machine are permitted.

Sponsored by: Nokia

16 years agoo Disable HMEDEBUG by default.
marius [Thu, 24 Apr 2008 23:12:03 +0000 (23:12 +0000)]
o Disable HMEDEBUG by default.
o Add CTASSERTs ensuring that HME_NRXDESC and HME_NTXDESC are set to
  legal values.
o Use appropriate maxsize, nsegments and maxsegsize parameters when
  creating DMA tags and correct some comments related to them.
o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
  some time now so collapse calls accordingly.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
  hme_rint() and hme_start_locked().
o Keep state of the link state and use it to enable or disable the MAC
  in hme_mii_statchg() accordingly as well as to return early from
  hme_start_locked() in case the link is down.
o Introduce a sc_flags and use it to replace individual members like
  sc_pci.
o Add bus_barrier(9) calls to hme_mac_bitflip(), hme_mii_readreg(),
  hme_mii_writereg() and hme_stop() to ensure the respective bit
  has been written before we starting polling on it and for the right
  bits to change.
o Rather just returning in case hme_mac_bitflip() fails and leaving us
  in an undefined state report the problem and move on; chances are
  the requested configuration will become active shortly after.
o Don't call hme_start_locked() in hme_init_locked() unconditionally
  but only after calls to hme_init_locked() when it's appropriate, i.e.
  in hme_watchdog().
o Add a KASSERT which asserts nsegs is valid also to hme_load_txmbuf().
o In hme_load_txmbuf():
  - use a maximum of the newly introduced HME_NTXSEGS segments instead
    of the incorrect HME_NTXQ, which reflects the maximum TX queue
    length, for loading the mbufs and put the DMA segments back onto
    the stack instead of the softc as 16 should be ok there.
  - use the common errno(2) return values instead of homegrown ones,
  - given that hme_load_txmbuf() is allowed to fail resulting in a
    packet drop for quite some time now implement the functionality of
    hme_txcksum() by means of m_pullup(9), which de-obfuscates the code
    and allows to always retrieve the correct length of the IP header, [1]
  - also add a KASSERT which asserts nsegs is valid,
  - take advantage of m_collapse(9) instead of m_defrag(9) for
    performance reasons.
o Don't bother to check whether the interface is running or whether its
  queue is empty before calling hme_start_locked() in hme_tint(), the
  former will check these anyway.
o In hme_intr() call hme_rint() before hme_tint() as gem_tint() may
  take quite a while to return when it calls hme_start_locked().
o Get rid of sc_debug and just check if_flags for IFF_DEBUG directly.
o Add a shadow sc_ifflags so we don't reset the chip when unnecessary.
o Handle IFF_ALLMULTI correctly. [2]
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o Use the maximum of 256 TX descriptors for better performance as using
  all of them has no additional static cost rather than using just half
  of them.

Reported by: rwatson [2]
Suggested by: yongari [1]
Reviewed by: yongari
MFC after: 1 month

16 years ago- vx_stop() requires the driver lock to be held.
marius [Thu, 24 Apr 2008 22:51:43 +0000 (22:51 +0000)]
- vx_stop() requires the driver lock to be held.
- Add some missing newlines to messages printed by vx_getlink().

MFC after: 3 days

16 years ago- Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
marius [Thu, 24 Apr 2008 22:48:34 +0000 (22:48 +0000)]
- Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
  in order to get rid of bus space handle and tag in struct sym_hcb.
- Remove unused members related to bus addresses in struct sym_hcb.
- sym(4) takes care of allocating an instance of struct sym_hcb
  itself so don't let newbus allocate it as an unused softc also.
- Add basic MPSAFE locking. This includes changing the sym(4) CCBs
  to be allocated up-front instead of on demand as needed. Besides
  making these allocations more likely to succeed, this also solves
  the problem of calling bus_dmamap_create(9) with the SIM mutex
  held.

Reviewed by: scottl
MFC after: 1 month

16 years ago- Use NULL instead of 0 for pointers.
marius [Thu, 24 Apr 2008 22:36:11 +0000 (22:36 +0000)]
- Use NULL instead of 0 for pointers.
- Remove superfluous returns in functions returning void.
- In sym_alloc_lcb_tags() return directly instead of jumping
  to a label which just returns.
- Fix some spelling in comments.
- Remove trailing whitespace.

16 years agofdhold can return NULL, so add the one remaining missing check for this
kris [Thu, 24 Apr 2008 22:08:36 +0000 (22:08 +0000)]
fdhold can return NULL, so add the one remaining missing check for this
condition.

Reviewed by:    attilio
MFC after:      1 week

16 years agoList of files that are off the vendor branch, but we use the stock vendor
obrien [Thu, 24 Apr 2008 18:23:13 +0000 (18:23 +0000)]
List of files that are off the vendor branch, but we use the stock vendor
files.

16 years agoRemove FreeBSD ID's so these are exact copies of the vendor sources.
obrien [Thu, 24 Apr 2008 18:18:53 +0000 (18:18 +0000)]
Remove FreeBSD ID's so these are exact copies of the vendor sources.

16 years agoUse logic or, not binary or, when deciding whether or not a system call
rwatson [Thu, 24 Apr 2008 12:23:31 +0000 (12:23 +0000)]
Use logic or, not binary or, when deciding whether or not a system call
exit requires entering the audit code.  The result is much the same,
but they mean different things.

MFC afer: 3 days
Submitted by: Diego Giagio <dgiagio at gmail dot com>

16 years agoAllow the vnode zone to return the unused memory. The vnode reference
kib [Thu, 24 Apr 2008 09:58:33 +0000 (09:58 +0000)]
Allow the vnode zone to return the unused memory. The vnode reference
count is/shall be properly maintained for the long time, and VFS
shall be safe against the vnode memory reclamation.

Proposed by: jeff
Tested by: pho

16 years agoStricter check for integer overflow.
ru [Thu, 24 Apr 2008 07:49:00 +0000 (07:49 +0000)]
Stricter check for integer overflow.

16 years agoUpdated the test to handle multiple sinks. The sinks cut their
gnn [Thu, 24 Apr 2008 06:56:45 +0000 (06:56 +0000)]
Updated the test to handle multiple sinks.  The sinks cut their
transmissions by the number of them running so that they do not
overwhelm the source.

Added a simple shell script to kick off sinks on multiple hosts as
well as a source on the host where the shell script is run.  The script
also collects the output of all the sinks and the source into files named
for the host on which the tests are run.  A date is appended to each output
file to make it unique per run.

16 years agoIn function rtalloc_mpath(), do not try to release the lock if the ro_rt
qingli [Thu, 24 Apr 2008 05:04:52 +0000 (05:04 +0000)]
In function rtalloc_mpath(), do not try to release the lock if the ro_rt
pointer is NULL.

Reported by: (pluknet at gmail dot com)

16 years agoCapitalize "Eve". This is the correct form and now matches
scf [Thu, 24 Apr 2008 01:37:12 +0000 (01:37 +0000)]
Capitalize "Eve".  This is the correct form and now matches
calendar.usholiday.

MFC after: 3 days

16 years agoAdd support for gpart:
marcel [Thu, 24 Apr 2008 00:11:15 +0000 (00:11 +0000)]
Add support for gpart:
o  Correct for gpart's 1-based index, versus 0-based index used by
   legacy slicers.
o  Parse and understand the xs and xt parameters.

16 years agoRevert rev 1.332 and keep ddb scripts off by default for now. Minidumps
brooks [Wed, 23 Apr 2008 22:40:59 +0000 (22:40 +0000)]
Revert rev 1.332 and keep ddb scripts off by default for now.  Minidumps
are more flexable and much text-dump like output can be produced from
them so there's a good argument they are a better default.

16 years agoAvoid various shadowed variables. libthr is now almost WARNS=4 clean except
delphij [Wed, 23 Apr 2008 21:06:51 +0000 (21:06 +0000)]
Avoid various shadowed variables.  libthr is now almost WARNS=4 clean except
for some const dequalifiers that needs more careful investigation.

Ok'ed by: davidxu

16 years ago- Include <machine/utrap.h> so this header doesn't have an MD
marius [Wed, 23 Apr 2008 20:38:37 +0000 (20:38 +0000)]
- Include <machine/utrap.h> so this header doesn't have an MD
  dependency.
- Make prototypes style(9) compliant.

MFC after: 1 week

16 years agoImplement the G_PART_DUMPCONF method for all 6 schemes. Also call
marcel [Wed, 23 Apr 2008 20:13:05 +0000 (20:13 +0000)]
Implement the G_PART_DUMPCONF method for all 6 schemes. Also call
the method for the (indent == NULL) case (i.e. the kern.geom.conftxt
sysctl). The purpose is to extend the conftxt output with scheme-
specific fields which can be used by libdisk. In particular, have
the schemes dump the xs and xt fields, which contain the backward
compatible values for class type and partition type. This allows
libdisk to work with the legacy slicers as well as with gpart and
helps/promotes migration.

16 years agoo Rename ic_eoi to ic_clear to emphasize the functions it points
marius [Wed, 23 Apr 2008 20:04:38 +0000 (20:04 +0000)]
o Rename ic_eoi to ic_clear to emphasize the functions it points
  don't send and EOI which works like on amd64/i386 and blocks all
  interrupts on the relevant interrupt controller.
o Replace the post_filter and post_inthread hooks registered when
  creating the interrupt events with just ic_clear as on sparc64 we
  don't need to do any disable->EOI->enable dance to unblock all but
  the relevant interrupt while running the filter or handler; just
  not clearing the interrupt already has the same effect.
o Merge from amd64/i386:
  - Split the intr_table_lock into an sx lock used for most things,
    and a spin lock to protect intrcnt_index.
  - Add support for binding interrupts to CPUs, including for the
    bus_bind_intr(9) interface, a assign_cpu hook and initially
    shuffling interrupts arround in a round-robin fashion.

Reviewed by: jhb
MFC after: 1 month

16 years agoImplement red-black trees without using parent pointers, and store the
jasone [Wed, 23 Apr 2008 16:09:18 +0000 (16:09 +0000)]
Implement red-black trees without using parent pointers, and store the
color bit in the least significant bit of the right child pointer, in
order to reduce red-black tree linkage overhead by ~2X as compared to
sys/tree.h.

Use the new red-black tree implementation in malloc, which drops
memory usage by ~0.5 or ~1%, for 32- and 64-bit systems, respectively.

16 years agoImplement linux_truncate64() syscall.
rdivacky [Wed, 23 Apr 2008 15:56:33 +0000 (15:56 +0000)]
Implement linux_truncate64() syscall.

Tested by: Aline de Freitas <aline@riseup.net>
Approved by: kib (mentor)

16 years agoFix the year of my doc/www commit bit that I've got :)
ganbold [Wed, 23 Apr 2008 08:51:05 +0000 (08:51 +0000)]
Fix the year of my doc/www commit bit that I've got :)

Approved by: keramida(mentor)

16 years agoAdd 'arm' category.
linimon [Wed, 23 Apr 2008 03:05:31 +0000 (03:05 +0000)]
Add 'arm' category.

Approved by: peter

16 years agoCorrect an off-by-1 for GPART. The literal partition type (i.e.
marcel [Wed, 23 Apr 2008 03:00:26 +0000 (03:00 +0000)]
Correct an off-by-1 for GPART. The literal partition type (i.e.
the actual UUID) is prefixed by '!' to distinguish them from
well-known aliases.

MFC after: 3 days

16 years agoAdd four utility functions related to struct grp processing modeled in-part
scf [Wed, 23 Apr 2008 00:49:13 +0000 (00:49 +0000)]
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
  - gr_equal()
    Perform a deep comparison of two struct grp's.  It does a thorough, yet
    unoptimized comparison of all the members regardless of order.

  - gr_make()
    Create a string (see group(5)) from a struct grp.

  - gr_dup()
    Duplicate a struct grp.  Returns a value that is a single contiguous
    block of memory.

  - gr_scan()
    Create a struct grp from a string (as produced by gr_make()).

MFC after: 3 weeks

16 years agoDifferentiate in the tests against getenv() between an empty string and a
scf [Wed, 23 Apr 2008 00:45:48 +0000 (00:45 +0000)]
Differentiate in the tests against getenv() between an empty string and a
NULL by having the test program return *NULL* for NULL's (no existing
variable) instead of an empty string (variable with empty value).

16 years agoNow that all platforms use genclock, shuffle things around slightly
phk [Tue, 22 Apr 2008 19:38:30 +0000 (19:38 +0000)]
Now that all platforms use genclock, shuffle things around slightly
for better structure.

Much of this is related to <sys/clock.h>, which should really have
been called <sys/calendar.h>, but unless and until we need the name,
the repocopy can wait.

In general the kernel does not know about minutes, hours, days,
timezones, daylight savings time, leap-years and such.  All that
is theoretically a matter for userland only.

Parts of kernel code does however care: badly designed filesystems
store timestamps in local time and RTC chips almost universally
track time in a YY-MM-DD HH:MM:SS format, and sometimes in local
timezone instead of UTC.  For this we have <sys/clock.h>

<sys/time.h> on the other hand, deals with time_t, timeval, timespec
and so on.  These know only seconds and fractions thereof.

Move inittodr() and resettodr() prototypes to <sys/time.h>.
Retain the names as it is one of the few surviving PDP/VAX references.

Move startrtclock() to <machine/clock.h> on relevant platforms, it
is a MD call between machdep.c/clock.c.  Remove references to it
elsewhere.

Remove a lot of unnecessary <sys/clock.h> includes.

Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs.
XXX: should be kern.disable_rtc_set really, it's not MD.

16 years agolibbsdxml is now required by ifconfig(8).
thompsa [Tue, 22 Apr 2008 18:20:05 +0000 (18:20 +0000)]
libbsdxml is now required by ifconfig(8).

Submitted by: Florian Smeets

16 years agoFix a leak in the recent fixes for file descriptors > SHRT_MAX. In the
jhb [Tue, 22 Apr 2008 17:03:32 +0000 (17:03 +0000)]
Fix a leak in the recent fixes for file descriptors > SHRT_MAX.  In the
case of a file descriptor we can't handle, clear the FILE structure's flags
so it can be reused.

MFC after: 1 week
Reported by: otto @ OpenBSD

16 years agoAdd:
pgj [Tue, 22 Apr 2008 15:42:20 +0000 (15:42 +0000)]
Add:
- myself to the doc committers' graph
- my birthday to the FreeBSD calendar

Approved by: gabor (mentor)

16 years agoMake it possible to disable sources of entropy harvesting.
ru [Tue, 22 Apr 2008 15:18:47 +0000 (15:18 +0000)]
Make it possible to disable sources of entropy harvesting.

Noticed by: Igor Sysoev
MFC after: 3 days

16 years ago - Use a local variable for i_ino in ufs_lookup. It is only used to
jeff [Tue, 22 Apr 2008 12:34:16 +0000 (12:34 +0000)]
 - Use a local variable for i_ino in ufs_lookup.  It is only used to
   communicate between two parts of this one function.  This was causing
   problems with shared lookups as each would trash the ino value in the
   inode.
 - Remove the unused i_ino field from the inode structure.

16 years agoAcquire a read lock, rather than a write lock, on a UDPv6 inpcb when
rwatson [Tue, 22 Apr 2008 12:20:33 +0000 (12:20 +0000)]
Acquire a read lock, rather than a write lock, on a UDPv6 inpcb when
delivering to the socket or extracting socket details for monitoring
purposes.

MFC after: 3 months

16 years agoAdd FreeBSD IDs to files that originate in FreeBSD.
jb [Tue, 22 Apr 2008 07:43:00 +0000 (07:43 +0000)]
Add FreeBSD IDs to files that originate in FreeBSD.

16 years agoUse native rwlock.
davidxu [Tue, 22 Apr 2008 06:44:11 +0000 (06:44 +0000)]
Use native rwlock.

16 years agoKill $P4$ id.
rpaulo [Mon, 21 Apr 2008 22:00:01 +0000 (22:00 +0000)]
Kill $P4$ id.

Noticed by: rwatson

16 years agoThe vmspace->vm_daddr is constant until freed, there is no need
rdivacky [Mon, 21 Apr 2008 21:24:08 +0000 (21:24 +0000)]
The vmspace->vm_daddr is constant until freed, there is no need
to hold lock while accessing it.

Approved by: kib (mentor)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r178388,
marius [Mon, 21 Apr 2008 20:40:42 +0000 (20:40 +0000)]
This commit was generated by cvs2svn to compensate for changes in r178388,
which included commits to RCS files with non-trunk default branches.

16 years ago* gthr-posix.h (__gthread_active_p): Use the Solaris implementation
marius [Mon, 21 Apr 2008 20:40:42 +0000 (20:40 +0000)]
* gthr-posix.h (__gthread_active_p): Use the Solaris implementation
for FreeBSD as well.

This is the fix for __gthread_active_p() returning false positives
which was committed as rev. 1.1.1.8.2.1 to RELENG_7 but now looped
back to the vendor branch via the GCC repository and relicensed to
be GPLv2 by me.
Thanks go to gerald@ for getting the fix approved upstream and for
committing to the GCC repository.

PR: 119289
Approved by: core