]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

9 years agoFix ips_out_nosa errors accounting.
ae [Wed, 12 Nov 2014 14:00:49 +0000 (14:00 +0000)]
Fix ips_out_nosa errors accounting.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoMerge from projects/sendfile:
glebius [Wed, 12 Nov 2014 10:17:46 +0000 (10:17 +0000)]
Merge from projects/sendfile:
- Use KASSERT()s instead of panic().
- Use sbavail() instead of sb_cc.

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

9 years agoIn preparation of merging projects/sendfile, transform bare access to
glebius [Wed, 12 Nov 2014 09:57:15 +0000 (09:57 +0000)]
In preparation of merging projects/sendfile, transform bare access to
sb_cc member of struct sockbuf to a couple of inline functions:

sbavail() and sbused()

Right now they are equal, but once notion of "not ready socket buffer data",
will be checked in, they are going to be different.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoFix an mdoc(7) macro that is not an option in the provided
gjb [Wed, 12 Nov 2014 08:36:42 +0000 (08:36 +0000)]
Fix an mdoc(7) macro that is not an option in the provided
description.

Bump Dd.

As CDDL License dictates, update the Copyright accordingly.

Sponsored by: The FreeBSD Foundation

9 years agoFix a few cases of use of uninitialized variables. Found with -Wall.
loos [Wed, 12 Nov 2014 03:59:26 +0000 (03:59 +0000)]
Fix a few cases of use of uninitialized variables.  Found with -Wall.

MFC after: 1 week

9 years agoFix the error checking, broken on r273337, to _not_ ignore controller
loos [Wed, 12 Nov 2014 03:07:46 +0000 (03:07 +0000)]
Fix the error checking, broken on r273337, to _not_ ignore controller
errors.

Without this fix you can't even scan the bus (all operations will always
succeed).

MFC with: r273337
Pointy hat to: loos

9 years agoFix the reversed sense of the PADCONF_NONE test.
ian [Wed, 12 Nov 2014 02:44:27 +0000 (02:44 +0000)]
Fix the reversed sense of the PADCONF_NONE test.

9 years agoRemove an #ifdef DEBUG wrapper, and instead use if (bootverbose).
ian [Wed, 12 Nov 2014 02:38:25 +0000 (02:38 +0000)]
Remove an #ifdef DEBUG wrapper, and instead use if (bootverbose).

9 years agoBugfixes for the imx5/imx6 iomux fdt_pinctrl driver.
ian [Wed, 12 Nov 2014 02:37:27 +0000 (02:37 +0000)]
Bugfixes for the imx5/imx6 iomux fdt_pinctrl driver.

I originally overlooked a couple flag bits defined in the fdt binding docs.
One flag suppresses the pad configuration (pullup/pulldown/etc).  The other
one requires that the SION (set input on) flag be set in the mux register.

Also, it appears from the data involved that if the input register
address in the config tuple is zero, there is no input configuration.  The
old code was writing to register zero, which contains a collection of misc
control bits (having nothing to do with input configuration) that probably
shouldn't get overwritten arbitrarily.  The bindings doc doesn't explictly
mention this.

9 years agoImprove CAM's reaction on asymmetric access errors.
mav [Wed, 12 Nov 2014 01:28:28 +0000 (01:28 +0000)]
Improve CAM's reaction on asymmetric access errors.

MFC after: 1 month

9 years agoSEEK_DATA has interesting behaviour for sparse files on ZFS. A sparse file
marcel [Wed, 12 Nov 2014 00:10:27 +0000 (00:10 +0000)]
SEEK_DATA has interesting behaviour for sparse files on ZFS.  A sparse file
with 128K of random data and truncated to 800K can have SEEK_DATA return -1
when given an offset of 128K. On UFS, the SEEK_DATA returns 800K (the size
of the file). SEEK_HOLE on ZFS seems to behave the same as UFS.

