]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAlias isinff to isinf on FreeBSD
ngie [Sun, 16 Nov 2014 20:37:46 +0000 (20:37 +0000)]
Alias isinff to isinf on FreeBSD

isinf on FreeBSD automatically picks the appropriate type per math.h

Sponsored by: EMC / Isilon Storage Division

9 years agoReset errno to 0 before running scalbn to be sure that the tested errno is
ngie [Sun, 16 Nov 2014 20:35:32 +0000 (20:35 +0000)]
Reset errno to 0 before running scalbn to be sure that the tested errno is
valid

Sponsored by: EMC / Isilon Storage Division

9 years agoSkip the long-double epsilon checks on FreeBSD/i386
ngie [Sun, 16 Nov 2014 20:34:46 +0000 (20:34 +0000)]
Skip the long-double epsilon checks on FreeBSD/i386

Sponsored by: EMC / Isilon Storage Division

9 years agoIndent a couple lines properly and expand a comment. No functional changes.
ian [Sun, 16 Nov 2014 20:34:14 +0000 (20:34 +0000)]
Indent a couple lines properly and expand a comment.  No functional changes.

9 years agoConvert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and
ngie [Sun, 16 Nov 2014 20:29:57 +0000 (20:29 +0000)]
Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and
Rename as lib/libc/stdio/fpclassify2_test

Sponsored by: EMC / Isilon Storage Division

9 years agoFlush out many more static binaries that can be used in a jail for building
sbruno [Sun, 16 Nov 2014 20:10:37 +0000 (20:10 +0000)]
Flush out many more static binaries that can be used in a jail for building
pkgs via poudriere.  This removes a significant amount of emulation speeding
up run times.

Phabric: D1172
Reviewed by: imp
MFC after: 2 weeks

9 years agoConvert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and
ngie [Sun, 16 Nov 2014 19:57:47 +0000 (19:57 +0000)]
Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and
rename as lib/libc/stdio/fmemopen2_test

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and
ngie [Sun, 16 Nov 2014 19:47:29 +0000 (19:47 +0000)]
Add freebsd-testing and myself to MAINTAINERS for contrib/netbsd-tests and
contrib/pjdfstest

9 years agoRevert r274585: rte lock is properly destroyed in uma dtor callback.
melifaro [Sun, 16 Nov 2014 18:15:23 +0000 (18:15 +0000)]
Revert r274585: rte lock is properly destroyed in uma dtor callback.

Pointed by: glebius

9 years agoFix r273112: do not turn DROP_EN by default.
melifaro [Sun, 16 Nov 2014 18:08:00 +0000 (18:08 +0000)]
Fix r273112: do not turn DROP_EN by default.

Due to adapter->hw.fc.requested_mode is filled with default value
after ixgbe_initialize_receive_units(), this leads to enabling
DROP_EN in most cases.

Tested by: ae
MFC after: 1 week

9 years agodrm/radeon: Lower priority of a message related to invalid EDID
dumbbell [Sun, 16 Nov 2014 17:53:48 +0000 (17:53 +0000)]
drm/radeon: Lower priority of a message related to invalid EDID

Like in r259717, the prority goes from "error" to "debug" to avoid
spamming logs when the connectors are polled.

PR: 194770
Submitted by: Larry Rosenman <ler@lerctr.org>
MFC after: 1 week

9 years agoMake witness happy: destroy rte lock before free.
melifaro [Sun, 16 Nov 2014 14:56:31 +0000 (14:56 +0000)]
Make witness happy: destroy rte lock before free.

MFC after: 2 weeks

9 years agoDefault to use 10 seconds as nap interval instead of 1.
delphij [Sun, 16 Nov 2014 09:44:30 +0000 (09:44 +0000)]
Default to use 10 seconds as nap interval instead of 1.

Previously, we have a nap interval of 1 second while we have a timeout of
128 seconds by default, which could be an overkill, and for some hardware
the patting action may be expensive.

