]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMake sure the boot2 stage is compiled with gcc, as clang has no
Rui Paulo [Sat, 21 Aug 2010 15:01:59 +0000 (15:01 +0000)]
Make sure the boot2 stage is compiled with gcc, as clang has no
problems compiling it, but it just gets too big at the moment, even
with -Os.  This is not applicable to gptboot, though.

Submitted by: Dimitry Andric <dimitry at andric.com>

14 years agoWe need to pull bsd.own.mk before modifying the CC variable. Otherwise
Rui Paulo [Sat, 21 Aug 2010 14:59:37 +0000 (14:59 +0000)]
We need to pull bsd.own.mk before modifying the CC variable. Otherwise
it will be overwritten when we include bsd.lib.mk.

Pointed out by: Dimitry Andric <dimitry at andric.com>

14 years agoSkip a KASSERT which isn't appropriate when not employing page coloring.
Marius Strobl [Sat, 21 Aug 2010 14:28:48 +0000 (14:28 +0000)]
Skip a KASSERT which isn't appropriate when not employing page coloring.
Reported by: Michael Moll

14 years agoUpdate for the new tests.
Rui Paulo [Sat, 21 Aug 2010 14:14:24 +0000 (14:14 +0000)]
Update for the new tests.

Sponsored by: The FreeBSD Foundation

14 years agoAdd a sysname char * to struct opensolaris_utsname.
Rui Paulo [Sat, 21 Aug 2010 14:09:24 +0000 (14:09 +0000)]
Add a sysname char * to struct opensolaris_utsname.

Sponsored by: The FreeBSD Foundation

14 years agoAdd the definition of LIBELF_PIC.
Rui Paulo [Sat, 21 Aug 2010 14:08:04 +0000 (14:08 +0000)]
Add the definition of LIBELF_PIC.

Sponsored by: The FreeBSD Foundation

14 years agoUse double quotes when checking the value of MACHINE_ARCH.
Rui Paulo [Sat, 21 Aug 2010 14:02:04 +0000 (14:02 +0000)]
Use double quotes when checking the value of MACHINE_ARCH.

Sponsored by: The FreeBSD Foundation

14 years agoAdd a Makefile for dtruss.
Rui Paulo [Sat, 21 Aug 2010 13:56:29 +0000 (13:56 +0000)]
Add a Makefile for dtruss.

Sponsored by: The FreeBSD Foundation

14 years agoPort plockstat to FreeBSD. This will be connected to the build later.
Rui Paulo [Sat, 21 Aug 2010 13:54:33 +0000 (13:54 +0000)]
Port plockstat to FreeBSD. This will be connected to the build later.

Sponsored by: The FreeBSD Foundation

14 years agoLink drti.o with a PIC version of libelf. This is needed because
Rui Paulo [Sat, 21 Aug 2010 13:48:04 +0000 (13:48 +0000)]
Link drti.o with a PIC version of libelf. This is needed because
drti.o depends on libelf and this avoids linking every other drti.o
program (namely programs with USDT probes) with libelf.

Sponsored by: The FreeBSD Foundation

14 years agoAdd libelf to the prebuild libs.
Rui Paulo [Sat, 21 Aug 2010 13:42:12 +0000 (13:42 +0000)]
Add libelf to the prebuild libs.

This is needed for the DTrace instrumentation object.

Sponsored by: The FreeBSD Foundation

14 years agoPort the DTrace helper ioctls to FreeBSD and add a helper member to
Rui Paulo [Sat, 21 Aug 2010 11:58:08 +0000 (11:58 +0000)]
Port the DTrace helper ioctls to FreeBSD and add a helper member to
dof_helper_t (needed by drti.o).

Sponsored by: The FreeBSD Foundation

14 years agoAdd libdtrace support for tracing userland programs.
Rui Paulo [Sat, 21 Aug 2010 11:50:53 +0000 (11:50 +0000)]
Add libdtrace support for tracing userland programs.

Summary of changes:
* Implement a compatibility shim between Solaris libproc and our
libproc and remove several ifdefs because of this.
* Port the drti to FreeBSD.
* Implement the missing DOODAD sections
* Link with libproc and librtld_db
* Support for ustack, jstack and uregs (by sson@)
* Misc bugfixing

When writing the SUWN_dof section, we had to resort to building the ELF
file layout by "hand". This is the job of libelf, but our libelf doesn't
support this yet. When libelf is fixed, we can remove the code under
#ifdef BROKEN_LIBELF.

