]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoApply patch from upstream Heimdal for encoding fix
bjk [Fri, 13 Dec 2013 03:09:29 +0000 (03:09 +0000)]
Apply patch from upstream Heimdal for encoding fix

RFC 4402 specifies the implementation of the gss_pseudo_random()
function for the krb5 mechanism (and the C bindings therein).
The implementation uses a PRF+ function that concatenates the output
of individual krb5 pseudo-random operations produced with a counter
and seed.  The original implementation of this function in Heimdal
incorrectly encoded the counter as a little-endian integer, but the
RFC specifies the counter encoding as big-endian.  The implementation
initializes the counter to zero, so the first block of output (16 octets,
for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
that the counter should begin at 1, but both existing implementations
begin with zero and it looks like the standard will be re-issued, with
test vectors, to begin at zero.)

This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
from 13 October, 2013:
% Fix krb5's gss_pseudo_random() (n is big-endian)
%
% The first enctype RFC3961 prf output length's bytes are correct because
% the little- and big-endian representations of unsigned zero are the
% same.  The second block of output was wrong because the counter was not
% being encoded as big-endian.
%
% This change could break applications.  But those applications would not
% have been interoperating with other implementations anyways (in
% particular: MIT's).

Approved by: hrs (mentor, src committer)
MFC after: 3 days

10 years agoAdd PMU-based CPU frequency scaling. This method is used on most Titanium
jhibbits [Fri, 13 Dec 2013 02:37:35 +0000 (02:37 +0000)]
Add PMU-based CPU frequency scaling.  This method is used on most Titanium
PowerBooks.

MFC after: 1 month

10 years agoSomehow stable/10 branch contains correct version, but head doesn't.
glebius [Thu, 12 Dec 2013 22:33:32 +0000 (22:33 +0000)]
Somehow stable/10 branch contains correct version, but head doesn't.

10 years agoI caught the following snippet at the end of my /var/log/bsdinstall_log:
dteske [Thu, 12 Dec 2013 20:47:18 +0000 (20:47 +0000)]
I caught the following snippet at the end of my /var/log/bsdinstall_log:
===
DEBUG: Running installation step: services
local: Not in a function
/usr/libexec/bsdinstall/services: cannot create  : Read-only file system
/usr/libexec/bsdinstall/services: /tmp/bsdinstall/etc/rc.conf.services: \
 Permission denied
===
The `local: Not in a function' is obvious, and was introduced by myself in
SVN revision 256348.

The latter two are caused by the attempt to use "\" to continue the line
after using the ">>" redirect. This appears to attempt to write a file with
the name " " in the current directory and subsequently attempts to execute
the file that was originally intended for writing (which is not executable;
hence the `Permission denied'). That was introduced in SVN r228192 about
2 years ago, apparently unnoticed until I started going over the debug
outputs very carefully.

MFC after: 3 days

10 years agoAdd a command to inject an NMI on a specific vcpu. It is a simple
jhb [Thu, 12 Dec 2013 20:34:04 +0000 (20:34 +0000)]
Add a command to inject an NMI on a specific vcpu.  It is a simple
wrapper around the existing vm_inject_nmi().

Reviewed by: grehan, neel

10 years agoMention BIND removal in release notes.
rodrigc [Thu, 12 Dec 2013 20:20:46 +0000 (20:20 +0000)]
Mention BIND removal in release notes.

Submitted by: skreuzer

10 years agoAfter r256961 ofw_iicbuc.c will be built for any kernel which includes
loos [Thu, 12 Dec 2013 18:29:36 +0000 (18:29 +0000)]
After r256961 ofw_iicbuc.c will be built for any kernel which includes
options 'iicbus' and 'fdt'.  Remove the (now) unnecessary entries.

Verified on BBB (am335x), EFIKA_MX (imx51 - by ray@), DIGI-CCWMX53
(imx53 - kernel build).

Approved by: adrian (mentor)

10 years agoAdd an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA.
bz [Thu, 12 Dec 2013 18:08:31 +0000 (18:08 +0000)]
Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA.

At this point we only support one CPU, the PIC, and a UART console.

Reviewed by: brooks
Sponsored by: DARPA, AFRL
MFC after: 5 days

10 years agoFix multi-repository support by properly respecting 'enabled' flag.
bdrewery [Thu, 12 Dec 2013 17:59:09 +0000 (17:59 +0000)]
Fix multi-repository support by properly respecting 'enabled' flag.

This will read the REPOS_DIR env/config setting (default is /etc/pkg
and /usr/local/etc/pkg/repos) and use the last enabled repository.

This can be changed in the environment using a comma-separated list,
or in /usr/local/etc/pkg.conf with JSON array syntax of:
    REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"]

Approved by: bapt
MFC after: 1 week

10 years agoUse correct value pointing to previously selected FDT DTB.
bz [Thu, 12 Dec 2013 17:48:33 +0000 (17:48 +0000)]
Use correct value pointing to previously selected FDT DTB.

Reviewed by: brooks
Sponsored by: DARPA, AFRL
MFC after: 1 week

10 years agoDo not try to probe/attach if attempt to add fbd child are failed.
ray [Thu, 12 Dec 2013 14:49:26 +0000 (14:49 +0000)]
Do not try to probe/attach if attempt to add fbd child are failed.

Sponsored by: The FreeBSD Foundation

10 years agoFix long known bug with handling device aliases residing not in devfs root.
mav [Thu, 12 Dec 2013 11:05:48 +0000 (11:05 +0000)]
Fix long known bug with handling device aliases residing not in devfs root.

Historically creation of device aliases created symbolic links using only
name of target device as a link target, not considering current directory.
Fix that by adding number of "../" chunks to the terget device name,
required to get out of the current directory to devfs root first.

MFC after: 1 month

10 years agoSome more cleanups and bug fixes in dtc for property printing / parsing.
theraven [Thu, 12 Dec 2013 08:55:24 +0000 (08:55 +0000)]
Some more cleanups and bug fixes in dtc for property printing / parsing.

Submitted by: Patrick Wildt

10 years agoFix the version string in dts emission.
theraven [Thu, 12 Dec 2013 08:48:45 +0000 (08:48 +0000)]
Fix the version string in dts emission.

Reported by: Patrick Wildt
MFC after: 1 week

10 years agoSet chain bit correctly. This will fix some problems sending and
hselasky [Thu, 12 Dec 2013 08:34:51 +0000 (08:34 +0000)]
Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more
information.

MFC after: 1 week
Reported by: Kohji Okuno <okuno.kohji@jp.panasonic.com>

10 years agoFix bug introduced at r256607. We have to recalculate bp_resid here since
mav [Thu, 12 Dec 2013 08:23:28 +0000 (08:23 +0000)]
Fix bug introduced at r256607.  We have to recalculate bp_resid here since
sizes of original and completed requests may differ due to end of media.

Bisected by: pho

10 years agoPrevent release build errors found during snapshot builds where if
gjb [Thu, 12 Dec 2013 05:49:27 +0000 (05:49 +0000)]
Prevent release build errors found during snapshot builds where if
NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if
WITH_DVD=1.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoFBT now does work fully on PowerPC.
jhibbits [Thu, 12 Dec 2013 04:12:19 +0000 (04:12 +0000)]
FBT now does work fully on PowerPC.

MFC after: 2 weeks

10 years agoAllow pmap_remove_pages() to be called for physical maps not
marcel [Thu, 12 Dec 2013 03:04:00 +0000 (03:04 +0000)]
Allow pmap_remove_pages() to be called for physical maps not
associated with the current thread.

Obtained from: alc@

10 years agosys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
asomers [Thu, 12 Dec 2013 00:27:22 +0000 (00:27 +0000)]
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
When a da or ada device dissappears, outstanding IOs fail with
ENXIO, not EIO.  The check for EIO was probably copied from Illumos,
where that is indeed the correct errno.

Without this change, pulling a busy drive from a zpool would usually
turn it into UNAVAIL, even though pulling an idle drive would turn
it into REMOVED.  With this change, it is REMOVED every time.

Also, vdev_geom_io_intr shouldn't do zfs_post_remove, because that
results in devd getting two resource.fs.zfs.removed events.  The
comment said that the event had to be sent directly instead of
through the async removal thread because "the DE engine is using
this information to discard prevoius I/O errors".  However, the fact
that vdev_geom_io_intr was never actually sending the events until
now, and that vdev_geom_orphan never sent them at all, and that
vdev_geom_orphan usually gets called about 2 seconds after the
actual removal, means that FreeBSD's userland can cope with a late
event just fine.

Approved by: ken (mentor)
Sponsored by: Spectra Logic Corporation
MFC after: 4 weeks

10 years agoCreate own free list for each of the first 32 possible allocation sizes.
mav [Wed, 11 Dec 2013 21:48:04 +0000 (21:48 +0000)]
Create own free list for each of the first 32 possible allocation sizes.
In case of 4K allocation quantum that means for allocations up to 128K.

With growth of memory fragmentation these lists may grow to quite a large
sizes (tenths and hundreds of thousands items).  Having in one list items
of different sizes in worst case may require full linear list traversal,
that may be very expensive.  Having lists for items of single size means
that unless user specify some alignment or border requirements (that are
very rare cases) first item found on the list should satisfy the request.

While running SPEC NFS benchmark on top of ZFS on 24-core machine with
84GB RAM this change reduces CPU time spent in vmem_xalloc() from 8%
and lock congestion spinning around it from 20% to invisible levels.
And that all is by the cost of just 26 more pointers per vmem instance.

If at some point our kernel will start to actively use KVA allocations
with odd sizes above 128K, something may need to be done to bigger lists
also.

10 years ago- Use <x86/mptable.h> instead of duplicating its definitions.
jhb [Wed, 11 Dec 2013 21:21:03 +0000 (21:21 +0000)]
- Use <x86/mptable.h> instead of duplicating its definitions.
- Switch to mmaping the table from RAM instead of reading it out of
  /dev/mem via read(2).

10 years agoUse fixed-width types for all fields in MP Table structures and pack
jhb [Wed, 11 Dec 2013 21:19:04 +0000 (21:19 +0000)]
Use fixed-width types for all fields in MP Table structures and pack
all the structures.  While here, move a helper struct only used in
the kernel parser out of this header since it is not part of the MP
specification itself.

10 years agoDestroy mtx lock when failed to allocate memory during attach.
mav [Wed, 11 Dec 2013 17:40:35 +0000 (17:40 +0000)]
Destroy mtx lock when failed to allocate memory during attach.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

10 years agoFix a panic when booting with kernels that have FREEBBSD_COMPAT
gnn [Wed, 11 Dec 2013 17:18:10 +0000 (17:18 +0000)]
Fix a panic when booting with kernels that have FREEBBSD_COMPAT
4, 5, 6 or 43 by only thunking the data parameter for old ioctls
compatability ioctls instead of doing it for all of them.

Submitted by: jhb@

10 years agoLoose -> Lose so this sentence makes sense.
imp [Wed, 11 Dec 2013 15:32:28 +0000 (15:32 +0000)]
Loose -> Lose so this sentence makes sense.

MFC after: 3 days

10 years agocalendar(1): use strlcpy instead of strncpy
eadler [Wed, 11 Dec 2013 14:54:58 +0000 (14:54 +0000)]
calendar(1): use strlcpy instead of strncpy

use strlcpy instead of strncpy which avoids non-null-termination if the string is MAXPATHLEN bytes or longer.

10 years agoUSB method structures for USB controllers and USB pipes should be
hselasky [Wed, 11 Dec 2013 13:20:32 +0000 (13:20 +0000)]
USB method structures for USB controllers and USB pipes should be
constant and does not need to be modified. This also saves a small
amount of RAM.

10 years agoFix typo when initializing the vlapic version register ('<<' instead of '<').
neel [Wed, 11 Dec 2013 06:28:44 +0000 (06:28 +0000)]
Fix typo when initializing the vlapic version register ('<<' instead of '<').

10 years agoFix one race and one fence post error. When the TX buffer was
imp [Wed, 11 Dec 2013 05:32:29 +0000 (05:32 +0000)]
Fix one race and one fence post error. When the TX buffer was
completely full, we'd not complete any of the mbufs due to the fence
post error (this creates a large leak). When this is fixed, we still
leak, but at a much smaller rate due to a race between ateintr and
atestart_locked as well as an asymmetry where atestart_locked is
called from elsewhere.  Ensure that we free in-flight packets that
have completed there as well. Also remove needless check for NULL on
mb, checked earlier in the loop and simplify a redundant if.

MFC after: 3 days

10 years agoCorrect the check for errors from proc_rwmem().
markj [Wed, 11 Dec 2013 04:31:40 +0000 (04:31 +0000)]
Correct the check for errors from proc_rwmem().

MFC after: 2 weeks

10 years agoMigrate tools/regression/bin/ tests to the new layout.
jmmv [Wed, 11 Dec 2013 04:09:17 +0000 (04:09 +0000)]
Migrate tools/regression/bin/ tests to the new layout.

This change is a proof of concept on how to easily integrate existing
tests from the tools/regression/ hierarchy into the /usr/tests/ test
suite and on how to adapt them to the new layout for src.

To achieve these goals, this change:

- Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/.
- Renames the previous regress.sh files to legacy_test.sh.
- Adds Makefiles to build and install the tests and all their supporting
  data files into /usr/tests/bin/.
- Plugs the legacy_test test programs into the test suite using the new
  TAP backend for Kyua (appearing in 0.8) so that the code of the test
  programs does not have to change.
- Registers the new directories in the BSD.test.dist mtree file.

Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)

