]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoFix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.
pfg [Fri, 30 May 2014 01:09:07 +0000 (01:09 +0000)]
Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.

POSIX.1-2008 specifies that those two functions should be declared by
including <strings.h>, not <string.h> (the latter only has strcoll_l()
and strxfrm_l()):

http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html

Obtained from: DragonFlyBSD
Reviewed by: theraven
MFC after: 2 weeks

10 years agoCreate /var/unbound/conf.d for additional configuration files.
des [Thu, 29 May 2014 22:34:04 +0000 (22:34 +0000)]
Create /var/unbound/conf.d for additional configuration files.
Ensure that it is used if present.

MFH: 3 weeks

10 years agoCorrect vt(4) border calculations on font switch
emaste [Thu, 29 May 2014 21:52:42 +0000 (21:52 +0000)]
Correct vt(4) border calculations on font switch

If a vt(4) font does not exactly fit the screen dimensions, the console
window is offset so that it is centered.  A rectangle is drawn at the
top, left, right, and bottom of the screen, to erase any leftovers that
are outside of the new usable console area.

If the x offset or y offset is 0 then the left border or top border
respectively is not drawn.  The right and bottom borders may be one
pixel larger than necessary due to rounding, and are always drawn.

Prior to this change a 0 offset would result in a panic when calling
vt_drawrect with an x or y coordinate of -1.

Sponsored by: The FreeBSD Foundation

10 years agoUpdate size in vt_grow if we don't have to reallocate
emaste [Thu, 29 May 2014 21:10:33 +0000 (21:10 +0000)]
Update size in vt_grow if we don't have to reallocate

vt_grow may be called with a new size that's larger than previous but
does not require reallocation - for example, when the number of columns
is the same and new number of rows is less than the history size.
Prior to this change we would fail to update vb_scr_size, and then hit
a KASSERT when trying to write to the newly visible rows.

Sponsored by: The FreeBSD Foundation

10 years agoFix unintended KBI change from r264905. Add _fib versions of
asomers [Thu, 29 May 2014 21:03:49 +0000 (21:03 +0000)]
Fix unintended KBI change from r264905.  Add _fib versions of
ifa_ifwithnet() and ifa_ifwithdstaddr()  The legacy functions will call the
_fib() versions with RT_ALL_FIBS, preserving legacy behavior.

sys/net/if_var.h
sys/net/if.c
Add legacy-compatible functions as described above.  Ensure legacy
behavior when RT_ALL_FIBS is passed as fibnum.

sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/net/route.c
sys/net/rtsock.c
sys/netinet6/nd6.c
Call with _fib() functions if we must use a specific fib, or the
legacy functions otherwise.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
Improve the udp_dontroute test.  The bug that this test exercises is
that ifa_ifwithnet() will return the wrong address, if multiple
interfaces have addresses on the same subnet but with different
fibs.  The previous version of the test only considered one possible
failure mode: that ifa_ifwithnet_fib() might fail to find any
suitable address at all.  The new version also checks whether
ifa_ifwithnet_fib() finds the correct address by checking where the
ARP request goes.

Reported by: bz, hrs
Reviewed by: hrs
MFC after: 1 week
X-MFC-with: 264905
Sponsored by: Spectra Logic

10 years agoChange examples to have master skew above 0 to have ability to overwrite this
marck [Thu, 29 May 2014 21:02:57 +0000 (21:02 +0000)]
Change examples to have master skew above 0 to have ability to overwrite this
from the slave (for example, when master is failing on disk IO and could not be
logged into or execute cronjob).

Commented out examples changed too to simplify future merging.

Idea by: kaa@zvuki.ru
Discussed with: glebius
MFC after: 1 week

10 years agoIn uart_bus_grab(), use the ier_mask instead of a custom hack for XScale.
cognet [Thu, 29 May 2014 21:00:06 +0000 (21:00 +0000)]
In uart_bus_grab(), use the ier_mask instead of a custom hack for XScale.

Suggested by: jmg

10 years agoAdd rwlock to struct dadq. A panic could occur when a large number of
hrs [Thu, 29 May 2014 20:53:53 +0000 (20:53 +0000)]
Add rwlock to struct dadq.  A panic could occur when a large number of
addresses performed DAD at the same time.

10 years agoCorrect KASSERT strings
emaste [Thu, 29 May 2014 20:26:01 +0000 (20:26 +0000)]
Correct KASSERT strings

Rows refer to height and cols to width.

