]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoSave the registers at the correct offsets.
jhibbits [Wed, 19 Aug 2015 06:07:32 +0000 (06:07 +0000)]
Save the registers at the correct offsets.

When merging the AIM and BookE trap.c files, the offsets for BookE's setfault
inadvertantly got munged.

9 years agoAdd required foo_if.h files to SRCS to fix build errors.
ian [Wed, 19 Aug 2015 02:37:30 +0000 (02:37 +0000)]
Add required foo_if.h files to SRCS to fix build errors.

Pointed out by:       gjb
Pointy hat to:       ian

9 years agoExpand the decoding of kevent structures.
jhb [Wed, 19 Aug 2015 01:44:56 +0000 (01:44 +0000)]
Expand the decoding of kevent structures.
- Print the ident value as decimal instead of hexadecimal for filter types
  that use "small" values such as file descriptors and PIDs.
- Decode NOTE_* flags in the fflags field of kevents for several system
  filter types.

9 years agoChange the argument formatting function to use a stdio FILE object opened
jhb [Wed, 19 Aug 2015 00:49:50 +0000 (00:49 +0000)]
Change the argument formatting function to use a stdio FILE object opened
with open_memstream() to build the string for each argument.  This allows
for more complicated argument building without resorting to intermediate
malloc's, etc.

Related, the strsig*() functions no longer return allocated strings but
use a static global buffer instead.

9 years agoFix minor malloc regressions.
jasone [Wed, 19 Aug 2015 00:06:46 +0000 (00:06 +0000)]
Fix minor malloc regressions.

- Use _Bool rather than bool to resolve missing type errors in malloc_np.h.
- Fix malloc manual page #include documentation.
- Add *allocm manual pages to obsolete files.

Submitted by: jbeich

9 years ago - ANSIfy
delphij [Tue, 18 Aug 2015 22:37:25 +0000 (22:37 +0000)]
 - ANSIfy
 - Remove the redundant _PATH_RSH definition (paths.h at r96194);
 - Use pid_t for PIDs
 - Note that we are at the same level of OpenBSD's counterpart of
   revision 1.7 (r94757).

No functional changes.

MFC after: 2 weeks

9 years agoFix the use of plural in two cases that I missed on r285784.
loos [Tue, 18 Aug 2015 21:37:14 +0000 (21:37 +0000)]
Fix the use of plural in two cases that I missed on r285784.

This should cause no functional change.

9 years agoAdd the GPIO driver for the ADI Engineering RCC-VE and RCC-DFF/DFFv2.
loos [Tue, 18 Aug 2015 21:05:56 +0000 (21:05 +0000)]
Add the GPIO driver for the ADI Engineering RCC-VE and RCC-DFF/DFFv2.

This driver allows read the software reset switch state and control the
status LEDs.

The GPIO pins have their direction (input/output) locked down to prevent
possible short circuits.

Note that most people get a reset button that is a hardware reset.  The
software reset button is available on boards from Netgate.

Sponsored by: Rubicon Communications (Netgate)

9 years agoDefine CPU_SPINWAIT as cpu_spinwait().
jasone [Tue, 18 Aug 2015 20:42:08 +0000 (20:42 +0000)]
Define CPU_SPINWAIT as cpu_spinwait().

Submitted by: cem

9 years agoUpdate sysbuild to new ports infrastructure.
phk [Tue, 18 Aug 2015 20:19:48 +0000 (20:19 +0000)]
Update sysbuild to new ports infrastructure.

9 years agowordexp(3): Update man page for no longer using the wordexp builtin.
jilles [Tue, 18 Aug 2015 20:13:36 +0000 (20:13 +0000)]
wordexp(3): Update man page for no longer using the wordexp builtin.

9 years agoFix multiple integer overflows in expat.
delphij [Tue, 18 Aug 2015 19:30:04 +0000 (19:30 +0000)]
Fix multiple integer overflows in expat.

Security: CVE-2015-1283
Security: FreeBSD-SA-15:20.expat

9 years agoSet curvnet context inside the RPC code in more places.
delphij [Tue, 18 Aug 2015 18:12:46 +0000 (18:12 +0000)]
Set curvnet context inside the RPC code in more places.

Reviewed by: melifaro
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3398

9 years agoCorrect All Saints' day.
pfg [Tue, 18 Aug 2015 15:50:02 +0000 (15:50 +0000)]
Correct All Saints' day.

Thanks to: zec
X-MFC with: r286891

9 years agoServe /etc/eui64 via NIS.
asomers [Tue, 18 Aug 2015 15:33:23 +0000 (15:33 +0000)]
Serve /etc/eui64 via NIS.

The C library already knows how to lookup eui64 entries from NIS. For
example, fwcontrol(8) does it. But /var/yp/Makefile.dist doesn't build the
eui64 maps, and ypinit(8) doesn't push them to slaves. This change fixes
that.