10 years agoMake bsd.progs.mk work in directories with SCRIPTS but no PROGS.
jmmv [Wed, 11 Dec 2013 03:41:07 +0000 (03:41 +0000)]
Make bsd.progs.mk work in directories with SCRIPTS but no PROGS.

This change fixes some cases where bsd.progs.mk would fail to handle
directories with SCRIPTS but no PROGS.  In particular, "install" did
not handle such scripts nor dependent files when bsd.subdir.mk was
added to the mix.

This is "make tinderbox" clean.

Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)

10 years agoAdd tap.test.mk.
jmmv [Wed, 11 Dec 2013 03:39:50 +0000 (03:39 +0000)]
Add tap.test.mk.

This file provides support to build test programs that comply with the
Test Anything Protocol.  Its main goal is to support the painless
integration of existing tests from tools/regression/ into the Kyua-based
test suite.

Approved by: rpaulo (mentor)

10 years agoFix x2apic support in bhyve.
neel [Tue, 10 Dec 2013 22:56:51 +0000 (22:56 +0000)]
Fix x2apic support in bhyve.

When the guest is bringing up the APs in the x2APIC mode a write to the
ICR register will now trigger a return to userspace with an exitcode of
VM_EXITCODE_SPINUP_AP. This gets SMP guests working again with x2APIC.