Sponsored by: The FreeBSD Foundation

14 years agoAdd sysname to struct opensolaris_utsname. This is needed by one DTrace
Rui Paulo [Sat, 21 Aug 2010 11:41:32 +0000 (11:41 +0000)]
Add sysname to struct opensolaris_utsname. This is needed by one DTrace
test.

Sponsored by: The FreeBSD Foundation

14 years agoUse double quotes when checking the value of MACHINE_ARCH.
Rui Paulo [Sat, 21 Aug 2010 11:14:50 +0000 (11:14 +0000)]
Use double quotes when checking the value of MACHINE_ARCH.

Sponsored by: The FreeBSD Foundation

14 years agoThe DTrace instrumentation object is going to be i386/amd64 only.
Rui Paulo [Sat, 21 Aug 2010 11:09:03 +0000 (11:09 +0000)]
The DTrace instrumentation object is going to be i386/amd64 only.

Sponsored by: The FreeBSD Foundation

14 years agoWrap remaining ieee80211_ratectl_node_init() calls missed in r211314.
Bernhard Schmidt [Sat, 21 Aug 2010 11:06:21 +0000 (11:06 +0000)]
Wrap remaining ieee80211_ratectl_node_init() calls missed in r211314.

MFC after: 1 week

14 years agoPort most of the DTrace tests to FreeBSD.
Rui Paulo [Sat, 21 Aug 2010 11:04:38 +0000 (11:04 +0000)]
Port most of the DTrace tests to FreeBSD.

Sponsored by: The FreeBSD Foundation

14 years agoInstall a PIC libelf. This will be needed by the DTrace runtime
Rui Paulo [Sat, 21 Aug 2010 10:40:12 +0000 (10:40 +0000)]
Install a PIC libelf. This will be needed by the DTrace runtime
instrumentation object (dtri.o).

Sponsored by: The FreeBSD Foundation

14 years agoRevert part of r211505. Some of the removed casts are actually safe so
Rui Paulo [Sat, 21 Aug 2010 10:31:26 +0000 (10:31 +0000)]
Revert part of r211505. Some of the removed casts are actually safe so
put them back in again. Also, clang only complained about the lvalue
cast.

Submitted by: Dimitry Andric <dimitry at andric.com>
Pointed out: bde

14 years agomake sure thread lock is locked.
David Xu [Fri, 20 Aug 2010 23:51:34 +0000 (23:51 +0000)]
make sure thread lock is locked.

14 years agoAdd dedicated routines to toggle lockmgr flags such as LK_NOSHARE and
John Baldwin [Fri, 20 Aug 2010 19:46:50 +0000 (19:46 +0000)]
Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and
LK_CANRECURSE after a lock is created.  Use them to implement macros that
otherwise manipulated the flags directly.  Assert that the associated
lockmgr lock is exclusively locked by the current thread when manipulating
these flags to ensure the flag updates are safe.  This last change required
some minor shuffling in a few filesystems to exclusively lock a brand new
vnode slightly earlier.

Reviewed by: kib
MFC after: 3 days

14 years agooptp may be NULL.
Hajimu UMEMOTO [Fri, 20 Aug 2010 17:52:49 +0000 (17:52 +0000)]
optp may be NULL.

14 years agoRevert r211434. Offline discussions have convinced me that this should
Matt Jacob [Fri, 20 Aug 2010 17:20:05 +0000 (17:20 +0000)]
Revert r211434. Offline discussions have convinced me that this should
be left alone for now.

14 years agoReduce redundant code.
David Xu [Fri, 20 Aug 2010 13:42:48 +0000 (13:42 +0000)]
Reduce redundant code.

Submitted by: kib

14 years ago In current implementation, thread cancellation is done in signal handler,
David Xu [Fri, 20 Aug 2010 05:15:39 +0000 (05:15 +0000)]
  In current implementation, thread cancellation is done in signal handler,
which does not know what is the state of interrupted system call, for
example, open() system call opened a file and the thread is still cancelled,
result is descriptor leak, there are other problems which can cause resource
leak or undeterminable side effect when a thread is cancelled. However, this
is no longer true in new implementation.

  In defering mode, a thread is canceled if cancellation request is pending and