10 years agoIn the grab function, keep the bit 6 on in the IER, on XScale, using 0
cognet [Thu, 29 May 2014 19:57:51 +0000 (19:57 +0000)]
In the grab function, keep the bit 6 on in the IER, on XScale, using 0
turns the UART off, which is unfortunate if one want to use it as a console.

10 years agoUpdate number of tests.
pfg [Thu, 29 May 2014 19:48:18 +0000 (19:48 +0000)]
Update number of tests.

Suggested by: jmmv

10 years agoMinor style knit.
pfg [Thu, 29 May 2014 19:43:43 +0000 (19:43 +0000)]
Minor style knit.

10 years agoFix pf(4) to build with MAXCPU set to 256. MAXCPU is actually a count,
jhb [Thu, 29 May 2014 19:17:10 +0000 (19:17 +0000)]
Fix pf(4) to build with MAXCPU set to 256.  MAXCPU is actually a count,
not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid).

10 years agoAdd VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)
emaste [Thu, 29 May 2014 18:05:03 +0000 (18:05 +0000)]
Add VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437 fonts.

10 years agoDo not hand the VM the memory used for stacks/page tables/etc.
cognet [Thu, 29 May 2014 16:56:39 +0000 (16:56 +0000)]
Do not hand the VM the memory used for stacks/page tables/etc.

10 years agoFor old CPUs, map the 64 first MB of RAM as it used to be. Some ports
cognet [Thu, 29 May 2014 16:54:15 +0000 (16:54 +0000)]
For old CPUs, map the 64 first MB of RAM as it used to be. Some ports
(XScale mainly) expects the memory located before the kernel to be mapped,
and use it to allocate the page tables, the various stacks, etc.
A better fix would probably be to rewrite the various bla_machdep.c to stop
using that RAM, but I'm not so inclined to do it, especially since I don't
have hardware for all of them.

10 years agoAdd support for the unmapped i/o to mfi(4).
kib [Thu, 29 May 2014 16:20:34 +0000 (16:20 +0000)]
Add support for the unmapped i/o to mfi(4).

Tested by: Nicholas Esborn <nick@desert.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd missing , in converted font output
emaste [Thu, 29 May 2014 16:18:46 +0000 (16:18 +0000)]
Add missing , in converted font output

Submitted by: Claude Buisson

10 years agoWhen usermode loaded non-default segment selector into the %gs,
kib [Thu, 29 May 2014 16:18:31 +0000 (16:18 +0000)]
When usermode loaded non-default segment selector into the %gs,
correctly prepare KGSBASE msr to restore the user descriptor base on
the last swapgs during return to usermode.

Reported and tested by: peterj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoReorganize this Makefile so that all the bsd.*.mk bits are in one
jhb [Thu, 29 May 2014 16:03:08 +0000 (16:03 +0000)]
Reorganize this Makefile so that all the bsd.*.mk bits are in one
section at the bottom.

Reviewed by: imp

10 years agoFix a typo.
gjb [Thu, 29 May 2014 15:43:51 +0000 (15:43 +0000)]
Fix a typo.

Sponsored by: The FreeBSD Foundation

10 years agonetinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in strict POSIX
jilles [Thu, 29 May 2014 15:23:37 +0000 (15:23 +0000)]
netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in strict POSIX
mode.

Put the htonl(), htons(), ntohl() and ntohs() declarations under
__POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be
exposed from <netinet/in.h> (as well as <arpa/inet.h>).

Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because
older versions of POSIX and the C standard do not define this header.
However, other places in the same file already perform the check.

PR: 188316
Submitted by: Christian Neukirchen

10 years agoAdd gallant vt(4) font as an example of font loading for vt(4).
ray [Thu, 29 May 2014 14:51:52 +0000 (14:51 +0000)]
Add gallant vt(4) font as an example of font loading for vt(4).

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoEnable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
ray [Thu, 29 May 2014 14:39:25 +0000 (14:39 +0000)]
Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
if vt(4) is present.

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoAdd gallant vt(4) font as an example of font loading for vt(4).
ray [Thu, 29 May 2014 13:41:07 +0000 (13:41 +0000)]
Add gallant vt(4) font as an example of font loading for vt(4).

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agomdoc: add missing paragraph macro.
pluknet [Thu, 29 May 2014 13:35:13 +0000 (13:35 +0000)]
mdoc: add missing paragraph macro.

10 years agoo Teach vidcontrol(1) how to load vt(4) font.
ray [Thu, 29 May 2014 13:09:48 +0000 (13:09 +0000)]
o Teach vidcontrol(1) how to load vt(4) font.
o Teach vidcontrol(1) to distinct which virtual terminal system is running now.
o Load vt(4) fonts from different location.
o Add $FreeBSD$ tag for path.h.

