Mark Johnston [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.
Mark Johnston [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.
John-Mark Gurney [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..
Edwin Groothuis [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.
Edwin Groothuis [Sun, 16 Nov 2014 00:43:41 +0000 (00:43 +0000)]
Vendor import of tzdata2014j:
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.
Alan Cox [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().
Ian Lepore [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.
Adrian Chadd [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.
Gleb Smirnoff [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.
John Baldwin [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.
John Baldwin [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.
John Baldwin [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.
John Baldwin [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).
Jung-uk Kim [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.
Navdeep Parhar [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.
Zbigniew Bodek [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
Dimitry Andric [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.
Pedro F. Giffuni [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.
Ian Lepore [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.
Marcel Moolenaar [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.
Peter 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
Gleb Smirnoff [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.