later the thread enters a cancellation point, otherwise, a later
pthread_cancel() just causes SIGCANCEL to be sent to the target thread, and
causes target thread to abort system call, userland code in libthr then checks
cancellation state, and cancels the thread if needed. For example, the
cancellation point open(), the thread may be canceled at start,
but later, if it opened a file descriptor, it is not canceled, this avoids
file handle leak. Another example is read(), a thread may be canceled at start
of the function, but later, if it read some bytes from a socket, the thread
is not canceled, the caller then can decide if it should still enable cancelling
or disable it and continue reading data until it thinks it has read all
bytes of a packet, and keeps a protocol stream in health state, if user ignores
partly reading of a packet without disabling cancellation, then second iteration
of read loop cause the thread to be cancelled.
An exception is that the close() cancellation point always closes a file handle
despite whether the thread is cancelled or not.

  The old mechanism is still kept, for a functions which is not so easily to
fix a cancellation problem, the rough mechanism is used.

Reviewed by: kib@

14 years agoIf thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR
David Xu [Fri, 20 Aug 2010 04:28:30 +0000 (04:28 +0000)]
If thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR
immediately, this is used for implementing reliable pthread cancellation.

14 years agoAccording to specification, function fcntl() is a cancellation point only
David Xu [Fri, 20 Aug 2010 04:15:05 +0000 (04:15 +0000)]
According to specification, function fcntl() is a cancellation point only
when cmd argument is F_SETLKW.

14 years agoFPU EMU is 32-bit only for now, so mark it as a powerpc-only feature.
Nathan Whitehorn [Fri, 20 Aug 2010 01:23:17 +0000 (01:23 +0000)]
FPU EMU is 32-bit only for now, so mark it as a powerpc-only feature.
This fixes powerpc64 LINT.

14 years agoFix mbuf leakages and remove unneccessary duplicate mbuf frees.
Ana Kukec [Thu, 19 Aug 2010 23:16:44 +0000 (23:16 +0000)]
Fix mbuf leakages and remove unneccessary duplicate mbuf frees.
Use the right copy of an mbuf for the IP6_EXTHDR_CHECK.

Reported by: zec, hrs
Approved by: bz (mentor)

14 years agoRevert a minor part of revision 211364:
Xin LI [Thu, 19 Aug 2010 22:55:17 +0000 (22:55 +0000)]
Revert a minor part of revision 211364:

 - Imply -h if single file is grepped, this is the GNU behaviour

This is already done by code above the change and have caused a regression
since this instance of code does not check Hflag.

Reported by: davidxu
Pointy hat to: delphij

14 years agoRevert part of the r211149 as I erroneously ported the logical_cpus from
Attilio Rao [Thu, 19 Aug 2010 22:37:43 +0000 (22:37 +0000)]
Revert part of the r211149 as I erroneously ported the logical_cpus from
Yahoo! patchset as a mask (and according manipulating variables) while
it is actually a CPU count.

Submitted by: neel
MFC after: 1 month
X-MFC: 211149

14 years ago'\0' -> 0
Edwin Groothuis [Thu, 19 Aug 2010 21:59:39 +0000 (21:59 +0000)]
'\0' -> 0

Fix silly mistake by being overly zeaolous[sp] of applying the style rules.

14 years agoEliminate the ambiguous queue setting logic for
Jack F Vogel [Thu, 19 Aug 2010 17:00:33 +0000 (17:00 +0000)]
Eliminate the ambiguous queue setting logic for
the VF, it made it possible to have 2 queues which
we don't want, the HOST is unable to handle it.

14 years agoRemove unused KTRACE includes.
John Baldwin [Thu, 19 Aug 2010 16:41:27 +0000 (16:41 +0000)]
Remove unused KTRACE includes.

14 years agoThere isn't really a need to hold the ktrace mutex just to read the value
John Baldwin [Thu, 19 Aug 2010 16:40:30 +0000 (16:40 +0000)]
There isn't really a need to hold the ktrace mutex just to read the value
of p_traceflag that is stored in the kinfo_proc structure.  It is still
racey even with the lock and the code will read a consistent snapshot of
the flag without the lock.

14 years agoCall dev_rel() in error paths.
Jaakko Heinonen [Thu, 19 Aug 2010 16:39:00 +0000 (16:39 +0000)]
Call dev_rel() in error paths.

Reported by: kib
Reviewed by: kib
MFC after: 2 weeks

14 years agoFix a whitespace nit and remove a questioning comment. STAILQ_CONCAT()
John Baldwin [Thu, 19 Aug 2010 16:38:58 +0000 (16:38 +0000)]
Fix a whitespace nit and remove a questioning comment.  STAILQ_CONCAT()
does require the STAILQ the existing list is being added to to already
be initialized (it is CONCAT() vs MOVE()).