Note that the choice of nap interval is still arbitrary.  We preferred
a safe value where even when the system is very heavily loaded, the
watchdog should not shoot the system down if it's not really hung.
According to the manual page of Linux's watchdog daemon, the nap interval
time of theirs is 10 seconds, which seems to be a reasonable value --
according to Intel documentation AP-725 (Document Number: 292273-001),
ICH5's maximum timeout is about 37.5 seconds, which the ichwd(4) driver
would set when we requested 128 seconds (although it should probably
feed back this as an error and do not set the timeout).  Since that's
the shortest maximum value, 10 seconds seems to be a right choice for
us too.

Discussed with: alfred
MFC after: 1 month

9 years agoRemove test-arc4random from this Makefile so others can continue to use
ngie [Sun, 16 Nov 2014 07:58:06 +0000 (07:58 +0000)]
Remove test-arc4random from this Makefile so others can continue to use
this as-is for the time being

9 years agoConvert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and
ngie [Sun, 16 Nov 2014 07:55:28 +0000 (07:55 +0000)]
Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and
rename as lib/libc/gen/arc4random_test

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/librt
ngie [Sun, 16 Nov 2014 07:03:19 +0000 (07:03 +0000)]
Add reachover Makefiles for contrib/netbsd-tests/lib/librt

A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures

Sponsored by: EMC / Isilon Storage Division

9 years agoCall sem_unlink on semaphores before attempting to create them
ngie [Sun, 16 Nov 2014 06:59:58 +0000 (06:59 +0000)]
Call sem_unlink on semaphores before attempting to create them

Due to the lack of uniqueness in the semaphore name, and the fact that the
tests don't have cleanup routines, an interrupted test can leave a semaphore
"laying around", causing all subsequent attempts to run the test to fail

I will file a NetBSD PR for this issue soon

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
ngie [Sun, 16 Nov 2014 06:35:20 +0000 (06:35 +0000)]
Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
lib/libthr/tests

A variant of this code has been tested on amd64/i386 for some time by
EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
code will remain off until it's proven it works on virtual hardware or real
hardware on other architectures

Original work by: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h
ngie [Sun, 16 Nov 2014 05:13:39 +0000 (05:13 +0000)]
Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h

9 years agoPort helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c
ngie [Sun, 16 Nov 2014 05:13:10 +0000 (05:13 +0000)]
Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

Submitted by: pho
In collaboration with: kib

9 years ago#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
ngie [Sun, 16 Nov 2014 05:11:07 +0000 (05:11 +0000)]
#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program

Submitted by: pho

9 years agoAdd pthread_np.h #include and initialize the pthread attribute on FreeBSD
ngie [Sun, 16 Nov 2014 05:09:23 +0000 (05:09 +0000)]
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

Submitted by: pho

9 years agoExpect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD
ngie [Sun, 16 Nov 2014 05:08:19 +0000 (05:08 +0000)]
Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

PR: 191906
In collaboration with: pho

9 years agoOnly expect timeouts on powerpc with NetBSD
ngie [Sun, 16 Nov 2014 05:06:35 +0000 (05:06 +0000)]
Only expect timeouts on powerpc with NetBSD

Submitted by: pho

9 years agoUse _exit instead of exit so the file descriptors aren't flushed twice in the
ngie [Sun, 16 Nov 2014 05:05:18 +0000 (05:05 +0000)]
Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes

Submitted by: pho

9 years agoOnly compare visitation counters if they've both been set for the current
markj [Sun, 16 Nov 2014 04:13:42 +0000 (04:13 +0000)]
Only compare visitation counters if they've both been set for the current
type graph walk.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove an incorrect optimization. The type IDs of each member of a struct or
markj [Sun, 16 Nov 2014 04:10:23 +0000 (04:10 +0000)]
Remove an incorrect optimization. The type IDs of each member of a struct or
union must be checked when determine whether two types are equivalent. This
bug could cause ctfmerge(1) to incorrectly merge distinct types.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix a couple of bugs around the handling of structs and unions of size zero.
markj [Sun, 16 Nov 2014 04:07:53 +0000 (04:07 +0000)]
Fix a couple of bugs around the handling of structs and unions of size zero.
These would cause ctfconvert(1) to return an error when attempting to
resolve valid C types.