Reviewed by: brooks, wblock
MFC after: 2 weeks
Sponsored by: SpectraLogic Corp
Differential Revision: https://reviews.freebsd.org/D3404

9 years agoCalendar: add a few more dates to the Christian calendar
pfg [Tue, 18 Aug 2015 15:11:41 +0000 (15:11 +0000)]
Calendar: add a few more dates to the Christian calendar

The many christian denominations have different dates for their
celebrations and controversies are likely to be always.

These are well established and happen to be holidays in many
Catholic countries.

MFC after: 1 month

9 years agoAdd ichwd TCO version 3 support (Bay Trail / Rangeley...)
fabient [Tue, 18 Aug 2015 14:54:29 +0000 (14:54 +0000)]
Add ichwd TCO version 3 support (Bay Trail / Rangeley...)

Reviewed by: jhb
Obtained from: Cas-well
Sponsored by: Stormshield

9 years agoUsing consistent coding style to deal with error inside the loop.
avatar [Tue, 18 Aug 2015 13:16:23 +0000 (13:16 +0000)]
Using consistent coding style to deal with error inside the loop.

MFC after: 1 week

9 years agoUsing the error return code documented in the comment.
avatar [Tue, 18 Aug 2015 13:16:06 +0000 (13:16 +0000)]
Using the error return code documented in the comment.

Though there is no direct midi_uninit() caller amongst existing drivers
at this moment, a quick experiment indicates that EBUSY gives users more
precise error message once drivers start to honour this result.  For example,
emu_midi_detach() should check the result of mpu401_uninit() and block
module unloading if there is any MIDI I/O in progress.

MFC after: 2 weeks

9 years agoFixing typo as well as improving readability of a few comments.
avatar [Tue, 18 Aug 2015 12:50:46 +0000 (12:50 +0000)]
Fixing typo as well as improving readability of a few comments.

MFC after: 3 days

9 years agoRIP Stefan Farfeleder (stefanf), committer since 2004.
brueffer [Tue, 18 Aug 2015 12:27:21 +0000 (12:27 +0000)]
RIP Stefan Farfeleder (stefanf), committer since 2004.

You will be missed!

9 years agoCorrect comment typo noted by erik
emaste [Tue, 18 Aug 2015 11:52:45 +0000 (11:52 +0000)]
Correct comment typo noted by erik

9 years agocallout_stop() should return 0 (fail) when the callout is currently
jch [Tue, 18 Aug 2015 10:15:09 +0000 (10:15 +0000)]
callout_stop() should return 0 (fail) when the callout is currently
being serviced and indeed unstoppable.

A scenario to reproduce this case is:

- the callout is being serviced and at same time,
- callout_reset() is called on this callout that sets
  the CALLOUT_PENDING flag and at same time,
- callout_stop() is called on this callout and returns 1 (success)
  even if the callout is indeed currently running and unstoppable.

This issue was caught up while making r284245 (D2763) workaround, and
was discussed at BSDCan 2015.  Once applied the r284245 workaround
is not needed anymore and will be reverted.

Differential Revision: https://reviews.freebsd.org/D3078
Reviewed by: jhb
Sponsored by: Verisign, Inc.

9 years agoRemove register dump from arm64 el0 unknown exception
emaste [Tue, 18 Aug 2015 10:07:03 +0000 (10:07 +0000)]
Remove register dump from arm64 el0 unknown exception

An exception with an unknown reasion is the expected result of the
attempted execution of an instruction bit pattern that has no allocated
instruction.

Sponsored by: The FreeBSD Foundation

9 years agoRe-add LG_SIZEOF_PTR definition for __aarch64__.
jasone [Tue, 18 Aug 2015 09:09:27 +0000 (09:09 +0000)]
Re-add LG_SIZEOF_PTR definition for __aarch64__.

This definition was erroneously removed during the 4.0.0 import.

9 years agoBump __FreeBSD_version for the jemalloc 4.0.0 import.
jasone [Tue, 18 Aug 2015 08:29:13 +0000 (08:29 +0000)]
Bump __FreeBSD_version for the jemalloc 4.0.0 import.

9 years agoMake clear that TIME_WAIT timeout expiration is managed solely by
jch [Tue, 18 Aug 2015 08:27:26 +0000 (08:27 +0000)]
Make clear that TIME_WAIT timeout expiration is managed solely by
tcp_tw_2msl_scan().

Sponsored by: Verisign, Inc.

9 years agoAdd missing sdallocx updates and remove *allocm manpage links.
jasone [Tue, 18 Aug 2015 08:18:28 +0000 (08:18 +0000)]
Add missing sdallocx updates and remove *allocm manpage links.

Submitted by: jbeich