Tested by: Claude Buisson <clbuisson@orange.fr>

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoRemove driver as unused.
ray [Thu, 29 May 2014 12:29:58 +0000 (12:29 +0000)]
Remove driver as unused.

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoFactor out kernel configuration for DWC OTG FDT attach code.
hselasky [Thu, 29 May 2014 11:13:40 +0000 (11:13 +0000)]
Factor out kernel configuration for DWC OTG FDT attach code.

10 years agoAdd some more spinlocks to protect the state of the USB transfer
hselasky [Thu, 29 May 2014 11:11:19 +0000 (11:11 +0000)]
Add some more spinlocks to protect the state of the USB transfer
queue. Rename some functions to indicate locking requirements.

MFC after: 1 week

10 years agoHook the ISP/SAF1761 driver into MIPS kernel builds.
hselasky [Thu, 29 May 2014 10:46:09 +0000 (10:46 +0000)]
Hook the ISP/SAF1761 driver into MIPS kernel builds.
- Update FDT file for BERI DE4 boards.
- Add needed kernel configuration keywords.
- Rename module to saf1761otg so that the device unit number does not
interfere with the hardware ID in dmesg.

Sponsored by: DARPA, AFRL

10 years agoOptimise the ISP/SAF1761 driver:
hselasky [Thu, 29 May 2014 10:06:18 +0000 (10:06 +0000)]
Optimise the ISP/SAF1761 driver:
- Use an interrupt filter for handling the data path interrupts. This
increases the throughput significantly.
- Implement support for USB suspend and resume in USB host mode.

Sponsored by: DARPA, AFRL

10 years agoCorrect the description of characters allowed. Based on pw_checkname in
wblock [Thu, 29 May 2014 02:26:12 +0000 (02:26 +0000)]
Correct the description of characters allowed.  Based on pw_checkname in
usr.sbin/pw/pw_user.c.  Modified version of patch submitted by
venture37.

PR: docs/47594
Submitted by: Fernando Schapachnik <fernando@mecon.gov.ar>, venture37 <venture37@geeklan.co.uk>
Reviewed by: allanjude, bcr, brueffer (on phabricator)
MFC after: 1 week

10 years agoCommit the rest of the changes that were intended to be part of r266826.
markj [Thu, 29 May 2014 01:42:22 +0000 (01:42 +0000)]
Commit the rest of the changes that were intended to be part of r266826.

X-MFC-with: r266826

10 years agoMove some duplicated hook definitions from machine-dependent files to
markj [Thu, 29 May 2014 01:41:19 +0000 (01:41 +0000)]
Move some duplicated hook definitions from machine-dependent files to
kern_dtrace.c.

Reviewed by: rpaulo
MFC after: 1 week

10 years agoUse IPv4 statistics in ipsec4_process_packet() rather than the IPv6
bz [Wed, 28 May 2014 23:01:20 +0000 (23:01 +0000)]
Use IPv4 statistics in ipsec4_process_packet() rather than the IPv6
version.  This also unbreaks the NOINET6 builds after r266800.

10 years ago- Actually, modules are built correctly when compiled along the kernel as
marius [Wed, 28 May 2014 19:59:27 +0000 (19:59 +0000)]
- Actually, modules are built correctly when compiled along the kernel as
  they then pick up an opt_global.h from KERNBUILDDIR having PAE defined.
  Thus, build all modules by default except those which still really are
  defective as of r266799.
- Minor style cleanup.

MFC after: 1 week

10 years ago- Shrink the list of excluded modules to what actually still doesn't build
marius [Wed, 28 May 2014 19:58:00 +0000 (19:58 +0000)]
- Shrink the list of excluded modules to what actually still doesn't build
  as of r266799.
- Some style cleanups.

MFC after: 1 week

10 years agoAdd a temporary hack to change the various non-build related special
jhb [Wed, 28 May 2014 19:52:01 +0000 (19:52 +0000)]
Add a temporary hack to change the various non-build related special
targets like 'cscope' and 'glimpse' to not depend on src.opts.mk or
bsd.*.mk.

Reviewed by: imp

10 years agoInitialize r_flags the same way in all cases using a sanitized copy of
truckman [Wed, 28 May 2014 16:57:17 +0000 (16:57 +0000)]
Initialize r_flags the same way in all cases using a sanitized copy of
flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE
bits are invalid in this context, and we want to defer setting RF_ACTIVE
in r_flags until later.  This should make rman_get_flags() return
the correct answer in all cases.

Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED
or RF_FIRSTSHARE flags.