Reviewed by: Robert Mustacchi <rm@joyent.com>
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoprevent doing filter ops locking for staticly compiled filter ops...
jmg [Sun, 16 Nov 2014 01:18:41 +0000 (01:18 +0000)]
prevent doing filter ops locking for staticly compiled filter ops...
This significantly reduces lock contention when adding/removing knotes
on busy multi-kq system...  Next step is to cache these references per
kq.. i.e. kq refs it once and keeps a local ref count so that the same
refs don't get accessed by many cpus...

only allocate a knote when we might use it...

Add a new flag, _FORCEONESHOT..  This allows a thread to force the
delivery of another event in a safe manner, say waking up an idle http
connection to force it to be reaped...

If we are _DISABLE'ing a knote, don't bother to call f_event on it, it's
disabled, so won't be delivered anyways..

Tested by: adrian

9 years agoMFV of 274557,tzdata{2014j}
edwin [Sun, 16 Nov 2014 01:00:39 +0000 (01:00 +0000)]
MFV of 274557,tzdata{2014j}

Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.

9 years agoEnable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default
alc [Sat, 15 Nov 2014 23:40:44 +0000 (23:40 +0000)]
Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default
on i386 PAE.  Previously, VM_PHYSSEG_SPARSE could not be used on amd64 and
i386 because vm_page_startup() would not create vm_page structures for the
kernel page table pages allocated during pmap_bootstrap() but those vm_page
structures are needed when the kernel attempts to promote the corresponding
kernel virtual addresses to superpage mappings.  To address this problem, a
new public function, vm_phys_add_seg(), is introduced and vm_phys_init() is
updated to reflect the creation of vm_phys_seg structures by calls to
vm_phys_add_seg().

Discussed with: Svatopluk Kraus
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix END()s for fueword and fueword64, match the name in END() with
kib [Sat, 15 Nov 2014 21:25:17 +0000 (21:25 +0000)]
Fix END()s for fueword and fueword64, match the name in END() with
entry.

Submitted by: Jeroen Hofstee <jeroen@myspectrum.nl>
MFC after: 1 week

9 years agoChange LDFLAGS to LDADD in order to allow static builds. This is more
sbruno [Sat, 15 Nov 2014 18:03:38 +0000 (18:03 +0000)]
Change LDFLAGS to LDADD in order to allow static builds.  This is more
proper way to ensure that the command line compile works the way we intend.

Add explicity DPADD statemens on LIBMD and LIBPTHREAD depending on which
options are used in the build.

Reviewed by: andrew
MFC after: 2 weeks

9 years agowpa_cli does not use libedit anymore since version 1.0
bapt [Sat, 15 Nov 2014 14:55:05 +0000 (14:55 +0000)]
wpa_cli does not use libedit anymore since version 1.0

9 years agoMake it possible to do "iscsictl -Rt xxx -p yyy", to remove a session
trasz [Sat, 15 Nov 2014 06:14:38 +0000 (06:14 +0000)]
Make it possible to do "iscsictl -Rt xxx -p yyy", to remove a session
that matches both -t and -p.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoWhitespace and comment tweaks, no functional changes.
ian [Sat, 15 Nov 2014 05:40:20 +0000 (05:40 +0000)]
Whitespace and comment tweaks, no functional changes.

9 years agoAdd a test for locking and unlocking user accounts
brd [Sat, 15 Nov 2014 05:12:30 +0000 (05:12 +0000)]
Add a test for locking and unlocking user accounts

Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Reviewed by: will

9 years agoWhen doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
ian [Sat, 15 Nov 2014 03:39:58 +0000 (03:39 +0000)]
When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
for cache maintenance operations, but ensure that all prior writes have
reached memory when doing a PREWRITE sync.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoMFi386: r274398
nyan [Sat, 15 Nov 2014 03:34:34 +0000 (03:34 +0000)]
MFi386: r274398

  Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
  gzip, and split).