9 years agoFix build failure due to missing CPU_SPINWAIT definition.
jasone [Tue, 18 Aug 2015 08:10:46 +0000 (08:10 +0000)]
Fix build failure due to missing CPU_SPINWAIT definition.

9 years agoAdd jemalloc support for 8 KiB, 16 KiB, and 64 KiB pages.
jasone [Tue, 18 Aug 2015 06:28:37 +0000 (06:28 +0000)]
Add jemalloc support for 8 KiB, 16 KiB, and 64 KiB pages.

9 years agoFix panic when handling non-inet arp message introduced in r286825.
melifaro [Tue, 18 Aug 2015 06:16:19 +0000 (06:16 +0000)]
Fix panic when handling non-inet arp message introduced in r286825.

Submitted by: delphij

9 years agoAdd 24 more page table pages we allocate on boot-up. 16MB slop
marcel [Tue, 18 Aug 2015 01:53:41 +0000 (01:53 +0000)]
Add 24 more page table pages we allocate on boot-up. 16MB slop
is a little tight in and by itself, but severily insufficient
when one needs to map a large frame buffer as part of console
initialization. 64MB slop should be enough for a while. As an
example: a 15" MacBook Pro with retina display needs ~28MB of
KVA for the frame buffer.

PR: 193745

9 years agoSupport frame buffers that are larger than the default screen
marcel [Tue, 18 Aug 2015 00:47:02 +0000 (00:47 +0000)]
Support frame buffers that are larger than the default screen
size as defined by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT
(at this time 2048x1200). The default is really a max. We cap
the height and width to those defaults and position the screen
in the center of the frame buffer.

Ideally we use a bigger font to utility the entire real estate
that is the frame buffer, but that's seen as an improvement over
making it work first.

PR: 193745

9 years agoUpdate jemalloc to version 4.0.0.
jasone [Tue, 18 Aug 2015 00:21:25 +0000 (00:21 +0000)]
Update jemalloc to version 4.0.0.

9 years agoConvert more ifp->if_softc -> ic->ic_softc.
adrian [Mon, 17 Aug 2015 23:44:38 +0000 (23:44 +0000)]
Convert more ifp->if_softc -> ic->ic_softc.

These should be a big no-op.

Tested:

* make universe

9 years agoMigrate ifp->if_softc -> ic->ic_softc.
adrian [Mon, 17 Aug 2015 23:35:31 +0000 (23:35 +0000)]
Migrate ifp->if_softc -> ic->ic_softc.

Tested:

* Lenovo T400 (Intel 5300)
* make universe

9 years agoOn arm64 disable three tests that hang or panic
emaste [Mon, 17 Aug 2015 23:19:36 +0000 (23:19 +0000)]
On arm64 disable three tests that hang or panic

Each issue has a PR open to track. This workaround allows us to run the
tests to investigate the failures and avoid any new regressions.

PR: 202304, 202305, 202307
Reviewed by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3378

9 years agoFix the copy of addresses passed from userland in table replace command.
loos [Mon, 17 Aug 2015 23:03:54 +0000 (23:03 +0000)]
Fix the copy of addresses passed from userland in table replace command.

The size2 is the maximum userland buffer size (used when the addresses are
copied back to userland).

Obtained from: pfSense
MFC after: 3 days
Sponsored by: Rubicon Communications (Netgate)

9 years agoUse an xlat table and xlookup() instead of a home-rolled version for the
jhb [Mon, 17 Aug 2015 19:08:48 +0000 (19:08 +0000)]
Use an xlat table and xlookup() instead of a home-rolled version for the
sigprocmask operation type.

9 years agoTidy the linux_socketcall decoding:
jhb [Mon, 17 Aug 2015 18:47:39 +0000 (18:47 +0000)]
Tidy the linux_socketcall decoding:
- Don't exit if get_struct() fails, instead print the raw pointer value to
  match all other argument decoding cases.
- Use an xlat table instead of a home-rolled switch for the operation name.
- Display the nested socketcall args structure as a structure instead of as
  two inline arguments.

9 years agoXEN/amd64 may initiate i/o over the pages not mapped by the direct
kib [Mon, 17 Aug 2015 18:42:45 +0000 (18:42 +0000)]
XEN/amd64 may initiate i/o over the pages not mapped by the direct
map.  Handle busdma bouncing and ata PIO accesses by using global
frame used by the current CPU locally for the duration of
pmap_quick_enter/remove_page().  A spin mutex protects the concurent
frame use and prevents thread migration.

Noted by: royger
Reviewed by: alc, jah, royger (previous version)
Sponsored by: The FreeBSD Foundation

9 years agoSome cleanups to make the style of pmap_quick_enter_page() and pmap_quick_remove_page...
jah [Mon, 17 Aug 2015 18:28:40 +0000 (18:28 +0000)]
Some cleanups to make the style of pmap_quick_enter_page() and pmap_quick_remove_page() in arm/pmap-v6-new.c more consistent with the rest of the file.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
Approved by: kib (mentor)