Change the vlapic timer lock to be a spinlock because the vlapic can be
accessed from within a critical section (vm run loop) when guest is using
x2apic mode.

Reviewed by: grehan@

10 years agoThe opt_*.h headers must be included before any system header, except
kib [Tue, 10 Dec 2013 22:33:02 +0000 (22:33 +0000)]
The opt_*.h headers must be included before any system header, except
sys/cdefs.h.  In particular, in case of COMPAT_43, param.h includes
sys/types.h, which includes sys/select.h, which includes
sys/_sigset.h.  The _sigset.h customizes the provided definions based
on COMPAT_43, eliminating osigset_t if symbol is not defined.  The
sys/proc.h is included after opt_compat.h and needs osigset_t.

Move opt_compat.h inclusion into the right place.

Sponsored by: The FreeBSD Foundation

10 years agoCorrect license statements to reflect the fact that these files were all
jhb [Tue, 10 Dec 2013 22:13:36 +0000 (22:13 +0000)]
Correct license statements to reflect the fact that these files were all
derived from sys/arm/mv/bus_space.c.

Approved by: core

10 years agoFix detection of EOF in kern_physio(). If bio_length was clipped by
kib [Tue, 10 Dec 2013 21:15:18 +0000 (21:15 +0000)]
Fix detection of EOF in kern_physio().  If bio_length was clipped by
the excess code in g_io_check(), bio_resid is also truncated by
g_io_deliver().  As result, bufdonebio() assigns truncated value to
the buffer b_resid field.