9 years agoUse the standard powerof2() macro from param.h instead of a local one.
ian [Sat, 15 Nov 2014 02:58:17 +0000 (02:58 +0000)]
Use the standard powerof2() macro from param.h instead of a local one.

Pointed out by:  jhb@

9 years agoConvert the callouts back to using mutexes.
adrian [Sat, 15 Nov 2014 01:18:49 +0000 (01:18 +0000)]
Convert the callouts back to using mutexes.

I did this wrong - I should've included a state flag for each callout
to see if it was supposed to run or not.  I didn't do that.
Instead, just use mutexes anyway.

Suggested by: jhb

9 years agoRemove mostly obsolete hint to disable LAPIC timers.
mav [Fri, 14 Nov 2014 22:01:14 +0000 (22:01 +0000)]
Remove mostly obsolete hint to disable LAPIC timers.

It is partially covered by new code and partially by new CPUs.

PR: 195016
Submitted by: tobias.rehbein@web.de
MFC after: 1 week

9 years agoAutomate options INET/INET6 turning into MK_$opt_SUPPORT
imp [Fri, 14 Nov 2014 21:10:45 +0000 (21:10 +0000)]
Automate options INET/INET6 turning into MK_$opt_SUPPORT
correctly. Fixes if_gfe when building without INET6 and
simplifies if_gif's Makefile.

Sponsored by: Netflix, Inc

9 years agoCleanup trailing newlines noticed while looking for other issues.
imp [Fri, 14 Nov 2014 21:08:51 +0000 (21:08 +0000)]
Cleanup trailing newlines noticed while looking for other issues.

9 years agoReference uefi(8) from i386 boot(8)
emaste [Fri, 14 Nov 2014 20:12:33 +0000 (20:12 +0000)]
Reference uefi(8) from i386 boot(8)

Suggested by trasz.

Differential Revision: https://reviews.freebsd.org/D1162

9 years agoUse ${SYSDIR} as the reference pointer instead of specifying relative path directly.
delphij [Fri, 14 Nov 2014 18:44:13 +0000 (18:44 +0000)]
Use ${SYSDIR} as the reference pointer instead of specifying relative path directly.

Reported by: jenkins via Olivér Pintér (on github)

9 years agoEven better indent struct pagerops.
glebius [Fri, 14 Nov 2014 18:15:35 +0000 (18:15 +0000)]
Even better indent struct pagerops.

9 years agoConstantly indent struct pagerops.
glebius [Fri, 14 Nov 2014 18:00:00 +0000 (18:00 +0000)]
Constantly indent struct pagerops.

9 years agosh(1): Add/improve information about exit status of commands.
jilles [Fri, 14 Nov 2014 17:11:28 +0000 (17:11 +0000)]
sh(1): Add/improve information about exit status of commands.

9 years ago- Use NULL to compare a pointer.
glebius [Fri, 14 Nov 2014 15:44:19 +0000 (15:44 +0000)]
- Use NULL to compare a pointer.
- Use KASSERT() instead of panic.
- Remove useless 'continue', no need to restart cycle here.

Sponsored by: Nginx, Inc.

9 years agoMerge from projects/sendfile:
glebius [Fri, 14 Nov 2014 15:33:40 +0000 (15:33 +0000)]
Merge from projects/sendfile:
  Use sbcut_locked() instead of manually editing a sockbuf.

Sponsored by: Nginx, Inc.

9 years agoAdd OBJDUMP to sys.mk. The EFI loader uses it however without this it can
andrew [Fri, 14 Nov 2014 14:45:36 +0000 (14:45 +0000)]
Add OBJDUMP to sys.mk. The EFI loader uses it however without this it can
be set but empty.

Obtained from: ABT Systems
Sponsored by: The FreeBSD Foundation

9 years agoFix mdoc warning.
trasz [Fri, 14 Nov 2014 11:47:27 +0000 (11:47 +0000)]
Fix mdoc warning.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoIn vfs_write_suspend_umnt(), if suspension cannot be established, do
kib [Fri, 14 Nov 2014 11:31:10 +0000 (11:31 +0000)]
In vfs_write_suspend_umnt(), if suspension cannot be established, do
not forget to restore write ops count when returning the error.

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