Do a strict equality check on the share type bits of flags.  In
particular, do an equality check on RF_PREFETCHABLE.  The previous
code would allow one type of mismatch of RF_PREFETCHABLE but disallow
the other type of mismatch.  Also, ignore the the RF_ALIGNMENT_MASK
bits since alignment validity should be handled by the amask check.
This field contains an integer value, but previous code did a strange
bitwise comparison on it.

Leave the original value of flags unmolested as a minor debug aid.

Change the start+amask overflow check to a KASSERT() since it is just
meant to catch a highly unlikely programming error in the caller.

Reviewed by: jhb
MFC after: 1 month

10 years agoDon't break the legacy applications which set
ume [Wed, 28 May 2014 16:50:18 +0000 (16:50 +0000)]
Don't break the legacy applications which set
just 2 bytes to salt.

MFC after: 1 week

10 years agoFixes for ISP/SAF1761 host mode:
hselasky [Wed, 28 May 2014 16:28:22 +0000 (16:28 +0000)]
Fixes for ISP/SAF1761 host mode:
- Make the USB hardware skip PTDs which are not allocated.
- Peek host memory twice. Sometimes the PTD status is incorrectly
returned as zero.
- Ensure the host channel is always freed when software TD
is completing.
- Add correct configuration of interrupt polarity and type.
- Set CERR to 2 for asynchronous traffic to avoid having to
reactivate the PTD when a NAK token is received.
- Fix detection of STALL PID.

Sponsored by: DARPA, AFRL

10 years agoActually, just merge r233362 and do away with the unnecessary uint8_t
marius [Wed, 28 May 2014 14:26:46 +0000 (14:26 +0000)]
Actually, just merge r233362 and do away with the unnecessary uint8_t
pointer casting altogether.

10 years agoUse M_WAITOK for the NGM_PIPE_SET_CFG control message. We expect it to
glebius [Wed, 28 May 2014 13:15:14 +0000 (13:15 +0000)]
Use M_WAITOK for the NGM_PIPE_SET_CFG control message. We expect it to
arrive from userland only.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

10 years agoRemove nop.
hselasky [Wed, 28 May 2014 12:58:37 +0000 (12:58 +0000)]
Remove nop.

MFC after: 1 week

10 years agoFixed IPv4-in-IPv6 and IPv6-in-IPv4 IPsec tunnels.
vanhu [Wed, 28 May 2014 12:45:27 +0000 (12:45 +0000)]
Fixed IPv4-in-IPv6 and IPv6-in-IPv4 IPsec tunnels.
For IPv6-in-IPv4, you may need to do the following command
on the tunnel interface if it is configured as IPv4 only:
ifconfig <interface> inet6 -ifdisabled

Code logic inspired from NetBSD.

PR: kern/169438
Submitted by: emeric.poupon@netasq.com
Reviewed by: fabient, ae
Obtained from: NETASQ

10 years agoCommit the right version of r266793.
marius [Wed, 28 May 2014 12:32:07 +0000 (12:32 +0000)]
Commit the right version of r266793.

10 years agoFix for big endian architectures. The "up_address" field is 8-bit and
hselasky [Wed, 28 May 2014 12:27:41 +0000 (12:27 +0000)]
Fix for big endian architectures. The "up_address" field is 8-bit and
does not need byte swapping.

MFC after: 1 week

10 years ago- Fix compilation with PAE support enabled by improving the casting of
marius [Wed, 28 May 2014 09:01:35 +0000 (09:01 +0000)]
- Fix compilation with PAE support enabled by improving the casting of
  physical addresses.
- Nuke the unused softc of emujoy(4).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoFix DMA handling in radeon_dummy_page_init():
marius [Wed, 28 May 2014 08:59:23 +0000 (08:59 +0000)]
Fix DMA handling in radeon_dummy_page_init():
- Based on actual usage and on what Linux does, dummy_page.addr should
  contain the physical bus address of the dummy page rather than its
  virtual one. As a side-effect, correcting this bug fixes compilation
  with PAE support enabled by getting rid of an inappropriate cast.
- Also based on actual usage of dummy_page.addr, theoretically Radeon
  devices could do a maximum of 44-bit DMA. In reality, though, it is
  more likely that they only support 32-bit DMA, at least that is what
  radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0
  to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on
  amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead,
  which the existing 32-bit DMA limits within the drm2 code spelled as
  0xFFFFFFFF should also be changed to.

Reviewed by: dumbbell
MFC after:      1 week
Sponsored by:   Bally Wulff Games & Entertainment GmbH