9 years agoDecode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
jhb [Mon, 17 Aug 2015 17:57:01 +0000 (17:57 +0000)]
Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
socket type.

9 years ago- Decode the arguments for several signal-related system calls: sigpending,
jhb [Mon, 17 Aug 2015 17:52:28 +0000 (17:52 +0000)]
- Decode the arguments for several signal-related system calls: sigpending,
  sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and
  thr_kill.
- Print signal sets as a structure (with {}'s) and in particular use this to
  differentiate empty sets from a NULL pointer.
- Decode arguments for some other system calls: issetugid, pipe2, sysarch
  (operations are only decoded for amd64 and i386), and thr_self.

9 years agogpioled(4) depends on gpiobus.
loos [Mon, 17 Aug 2015 17:09:57 +0000 (17:09 +0000)]
gpioled(4) depends on gpiobus.

This fixes the loading of gpioled as a module.

Sponsored by: Rubicon Communications (Netgate)

9 years agoFix the build of gpiobus as a module.
loos [Mon, 17 Aug 2015 17:01:26 +0000 (17:01 +0000)]
Fix the build of gpiobus as a module.

Add the missing newbus interfaces and gpioc, which is part of basic gpiobus
framework.

Sponsored by: Rubicon Communications (Netgate)

9 years agoFix a few bugs when gpiobus is detaching:
loos [Mon, 17 Aug 2015 16:51:37 +0000 (16:51 +0000)]
Fix a few bugs when gpiobus is detaching:

 - Detach the gpiobus and the gpioc devices from the GPIO controller.

 - Fix the leak of gpiobus IRQ rman(9) region descriptor.

 - Fix the leak of child ivars and IRQ resource list.

While here return NULL (instead of 0) for a device_t that fails to allocate
the ivar memory.

Tested with gpiobus built as a module.

Sponsored by: Rubicon Communications (Netgate)

9 years agoDon't forget to invoke pre_execve() and post_execve().
ed [Mon, 17 Aug 2015 13:07:12 +0000 (13:07 +0000)]
Don't forget to invoke pre_execve() and post_execve().

CloudABI's proc_exec() was implemented before r282708 introduced
pre_execve() and post_execve(). Sync up by adding these missing calls.

9 years agoSeparate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP
emaste [Mon, 17 Aug 2015 10:48:55 +0000 (10:48 +0000)]
Separate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP

For most cases they are equivalent, but BINUTILS_BOOTSTRAP is a
BROKEN_OPTION on arm64 as the in-tree GNU binutils do not support it,
so we need a separate internal flag for ELF Tool Chain.

Reviewed by: andrew, brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3381

9 years agoBelatedly fix documentation on which interface to use as argument.
glebius [Mon, 17 Aug 2015 09:18:54 +0000 (09:18 +0000)]
Belatedly fix documentation on which interface to use as argument.

9 years agoAdd DEV_RANDOM pseudo-option and use it to "include out" random(4)
markm [Mon, 17 Aug 2015 07:36:12 +0000 (07:36 +0000)]
Add DEV_RANDOM pseudo-option and use it to "include out" random(4)
if desired.

Retire randomdev_none.c and introduce random_infra.c for resident
infrastructure. Completely stub out random(4) calls in the "without
DEV_RANDOM" case.

Add RANDOM_LOADABLE option to allow loadable Yarrow/Fortuna/LocallyWritten
algorithm.  Add a skeleton "other" algorithm framework for folks
to add their own processing code. NIST, anyone?

Retire the RANDOM_DUMMY option.

Build modules for Yarrow, Fortuna and "other".

Use atomics for the live entropy rate-tracking.

Convert ints to bools for the 'seeded' logic.

Move _write() function from the algorithm-specific areas to randomdev.c

Get rid of reseed() function - it is unused.

Tidy up the opt_*.h includes.

Update documentation for random(4) modules.

Fix test program (reviewers, please leave this).

Differential Revision:    https://reviews.freebsd.org/D3354
Reviewed by:              wblock,delphij,jmg,bjk
Approved by:              so (/dev/random blanket)

9 years agoAdd simple (no-op) emulations for the CHECK_POWER_MODE,
grehan [Mon, 17 Aug 2015 05:59:36 +0000 (05:59 +0000)]
Add simple (no-op) emulations for the CHECK_POWER_MODE,
READ_VERIFY and READ_VERIFY_EXT commands.

Reviewed by: mav

9 years agoAdd define for SATA Check-Power-Mode command, 0xe5.
grehan [Mon, 17 Aug 2015 05:56:41 +0000 (05:56 +0000)]
Add define for SATA Check-Power-Mode command, 0xe5.

9 years agoso_vnet is constant after creation and no locking is necessary,
delphij [Mon, 17 Aug 2015 05:53:37 +0000 (05:53 +0000)]
so_vnet is constant after creation and no locking is necessary,
document this fact.

(netmap have an assignment too but that socket object is on stack).

MFC after: 2 weeks

9 years agoRemove most of the references of ifp->if_softc and replace with
adrian [Mon, 17 Aug 2015 02:04:11 +0000 (02:04 +0000)]
Remove most of the references of ifp->if_softc and replace with
references to ic->ic_softc.

This is in preparation for gleb's ifnet work.

Tested:

* ath(4), STA mode
* ath(4), hostap mode
* make universe

9 years agoUse arc4random_buf(). While there, unifdef the code for HAVE_ARC4RANDOM.
delphij [Sun, 16 Aug 2015 23:23:58 +0000 (23:23 +0000)]
Use arc4random_buf().  While there, unifdef the code for HAVE_ARC4RANDOM.

MFC after: 2 weeks

9 years agoBump all copywrite dates to 2015
sbruno [Sun, 16 Aug 2015 20:13:58 +0000 (20:13 +0000)]
Bump all copywrite dates to 2015

Differential Revision: https://reviews.freebsd.org/D3160
Submitted by: erj
MFC after: 2 weeks
Sponsored by: Intel Corportation

9 years agoe1000/if_lem.c bump to 1.1.0
sbruno [Sun, 16 Aug 2015 20:10:43 +0000 (20:10 +0000)]
e1000/if_lem.c bump to 1.1.0
- deprecate fbsd 8

Differential Revision: https://reviews.freebsd.org/D3164
Submitted by: erj
MFC after: 2 weeks
Sponsored by: Intel Corporation

9 years agoIncrease EM_MAX_SCATTER to 64 such that the size of em_xmit()::segs[EM_MAX_SCATTER]
sbruno [Sun, 16 Aug 2015 19:43:44 +0000 (19:43 +0000)]
Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::segs[EM_MAX_SCATTER]
doesn't get overrun by things like NFS that can and do shove more than 32 segs when
being used with em(4) and TSO4.

Update tso handling code in em_xmit() with update from jhb@ in email thread:
https://lists.freebsd.org/pipermail/freebsd-net/2014-July/039306.html

set ifp->if_hw_tsomax, ifp->if_hw_tsomaxsegcount & ifp->if_hw_tsomaxsegsize
to appropriate values.

Define a TSO workaround "magic" number  of 4 that is used to avoid an
alignment issue in hardware.

Change a couple of integer values that were used as booleans to actual
bool types.

Ensure that em_enable_intr() enables the appropriate mask of interrupts
and not just a hardcoded define of values.

PR: 200221 199174 195078
Differential Revision: https://reviews.freebsd.org/D3192
Reviewed by: erj jhb hiren
MFC after: 2 weeks
Sponsored by: Limelight Networks

9 years agowordexp(): Stop using the undocumented wordexp builtin.
jilles [Sun, 16 Aug 2015 19:42:15 +0000 (19:42 +0000)]
wordexp(): Stop using the undocumented wordexp builtin.

The functionality of the wordexp builtin is easily replaced using normal
shell code, although performance is slightly worse.

This does not mean that wordexp() will remain shell-independent -- a fully
reliable implementation of WRDE_NOCMD is really only possible using
extensions to the shell, or by adding much of the shell's code to libc.

9 years agoAdd capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain...
sbruno [Sun, 16 Aug 2015 19:06:23 +0000 (19:06 +0000)]
Add capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain adatpers.
Linux has been doing the exact same thing since 2008

https://github.com/torvalds/linux/commit/eb7c3adb1ca92450870dbb0d347fc986cd5e2af4

PR: 161277
Differential Revision: https://reviews.freebsd.org/D3282
Submitted by: Fravadona@gmail.com
Reviewed by: erj wblock
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks

9 years agoAs another piece of PG_CACHE page elimination, remove an LRU-defeating call
alc [Sun, 16 Aug 2015 17:07:53 +0000 (17:07 +0000)]
As another piece of PG_CACHE page elimination, remove an LRU-defeating call
to vm_page_try_to_cache() from vm_pageout_flush().  Other changes, most
recently r286814, have made this call unnecessary.

Reviewed by: kib
Discussed with: jeff
Tested by: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoPick UINT_MAX / 100 as an upperbound.
ed [Sun, 16 Aug 2015 13:59:11 +0000 (13:59 +0000)]
Pick UINT_MAX / 100 as an upperbound.

The fix that I applied in r286798 is already good, but it assumes that
sizeof(int) > sizeof(short). Express the upperbound in terms of
UINT_MAX. By dividing that by 100, we're sure that the resulting value
is never larger than approximately UINT_MAX / 10, which is safe.

PR: 202326
Discussed with: kcwu csie org
MFC after: 1 month

9 years agosh: Backslash-newline should not affect field splitting in read builtin.
jilles [Sun, 16 Aug 2015 12:57:17 +0000 (12:57 +0000)]
sh: Backslash-newline should not affect field splitting in read builtin.

This was originally broken in r212339 in 2010.

9 years agoSplit arpresolve() into fast/slow path.
melifaro [Sun, 16 Aug 2015 12:23:58 +0000 (12:23 +0000)]
Split arpresolve() into fast/slow path.

This change isolates the most common case (e.g. successful lookup)
  from more complicates scenarios. It also (tries to) make code
  more simple by avoiding retry: cycle.

The actual goal is to prepare code to the upcoming change that will
  allow LL address retrieval without acquiring LLE lock at all.

Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D3383

9 years agoRegen src.conf.5 per r286822
ngie [Sun, 16 Aug 2015 10:10:58 +0000 (10:10 +0000)]
Regen src.conf.5 per r286822

9 years agoReap MK_SYSINSTALL
ngie [Sun, 16 Aug 2015 09:51:24 +0000 (09:51 +0000)]
Reap MK_SYSINSTALL

It's no longer in use in the tree (most likely missed when sade/sysinstall
were removed)