Use the residual bio_completed to calculate buffer b_resid from
b_bcount in bufdonebio(), instead of bio_resid, calculated from
bio_length in g_io_deliver().

The issue is seemingly caused by the code rearrange into g_io_check(),
which is not present in stable/10.  The change still looks as the
useful change to have in 10 nevertheless.

Reported by: Stefan Hegnauer <stefan.hegnauer@gmx.ch>
Tested by: pho, Stefan Hegnauer <stefan.hegnauer@gmx.ch>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoReturn the correct IEEE 1275 code for "nextprop".
nwhitehorn [Tue, 10 Dec 2013 21:01:28 +0000 (21:01 +0000)]
Return the correct IEEE 1275 code for "nextprop".

10 years agoOnly assert the length of the passed bio in the mdstart_vnode() when
kib [Tue, 10 Dec 2013 20:52:31 +0000 (20:52 +0000)]
Only assert the length of the passed bio in the mdstart_vnode() when
the bio is unmapped, so we must map the bio pages into pbuf.  This
works around the geom classes which do not follow the MAXPHYS limit on
the i/o size, since such classes do not know about unmapped bios
either.

Reported by: Paolo Pinto <paolo.pinto@netasq.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoDo not DELAY() for P-state transition unless we want to see the result.
mav [Tue, 10 Dec 2013 20:25:43 +0000 (20:25 +0000)]
Do not DELAY() for P-state transition unless we want to see the result.

Intel manual says: "If a transition is already in progress, transition to
a new value will subsequently take effect. Reads of IA32_PERF_CTL determine
the last targeted operating point."  So seems it should be fine to just
trigger wanted transition and go.  Linux does the same.

MFC after: 1 month