10 years agoreference the correct variable in a comment
luigi [Wed, 28 May 2014 06:50:16 +0000 (06:50 +0000)]
reference the correct variable in a comment

MFC after: 3 days

10 years agoAdd simple polling mechanism that works for KDB.
br [Wed, 28 May 2014 06:15:45 +0000 (06:15 +0000)]
Add simple polling mechanism that works for KDB.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoDocument support for Intel Centrino Wireless-N 105, added in r266770.
brueffer [Wed, 28 May 2014 06:11:16 +0000 (06:11 +0000)]
Document support for Intel Centrino Wireless-N 105, added in r266770.

MFC after: 2 weeks

10 years agoDescribe I2C arbitrator device in DTS and use it for Chromebook Snow only.
br [Wed, 28 May 2014 06:11:12 +0000 (06:11 +0000)]
Describe I2C arbitrator device in DTS and use it for Chromebook Snow only.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoo Add kernel configuration for HP Chromebook 11
br [Wed, 28 May 2014 06:00:55 +0000 (06:00 +0000)]
o Add kernel configuration for HP Chromebook 11
o Use machine codename in filenames
o Add GEOM_PART_GPT kernel option

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoIn r218101 I have not changed properly the futex syscall definition.
dchagin [Wed, 28 May 2014 05:57:35 +0000 (05:57 +0000)]
In r218101 I have not changed properly the futex syscall definition.
Some Linux futex ops atomically verifies that the futex address uaddr
(uval) contains the value val. Comparing signed uval and unsigned val
may lead to an unexpected result, mostly to a deadlock.

So copyin uaddr to an unsigned int to compare the parameters correctly.

While here change ktr records to print parameters in more readable format.

Tested by eadler@

MFC after: 3 days

10 years agoRemove the assert which can be triggered by the userspace. The
kib [Wed, 28 May 2014 00:45:35 +0000 (00:45 +0000)]
Remove the assert which can be triggered by the userspace.  The
situation checked by assert is verified to not take place in
vm_map_wire(), and protection permissions on the wired entry can be
revoked afterward.

Reported by: markj
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoadd '3wire' (no handshake lines) to gettytab and ttys so that after
luigi [Wed, 28 May 2014 00:30:32 +0000 (00:30 +0000)]
add '3wire' (no handshake lines) to gettytab and ttys so that after
svn 264175 bhyve etc. work -- without that, /usr/bin/login would stop
in getpass()

MFC after: 3 days

10 years agoRepair nested signal handling on PowerPC. The signal trampoline code
nwhitehorn [Tue, 27 May 2014 23:57:22 +0000 (23:57 +0000)]
Repair nested signal handling on PowerPC. The signal trampoline code
was not allocating space for the parameter save area in the stack frame.
If the compiler chose to save the argument to the signal handler on the
stack, it would overwrite the first 32 bits of the sigaction struct with
it, corrupting it for a subsequent invocation.

PR: powerpc/183040
MFC after: 8 days

10 years agoMove libworker_event_done_cb() from libworker.h to worker.h.
des [Tue, 27 May 2014 23:39:28 +0000 (23:39 +0000)]
Move libworker_event_done_cb() from libworker.h to worker.h.

10 years agoRemove debugging printf that crept in in r266770.
gavin [Tue, 27 May 2014 23:05:12 +0000 (23:05 +0000)]
Remove debugging printf that crept in in r266770.

Submitted by: adrian, nwhitehorn
MFC after: 2 weeks

10 years agoEliminate the fake contig_dmamap and replace it with a new flag,
scottl [Tue, 27 May 2014 21:31:11 +0000 (21:31 +0000)]
Eliminate the fake contig_dmamap and replace it with a new flag,
BUS_DMA_KMEM_ALLOC.  They serve the same purpose, but using the flag
means that the map can be NULL again, which in turn enables significant
optimizations for the common case of no bouncing.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoimprove ifconfig(8) man page by describing special behaviour of -l ether
allanjude [Tue, 27 May 2014 20:45:15 +0000 (20:45 +0000)]
improve ifconfig(8) man page by describing special behaviour of -l ether

PR: docs/187644
Submitted by: Andrew Merenbach (original patch)
Approved by: bcr (mentor)

10 years agoFix a couple of size_t != int warnings.
jhb [Tue, 27 May 2014 20:22:36 +0000 (20:22 +0000)]
Fix a couple of size_t != int warnings.

10 years agoVarious cleanups and fixes:
jhb [Tue, 27 May 2014 19:56:02 +0000 (19:56 +0000)]
Various cleanups and fixes:
- Switch from timeout() to callout_*() for per-request timers.
- Use device_find_child() in the identify routine.
- Use device_printf() instead of passing device_get_nameunit() to
  printf().