MFC after: 1 week

9 years agoSRR1 and DSISR aren't pointers, print them as integers.
jhibbits [Sun, 16 Aug 2015 01:08:59 +0000 (01:08 +0000)]
SRR1 and DSISR aren't pointers, print them as integers.

9 years agoSmall addition to r286814.
mav [Sat, 15 Aug 2015 22:55:32 +0000 (22:55 +0000)]
Small addition to r286814.

Submitted by: bz
MFC after: 2 weeks

9 years agoMake dtb file configurable via loader(8) variable. ubldr already checks
gonzo [Sat, 15 Aug 2015 21:47:07 +0000 (21:47 +0000)]
Make dtb file configurable via loader(8) variable. ubldr already checks
"fdt_file" and "fdtfile" U-Boot variables. Add one more check for
"fdt_file" loader(8) variable.

loader(8) variable takes precedence over u-boot env one

9 years agoRemove UMA allocation of ATA requests.
mav [Sat, 15 Aug 2015 21:46:02 +0000 (21:46 +0000)]
Remove UMA allocation of ATA requests.

After CAM replaced old ATA stack, this driver processes no more then one
request at a time per channel.  Using UMA after that is overkill, so
replace it with simple preallocation of one request per channel.

MFC after: 2 weeks

9 years agobsd.lib.mk has to be included after MLINKS assignment
antoine [Sat, 15 Aug 2015 19:00:38 +0000 (19:00 +0000)]
bsd.lib.mk has to be included after MLINKS assignment