14 years agoMigrate if_arge to use the PLL cpuops.
Adrian Chadd [Thu, 19 Aug 2010 16:29:08 +0000 (16:29 +0000)]
Migrate if_arge to use the PLL cpuops.

This has been lightly tested on the AR7161 and AR9132.

14 years agoImplement PLL generalisation in preparation for use in if_arge.
Adrian Chadd [Thu, 19 Aug 2010 16:25:15 +0000 (16:25 +0000)]
Implement PLL generalisation in preparation for use in if_arge.

* Add a function to write to the relevant PLL register
* Break out the PLL configuration for the AR71XX into the CPU ops,
  lifted from if_arge.c.
* Add the AR91XX PLL configuration ops, using the AR91XX register
  definitions.

14 years agoadd the PLL set functions to cpuops
Adrian Chadd [Thu, 19 Aug 2010 16:15:30 +0000 (16:15 +0000)]
add the PLL set functions to cpuops

14 years agoRemove an unused macro. exit1() invokes ktrprocexit() directly.
John Baldwin [Thu, 19 Aug 2010 15:55:50 +0000 (15:55 +0000)]
Remove an unused macro.  exit1() invokes ktrprocexit() directly.

14 years agoRemove unneeded casts in inline assembly in contrib/gcc/longlong.h,
Rui Paulo [Thu, 19 Aug 2010 12:59:57 +0000 (12:59 +0000)]
Remove unneeded casts in inline assembly in contrib/gcc/longlong.h,
which are apparently "heinous" GNU extensions, so clang can
compile this without using the -fheinous-gnu-extensions option.

Results in *no* binary change, neither with clang, nor with gcc.

Submitted by: Dimitry Andric <dimitry at andric.com>

14 years agoFix mistaken indenting.
Adrian Chadd [Thu, 19 Aug 2010 12:52:49 +0000 (12:52 +0000)]
Fix mistaken indenting.

14 years agoAdd some initial AR724X chipset support.
Adrian Chadd [Thu, 19 Aug 2010 11:53:55 +0000 (11:53 +0000)]
Add some initial AR724X chipset support.

This is untested but should at least allow an AR724X to boot.

The current code is lacking the detail needed to expose the PCIe bus.
It is also lacking any NIC, PLL or flush/WB code.

14 years agoAdd initial Atheros AR91XX support.
Adrian Chadd [Thu, 19 Aug 2010 11:40:10 +0000 (11:40 +0000)]
Add initial Atheros AR91XX support.

This works well enough to bring a system up to single-user mode
using an MDROOT.

Known Issues:

* The EHCI USB doesn't currently work and will panic the kernel during
  attach.
* The onboard ethernet won't work until the PLL routines have been
  fleshed out and shoe-horned into if_arge.
* The WMAC device glue (and quite likely the if_ath support)
  hasn't yet been implemented.

14 years agoMFp4: anchie_soc2009 branch:
Ana Kukec [Thu, 19 Aug 2010 11:31:03 +0000 (11:31 +0000)]
MFp4: anchie_soc2009 branch:

Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971.

The implementation consists of a kernel module that gets packets from
the nd6 code, sends them to user space on a dedicated socket and reinjects
them back for further processing.

Hooks are used from nd6 code paths to divert relevant packets to the
send implementation for processing in user space.  The hooks are only
triggered if the send module is loaded. In case no user space
application is connected to the send socket, processing continues
normaly as if the module would not be loaded. Unloading the module
is not possible at this time due to missing nd6 locking.

The native SeND socket is similar to a raw IPv6 socket but with its own,
internal pseudo-protocol.

Approved by: bz (mentor)

14 years agoexpand_number(3) takes a uint64_t * now; intmax_t was never correct
Dag-Erling Smørgrav [Thu, 19 Aug 2010 11:20:24 +0000 (11:20 +0000)]
expand_number(3) takes a uint64_t * now; intmax_t was never correct
except by accident.

MFC after: 3 weeks

14 years agoexpand_number(3) takes a uint64_t * now.
Dag-Erling Smørgrav [Thu, 19 Aug 2010 11:19:21 +0000 (11:19 +0000)]
expand_number(3) takes a uint64_t * now.

MFC after: 3 weeks

14 years agoAdd missing licence.
Adrian Chadd [Thu, 19 Aug 2010 11:18:50 +0000 (11:18 +0000)]
Add missing licence.

14 years agostyle(9) pick from imp@ .
Adrian Chadd [Thu, 19 Aug 2010 11:16:52 +0000 (11:16 +0000)]
style(9) pick from imp@ .