- Expand the SBP_LOCK coverage simplifying the locking.
- Uninline STAILQ_FOREACH_SAFE().

Tested by: sbruno

10 years agoMFV r266766:
delphij [Tue, 27 May 2014 19:46:11 +0000 (19:46 +0000)]
MFV r266766:

Add a new zfs property, "redundant_metadata" which can have values "all" or
"most".  The default will be "all", which is the current behavior.  When set
to all, ZFS stores an extra copy of all metadata.  If a single on-disk block
is corrupt, at worst a single block of user data (which is recordsize bytes
long) can be lost.

Setting to "most" will cause us to only store 1 copy of level-1 indirect
blocks of user data files.  This can improve performance of random writes,
because less metadata has to be written.  In practice,  at worst about
100 blocks (of recordsize bytes each) of user data can be lost if a single
on-disk block is corrupt.

The exact behavior of which metadata blocks are stored redundantly may change
in future releases.

Illumos issue: 3835 zfs need not store 2 copies of all metadata

MFC after: 2 weeks

10 years agoAdd support for the Intel Centrino Wireless-N 105 chipset.
gavin [Tue, 27 May 2014 19:39:57 +0000 (19:39 +0000)]
Add support for the Intel Centrino Wireless-N 105 chipset.

MFC after: 2 weeks
Relnotes: yes

10 years ago- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
jhb [Tue, 27 May 2014 19:04:38 +0000 (19:04 +0000)]
- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
  guest for which the rules regarding xsetbv emulation are known.  In
  particular future extensions like AVX-512 have interdependencies among
  feature bits that could allow a guest to trigger a GP# in the host with
  the current approach of allowing anything the host supports.
- Add proper checking of Intel MPX and AVX-512 XSAVE features in the
  xsetbv emulation and allow these features to be exposed to the guest if
  they are enabled in the host.
- Expose a subset of known-safe features from leaf 0 of the structured
  extended features to guests if they are supported on the host including
  RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
  from AVX-512, these features are all new instructions available for use
  in ring 3 with no additional hypervisor changes needed.

Reviewed by: neel

10 years agoPortmgr no longer need the UL hack.
sjg [Tue, 27 May 2014 18:39:13 +0000 (18:39 +0000)]
Portmgr no longer need the UL hack.

Reviewed by: obrien

10 years agocxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
np [Tue, 27 May 2014 18:18:41 +0000 (18:18 +0000)]
cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Netmap gets its own hardware-assisted virtual interface and won't take
over or disrupt the "normal" interface in any way.  You can use both
simultaneously.

For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl<N> interface
(note the 'n' prefix) in the hardware to accompany each cxl<N>
interface.  These two ifnet's per port share the same wire but really
are separate interfaces in the hardware and software.  Each gets its own
L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
should run netmap on the 'n' interfaces only, that's what they are for.

With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
Single port receive is at 33Mpps but this is very much a work in
progress.  I expect it to be closer to 40Mpps once done.  In any case
the current effort can already saturate multiple 10G ports of a T5 card
at the smallest legal packet size.  T4 gear is totally untested.

trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
881.952141 main [1621] interface is ncxl0
881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
881.962540 main [1804] mapped 334980KB at 0x801dff000
Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
881.962562 main [1882] Sending 512 packets every  0.000000000 s
881.962563 main [1884] Wait 2 secs for phy reset
884.088516 main [1886] Ready...
884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
884.088607 sender_body [996] start
884.093246 sender_body [1064] drop copy
885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
...

Relnotes: Yes
Sponsored by: Chelsio Communications.

10 years agoBetter documentation for why KERBEROS and OPENSSH are here, and where
imp [Tue, 27 May 2014 16:30:54 +0000 (16:30 +0000)]
Better documentation for why KERBEROS and OPENSSH are here, and where
to look for all the other options that used to be here (well, in
bsd.own.mk)

Suggested by: des@

10 years agoRegen after r266752.
gjb [Tue, 27 May 2014 15:55:26 +0000 (15:55 +0000)]
Regen after r266752.

Sponsored by: The FreeBSD Foundation

10 years agoRemove empty lines that cause mdoc warnings.
gjb [Tue, 27 May 2014 15:52:27 +0000 (15:52 +0000)]
Remove empty lines that cause mdoc warnings.

Sponsored by: The FreeBSD Foundation

10 years agoNow that there are separate back-end implementations of busdma, the bounce
scottl [Tue, 27 May 2014 14:18:57 +0000 (14:18 +0000)]
Now that there are separate back-end implementations of busdma, the bounce
implementation shouldn't steal flags from the common front-end.
Move those flags to the back-end.