9 years agoPolish sizes processing.
mav [Sat, 15 Aug 2015 18:22:16 +0000 (18:22 +0000)]
Polish sizes processing.

9 years agoImprove support for Macs that have a stride not equal to the
marcel [Sat, 15 Aug 2015 16:13:28 +0000 (16:13 +0000)]
Improve support for Macs that have a stride not equal to the
horizonal resolution (width). In those cases fb_bpp ended up
completely wrong -- as in 6 bytes per pixel or something like
that. Since we already have a way to calculate fb_depth given
the masks and fb_bpp is effectively the same as fb_depth, all
we need to do is make sure fb_bpp is rounded to the next
multiple of the number of bits in a byte -- we assume we can
divide by the number of bits in a byte throughout vt(4).
While here:
-   simplify how we calculate fb_depth.
-   use fb_bpp instead of fb_depth to calculate fb_stride;
    we know we can divide fb_bpp.
-   don't limit fb_width and fb_height by VT_FB_DEFAULT_WIDTH
    and VT_FB_DEFAULT_HEIGHT (resp.). Those constants have
    not relation to the size of the frame buffer.

This at least fixes "lower-resolution" Macs. We're talking
1280x1024 or so. There still is a problem with 27" Macs,
which typically have a horizontal resolution over 2K.

PR: 193745 (partial)
Ok'd by: emaste@

9 years agoImprove the VT initialization message: have it say what the
marcel [Sat, 15 Aug 2015 15:44:09 +0000 (15:44 +0000)]
Improve the VT initialization message: have it say what the
resolution is. For text mode this is the number of columns
by the number of rows. Include the name of the driver in a
much less prominent way.

9 years agoMove "ioctl" CAM frontend into separate file.
mav [Sat, 15 Aug 2015 15:42:21 +0000 (15:42 +0000)]
Move "ioctl" CAM frontend into separate file.