10 years agoCheck remote protocol version only for the first connection (when it
trociny [Tue, 10 Dec 2013 20:09:49 +0000 (20:09 +0000)]
Check remote protocol version only for the first connection (when it
is actually sent by the remote node).

Otherwise it generated confusing "Negotiated protocol version 1" debug
messages when processing the second connection.

MFC after: 2 weeks

10 years agoSend wakeup to threads waiting on empty queue before releasing the
trociny [Tue, 10 Dec 2013 20:06:41 +0000 (20:06 +0000)]
Send wakeup to threads waiting on empty queue before releasing the
lock to decrease spurious wakeups.

Submitted by: davidxu
MFC after: 2 weeks

10 years agoIn remote_send_thread, if sending a request fails don't take the
trociny [Tue, 10 Dec 2013 20:05:07 +0000 (20:05 +0000)]
In remote_send_thread, if sending a request fails don't take the
request back from the receive queue -- it might already be processed
by remote_recv_thread, which lead to crashes like below:

  (primary) Unable to receive reply header: Connection reset by peer.
  (primary) Unable to send request (Connection reset by peer):
      WRITE(954662912, 131072).
  (primary) Disconnected from kopusha:7772.
  (primary) Increasing localcnt to 1.
  (primary) Assertion failed: (old > 0), function refcnt_release,
      file refcnt.h, line 62.

Taking the request back was not necessary (it would properly be
processed by the remote_recv_thread) and only complicated things.

MFC after: 2 weeks

10 years agoFix compiler warnings.
trociny [Tue, 10 Dec 2013 20:02:09 +0000 (20:02 +0000)]
Fix compiler warnings.

MFC after: 2 weeks

10 years agoAdd some macros to make the code more readable (no functional chages).
trociny [Tue, 10 Dec 2013 19:58:10 +0000 (19:58 +0000)]
Add some macros to make the code more readable (no functional chages).

MFC after: 2 weeks

10 years agoFor memsync replication, hio_countdown is used not only as an
trociny [Tue, 10 Dec 2013 19:56:26 +0000 (19:56 +0000)]
For memsync replication, hio_countdown is used not only as an
indication when a request can be moved to done queue, but also for
detecting the current state of memsync request.

This approach has problems, e.g. leaking a request if memsynk ack from
the secondary failed, or racy usage of write_complete, which should be
called only once per write request, but for memsync can be entered by
local_send_thread and ggate_send_thread simultaneously.

So the following approach is implemented instead:

1) Use hio_countdown only for counting components we waiting to
   complete, i.e. initially it is always 2 for any replication mode.

2) To distinguish between "memsync ack" and "memsync fin" responses
   from the secondary, add and use hio_memsyncacked field.

3) write_complete() in component threads is called only before
   releasing hio_countdown (i.e. before the hio may be returned to the
   done queue).

4) Add and use hio_writecount refcounter to detect when
   write_complete() can be called in memsync case.

Reported by: Pete French petefrench ingresso.co.uk
Tested by: Pete French petefrench ingresso.co.uk
MFC after: 2 weeks

10 years agoFix typo in fortune (go -> to)
gavin [Tue, 10 Dec 2013 19:42:35 +0000 (19:42 +0000)]
Fix typo in fortune (go -> to)

10 years agoMinor mdoc fixes.
joel [Tue, 10 Dec 2013 19:15:26 +0000 (19:15 +0000)]
Minor mdoc fixes.

10 years agoProperly refuse handoff requests on already connected sessions. Previously
trasz [Tue, 10 Dec 2013 18:18:39 +0000 (18:18 +0000)]
Properly refuse handoff requests on already connected sessions.  Previously
this would result in dropping the session.

MFC after: 2 days
Sponsored by: The FreeBSD Foundation

10 years agoFix handling for empty auth-groups. Without it, ctld child process
trasz [Tue, 10 Dec 2013 17:27:11 +0000 (17:27 +0000)]
Fix handling for empty auth-groups.  Without it, ctld child process
would either exit on assertion, or, if assertions are not enabled,
fail to authenticate the target.

MFC after: 2 days
Sponsored by: The FreeBSD Foundation

10 years agoFix missing new line after:
pjd [Tue, 10 Dec 2013 17:16:13 +0000 (17:16 +0000)]
Fix missing new line after:

Netvsc initializing...

during boot.

10 years agoDisable error message about failed attempt to attach fbd when drm2 built with
ray [Tue, 10 Dec 2013 15:53:00 +0000 (15:53 +0000)]
Disable error message about failed attempt to attach fbd when drm2 built with
syscons.

Sponsored by: The FreeBSD Foundation

10 years agoBreak build with error in case when both syscons and newcons are enabled.
ray [Tue, 10 Dec 2013 15:36:29 +0000 (15:36 +0000)]
Break build with error in case when both syscons and newcons are enabled.