Obtained from:  Netflix, Inc.
MFC after:      3 days

10 years agoRevert r266481. It was based on faulty analysis of the problem. A correct
scottl [Tue, 27 May 2014 14:06:23 +0000 (14:06 +0000)]
Revert r266481.  It was based on faulty analysis of the problem.  A correct
fix is forthcoming.

Obtained from: Netflix, Inc.

10 years agoAdd PCI ID for AMT based serial interface found on the Lenovo T61.
sbruno [Tue, 27 May 2014 13:35:31 +0000 (13:35 +0000)]
Add PCI ID for AMT based serial interface found on the Lenovo T61.

uart2: <Intel AMT - PM965/GM965 KT Controller> port 0x1830-0x1837
mem 0xfe024000-0xfe024fff irq 17 at device 3.3 on pci0
uart2: console (115200,n,8,1)

Tested as tty and serial console.  Seems "fine"

10 years agoDisconnect the following geom classes from the kernel modules build:
ae [Tue, 27 May 2014 10:21:49 +0000 (10:21 +0000)]
Disconnect the following geom classes from the kernel modules build:
BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern
replacement. Also it is still possible build them manually.

Discussed with: geom

10 years ago- Correct bus space resource type for register access.
hselasky [Tue, 27 May 2014 10:12:16 +0000 (10:12 +0000)]
- Correct bus space resource type for register access.
- Add configuration of interrupt type and polarity via FDT.

Sponsored by: DARPA, AFRL

10 years agoMultiple fixes and improvements:
hselasky [Tue, 27 May 2014 10:01:19 +0000 (10:01 +0000)]
Multiple fixes and improvements:
- Put "_LE_" into the register access macros to indicate little endian
byte order is expected by the hardware.
- Avoid using the bounce buffer when not strictly needed. Try to move
data directly using bus-space functions first.
- Ensure we preserve the reserved bits in the power down mode
register. Else the hardware goes into a non-recoverable state.
- Always use 32-bit access when writing or reading registers or FIFOs,
because the hardware is 32-bit oriented and don't really understand 8-
and 16-bit access.
- Correct writes to the memory address register. There is no need to
shift the register offset.
- Correct interval for interrupt endpoints.
- Optimise 90ns internal memory buffer read delay.
- Rename PDT into PTD, which is how the datasheet writes it.
- Add missing programming for activating host controller PTDs.

Sponsored by: DARPA, AFRL

10 years ago- Improve performance by fixing incorrect Rx/Tx handling
kevlo [Tue, 27 May 2014 08:14:54 +0000 (08:14 +0000)]
- Improve performance by fixing incorrect Rx/Tx handling
- Rename definition of AXGE_* to reflect reality
- Add new USB IDs

10 years agoThe users of RSS shouldn't be directly concerned about hash -> CPU ID
adrian [Tue, 27 May 2014 08:06:20 +0000 (08:06 +0000)]
The users of RSS shouldn't be directly concerned about hash -> CPU ID
mappings.  Instead, they should be first mapping to an RSS bucket and
then querying the RSS bucket -> CPU ID mapping to figure out the target
CPU.

When (if?) RSS rebalancing is implemented or some other (non round-robin)
distribution of work from buckets to CPU IDs, various bits of code - both
userland and kernel - will need to know how this mapping works.

So, to support this:

* Add a new function rss_m2bucket() - this maps an mbuf to a given bucket.
  Anything which is currently doing hash -> CPU work may instead wish to
  do hash -> bucket, and then query the bucket->cpuid map for which
  CPU it belongs on.  Or, map it to a bucket, then re-pin that bucket ->
  CPU during a rebalance operation.

* For userland applications which wish to exploit affinity to RSS buckets,
  the bucket -> CPU ID mapping is now available via a sysctl.
  net.inet.rss.bucket_mapping lists the bucket to CPU ID mapping via
  a list of bucket:cpu pairs.

10 years agoUpdate backend files and makefiles for apr 1.4.8 -> 1.5.1
peter [Tue, 27 May 2014 07:16:43 +0000 (07:16 +0000)]
Update backend files and makefiles for apr 1.4.8 -> 1.5.1

10 years agoMerge apr-1.4.8 -> apr-1.5.1 and update.
peter [Tue, 27 May 2014 07:15:14 +0000 (07:15 +0000)]
Merge apr-1.4.8 -> apr-1.5.1 and update.