9 years agoFix mdoc warning by removing empty lines.
trasz [Fri, 14 Nov 2014 08:58:55 +0000 (08:58 +0000)]
Fix mdoc warning by removing empty lines.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd missing commas to .Xr.
trasz [Fri, 14 Nov 2014 08:58:06 +0000 (08:58 +0000)]
Add missing commas to .Xr.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoThere should not be zero length mbufs in socket buffers. The code comes
glebius [Fri, 14 Nov 2014 06:02:29 +0000 (06:02 +0000)]
There should not be zero length mbufs in socket buffers.  The code comes
from r1451, and thus can't be explained.  A patch with explicit panic()
here survived all tests.

Tested by: pho
Sponsored by: Nginx, Inc.

9 years agoMigrate the callouts from using mutex locks to being mpsafe with
adrian [Fri, 14 Nov 2014 04:26:26 +0000 (04:26 +0000)]
Migrate the callouts from using mutex locks to being mpsafe with
the locks being held by the callers.

Kill callout_drain() and use callout_stop().

9 years agoCorrect a typo to fix chown(2). It was broken since r274476.
jkim [Thu, 13 Nov 2014 23:51:13 +0000 (23:51 +0000)]
Correct a typo to fix chown(2).  It was broken since r274476.

Pointy hat to: kib
X-MFC-With: r274476

9 years agoAdd more static binaries to the native-xtools target. These help speed
sbruno [Thu, 13 Nov 2014 22:25:22 +0000 (22:25 +0000)]
Add more static binaries to the native-xtools target.  These help speed
up the cross builds significantly.

adding:
bin/sh
bin/csh
sbin/md5
usr.bin/bzip2
usr.bin/fetch
usr.bin/gzip
usr.bin/tar
usr.bin/unzip
usr.bin/xz

Phabric: D1146
Reviewed by: imp bdrewery
MFC after: 2 weeks

9 years agoExtend earlier addition of stack frames to most of support.S. This makes
scottl [Thu, 13 Nov 2014 22:11:44 +0000 (22:11 +0000)]
Extend earlier addition of stack frames to most of support.S.  This makes
stack traces in KDB, HWPMC, and DTrace much more reliable and useful.

Reviewed by: kan, kib
Obtained from: Netflix, Inc.
MFC after: 5 days

9 years ago- Use the existing driver lock in cdevsw methods and remove D_NEEDGIANT.
jhb [Thu, 13 Nov 2014 22:06:57 +0000 (22:06 +0000)]
- Use the existing driver lock in cdevsw methods and remove D_NEEDGIANT.
- Use callout(9) instead of timeout(9).
- Use bus_*() instead of bus_space_*().
- Don't check for a NULL softc in attach.

Tested by: no one

9 years agoLock iir(4) and mark it MPSAFE.
jhb [Thu, 13 Nov 2014 22:00:18 +0000 (22:00 +0000)]
Lock iir(4) and mark it MPSAFE.
- Add a per-device mutex to the softc and use it for bus_dma tags,
  CAM SIMs, callouts, and interrupt handler.
- Switch from timeout(9) to callout(9).
- Add a separate global mutex to protect the global event buffer ring.
- Return completed index from iir_intr_locked() and remove the global
  gdt_wait_* variables.
- Remove global list of gdt softcs and replace its use with
  devclass_get_device().
- Use si_drv1 to store softc pointer in the SDEV_PER_HBA case instead
  of minor numbers.
- Do math on osreldate instead of dubious char math on osrelease[]
  that didn't work on 10.0+.
- Use bus_*() instead of bus_space_*().
- Use device_printf() instead of printf() with a unit number.

Tested by: no one

9 years agofiledesc: oops.. commit missing change to filedesc.h
mjg [Thu, 13 Nov 2014 21:47:43 +0000 (21:47 +0000)]
filedesc: oops.. commit missing change to filedesc.h