It has nothing to share with too huge ctl.c other then device descriptor,
but even that may be counted as design error that may be fixed later.
At some point we may even want to have several ioctl ports.

9 years agoDrop "internal" CTL frontend.
mav [Sat, 15 Aug 2015 13:34:38 +0000 (13:34 +0000)]
Drop "internal" CTL frontend.

Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places..

9 years agoUpdate to use the latest version of the PCI IDs Repository.
bapt [Sat, 15 Aug 2015 12:55:06 +0000 (12:55 +0000)]
Update to use the latest version of the PCI IDs Repository.

MFC after: 1 week

9 years agoFixes for HIGH speed ISOCHRONOUS traffic. HS ISOCHRONOUS traffic at
hselasky [Sat, 15 Aug 2015 12:06:15 +0000 (12:06 +0000)]
Fixes for HIGH speed ISOCHRONOUS traffic. HS ISOCHRONOUS traffic at
intervals less than 250us was not handled properly. Add support for
high-bandwidth ISOCHRONOUS packets. USB webcams, USB audio and USB DVB
devices are expected to work better. High-bandwidth INTERRUPT
endpoints is not yet supported.

MFC after: 2 weeks

9 years agoFix race in USB PF which can happen if we stop tracing exactly when
hselasky [Sat, 15 Aug 2015 09:00:36 +0000 (09:00 +0000)]
Fix race in USB PF which can happen if we stop tracing exactly when
the kernel is tapping an USB transfer. This leads to a NULL pointer
access. The solution is to only trace while the USB bus lock is
locked.

MFC after: 2 weeks

9 years agoStop parsing digits if the value already exceeds USHRT_MAX.
ed [Sat, 15 Aug 2015 08:42:33 +0000 (08:42 +0000)]
Stop parsing digits if the value already exceeds USHRT_MAX.

There is no need for us to support parsing values that are larger than
the maximum terminal window size. In this case that would be the maximum
of unsigned short.

The problem with parsing larger values is that they can cause integer
overflows when adjusting the cursor position, leading to all sorts of
failing assertions.

PR: 202326
Reported by: kcwu csie org
MFC after: 1 month

9 years agoAdd missing 'static' keyword to keep build at WARNS=6 happy.
ed [Sat, 15 Aug 2015 08:29:13 +0000 (08:29 +0000)]
Add missing 'static' keyword to keep build at WARNS=6 happy.

MFC after: 1 month

9 years agoAdd support for the arrays in nvlist library.
oshogbo [Sat, 15 Aug 2015 06:34:49 +0000 (06:34 +0000)]
Add support for the arrays in nvlist library.

- Add
  nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
  descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_array_next field to the nvlist structure.
  If an array is added by the nvlist_{move,add}_nvlist_array function
  this field will contains next element in the array.
- Add the nitems field to the nvpair and nvpair_header structure.
  This field contains number of elements in the array.
- Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of
  an array.
- Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only
  on packing/unpacking.
- Add new API for traversing arrays (nvlist_get_array_next).
- Add the nvlist_get_pararr function which combines the
  nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in
  the array it will return next element from array. If nvlist is last
  element in array or it isn't in array it will return his
  container (parent). This function should simplify traveling over nvlist.
- Add tests for new features.
- Add documentation for new functions.
- Add my copyright.
- Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.

PR: 191083
Reviewed by: allanjude (doc)
Approved by: pjd (mentor)

9 years agoRemove automatic checkout feature.
delphij [Sat, 15 Aug 2015 00:42:33 +0000 (00:42 +0000)]
Remove automatic checkout feature.

Obtained from: DragonFly via OpenBSD
Relnotes: yes
MFC: never

9 years agosys/conf: pass NMFLAGS to nm(1) via genassym.sh.
rpaulo [Fri, 14 Aug 2015 22:58:32 +0000 (22:58 +0000)]
sys/conf: pass NMFLAGS to nm(1) via genassym.sh.

9 years agogenassym.sh: call nm(1) with NMFLAGS.
rpaulo [Fri, 14 Aug 2015 22:57:13 +0000 (22:57 +0000)]
genassym.sh: call nm(1) with NMFLAGS.

9 years agobsd.lib.mk: pass NMFLAGS to the lorder script.
rpaulo [Fri, 14 Aug 2015 22:55:23 +0000 (22:55 +0000)]
bsd.lib.mk: pass NMFLAGS to the lorder script.

9 years agoIntroduce a new make variable: NMFLAGS.
rpaulo [Fri, 14 Aug 2015 22:54:52 +0000 (22:54 +0000)]
Introduce a new make variable: NMFLAGS.

As the name indicates, these are flags to pass to nm(1).  The newer
binutils have a plugin mechanism so, to build something with LLVM's
LTO, we need to pass flags to nm(1).  This commit also extends
lorder(1) to pass NMFLAGS to nm(1).