Sponsored by: The FreeBSD Foundation

10 years agoChange the type of addr argument in dump() function to be able
ae [Tue, 10 Dec 2013 14:17:07 +0000 (14:17 +0000)]
Change the type of addr argument in dump() function to be able
disambiguate link-local addresses from different zones.

10 years agoRemove unused macro ADVANCE() and replace ROUNDUP() macro with ALIGN().
ae [Tue, 10 Dec 2013 13:34:28 +0000 (13:34 +0000)]
Remove unused macro ADVANCE() and replace ROUNDUP() macro with ALIGN().
They aren't the same, but in our use cases ALIGN gives the same results.

10 years agoAnsify function definitions.
ae [Tue, 10 Dec 2013 13:14:54 +0000 (13:14 +0000)]
Ansify function definitions.

10 years agoDon't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE
mav [Tue, 10 Dec 2013 12:36:44 +0000 (12:36 +0000)]
Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE
(64MB).  Even if we would find one somehow, ZFS kernel code rejects such
devices.  It is funny to look on attempts to read 4 256K vdev labels from
1.44MB floppy, though it is not very practical and quite slow.

10 years agoAdd missing includes.
jmallett [Tue, 10 Dec 2013 09:38:18 +0000 (09:38 +0000)]
Add missing includes.

10 years agomtest(8): use correct macro in mdoc
eadler [Tue, 10 Dec 2013 05:01:01 +0000 (05:01 +0000)]
mtest(8): use correct macro in mdoc

The An macros is used for authors while the Ar macro is used for arguments.
AFAIK mcast-addr and ifname are not authors.

PR: docs/184649
Submitted by: cnst++
MFC After: 3 days

10 years agocalendar(1): Add support for #include with absolute paths
eadler [Tue, 10 Dec 2013 01:39:22 +0000 (01:39 +0000)]
calendar(1): Add support for #include with absolute paths

Prior to the addition of cpp support into calendar itself
#include </usr/share/calendar/calendar.all>
was a legal construction in a calendar file.

Permit this again

10 years agoPrint out the full PCIe link negotiation during dmesg.
adrian [Tue, 10 Dec 2013 00:07:04 +0000 (00:07 +0000)]
Print out the full PCIe link negotiation during dmesg.

I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot
or not.

Reviewed by: np
Sponsored by: Netflix, inc.