10 years agoVendor import apr-1.5.1
peter [Tue, 27 May 2014 07:00:33 +0000 (07:00 +0000)]
Vendor import apr-1.5.1

10 years agoXr bktr.4
kevlo [Tue, 27 May 2014 06:35:36 +0000 (06:35 +0000)]
Xr bktr.4

10 years agoMerge svn-1.8.8 -> 1.8.9
peter [Tue, 27 May 2014 04:59:53 +0000 (04:59 +0000)]
Merge svn-1.8.8 -> 1.8.9

10 years agoUpdate serf 1.3.4 -> 1.3.5
peter [Tue, 27 May 2014 04:52:32 +0000 (04:52 +0000)]
Update serf 1.3.4 -> 1.3.5

10 years agoEmphasis on 'do not' and 'complement' in the strcspn(3)
allanjude [Tue, 27 May 2014 04:30:56 +0000 (04:30 +0000)]
Emphasis on 'do not' and 'complement' in the strcspn(3)
Replace literal parentheses with .Po/.Pc

Approved by: wblock (mentor)

10 years agoAdd segment protection and limits violation checks in vie_calculate_gla()
neel [Tue, 27 May 2014 04:26:22 +0000 (04:26 +0000)]
Add segment protection and limits violation checks in vie_calculate_gla()
for 32-bit x86 guests.

Tested using ins/outs executed in a FreeBSD/i386 guest.

10 years agoGarbage-collect a couple of unused identifiers.
markj [Tue, 27 May 2014 02:00:43 +0000 (02:00 +0000)]
Garbage-collect a couple of unused identifiers.

MFC after: 3 days

10 years agoRemove r264317 by accident.
kevlo [Tue, 27 May 2014 01:47:23 +0000 (01:47 +0000)]
Remove r264317 by accident.

Spotted by: Kuan-Chung Chiu

10 years agoLanguage cleanup.
brueffer [Mon, 26 May 2014 19:02:34 +0000 (19:02 +0000)]
Language cleanup.

Reviewed by: mav, bcr, wblock
MFC after: 1 week

10 years agoFix issue with restarting an "insb/insw/insl" instruction because of a page
neel [Mon, 26 May 2014 18:21:08 +0000 (18:21 +0000)]
Fix issue with restarting an "insb/insw/insl" instruction because of a page
fault on the destination buffer.

Prior to this change a page fault would be detected in vm_copyout(). This
was done after the I/O port access was done. If the I/O port access had
side-effects (e.g. reading the uart FIFO) then restarting the instruction
would result in incorrect behavior.

Fix this by validating the guest linear address before doing the I/O port
emulation. If the validation results in a page fault exception being injected
into the guest then the instruction can now be restarted without any
side-effects.

10 years agoRework the Ti GPIO driver to work on multiple SoCs. At the moment it could
andrew [Mon, 26 May 2014 18:02:36 +0000 (18:02 +0000)]
Rework the Ti GPIO driver to work on multiple SoCs. At the moment it could
work with OMAP4 and AM335x without needing to recompile.

Reviewed by: loos

10 years agoNote proper revision number for sendmail 8.14.9 merge.
gshapiro [Mon, 26 May 2014 15:54:31 +0000 (15:54 +0000)]
Note proper revision number for sendmail 8.14.9 merge.

10 years agoprintf(1): add tests for warn about incomplete uses n$
pfg [Mon, 26 May 2014 15:08:39 +0000 (15:08 +0000)]
printf(1): add tests for  warn about incomplete uses n$

Submitted by: jilles
MFC after: 2 weeks

10 years agoprintf(1): warn about incomplete uses n$
pfg [Mon, 26 May 2014 14:57:47 +0000 (14:57 +0000)]
printf(1): warn about incomplete uses n$

Reviewed by: jilles
Obtained from: Illumos
MFC after: 2 weeks

10 years agoe1000: add missing braces
eadler [Mon, 26 May 2014 02:19:50 +0000 (02:19 +0000)]
e1000: add missing braces

Obtained from: DragonFlyBSD

10 years agoAdd the clang patch for r266674.
dim [Sun, 25 May 2014 19:28:34 +0000 (19:28 +0000)]
Add the clang patch for r266674.

10 years agoPull in r209489 from upstream clang trunk (by Akira Hatanaka):
dim [Sun, 25 May 2014 19:22:28 +0000 (19:22 +0000)]
Pull in r209489 from upstream clang trunk (by Akira Hatanaka):

  Fix a bug in xmmintrin.h.

  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
  that reads two __m64 values and packs four 32-bit values into four 16-bit
  values.

  <rdar://problem/16873717>

MFC after: 3 days