9 years agoFix typo in ARM GIC device_printf()
zbb [Thu, 13 Nov 2014 21:37:53 +0000 (21:37 +0000)]
Fix typo in ARM GIC device_printf()

Obtained from:   Semihalf
Sponsored by:    The FreeBSD Foundation

9 years agoThe fix imported into llvm in r274442 contains some C++11 constructs,
dim [Thu, 13 Nov 2014 21:16:01 +0000 (21:16 +0000)]
The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by: bz, kib
Pointy hat to: dim
MFC after: 1 week
X-MFC-With: r274442

9 years agofiledesc: fixup fdinit to lock fdp and preapare files conditinally
mjg [Thu, 13 Nov 2014 21:15:09 +0000 (21:15 +0000)]
filedesc: fixup fdinit to lock fdp and preapare files conditinally

Not all consumers providing fdp to copy from want files.

Perhaps these functions should be reorganized to better express the outcome.

This fixes up panics after r273895 .

Reported by: markj

9 years agoDrop mention of ISA cards. Note that I have no idea what to cull from the
jhb [Thu, 13 Nov 2014 20:09:47 +0000 (20:09 +0000)]
Drop mention of ISA cards.  Note that I have no idea what to cull from the
supported hardware list.  Judging by the PCI driver attachment, dpt_pci.c
only supports a single adapter rather than the various PCI adapters listed.
The list of EISA adapters listed somewhat overlaps with the device IDs in
dpt_eisa.c.  It's not clear which devices are ISA-only devices.

9 years agoRemove dpt_isa.c and commented out references to it. It was never connected
jhb [Thu, 13 Nov 2014 20:00:54 +0000 (20:00 +0000)]
Remove dpt_isa.c and commented out references to it.  It was never connected
to the build in either sys/conf/files* or sys/modules/dpt/Makefile.  Also,
it was denoted as "doesn't quite work yet" when the file was initially added
(which may account for it never having been hooked up to the build).

9 years agoRemove reference to sys/dev/dpt/dpt_control.c. It was removed back in 2001 after...
jhb [Thu, 13 Nov 2014 19:56:02 +0000 (19:56 +0000)]
Remove reference to sys/dev/dpt/dpt_control.c.  It was removed back in 2001 after having
never been updated for CAM changes in 1998.

9 years agoFix assertion, &uc->uc_busy is never zero, the intent is to test the
kib [Thu, 13 Nov 2014 18:51:09 +0000 (18:51 +0000)]
Fix assertion, &uc->uc_busy is never zero, the intent is to test the
uc_busy value, and not its address [1].

Remove the single use of the macro, write KASSERT() explicitely in the
code of umtxq_sleep_pi().

Submitted by: Eric van Gyzen <eric@vangyzen.net> [1]
MFC after: 1 week

9 years agoFix check for vendor-specific peripheral qualifier.
mav [Thu, 13 Nov 2014 18:15:05 +0000 (18:15 +0000)]
Fix check for vendor-specific peripheral qualifier.

Submitted by: anton.rang@isilon.com
MFC after: 1 week

9 years agoRemove the no-at variants of the kern_xx() syscall helpers. E.g., we
kib [Thu, 13 Nov 2014 18:01:51 +0000 (18:01 +0000)]
Remove the no-at variants of the kern_xx() syscall helpers.  E.g., we
have both kern_open() and kern_openat(); change the callers to use
kern_openat().

This removes one (sometimes two) levels of indirection and
consolidates arguments checks.

Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRegen test cases for yacc(1) after r274460. YYINT is int now.
jkim [Thu, 13 Nov 2014 17:54:17 +0000 (17:54 +0000)]
Regen test cases for yacc(1) after r274460.  YYINT is int now.

PR: 194982

9 years agoDo not try to dereference thread pointer when the value is not a pointer.
kib [Thu, 13 Nov 2014 17:44:35 +0000 (17:44 +0000)]
Do not try to dereference thread pointer when the value is not a pointer.

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