To handle this, map -1 to the size of the file (`end') when lseek returns
this for either SEEK_HOLE or SEEK_DATA. When sparse files are not supported
by the file system both `hole' and `data' will now be equal to `end' and we
will treat the entire file as data. This way, the -1 return for SEEK_DATA
on ZFS will end up doing the right thing.

Reported by: gjb@

MFC after: 3 days

9 years agoSince r273264 the SD card detection on Raspberry Pi is reliably working and
loos [Tue, 11 Nov 2014 23:55:37 +0000 (23:55 +0000)]
Since r273264 the SD card detection on Raspberry Pi is reliably working and
that expose new bugs with HS mode.

When the old code could not do the proper card detection it would boot with
lower defaults (and no HS mode) and this makes some HS cards boots.

Now, with the card always identified as HS capable, the sdhci controller
tries to run the card at HS speeds and makes the boot always fail.

Disable the HS mode for now (which still can be enabled with the tunable)
until it is properly fixed.

MFC with: r273264
Requested by: many

9 years agoFix build.
glebius [Tue, 11 Nov 2014 22:08:18 +0000 (22:08 +0000)]
Fix build.

9 years agoFix incorrect reading of 32-bit modinfo by 64-bit loaders.
grehan [Tue, 11 Nov 2014 22:03:11 +0000 (22:03 +0000)]
Fix incorrect reading of 32-bit modinfo by 64-bit loaders.

The various structures in the mod_metadata set of a FreeBSD kernel and
modules contain pointers. The FreeBSD loader correctly deals with a
mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
the inverse case where a 64-bit loader was loading a 32-bit kernel.

Reported by: ktcallbox@gmail.com with a bhyve/i386 and ZFS root install
Differential Revision: https://reviews.freebsd.org/D1129
Reviewed by: neel, jhb
MFC after: 1 week

9 years agoFix text output for the uptime command.
marcel [Tue, 11 Nov 2014 21:52:10 +0000 (21:52 +0000)]
Fix text output for the uptime command.

Reported by: "Max N. Boyarov" <zotrix@bsd.by>, ae@

9 years agoUpgrade libxo to 0.1.5
marcel [Tue, 11 Nov 2014 21:37:17 +0000 (21:37 +0000)]
Upgrade libxo to 0.1.5

Obtained from:  https://github.com/Juniper/libxo

9 years agoRemove SF_KQUEUE code. This code was developed at Netflix, but was not
glebius [Tue, 11 Nov 2014 20:32:46 +0000 (20:32 +0000)]
Remove SF_KQUEUE code.  This code was developed at Netflix, but was not
ever used.  It didn't go into stable/10, neither was documented.
It might be useful, but we collectively decided to remove it, rather
leave it abandoned and unmaintained.  It is removed in one single
commit, so restoring it should be easy, if anyone wants to reopen
this idea.

Sponsored by: Netflix

9 years agoAdd device ID for the T502-BT (dual-port 1G) adapter.
jhb [Tue, 11 Nov 2014 20:05:50 +0000 (20:05 +0000)]
Add device ID for the T502-BT (dual-port 1G) adapter.

Reviewed by: np
MFC after: 1 week

9 years agoFix whitespace.
dteske [Tue, 11 Nov 2014 19:45:14 +0000 (19:45 +0000)]
Fix whitespace.

Thanks to: nwhitehorn

9 years agoMove NFS and TFTP filesystems before the synthetic filesystems (bzip,
jhb [Tue, 11 Nov 2014 19:44:59 +0000 (19:44 +0000)]
Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
gzip, and split).  "Real" filesystems should always be listed first so
that the "bare" filename is tried before alternate filenames.  For PXE
booting in particular this can remove a lot of spurious pathname lookups.

While here, move splitfs to the bottom after the bzip and gzip filesystems
as it is the least often used.

Tested by: Prokash Sinha <psinha@panasas.com>
MFC after: 1 week

9 years agoUse the correct device. Note this commit complements r274386.
jkim [Tue, 11 Nov 2014 19:42:10 +0000 (19:42 +0000)]
Use the correct device.  Note this commit complements r274386.

PR: 194884

9 years agoDefault `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
dteske [Tue, 11 Nov 2014 19:37:17 +0000 (19:37 +0000)]
Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.

Recommended by: cperciva
Reviewed by: cperciva
Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC

9 years agoChange kbdb's kthr::cpu field into an int, to avoid gcc warnings about
dim [Tue, 11 Nov 2014 18:54:57 +0000 (18:54 +0000)]
Change kbdb's kthr::cpu field into an int, to avoid gcc warnings about
comparing it with NOCPU, which became -1 recently.  While here, avoid
using it for address calculations if it is negative.

Reviewed by: jhb, adrian
MFC after: 1 week