14 years agoUTFize my name.
Dag-Erling Smørgrav [Thu, 19 Aug 2010 09:28:59 +0000 (09:28 +0000)]
UTFize my name.

14 years agoThis patch to pc-sysinstall allows the setting of a new config
Warner Losh [Thu, 19 Aug 2010 06:11:06 +0000 (06:11 +0000)]
This patch to pc-sysinstall allows the setting of a new config
variable for installation, which lets the user/front-end select
between MBR or GPT partitioning schemes when doing a dedicated disk
installation.

PR: 149772
Submitted by: Kris Moore

14 years agoAdded "-m" option to "disk-list" to list memory disks along with
Warner Losh [Thu, 19 Aug 2010 06:07:49 +0000 (06:07 +0000)]
Added "-m" option to "disk-list" to list memory disks along with
standard disks.

PR: 149749
Submitted by: John Hixson

14 years agoSimple patch to add support zpool virtual devices that are not
Warner Losh [Thu, 19 Aug 2010 06:05:05 +0000 (06:05 +0000)]
Simple patch to add support zpool virtual devices that are not
currently supported.

PR: 149599
Submitted by: John Hixson

14 years agoSome cleanup, changed some echo's to echo_log, check for PROGDIR so
Warner Losh [Thu, 19 Aug 2010 06:02:31 +0000 (06:02 +0000)]
Some cleanup, changed some echo's to echo_log, check for PROGDIR so
that different PROGDIR's can be set.

PR: 148806
Submitted by: John Hixson

14 years agoUpdates to pc-sysinstall that allow FTP installation of FreeBSD.
Warner Losh [Thu, 19 Aug 2010 06:01:25 +0000 (06:01 +0000)]
Updates to pc-sysinstall that allow FTP installation of FreeBSD.

PR: 148661
Submitted by: John Hixson

14 years agoVarious updates to support new pc-sysinstall directive
Warner Losh [Thu, 19 Aug 2010 05:59:27 +0000 (05:59 +0000)]
Various updates to support new pc-sysinstall directive
"installPackages" that will install packages and all package
dependencies.

PR: 148606
Submitted by: John Hixon

14 years agoFirst cut at mips n64 ABI support
Warner Losh [Thu, 19 Aug 2010 03:31:26 +0000 (03:31 +0000)]
First cut at mips n64 ABI support

14 years agoUnbreak the LINT kernel on powerpc64. Note that the LINT kernel
Nathan Whitehorn [Thu, 19 Aug 2010 03:19:26 +0000 (03:19 +0000)]
Unbreak the LINT kernel on powerpc64. Note that the LINT kernel
configuration is TARGET_ARCH specific and must be generated with
TARGET_ARCH set.

Reviewed by: imp

14 years agoRemove now unused 'reg'.
Adrian Chadd [Thu, 19 Aug 2010 02:15:39 +0000 (02:15 +0000)]
Remove now unused 'reg'.

14 years agoInitialise the USB system using cpuops rather than the AR71XX specific method.
Adrian Chadd [Thu, 19 Aug 2010 02:14:53 +0000 (02:14 +0000)]
Initialise the USB system using cpuops rather than the AR71XX specific method.

14 years agoMigrate the CPU reset path to use the new cpuops.
Adrian Chadd [Thu, 19 Aug 2010 02:12:04 +0000 (02:12 +0000)]
Migrate the CPU reset path to use the new cpuops.

14 years agoRemove the now-unused DDR flush register value.
Adrian Chadd [Thu, 19 Aug 2010 02:10:05 +0000 (02:10 +0000)]
Remove the now-unused DDR flush register value.

14 years agoMake the PCI initialisation path use the new cpuops rather than directly
Adrian Chadd [Thu, 19 Aug 2010 02:05:16 +0000 (02:05 +0000)]
Make the PCI initialisation path use the new cpuops rather than directly
programming the reset register.

14 years agoMake if_arge use the new cpuops rather than hard coding the DDR flush registers.
Adrian Chadd [Thu, 19 Aug 2010 02:04:35 +0000 (02:04 +0000)]
Make if_arge use the new cpuops rather than hard coding the DDR flush registers.

14 years agoPreparation work for supporting the AR91xx and AR724x.
Adrian Chadd [Thu, 19 Aug 2010 02:03:12 +0000 (02:03 +0000)]
Preparation work for supporting the AR91xx and AR724x.