9 years agoRemove fossil. It has been present in 4.4Lite2, but its use was
kib [Thu, 13 Nov 2014 17:43:37 +0000 (17:43 +0000)]
Remove fossil.  It has been present in 4.4Lite2, but its use was
removed for some time.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoBump FreeBSD_version for r274462 - add ppoll() system call.
dchagin [Thu, 13 Nov 2014 14:46:33 +0000 (14:46 +0000)]
Bump FreeBSD_version for r274462 - add ppoll() system call.

9 years agoCount statistics for the specific address family.
ae [Thu, 13 Nov 2014 12:58:33 +0000 (12:58 +0000)]
Count statistics for the specific address family.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoStrip IP header only when we act in tunnel mode.
ae [Thu, 13 Nov 2014 10:48:59 +0000 (10:48 +0000)]
Strip IP header only when we act in tunnel mode.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoRemove redundant ip6_plen initialization.
ae [Thu, 13 Nov 2014 10:47:24 +0000 (10:47 +0000)]
Remove redundant ip6_plen initialization.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoRegen for r274462.
dchagin [Thu, 13 Nov 2014 05:28:06 +0000 (05:28 +0000)]
Regen for r274462.

9 years agoAdd the ppoll() system call.
dchagin [Thu, 13 Nov 2014 05:26:14 +0000 (05:26 +0000)]
Add the ppoll() system call.
Export kern_poll() needed by an upcoming Linuxulator change.

Differential Revision: https://reviews.freebsd.org/D1133
Reviewed by: kib, wblock
MFC after: 1 month

9 years agoiw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect
np [Thu, 13 Nov 2014 03:59:36 +0000 (03:59 +0000)]
iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect
fails.

Submitted by: hariprasad at chelsio dot com

9 years agoIncrease MAXTABLE to the maxmimum possible value. The default value is too
jkim [Thu, 13 Nov 2014 00:46:53 +0000 (00:46 +0000)]
Increase MAXTABLE to the maxmimum possible value.  The default value is too
low for complex parsers.  Note it was one of those memory optimization hacks
back in the day.

MFC after: 1 week

9 years agoadd support for private knote lock (reduces lock contention),
luigi [Thu, 13 Nov 2014 00:40:34 +0000 (00:40 +0000)]
add support for private knote lock (reduces lock contention),
adapting OS_selrecord accordingly.
Problem and fix suggested by adrian and jmg

9 years agoDerive copyright year from src/COPYRIGHT.
delphij [Thu, 13 Nov 2014 00:30:17 +0000 (00:30 +0000)]
Derive copyright year from src/COPYRIGHT.

MFC after: 2 weeks

9 years agowe need full barriers here
luigi [Thu, 13 Nov 2014 00:14:25 +0000 (00:14 +0000)]
we need full barriers here

9 years agoFix some bad interaction between cxgbe(4) and lacp lagg(4) that could
np [Wed, 12 Nov 2014 23:29:22 +0000 (23:29 +0000)]
Fix some bad interaction between cxgbe(4) and lacp lagg(4) that could
leave a port permanently disabled when a copper cable is unplugged and
then plugged right back in.

lacp_linkstate goes looking for the current ifmedia on a link state
change and it could get stale information from cxgbe(4) on a module
unplug followed by replug.  The fix is to process module events before
link-state events within the driver, and to always rebuild the ifmedia
list on a module change event (instead of rebuilding it lazily).

Thanks to asomers@ for the problem report and detailed analysis to go
with it.

MFC after: 1 week

9 years agoWe don't return sp pointer, thus NULL assignment isn't needed.
ae [Wed, 12 Nov 2014 22:58:52 +0000 (22:58 +0000)]
We don't return sp pointer, thus NULL assignment isn't needed.
And reference to sp will be freed at the end.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoipsec6_process_packet is called before ip6_output fixes ip6_plen.
ae [Wed, 12 Nov 2014 22:51:30 +0000 (22:51 +0000)]
ipsec6_process_packet is called before ip6_output fixes ip6_plen.
Update ip6_plen before bpf processing to be able see correct value.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoFix wrong message when using pw -V with a non existent directory
bapt [Wed, 12 Nov 2014 22:27:53 +0000 (22:27 +0000)]
Fix wrong message when using pw -V with a non existent directory
Add a regression test about it