10 years agoFix a regression introduced by SVN r257842; resulting in mountroot prompt
dteske [Mon, 9 Dec 2013 23:58:26 +0000 (23:58 +0000)]
Fix a regression introduced by SVN r257842; resulting in mountroot prompt
after attempting to install to encrypted ZFS root (caused by a typo in a
variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

MFC after: 3 days

10 years agoUnstaticize t4_list and t4_uld_list. This works around a clang
np [Mon, 9 Dec 2013 23:33:57 +0000 (23:33 +0000)]
Unstaticize t4_list and t4_uld_list.  This works around a clang
annoyance[1] and allows kgdb to find these symbols.

[1] http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041166.html

MFC after: 3 days

10 years agoFix a regression introduced by SVN r257842. Result was that after
dteske [Mon, 9 Dec 2013 22:58:26 +0000 (22:58 +0000)]
Fix a regression introduced by SVN r257842. Result was that after
successfully installing to encrypted ZFS root, the passphrase is
not accepted and a message about "incorrect key" is displayed.

MFC after: 3 days

10 years agosed(1): Use /i instead of /I
eadler [Mon, 9 Dec 2013 22:56:19 +0000 (22:56 +0000)]
sed(1): Use /i instead of /I

the i modifier was added in r259132 since POSIX recently agreed to add
it. Switch uses of /I to /i.

10 years agoMove constants for indices in the local APIC's local vector table from
jhb [Mon, 9 Dec 2013 21:08:52 +0000 (21:08 +0000)]
Move constants for indices in the local APIC's local vector table from
apicvar.h to apicreg.h.

10 years agoBump the g2b firmware to 18.x.
adrian [Mon, 9 Dec 2013 19:35:42 +0000 (19:35 +0000)]
Bump the g2b firmware to 18.x.

Tested:

* Intel 6235

10 years ago- Refresh /etc/localtime after each update using tzsetup -r.
jhb [Mon, 9 Dec 2013 19:31:30 +0000 (19:31 +0000)]
- Refresh /etc/localtime after each update using tzsetup -r.
- Regenerate /var/db/services.db when /etc/services changes.

MFC after: 1 week

10 years agoAdd regression test for recently added 'i' flag in r259132.
eadler [Mon, 9 Dec 2013 19:13:16 +0000 (19:13 +0000)]
Add regression test for recently added 'i' flag in r259132.

PR: standards/184641

10 years agoPer the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
eadler [Mon, 9 Dec 2013 18:57:20 +0000 (18:57 +0000)]
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
as a case insensitive flag.

PR: standards/184641
Requested by: David A. Wheeler <dwheeler@dwheeler.com>
MFC After: 1 week

10 years agoDon't panic when we get ZPOOL_STATUS_NON_NATIVE_ASHIFT
delphij [Mon, 9 Dec 2013 18:52:21 +0000 (18:52 +0000)]
Don't panic when we get ZPOOL_STATUS_NON_NATIVE_ASHIFT
while listing importable pools.

MFC after: 3 days

10 years agoo Compat options have to be defined before sys/ioccom.h included, so move
ray [Mon, 9 Dec 2013 15:28:34 +0000 (15:28 +0000)]
o Compat options have to be defined before sys/ioccom.h included, so move
inclusion of right after sys/param.h.
o Only vt_core module use compat options, move it from common header to module.

Reported by: Larry Rosenman ler at lerctr dot org

Sponsored by: The FreeBSD Foundation

10 years agoRespect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
ray [Mon, 9 Dec 2013 15:01:34 +0000 (15:01 +0000)]
Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
for vt(9). Note: /dev/sysmouse not affected.

Sponsored by: The FreeBSD Foundation

10 years agoBring the RPi I2C driver in line with ti_i2c. Make it treat any slave
loos [Mon, 9 Dec 2013 12:01:17 +0000 (12:01 +0000)]
Bring the RPi I2C driver in line with ti_i2c.  Make it treat any slave
address as a 7-bit address.

Approved by: adrian (mentor)

10 years agoActivate the device before attempt to access any of its registers. Without
loos [Mon, 9 Dec 2013 11:51:17 +0000 (11:51 +0000)]
Activate the device before attempt to access any of its registers.  Without
this change we may end up with a panic (Fatal kernel mode data abort:
'External Non-Linefetch Abort (S)') as described in
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.

It is now possible to bring up I2C1 and I2C2 on BBB.

Approved by: adrian (mentor)

10 years agoFix a few typos on the scm (control module) pin mux definitions.
loos [Mon, 9 Dec 2013 11:33:45 +0000 (11:33 +0000)]
Fix a few typos on the scm (control module) pin mux definitions.

Approved by: adrian (mentor)

10 years agoMake it easier to test build the USB code having the debug flags set
hselasky [Mon, 9 Dec 2013 07:26:55 +0000 (07:26 +0000)]
Make it easier to test build the USB code having the debug flags set
without having to build the complete kernel.

MFC after: 2 weeks

10 years agoAdd gpio config for usb1 in dts.
ganbold [Mon, 9 Dec 2013 07:15:46 +0000 (07:15 +0000)]
Add gpio config for usb1 in dts.
That way it gives power to other usb hub via gpio at boot time.

Reviewed by: stas@

10 years agoAdd gpio parse routines according to sys/boot/fdt/dts/bindings-gpio.txt.
ganbold [Mon, 9 Dec 2013 07:14:59 +0000 (07:14 +0000)]
Add gpio parse routines according to sys/boot/fdt/dts/bindings-gpio.txt.

Reviewed by: stas@

10 years agoReplace Sun RPC license with a 3-clause BSD license. This license change
hrs [Mon, 9 Dec 2013 05:01:38 +0000 (05:01 +0000)]
Replace Sun RPC license with a 3-clause BSD license.  This license change
was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
Virtualization at Oracle Corporation.

10 years agoReplace Sun RPC license with a 3-clause BSD license. This license change
hrs [Mon, 9 Dec 2013 04:26:50 +0000 (04:26 +0000)]
Replace Sun RPC license with a 3-clause BSD license.  This license change
was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
Virtualization at Oracle Corporation.

10 years agoAdd some initial support for the Intel 6235.
adrian [Mon, 9 Dec 2013 03:40:02 +0000 (03:40 +0000)]
Add some initial support for the Intel 6235.

Tested:

* Intel 5100
* Intel 6235

Obtained from: mav, others

10 years agoForgot to utilize feature added in SVN r257782 to prevent truncating
dteske [Mon, 9 Dec 2013 03:38:18 +0000 (03:38 +0000)]
Forgot to utilize feature added in SVN r257782 to prevent truncating
/tmp/bsdinstall_log each time we exec a module.

MFC after: 3 days

10 years agoChase down cryptodeflate.c change from r259109.
alfred [Mon, 9 Dec 2013 02:06:52 +0000 (02:06 +0000)]
Chase down cryptodeflate.c change from r259109.

10 years agoFix failed attempt to send pkg(8) stderr to /dev/null
dteske [Mon, 9 Dec 2013 01:30:20 +0000 (01:30 +0000)]
Fix failed attempt to send pkg(8) stderr to /dev/null

MFC after: 3 days

10 years agoUse correct casts in gcc's emmintrin.h for the first arguments of the
dim [Sun, 8 Dec 2013 23:24:32 +0000 (23:24 +0000)]
Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'

MFC after: 3 days

10 years agoo Build syscons(9)'s splash support if both sc and splash are enabled.
ray [Sun, 8 Dec 2013 22:49:12 +0000 (22:49 +0000)]
o Build syscons(9)'s splash support if both sc and splash are enabled.
o Include opt_splash.h for vt(9) to know when splash device is enabled.
o Build logo_freebsd.c only if splash and vt are enabled.
o Include opt_compat.h to know when we have to respect compatibility.

Sponsored by: The FreeBSD Foundation

10 years agoFix build with 'crypto' and 'zfs' in the same kernel. This was the path
peter [Sun, 8 Dec 2013 21:59:46 +0000 (21:59 +0000)]
Fix build with 'crypto' and 'zfs' in the same kernel.  This was the path
of least pain I could find.

10 years agoWhen comparing device IDs, make sure that they have the same type
mav [Sun, 8 Dec 2013 20:43:01 +0000 (20:43 +0000)]
When comparing device IDs, make sure that they have the same type
(like NAA assigned) and identify the same entity (like device or port).
Otherwise there can be false positives since at least some models of
Seagate disks use same IDs for the whole device and one of its ports.

MFC after: 2 weeks

10 years agoEliminate a redundant parameter to vm_radix_replace().
alc [Sun, 8 Dec 2013 20:07:02 +0000 (20:07 +0000)]
Eliminate a redundant parameter to vm_radix_replace().

Improve the wording of the comment describing vm_radix_replace().

Reviewed by: attilio
MFC after: 6 weeks
Sponsored by: EMC / Isilon Storage Division

10 years agoSome improvements to the casperd manual page.
pjd [Sun, 8 Dec 2013 19:32:29 +0000 (19:32 +0000)]
Some improvements to the casperd manual page.

Submitted by: emaste

10 years agodrm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD
dumbbell [Sun, 8 Dec 2013 18:48:07 +0000 (18:48 +0000)]
drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD

The code was unmodified compared to Linux and returned the amount of
received bytes from the i2c bus. This led to non-working i2c bus and
failure to eg. read monitor's EDID, if connected to DisplayPort.

MFC after: 3 days
Tested by: MikaĆ«l Urankar <mikael.urankar@gmail.com>

10 years agocxgbe(4): save a copy of the RSS map for each port for the driver's use.
np [Sun, 8 Dec 2013 17:47:37 +0000 (17:47 +0000)]
cxgbe(4): save a copy of the RSS map for each port for the driver's use.

10 years agoRestore a vital comment nuked in r259016.
marius [Sun, 8 Dec 2013 15:25:19 +0000 (15:25 +0000)]
Restore a vital comment nuked in r259016.

10 years agodrm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes
dumbbell [Sun, 8 Dec 2013 14:21:54 +0000 (14:21 +0000)]
drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes

This fixes radeon_agp_init() and gtt_size is now correct. However, this
is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
implemented yet.

Submitted by: tijl@

10 years agoPull in r196658 from upstream clang trunk:
dim [Sun, 8 Dec 2013 13:56:26 +0000 (13:56 +0000)]
Pull in r196658 from upstream clang trunk:

  CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by: se
MFC after: 3 days

10 years agoSimilar to r255816, fix the math for the DELAY() calculation. It was off
loos [Sun, 8 Dec 2013 13:46:27 +0000 (13:46 +0000)]
Similar to r255816, fix the math for the DELAY() calculation.  It was off
by a really small amount because of the higher timer resolution.

Approved by: adrian (mentor)
Verified on: BBB

10 years agoPartially revert r259080. bde@ pointed out that there are a lot more style bugs
jhibbits [Sun, 8 Dec 2013 09:34:56 +0000 (09:34 +0000)]
Partially revert r259080.  bde@ pointed out that there are a lot more style bugs
going on in here than can be fixed, and I introduced some of my own.  Rather
than fix the whole host of them, back out my bugs.

Found by: bde
X-MFC with: r259080

10 years agoFix typos.
hselasky [Sun, 8 Dec 2013 06:52:22 +0000 (06:52 +0000)]
Fix typos.

Found by: remko