* Implement a SoC probe function, from Linux, which determines the
  SoC family, type and revision. This only probes the AR71xx series
  SoC and (currently) panics on others.

* Migrate some of the AR71XX specific hardware init (USB device, determining
  system frequencies) into using the cpuops introduced in an earlier commit.
  Other SoC specific hardware stuff (per-device flush/WB, GPIO pin wiring,
  Ethernet PLL setup, other things I've likely missed) will be introduced in
  subsequent commits.

Reviewed by: imp@
Obtained from: (partially) Linux

14 years agoCheck return value of dup(), it could be -1 when the system is running
Xin LI [Thu, 19 Aug 2010 01:34:00 +0000 (01:34 +0000)]
Check return value of dup(), it could be -1 when the system is running
out of file descriptors for instance.

Found with: Coverity Prevent(tm)
CID: 6084
MFC after: 1 month

14 years agoMore tests.
Pawel Jakub Dawidek [Wed, 18 Aug 2010 22:06:43 +0000 (22:06 +0000)]
More tests.

14 years agosh: Add a test for break from a trap action.
Jilles Tjoelker [Wed, 18 Aug 2010 20:26:50 +0000 (20:26 +0000)]
sh: Add a test for break from a trap action.

14 years agoIf a TCP connection has been idle for one retransmit timeout or more
Andre Oppermann [Wed, 18 Aug 2010 18:05:54 +0000 (18:05 +0000)]
If a TCP connection has been idle for one retransmit timeout or more
it must reset its congestion window back to the initial window.

RFC3390 has increased the initial window from 1 segment to up to
4 segments.

The initial window increase of RFC3390 wasn't reflected into the
restart window which remained at its original defaults of 4 segments
for local and 1 segment for all other connections.  Both values are
controllable through sysctl net.inet.tcp.local_slowstart_flightsize
and net.inet.tcp.slowstart_flightsize.

The increase helps TCP's slow start algorithm to open up the congestion
window much faster.

Reviewed by: lstewart
MFC after: 1 week

14 years ago- Refactor file reading code to use pure syscalls and an internal buffer
Gabor Kovesdan [Wed, 18 Aug 2010 17:40:10 +0000 (17:40 +0000)]
- Refactor file reading code to use pure syscalls and an internal buffer
  instead of stdio.  This gives BSD grep a very big performance boost,
  its speed is now almost comparable to GNU grep.

Submitted by: Dimitry Andric <dimitry@andric.com>
Approved by: delphij (mentor)

14 years agoUntangle the net.inet.tcp.log_in_vain and net.inet.tcp.log_debug
Andre Oppermann [Wed, 18 Aug 2010 17:39:47 +0000 (17:39 +0000)]
Untangle the net.inet.tcp.log_in_vain and net.inet.tcp.log_debug
sysctl's and remove any side effects.

Both sysctl's share the same backend infrastructure and due to the
way it was implemented enabling net.inet.tcp.log_in_vain would also
cause log_debug output to be generated.  This was surprising and
eventually annoying to the user.

The log output backend is kept the same but a little shim is inserted
to properly separate log_in_vain and log_debug and to remove any side
effects.

PR: kern/137317
MFC after: 1 week

14 years agoRemove bintime_cmp() function, unused since r200086.
Alexander Motin [Wed, 18 Aug 2010 15:38:10 +0000 (15:38 +0000)]
Remove bintime_cmp() function, unused since r200086.

MFC after: 1 week

14 years agoMIPS n64 support - continued...
Jayachandran C. [Wed, 18 Aug 2010 12:52:21 +0000 (12:52 +0000)]
MIPS n64 support - continued...

1. On n64, use XKPHYS to map page table pages instead of KSEG0. Maintain
   just one freepages list on n64.

   The changes are mainly to introduce MIPS_PHYS_TO_DIRECT(pa),
   MIPS_DIRECT_TO_PHYS(), which will use KSEG0 in 32 bit compilation
   and XKPHYS in 64 bit compilation.

2. Change macro based PMAP_LMEM_MAP1(), PMAP_LMEM_MAP2(), PMAP_LMEM_UNMAP()
  to inline functions.

3. Introduce MIPS_DIRECT_MAPPABLE(pa), which will further reduce the cases
   in which we will need to have a special case for 64 bit compilation.

4. Update CP0 hazard definitions for CPU_RMI - the cpu does not need any
   nops

Reviewed by: neel

14 years agoFor some setups sending data in 128kB chunks makes communication very slow. No
Pawel Jakub Dawidek [Wed, 18 Aug 2010 12:09:27 +0000 (12:09 +0000)]
For some setups sending data in 128kB chunks makes communication very slow. No
idea why. 32kB on the other hand seems to work properly everywhere.

Reported by: Thomas Steen Rasmussen <thomas@gibfest.dk>
MFC after: 3 weeks

14 years agoWhen calculating the expected memory size for userspace, also take the
Bjoern A. Zeeb [Wed, 18 Aug 2010 09:28:12 +0000 (09:28 +0000)]
When calculating the expected memory size for userspace, also take the
number of syncache entries into account for the surplus we add to account
for a possible increase of records in the re-entry window.

Discussed with: jhb, silby
MFC after: 1 week

14 years agoRevert r211436; it was a good idea, but not fully thought out.
Dag-Erling Smørgrav [Wed, 18 Aug 2010 09:18:37 +0000 (09:18 +0000)]
Revert r211436; it was a good idea, but not fully thought out.

14 years agoAdd a DDR flush function, inspired by both Linux and if_arge.c.
Adrian Chadd [Wed, 18 Aug 2010 09:11:45 +0000 (09:11 +0000)]
Add a DDR flush function, inspired by both Linux and if_arge.c.

14 years agoAdd a further register definition for USB device initialisation.
Adrian Chadd [Wed, 18 Aug 2010 08:22:58 +0000 (08:22 +0000)]
Add a further register definition for USB device initialisation.

Obtained from: Linux

14 years agoBring over the first cut of the Atheros-specific SoC operations.
Adrian Chadd [Wed, 18 Aug 2010 08:22:09 +0000 (08:22 +0000)]
Bring over the first cut of the Atheros-specific SoC operations.

Each of these SoCs have different devices, different hardware initialisation
methods and, quite likely, different quirks. These functions will abstract
out the SoC differences and keep these differences out of the drivers (eg
USB init, if_arge, etc.)

14 years agoMake return statements style(9) compliant in MIPS pmap.c
Jayachandran C. [Wed, 18 Aug 2010 07:38:13 +0000 (07:38 +0000)]
Make return statements style(9) compliant in MIPS pmap.c

Reported by: neel

Reviewed by: neel (earlier version)

14 years agoImport initial AR91XX and AR724X CPU register definitions.
Adrian Chadd [Wed, 18 Aug 2010 00:26:14 +0000 (00:26 +0000)]
Import initial AR91XX and AR724X CPU register definitions.

Obtained from: Linux

14 years agoKeep the process locked when calling ktrops() or ktrsetchildren() instead
John Baldwin [Tue, 17 Aug 2010 21:34:19 +0000 (21:34 +0000)]
Keep the process locked when calling ktrops() or ktrsetchildren() instead
of dropping the lock only to immediately reacquire it.

14 years agoFor every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Rui Paulo [Tue, 17 Aug 2010 20:39:28 +0000 (20:39 +0000)]
For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by: Dimitry Andric <dimitry at andric.com>

14 years agoSplit kernel stage 3.2 (build everything) into 3.2 (build the kernel)
Dag-Erling Smørgrav [Tue, 17 Aug 2010 20:26:17 +0000 (20:26 +0000)]
Split kernel stage 3.2 (build everything) into 3.2 (build the kernel)
and 3.3 (build the modules).  IMHO, this makes it a little easier to
track the progress of a kernel build using whereintheworld et al.

MFC after: 3 weeks

14 years agoMake `ping6 -I' work with net.inet6.ip6.use_defaultzone=1.
Hajimu UMEMOTO [Tue, 17 Aug 2010 17:30:56 +0000 (17:30 +0000)]
Make `ping6 -I' work with net.inet6.ip6.use_defaultzone=1.

MFC after: 2 weeks

14 years agoNow is as good a time as any to find out if we induce breakage
Matt Jacob [Tue, 17 Aug 2010 17:11:15 +0000 (17:11 +0000)]
Now is as good a time as any to find out if we induce breakage
by issueing aborts for any pending commands when we're decommssioning
a disk.

MFC after: 3 months

14 years agoEnsure a minimum "slop" of 10 extra pcb structures when providing a
John Baldwin [Tue, 17 Aug 2010 16:41:16 +0000 (16:41 +0000)]
Ensure a minimum "slop" of 10 extra pcb structures when providing a
memory size estimate to userland for pcb list sysctls.  The previous
behavior of a "slop" of n/8 does not work well for small values of n
(e.g. no slop at all if you have less than 8 open UDP connections).

Reviewed by: bz
MFC after: 1 week

14 years agoAdd s25sl064a, an 8mb SPI flash part.
Adrian Chadd [Tue, 17 Aug 2010 16:27:13 +0000 (16:27 +0000)]
Add s25sl064a, an 8mb SPI flash part.

14 years agoAdd a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This
John Baldwin [Tue, 17 Aug 2010 15:44:52 +0000 (15:44 +0000)]
Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP().  This
method is used by the PCI bus driver to query the power management system
to determine the proper device state to be used for a device during suspend
and resume.  For the ACPI PCI bridge drivers this calls
acpi_device_pwr_for_sleep().  This removes ACPI-specific knowledge from
the PCI and PCI-PCI bridge drivers.

Reviewed by: jkim

14 years agoMake sure any -U CFLAGS are not filtered out when calling mkdep, as
Rui Paulo [Tue, 17 Aug 2010 13:02:08 +0000 (13:02 +0000)]
Make sure any -U CFLAGS are not filtered out when calling mkdep, as
gnu/usr.bin/cc/libiberty first defines the PREFIX macro, and then
undefines it again, so mkdep with clang complains.

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: ru

14 years ago- The iMac9,1 needs the PAT workaround as well
Pietro Cerutti [Tue, 17 Aug 2010 12:17:24 +0000 (12:17 +0000)]
- The iMac9,1 needs the PAT workaround as well

Approved by: cognet

14 years agoMFV of r211420, tzdata2010l
Edwin Groothuis [Tue, 17 Aug 2010 12:10:35 +0000 (12:10 +0000)]
MFV of r211420, tzdata2010l

- Fix start times of DST for Egypt.
- clocks were set back one hour at 2010-08-11 00:00:00 local time
  in Gaza and the West Bank.

Obtained from:  ftp://elsie.nci.nih.gov/pub/

14 years agoVendor import of tzdata2010l
Edwin Groothuis [Tue, 17 Aug 2010 12:04:17 +0000 (12:04 +0000)]
Vendor import of tzdata2010l

- Fix start times of DST for Egypt.
- clocks were set back one hour at 2010-08-11 00:00:00 local time
  in Gaza and the West Bank.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoSince top displays the uptime including seconds, there is no need to add 30
Rebecca Cran [Tue, 17 Aug 2010 09:51:08 +0000 (09:51 +0000)]
Since top displays the uptime including seconds, there is no need to add 30
onto it, which may have been used for rounding purposes in other utilities.

PR: bin/147934
Submitted by: Janne Snabb <snabb at epipe.com>
Approved by: rrs (mentor)
MFC after: 2 weeks

14 years agoAdd simple test to check the functioning of retrieval of
Konstantin Belousov [Tue, 17 Aug 2010 09:42:50 +0000 (09:42 +0000)]
Add simple test to check the functioning of retrieval of
pagesize()/pagesizes() after change to use aux vector. Note that
public function getosreldate() is different from libc-internal
__getosreldate() and does not use aux to fetch osreldate value.

MFC after: 1 month

14 years agoTo restart, sysinstall calls execl. Since it will create a new process, we
Rebecca Cran [Tue, 17 Aug 2010 09:39:06 +0000 (09:39 +0000)]
To restart, sysinstall calls execl. Since it will create a new process, we
can't check to see if sysinstall is running as init just by checking if the
PID is 0. Introduce a new option that sets the RunningAsInit flag, and update
the code to check RunningAsInit intstead of getpid().

PR: bin/38854
Submitted by: Peter Sedeffow <peter at trumanbrewery.com>
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoUse aux vector to get values for SSP canary, pagesize, pagesizes array,
Konstantin Belousov [Tue, 17 Aug 2010 09:13:26 +0000 (09:13 +0000)]
Use aux vector to get values for SSP canary, pagesize, pagesizes array,
number of host CPUs and osreldate.

This eliminates the last sysctl(2) calls from the dynamically linked image
startup.

No objections from: kan
Tested by: marius (sparc64)
MFC after: 1 month

14 years agoAdd -m and -M options to control the minimum and maximum frequency.
Rebecca Cran [Tue, 17 Aug 2010 09:11:38 +0000 (09:11 +0000)]
Add -m and -M options to control the minimum and maximum frequency.

PR: bin/145063
Submitted by: Boris Kochergin <spawk at acm.poly.edu>
Reviewed by: cperciva
Approved by: rrs (mentor)
MFC after: 2 weeks