PR: 194971
Submitted by: Freddy DISSAUX <bugzilla@dsx.bsdsx.fr>

9 years agoMake uart_bus_fdt a decendant of ofwbus
zbb [Wed, 12 Nov 2014 21:41:15 +0000 (21:41 +0000)]
Make uart_bus_fdt a decendant of ofwbus

This will allow to attach UART drivers lying directly on the root node
instead of simple-bus compatible bus only.

Obtained from:   Semihalf
Sponsored by:    The FreeBSD Foundation

9 years agoMake PL011 UART to wait on putc only when TX FIFO is full
zbb [Wed, 12 Nov 2014 21:38:31 +0000 (21:38 +0000)]
Make PL011 UART to wait on putc only when TX FIFO is full

Instead of waiting for empty TX FIFO it is more reasonable to
block on full FIFO. As soon as FIFO slot is free the character
can be transmitted.
In case of TX FIFO disabled, TXFF bit indicates that transmit
register is not empty.

Obtained from:   Semihalf
Reviewed by:     andrew, emaste
Sponsored by:    The FreeBSD Foundation

9 years agoFix previous change to this file (r273811).
np [Wed, 12 Nov 2014 20:57:29 +0000 (20:57 +0000)]
Fix previous change to this file (r273811).

This has been submitted upstream and should show up there soon.

Submitted by: Hariprasad at Chelsio dot com

9 years agoPull in r221709 from upstream llvm trunk (by Frédéric Riss):
dim [Wed, 12 Nov 2014 20:01:10 +0000 (20:01 +0000)]
Pull in r221709 from upstream llvm trunk (by Frédéric Riss):

  Totally forget deallocated SDNodes in SDDbgInfo.

  What would happen before that commit is that the SDDbgValues associated with
  a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
  a map entry keyed by the SDNode pointer pointing to this list of invalidated
  SDDbgNodes. As the memory gets reused, the list might get wrongly associated
  with another new SDNode. As the SDDbgValues are cloned when they are transfered,
  this can lead to an exponential number of SDDbgValues being produced during
  DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

  Note that the previous behavior wasn't really buggy as the invalidation made
  sure that the SDDbgValues won't be used. This commit can be considered a
  memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by: Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893
MFC after: 1 week

9 years agoAdd the FDT table GUID. This is used to pass the device tree blob from UEFI
andrew [Wed, 12 Nov 2014 17:56:38 +0000 (17:56 +0000)]
Add the FDT table GUID. This is used to pass the device tree blob from UEFI
to the loader in a similar way to the ACPI tables.

This will be used on arm64 but is not specific to the architecture.

Sponsored by: The FreeBSD Foundation

9 years agoFor posix_fallocate(2) and posix_fadvise(2), return ESPIPE when
kib [Wed, 12 Nov 2014 17:31:38 +0000 (17:31 +0000)]
For posix_fallocate(2) and posix_fadvise(2), return ESPIPE when
underlying file does not have DFLAG_SEEKABLE set [1].

For posix_fallocate(2), simplify error handling logic.  Do return when
fp is not yet referenced.

Noted by: bde [1]
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoifdef ext2_print_inode which is not really used.
pfg [Wed, 12 Nov 2014 16:23:56 +0000 (16:23 +0000)]
ifdef ext2_print_inode which is not really used.

ext2_print_inode is not really used but it was nice to
have for initial development work. #ifdef it under a
new EXT2FS_DEBUG knob so that we don't spend time
compiling it.

MFC after: 3 days

9 years agoFix spelling and wording.
des [Wed, 12 Nov 2014 16:07:33 +0000 (16:07 +0000)]
Fix spelling and wording.

9 years agoDecode more fields when dumping USB descriptors.
hselasky [Wed, 12 Nov 2014 14:52:44 +0000 (14:52 +0000)]
Decode more fields when dumping USB descriptors.
- Some minor style changes while at it.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week