jhb [Fri, 25 Jan 2013 15:25:24 +0000 (15:25 +0000)]
Further cleanups to use of timestamps in NFS:
- Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds
portion of wall-time stamps to manage timeouts on events.
- Remove unused nd_starttime from the per-request structure in the new
NFS server.
- Use nanotime() for the modification time on a delegation to get as
precise a time as possible.
- Use time_second instead of extracting the second from a call to
getmicrotime().
brooks [Thu, 24 Jan 2013 17:00:11 +0000 (17:00 +0000)]
Don't link two different things to the same paths. As tiebreaker I've
picked the link that was installed last so as to not change the behavior.
The one exception is sr_YU.ISO8859-2/LC_MONETARY where a file was being
replaced by a link.
brooks [Thu, 24 Jan 2013 16:53:35 +0000 (16:53 +0000)]
Install the NLS catalog in the C directory rather than en_US.US-ASCII
which is a link to C. This allow the makefs mtree manifest mode to find
the file.
brooks [Thu, 24 Jan 2013 16:38:47 +0000 (16:38 +0000)]
Only install manpages and html documentation in the ncurses/*w (wchar)
builds so that it is only installed once. This is consistent with the
existing decision to only install headers in the that case.
jchandra [Thu, 24 Jan 2013 15:49:47 +0000 (15:49 +0000)]
Little-endian and other fixes for Broadcom XLP network driver
The changes are:
- the microcore code loaded into the NAE has to be byteswapped
in LE
- the descriptors in memory for a P2P NAE descriptor has to be
byteswapped in LE
- the m_data pointer is already cacheline aligned, so the
unnecessary m_adj to cacheline size can be removed
- fix mask used to obtain physical address from the Tx freeback
descriptor
- fix a compile error in code under #ifdef
Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
jchandra [Thu, 24 Jan 2013 15:23:01 +0000 (15:23 +0000)]
Fix credit configuration on Broadcom XLP CMS
The CMS output queue credit configuration register is 64 bit, so use
a 64 bit variable while updating it.
Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
brooks [Thu, 24 Jan 2013 15:18:41 +0000 (15:18 +0000)]
Reorder so that NO_MAN is declared before bsd.own.mk is included and thus
has an effect (not installed a g++.1 manpage over the g++.1(.gz) link
created in ../cc).
jchandra [Thu, 24 Jan 2013 14:33:25 +0000 (14:33 +0000)]
Broadcom XLP updates for the new firmware
Support few more versions of board firmware. In case the security
block is disabled, enable it at boot. Also increase the excluded
memory region to cover the area used by the firmware to initialize
devices.
glebius [Thu, 24 Jan 2013 14:29:31 +0000 (14:29 +0000)]
- Utilize m_get2(), accidentially fixing some signedness bugs.
- Return EMSGSIZE in both cases if uio_resid is oversized or undersized.
- No need to clear rcvif.
jchandra [Thu, 24 Jan 2013 11:42:16 +0000 (11:42 +0000)]
Little-endian fix for PCI on Broadcom XLP.
Update the function xlp_pcib_hardware_swap_enable() to do nothing
when BYTE_ORDER is not BIG_ENDIAN. PCIe hardware swap is not requred
in little-endian mode as the endianness matches that of CPU.
marius [Wed, 23 Jan 2013 22:52:20 +0000 (22:52 +0000)]
Revert the part of r239864 which removed obtaining the SMP mutex around
reading registers from other CPUs. As it turns out, the hardware doesn't
really like concurrent IPI'ing causing adverse effects. Also the thought
deadlock when using this spin lock here and the targeted CPU(s) are also
holding or in case of nested locks can't actually happen. This is due to
the fact that on sparc64, spinlock_enter() only raises the PIL but doesn't
disable interrupts completely. Thus direct cross calls as used for the
register reading (and all other MD IPI needs) still will be executed by
the targeted CPU(s) in that case.
jhb [Wed, 23 Jan 2013 21:44:48 +0000 (21:44 +0000)]
Don't assume that all Linux TCP-level socket options are identical to
FreeBSD TCP-level socket options (only the first two are). Instead,
using a mapping function and fail unsupported options as we do for other
socket option levels.
jhb [Wed, 23 Jan 2013 18:34:21 +0000 (18:34 +0000)]
Always update the hw.uart.console hint anytime a change is made to the
comconsole setup. Previously the hint would be set when if you set a
custom port, but it would not be updated if you later set a custom speed.
Also, leave the hw.uart.console hint mutable so it can be overridden or
unset by the user if needed.
luigi [Wed, 23 Jan 2013 05:37:45 +0000 (05:37 +0000)]
Add support for transparent mode while in netmap.
By setting dev.netmap.fwd=1 (or enabling the feature with a per-ring flag),
packets are forwarded between the NIC and the host stack unless the
netmap client clears the NS_FORWARD flag on the individual descriptors.
This feature greatly simplifies applications where some traffic
(think of ARP, control traffic, ssh sessions...) must be processed
by the host stack, whereas the bulk is handled by the netmap process
which simply (un)marks packets that should not be forwarded.
The default is chosen so that now a netmap receiver operates
in a mode very similar to bpf.
Of course there is no free lunch: traffic to/from the host stack
still operates at OS speed (or less, as there is one extra copy in
one direction).
HOWEVER, since traffic goes to the user process before being
reinjected, and reinjection occurs in a user context, you get some
form of livelock protection for free.
obrien [Wed, 23 Jan 2013 02:06:20 +0000 (02:06 +0000)]
Return "failure" as we do for 'cp -i' and a "n" answer.
Otherwise with '-v' we print out the file name as if it was copied:
/tmp/2gb-card/M0132.CTG not overwritten
/mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG
brooks [Tue, 22 Jan 2013 21:10:03 +0000 (21:10 +0000)]
Introduce a new option -DNO_ROOT that allows install and distribution
targets to be run without root privilege.
Information about ownership, group, flags, and suid bits are stored in
the file specified by METALOG which defaults to ${DESTDIR}/METALOG.
This file can be used in conjunction with bsdtar or makefs to generate
archives or file system images with correct permissions.
The packageworld target has been altered to use this metadata allowing
non-root releases (subject to further changes in release/Makefile.)
pfg [Tue, 22 Jan 2013 18:54:03 +0000 (18:54 +0000)]
ext2fs: make some inode fields match the ext2 spec.
Ext2fs uses unsigned fields in its dinode struct.
FreeBSD can have negative values in some of those
fields and the inode is meant to interact with the
system so we have never respected the unsigned
nature of most of those fields.
Block numbers and the NFS generation number do
not need to be signed so redefine them as
unsigned to better match the on-disk information.
brooks [Tue, 22 Jan 2013 18:51:14 +0000 (18:51 +0000)]
MFP4 change 219820
Add a missing 0 to the mask for byte0 of C_SIZE.
The previous mask (0xc) worked except that the last 0-1536K of the disk
could not be accessed since we were shifting the (wrong) bits we did
mask off the right edge.
emaste [Tue, 22 Jan 2013 18:02:48 +0000 (18:02 +0000)]
Restore Python 2.6+ compatibility
SVN r245536 ported this to Python 3. The major change was the use of the
print function. Unfortunately this is incompatible with Python 2, which
is still the default version in the ports tree.
Use a __future__ import to make this compatible with Python 2.6 and later.
theraven [Tue, 22 Jan 2013 17:49:51 +0000 (17:49 +0000)]
Import new (BSDL) device tree compiler. Now built by default, so that it can't
be used on the host system (and not installed on the device, if required). The
GPL'd one is still available if there are any devices that need it (make
universe passes with it, including kernels that use fdt, but there may be some
out-of-tree ones). WITH_GPL_DTC can be used to select the old one, for now.
Probably won't be MFC'd, but we'll remove the GPL'd version in head after the
new one has had a lot more testing and ship it in 10.0.
nwhitehorn [Tue, 22 Jan 2013 17:06:28 +0000 (17:06 +0000)]
Improve error handling and remove an unnecessary check on geom provider
type. GEOM provider names can't duplicate (or shouldn't -- devfs will either
break or only use the first one if they do) so using the first provider
by that name is a sufficient check. This also lets the scripted partitioner
install onto gmirror and geli and such things.
brooks [Tue, 22 Jan 2013 16:23:08 +0000 (16:23 +0000)]
Make "install -l s[ar]" act like "ln -sfh" as intended. This fixes
installation of symbolic links where the target is a link is to an
existing directory.
lstewart [Tue, 22 Jan 2013 09:44:21 +0000 (09:44 +0000)]
Simplify and fix a bug in cc_ack_received()'s "are we congestion window limited"
logic (refer to [1] for associated discussion). snd_cwnd and snd_wnd are
unsigned long and on 64 bit hosts, min() will truncate them to 32 bits and could
therefore potentially corrupt the result (although under normal operation,
neither variable should legitmately exceed 32 bits).
delphij [Tue, 22 Jan 2013 05:41:34 +0000 (05:41 +0000)]
- Don't include date and time the driver is built, this is useful for
generating binary diffs.
- Constify a few strings used in the driver.
- Style changes to make the driver compile with default clang settings.
Approved by: HighPoint Technologies
MFC after: 3 days
andrew [Tue, 22 Jan 2013 05:39:34 +0000 (05:39 +0000)]
When copying the complement of the string loop to WINT_MAX as we are dealing
with a wint_t. WINT_MAX and WCHAR_MAX are the same on most architectures
except ARM EABI where wint_t is signed and wchar_t is unsigned.
benno [Tue, 22 Jan 2013 04:14:27 +0000 (04:14 +0000)]
Fix linking of loader.efi.
gcc handles -symbolic by passing -Bsymbolic through to ld. clang ignores
-symbolic and thus invokes ld without -Bsymbolic which leads to some symbols
not being properly linked in loader.efi. Fix this by using -Wl,-Bsymbolic which
passes -Bsymbolic to ld in both the gcc and clang cases.
nwhitehorn [Tue, 22 Jan 2013 02:40:06 +0000 (02:40 +0000)]
Document bsdinstall scripting as it currently operates. It may change in
the future depending on feedback from people using it to do unattended
system setup.
brooks [Mon, 21 Jan 2013 23:12:50 +0000 (23:12 +0000)]
Always bootstrap nmtree if it is not available on the host. It is fairly
small and it is quite annoying to get all the way through buildworld
only to discover that you forgot the DB_FROM_SRC (or soon NO_ROOT)
option.
neel [Mon, 21 Jan 2013 22:07:05 +0000 (22:07 +0000)]
Allocate the memory for the MSI-X table dynamically instead of allocating 32KB
statically. In most cases the number of table entries will be far less than
the maximum of 2048 allowed by the PCI specification.
Reuse macros from pcireg.h to interpret the MSI-X capability instead of rolling
our own.
theraven [Mon, 21 Jan 2013 17:37:23 +0000 (17:37 +0000)]
Import new fix from libcxxrt. This fixes the case where you attempt to rethrow
an exception when you haven't caught one. This is largely a cosmetic fix, as
(unless you have a very unusual terminate handler installed) it will print a
nice error and then abort, rather than just aborting.