9 years agoFor the case where an NFSv4.1 ExchangeID operation has the client identifier
rmacklem [Fri, 14 Aug 2015 22:02:14 +0000 (22:02 +0000)]
For the case where an NFSv4.1 ExchangeID operation has the client identifier
that already has a confirmed ClientID, the nfsrv_setclient() function would
not fill in the clientidp being returned. As such, the value of ClientID
returned would be whatever garbage was on the stack.
An NFSv4.1 client would not normally do this, but it appears that it can
happen for certain Linux clients. When it happens, the client persistently
retries the ExchangeID and Create_session after Create_session fails when
it uses the bogus clientid. With this patch, the correct clientid is replied.
This problem was identified in a packet trace supplied by
Ahmed Kamal via email.

Reported by: email.ahmedkamal@googlemail.com
MFC after: 2 weeks

9 years agosh: When setting option via long name, don't go via letter.
jilles [Fri, 14 Aug 2015 21:44:15 +0000 (21:44 +0000)]
sh: When setting option via long name, don't go via letter.

Looking up the letter makes no sense and prevents adding options that only
have a long name, no letter.

9 years agoUse pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_...
jah [Fri, 14 Aug 2015 20:08:16 +0000 (20:08 +0000)]
Use pmap_quick_enter_page() to handle bouncing of unmapped buffers in the x86 busdma_bounce implementation.  Also treat user buffers as unmapped.
This allows two things:
1. Sync'ing bounced maps in non-sleepable contexts.  The physcopy* calls previously used could sleep on sf_buf operations in some cases.
2. Sync'ing user buffers outside the context of the owning process

Approved by: kib (mentor)

9 years agoRemove another remnant of PV domU support and assume that we always run
jhb [Fri, 14 Aug 2015 18:38:39 +0000 (18:38 +0000)]
Remove another remnant of PV domU support and assume that we always run
with an automatically translated physmap under XEN.

Reviewed by: royger (earlier version)
Differential Revision: https://reviews.freebsd.org/D3325

9 years agoReformat x86 bounce buffer synchronization code to reduce indentation. No functional...
jah [Fri, 14 Aug 2015 18:01:40 +0000 (18:01 +0000)]
Reformat x86 bounce buffer synchronization code to reduce indentation.  No functional change.

Approved by: kib (mentor)

9 years agoStop describing an acquire operation as a read barrier and a release
alc [Fri, 14 Aug 2015 17:49:03 +0000 (17:49 +0000)]
Stop describing an acquire operation as a read barrier and a release
operation as a write barrier.  That description has never been correct,
and it has caused confusion.  An acquire operation orders writes as well
as reads, and a release operation orders reads as well as writes.

Also, explicitly say that a thread doesn't see its own accesses being
reordered.  The reordering of a thread's accesses is only (potentially)
visible to another thread.  Thus, memory barriers need only be used to
control the ordering of accesses between threads, not within a thread.

Reviewed by: bde, kib
Discussed with: jhb
MFC after: 1 week

9 years agoUse simple fixed name strings for these timecounters and eventimers which
ian [Fri, 14 Aug 2015 16:48:07 +0000 (16:48 +0000)]
Use simple fixed name strings for these timecounters and eventimers which
are tied to fixed pieces of hardware; dynamic string formatting isn't needed.

9 years agoRemove a stale comment and clarify the original where it was taken from
pfg [Fri, 14 Aug 2015 14:58:04 +0000 (14:58 +0000)]
Remove a stale comment and clarify the original where it was taken from

The comment in the libc/sys symbol map referenced the generated symbols
for the syscall trampolines. Such comment was out of place in the secure
symbol map so remove the stale comment and attempt to clarify the old one
to avoid risks of confusion.

Pointed out by: kib

9 years agoAllow the path MTU to grow up to the outgoing interface MTU.
tuexen [Fri, 14 Aug 2015 14:26:13 +0000 (14:26 +0000)]
Allow the path MTU to grow up to the outgoing interface MTU.

MFC after: 3 days

9 years agoHandle NYET high speed tokens and predict NAK'ing is up next.
hselasky [Fri, 14 Aug 2015 14:20:10 +0000 (14:20 +0000)]
Handle NYET high speed tokens and predict NAK'ing is up next.

MFC after: 2 weeks

9 years agoUse __builtin_clzll to count the leading zero bits, the data is based on
andrew [Fri, 14 Aug 2015 14:17:04 +0000 (14:17 +0000)]
Use __builtin_clzll to count the leading zero bits, the data is based on
long long so __builtin_clz will return an incorrect value.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D3375

9 years agoMinor code refactor to avoid duplicating code.
hselasky [Fri, 14 Aug 2015 13:58:18 +0000 (13:58 +0000)]
Minor code refactor to avoid duplicating code.

MFC after: 2 weeks