]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years ago- Improve readability of sys_obreak().
Andrey Zonov [Fri, 11 Jan 2013 09:58:35 +0000 (09:58 +0000)]
- Improve readability of sys_obreak().

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

11 years agoAdd flags argument to vfs_write_resume() and remove
Konstantin Belousov [Fri, 11 Jan 2013 06:08:32 +0000 (06:08 +0000)]
Add flags argument to vfs_write_resume() and remove
vfs_write_resume_flags().

Sponsored by: The FreeBSD Foundation

11 years agoPlace-holders for enable/active parameter flags.
Adrian Chadd [Fri, 11 Jan 2013 02:25:39 +0000 (02:25 +0000)]
Place-holders for enable/active parameter flags.

11 years agoOverhaul the stid allocator so that it can be used for IPv6 servers
Navdeep Parhar [Fri, 11 Jan 2013 00:07:01 +0000 (00:07 +0000)]
Overhaul the stid allocator so that it can be used for IPv6 servers
too.  The entry for an IPv6 server in the TCAM takes up the equivalent
of two ordinary stids and must be properly aligned too.

MFC after: 1 week

11 years agoUse better arm memory barrier
Warner Losh [Fri, 11 Jan 2013 00:03:19 +0000 (00:03 +0000)]
Use better arm memory barrier

11 years agocxgbe(4): Add functions to help synchronize "slow" operations (those not
Navdeep Parhar [Thu, 10 Jan 2013 23:56:50 +0000 (23:56 +0000)]
cxgbe(4): Add functions to help synchronize "slow" operations (those not
on the fast data path) and use them instead of frobbing the adapter lock
and busy flag directly.

Other changes made while reworking all slow operations:
- Wait for the reply to a filter request (add/delete).  This guarantees
  that the operation is complete by the time the ioctl returns.
- Tidy up the tid_info structure.
- Do not allow the tx queue size to be set to something that's not a
  power of 2.

MFC after: 1 week

11 years agoAdd an ugly hack to libgcc's unwind code, to make it behave properly at
Dimitry Andric [Thu, 10 Jan 2013 23:36:02 +0000 (23:36 +0000)]
Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by: stefanf
MFC after: 3 days

11 years agoAdd xargs to the set of install tools when zoneinfo is not disabled.
Brooks Davis [Thu, 10 Jan 2013 23:29:36 +0000 (23:29 +0000)]
Add xargs to the set of install tools when zoneinfo is not disabled.
This fixes installworld which I had broken in r245265.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>

11 years agoRemove all support for legacy NOFOO and NO_FOO build options.
Dag-Erling Smørgrav [Thu, 10 Jan 2013 22:44:19 +0000 (22:44 +0000)]
Remove all support for legacy NOFOO and NO_FOO build options.

11 years agoThe Giant lock is no longer used in the vm_map(9) part of the VM.
Sergey Kandaurov [Thu, 10 Jan 2013 22:36:30 +0000 (22:36 +0000)]
The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

MFC after: 1 week

11 years agoRemove not very useful printf, that can be too chatty.
Alexander Motin [Thu, 10 Jan 2013 21:38:31 +0000 (21:38 +0000)]
Remove not very useful printf, that can be too chatty.

ASUS P8Z77-V board reports _AC2, _AC3 and _AC4 setpoints as 0C.  With active
cooling already automatically set to _AC2, that still caused driver to print
two useless lines about temperature above _AC3 and _AC4 every ten seconds.
Three setponts of 0C is probably a board bug, but the same spam could happen
also in correct case if system is runnign not with the lowest cooling level.

11 years agoRather than using zic to both compile and install zoneinfo files,
Brooks Davis [Thu, 10 Jan 2013 19:46:08 +0000 (19:46 +0000)]
Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1).
This was the one place in installworld where files (vs links) were
installed by a tool other than install.

Reviewed by: edwin, jilles

11 years agoThe current ZFS code expects ddt_zap_count to always succeed by asserting
Xin LI [Thu, 10 Jan 2013 19:26:56 +0000 (19:26 +0000)]
The current ZFS code expects ddt_zap_count to always succeed by asserting
the underlying zap_count() to return no errors.  However, it is possible
that the pool reaches to such a state where zap_count would return error,
leading to panics when a pool is imported.

This commit changes the ddt_zap_count to return error returned from
zap_count and handle the error appropriately.  With this change, it's now
possible to let zpool rollback damaged transaction groups and import the
pool.

Obtained from: ZFS on Linux github (e8fd45a0f975c6b8ae8cd644714fc21f14fac2bf)
MFC after: 1 month

11 years agoClang complains about the comparision of fak < 0 always being
Warner Losh [Thu, 10 Jan 2013 18:51:35 +0000 (18:51 +0000)]
Clang complains about the comparision of fak < 0 always being
false. It is right. Delete it because on the next line we catch all
'negative' cases with the test > 2, since 'negative' numbers are just
really big unsigned numbers and we do an identical action.

11 years agoWhen nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
Konstantin Belousov [Thu, 10 Jan 2013 18:24:48 +0000 (18:24 +0000)]
When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
get back the leased write reference from the lower vnode.  There is no
other path which can correct v_writecount on the lowervp.

Reported by: flo
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoRe-enable ip6addrctl support but only for IPv6 address.
Hajimu UMEMOTO [Thu, 10 Jan 2013 14:08:19 +0000 (14:08 +0000)]
Re-enable ip6addrctl support but only for IPv6 address.

Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week

11 years ago- Reduce kernel size by removing unnecessary pointer indirections.
Andrey Zonov [Thu, 10 Jan 2013 12:43:58 +0000 (12:43 +0000)]
- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

11 years agoChanged scsi_da device requests to use the sysctl tunable value for retry_count
Steven Hartland [Thu, 10 Jan 2013 12:25:00 +0000 (12:25 +0000)]
Changed scsi_da device requests to use the sysctl tunable value for retry_count
and da_default_timeout where their current hardcoded values matched the current
default value for said tunables.

PR: kern/169976
Reviewed by: pjd (mentor)
Approved by: mav

11 years agoUpdates delete_method sysctl changes to always maintain disk d_flags
Steven Hartland [Thu, 10 Jan 2013 11:57:46 +0000 (11:57 +0000)]
Updates delete_method sysctl changes to always maintain disk d_flags
DISKFLAG_CANDELETE. While this change makes this layer consistent
other layers such as UFS and ZFS BIO_DELETE support may not notice
any change made manually via these device sysctls until the device
is reopened via a mount.

Also corrected var order in dadeletemethodsysctl

PR: kern/169801
Reviewed by: pjd (mentor)
Approved by: mav
MFC after: 2 weeks

11 years agoRemoves essentially unused variables from scsi_da probe setups
Steven Hartland [Thu, 10 Jan 2013 11:28:12 +0000 (11:28 +0000)]
Removes essentially unused variables from scsi_da probe setups

PR: kern/169835
Reviewed by: pjd (mentor)
Approved by: mav
MFC after: 2 weeks

11 years agoAllow perl scripts to be used in rc.d scripts
Steven Hartland [Thu, 10 Jan 2013 11:08:22 +0000 (11:08 +0000)]
Allow perl scripts to be used in rc.d scripts

PR: conf/117027
Reviewed by: pjd (mentor)
Approved by: hrs
MFC after: 2 weeks

11 years agoBugfix: Fix sizeof() argument.
Hans Petter Selasky [Thu, 10 Jan 2013 08:06:12 +0000 (08:06 +0000)]
Bugfix: Fix sizeof() argument.

Found by: Haakon Loevdal
MFC after: 1 week

11 years agoFix detection of Razer Copperhead as a USB mouse.
Hans Petter Selasky [Thu, 10 Jan 2013 07:45:46 +0000 (07:45 +0000)]
Fix detection of Razer Copperhead as a USB mouse.
Factor out USB mouse and keyboard detection logic.
Reject USB keyboards which have mouse alike HID items
in their HID descriptors.

Submitted by: Matthew W
MFC after: 1 week

11 years agoSimplify in6_setscope() function to get better performance.
Andrey V. Elsukov [Thu, 10 Jan 2013 00:10:24 +0000 (00:10 +0000)]
Simplify in6_setscope() function to get better performance.
Currently we use interface indeces as zone IDs for link-local and
interface-local scopes, and since we don't have any tool to configure
zone IDs, there is no need to acquire the afdata lock several times per
packet only to read if_index value.
So, now in6_setscope reads zone IDs for interface-local, link-local and
global scopes without a lock.

Sponsored by: Yandex LLC
MFC after: 2 weeks

11 years agocxgbe(4): updates to the configuration file that controls how hardware
Navdeep Parhar [Wed, 9 Jan 2013 21:27:14 +0000 (21:27 +0000)]
cxgbe(4): updates to the configuration file that controls how hardware
resources are partitioned.

- Reduce the number of virtual interfaces reserved for PF4.  This leaves
  spare room in the source MAC table and allows the driver to setup
  filters that rewrite the source MAC address.

- Reduce the number of filters and use the freed up space for the CLIP
  (Compressed Local IPv6 addresses) table.  This is a prerequisite for
  IPv6 TOE support which will follow separately in a series of commits.

MFC after: 1 week

11 years agoAlways install our mtree as /usr/sbin/fmtree and link it as
Brooks Davis [Wed, 9 Jan 2013 21:07:08 +0000 (21:07 +0000)]
Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.

11 years agoDon't drop options from the third retransmitted SYN by default. If the
John Baldwin [Wed, 9 Jan 2013 20:27:06 +0000 (20:27 +0000)]
Don't drop options from the third retransmitted SYN by default.  If the
SYNs (or SYN/ACK replies) are dropped due to network congestion, then the
remote end of the connection may act as if options such as window scaling
are enabled but the local end will think they are not.  This can result in
very slow data transfers in the case of window scaling disagreements.

The old behavior can be obtained by setting the
net.inet.tcp.rexmit_drop_options sysctl to a non-zero value.

Reviewed by: net@
MFC after: 2 weeks

11 years agoUpdate where porters handbook lives.
Glen Barber [Wed, 9 Jan 2013 20:10:45 +0000 (20:10 +0000)]
Update where porters handbook lives.

MFC after: 3 days

11 years agoFix the bindto parameter declaration.
Andrey V. Elsukov [Wed, 9 Jan 2013 19:49:35 +0000 (19:49 +0000)]
Fix the bindto parameter declaration.

Submitted by: sem

11 years agoRemove unneeded variable.
Andrey V. Elsukov [Wed, 9 Jan 2013 18:54:58 +0000 (18:54 +0000)]
Remove unneeded variable.

MFC after: 1 week

11 years agoAdd the "enable at reset" functionality to trigger spectral scan upon
Adrian Chadd [Wed, 9 Jan 2013 18:50:06 +0000 (18:50 +0000)]
Add the "enable at reset" functionality to trigger spectral scan upon
a channel change/reset.

11 years agoAdd no_prefer_iface option.
Hajimu UMEMOTO [Wed, 9 Jan 2013 18:18:08 +0000 (18:18 +0000)]
Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

Requested by: hrs
Reviewed by: IHANet folks including hrs
MFC after: 1 week

11 years agoMake CTL work a little better with loading and unloading drivers.
Kenneth D. Merry [Wed, 9 Jan 2013 17:02:08 +0000 (17:02 +0000)]
Make CTL work a little better with loading and unloading drivers.

Previously CTL would leave individual LUNs enabled in the target
driver, whether or not the port as a whole was enabled.  It would
also leave the wildcard LUN enabled indefinitely.

This change means that CTL will enable and disable any active LUNs,
as well as the wildcard LUN, when enabling and disabling a port.

Also, fix a bug that could crop up due to an uninitialized CCB
type.

ctl.c: Before calling ctl_frontend_online(), run through
the LUN list and enable all active LUNs.

After calling ctl_frontend_offline(), run through
the LUN list and disble all active LUNs.

scsi_ctl.c: Before bringing a port online, allocate the
wildcard peripheral for that bus.  And after taking
a port offline, invalidate the wildcard peripheral
for that bus.

Make sure that we hold the SIM lock around all
calls to xpt_action() and other transport layer
interfaces that require it.

Use CAM_SIM_{LOCK|UNLOCK} consistently to acquire
and release the SIM lock.

Update a number of outdated comments.  Some of
these should have been fixed long ago.

Actually do LUN disbables now.  The newer drivers
in the tree work correctly for this as far as I
know.

Initialize the CCB type to CTLFE_CCB_DEFAULT to
avoid a panic due to uninitialized memory.

Submitted by: Chuck Tuffli (partially)
MFC after: 1 week

11 years agoFix a bug in the device pager code that can trigger an assertion
Kenneth D. Merry [Wed, 9 Jan 2013 16:48:38 +0000 (16:48 +0000)]
Fix a bug in the device pager code that can trigger an assertion
in devfs if a particular race condition is hit in the device pager
code.

This was a side effect of change 227530 which changed the device
pager interface to call a new destructor routine for the cdev.
That destructor routine, old_dev_pager_dtor(), takes a VM object
handle.

The object handle is cast to a struct cdev *, and passed into
dev_rel().

That works in most cases, except the case in cdev_pager_allocate()
where there is a race condition between two threads allocating an
object backed by the same device.  The loser of the race
deallocates its object at the end of the function.

The problem is that before inserting the object into the
dev_pager_object_list, the object's handle is changed from the
struct cdev pointer to the object's own address.  This is to avoid
conflicts with the winner of the race, which already inserted an
object in the list with a handle that is a pointer to the same cdev
structure.

The object is then passed to vm_object_deallocate(), and eventually
makes its way down to old_dev_pager_dtor().  That function passes
the handle pointer (which is actually a VM object, not a struct
cdev as usual) into dev_rel().  dev_rel() decrements the reference
count in the assumed struct cdev (which happens to be 0), and
that triggers the assertion in dev_rel() that the reference count
is greater than or equal to 0.

The fix is to add a cdev pointer to the VM object, and use that
pointer when calling the cdev_pg_dtor() routine.

vm_object.h: Add a struct cdev pointer to the VM object
structure.

device_pager.c: In cdev_pager_allocate(), populate the new cdev
pointer.

In dev_pager_dealloc(), use the new cdev pointer
when calling the object's cdev_pg_dtor() routine.

Reviewed by: kib
Sponsored by: Spectra Logic Corporation
MFC after: 1 week

11 years agoDisable destination address selection support of
Hajimu UMEMOTO [Wed, 9 Jan 2013 15:22:37 +0000 (15:22 +0000)]
Disable destination address selection support of
getipnodebyname(1).  RFC 2553 mentions IPv6 addresses
are returned 1st.

Spotted by: uqs
MFC after: 1 week

11 years agoChange function argument type instead of casting.
Hans Petter Selasky [Wed, 9 Jan 2013 09:29:22 +0000 (09:29 +0000)]
Change function argument type instead of casting.

Suggested by: glebius @

11 years agoFix compile warning when using GCC:
Hans Petter Selasky [Wed, 9 Jan 2013 09:09:09 +0000 (09:09 +0000)]
Fix compile warning when using GCC:
Comparison between signed and unsigned.

MFC after: 1 week

11 years agoAdd a "pause" to busy wait loops in the cpu reset path.
Neel Natu [Wed, 9 Jan 2013 02:11:16 +0000 (02:11 +0000)]
Add a "pause" to busy wait loops in the cpu reset path.

This should not matter much when running on bare metal but it makes the guest
more friendly when running inside a virtual machine.

Discussed with: jhb
Obtained from: NetApp

11 years agoDefine IPI_IRQ_START and IPI_IRQ_END.
Olivier Houchard [Wed, 9 Jan 2013 01:54:17 +0000 (01:54 +0000)]
Define IPI_IRQ_START and IPI_IRQ_END.

11 years agoUse get_pcpu() instead of using pcpup, as it's wrong for SMP.
Olivier Houchard [Wed, 9 Jan 2013 01:52:28 +0000 (01:52 +0000)]
Use get_pcpu() instead of using pcpup, as it's wrong for SMP.

Submitted by: Lukasz Plachno <luk@semihalf.com>

11 years agoThe in6_setscope() function determines the scope zone id of an address
Andrey V. Elsukov [Wed, 9 Jan 2013 00:36:06 +0000 (00:36 +0000)]
The in6_setscope() function determines the scope zone id of an address
and embeds it into address. Inside the kernel we keep addresses with
embedded zone id only for two scopes: link-local and interface-local.

For other scopes this function is nop in most cases. To reduce an
overhead of locking, first check that address is capable for embedding.
Also, handle the loopback address before acquire the lock.

Sponsored by: Yandex LLC
MFC after: 1 week

11 years agoRemove old declarations.
Olivier Houchard [Tue, 8 Jan 2013 22:55:39 +0000 (22:55 +0000)]
Remove old declarations.

11 years agoFix format size.
Adrian Chadd [Tue, 8 Jan 2013 22:42:15 +0000 (22:42 +0000)]
Fix format size.

11 years agoAdd support for triggering spectral scan upon a channel reset/change.
Adrian Chadd [Tue, 8 Jan 2013 22:15:13 +0000 (22:15 +0000)]
Add support for triggering spectral scan upon a channel reset/change.

This is intended to support reporting FFT results during active channel
scans, for users who would like to fiddle around with writing applications
that do both FFT visualisation _and_ AP scanning.

* add a new ioctl to enable/trigger spectral scan at channel change/reset;
* set do_spectral consistently if it's enabled, so a channel set/reset
  will carry forth the correct PHY error configuration so frames
  are actually received;
* for NICs that don't do spectral scan, don't bother checking the
  spectral scan state on channel change/reset.

Tested:

* AR9280 - STA and scanning;
* AR5416 - STA, ensured that the SS code doesn't panic

11 years agoUse calloc() to get zeroed memory.
Xin LI [Tue, 8 Jan 2013 22:14:45 +0000 (22:14 +0000)]
Use calloc() to get zeroed memory.

MFC after: 1 month

11 years agoIf spectral scan is enabled, ensure radar report PHY errors are also
Adrian Chadd [Tue, 8 Jan 2013 22:12:45 +0000 (22:12 +0000)]
If spectral scan is enabled, ensure radar report PHY errors are also
enabled.

11 years agoISO 9660 specification allows only "d-characters" and "a-characters" in the
Hiroki Sato [Tue, 8 Jan 2013 21:13:58 +0000 (21:13 +0000)]
ISO 9660 specification allows only "d-characters" and "a-characters" in the
Volume Descriptor (section 7.4).  In short, upper-case alphanumeric + some
symbols only.  While the makefs utility automatically converts the characters,
$LABEL should be consistent in the scripts.

11 years agoShave off another register write to save some more
Hans Petter Selasky [Tue, 8 Jan 2013 19:38:57 +0000 (19:38 +0000)]
Shave off another register write to save some more
microseconds of PCI access time.

Tested by: sos @
Submitted by: sos @
MFC after: 1 week

11 years agoFollowing r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
David E. O'Brien [Tue, 8 Jan 2013 18:37:12 +0000 (18:37 +0000)]
Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.

Obtained from: Juniper Networks

11 years agoFix -iface and -interface modifiers.
Hiroki Sato [Tue, 8 Jan 2013 17:24:43 +0000 (17:24 +0000)]
Fix -iface and -interface modifiers.

Spotted by: Ian FREISLICH

11 years agoAdd support for IO_APPEND flag in fuse
Baptiste Daroussin [Tue, 8 Jan 2013 12:21:50 +0000 (12:21 +0000)]
Add support for IO_APPEND flag in fuse
This make open(..., O_APPEND) actually works on fuse filesystem.

Reviewed by: attilio

11 years agoAdd in the missing radiotap definitions from the sipsolutions.net
Adrian Chadd [Tue, 8 Jan 2013 06:59:21 +0000 (06:59 +0000)]
Add in the missing radiotap definitions from the sipsolutions.net
radiotap "upstream" source.

11 years agoBring in some userboot changes from the bhyve branch to reduce diffs.
Peter Grehan [Tue, 8 Jan 2013 03:27:37 +0000 (03:27 +0000)]
Bring in some userboot changes from the bhyve branch to reduce diffs.

r238966
  Bump up the heap size to 1MB. With a few kernel modules, libstand
  zalloc and userboot seem to want to use ~600KB of heap space, which
  results in a segfault when malloc fails in bhyveload.

r241180
  Clarify comment about default number of FICL dictionary cells.

r241153
  Allow the number of FICL dictionary cells to be overridden.
  Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells,
  overflowing the long-standing default of 10000.

  Bump userboot's value up to 15000 cells.

Reviewed by: dteske (r238966,241180)
Obtained from: NetApp

11 years agoSwitch default cache type for ARMv6/ARMv7 from write-through to
Oleksandr Tymoshenko [Tue, 8 Jan 2013 02:40:20 +0000 (02:40 +0000)]
Switch default cache type for ARMv6/ARMv7 from write-through to
writeback-writeallocate

11 years agoFix cache-related issue with pmap for ARMv6/ARMv7:
Oleksandr Tymoshenko [Tue, 8 Jan 2013 02:38:38 +0000 (02:38 +0000)]
Fix cache-related issue with pmap for ARMv6/ARMv7:

- Missing PTE_SYNC in pmap_kremove caused memory corruption
    in userland applications
- Fix lack of cache flushes when using special PTEs for zeroing or
    copying pages. If there are dirty lines for destination memory
    and page later remapped as a non-cached region actual content
    might be overwritten by these dirty lines when cache eviction
    happens as a result of applying cache eviction policy or because
    of wbinv_all call.
- icache sync for new mapping for userland applications.

Tested by: gber

11 years agoNuke ARM_WANT_TP_ADDRESS, it's not used anymore.
Olivier Houchard [Mon, 7 Jan 2013 23:41:14 +0000 (23:41 +0000)]
Nuke ARM_WANT_TP_ADDRESS, it's not used anymore.
Don't force -march=armv6 for Cortex A, as we want at least armv6k. The
compiler default is good enough.

11 years ago- Identify more devices for OMAP4 SoC (up to OMAP4470)
Oleksandr Tymoshenko [Mon, 7 Jan 2013 23:30:53 +0000 (23:30 +0000)]
- Identify more devices for OMAP4 SoC (up to OMAP4470)
- Whitespace fixes

11 years agoRevert r244549.
Jim Harris [Mon, 7 Jan 2013 21:35:25 +0000 (21:35 +0000)]
Revert r244549.

This change was originally intended to account for test kthreads under
the nvmecontrol process, but jhb indicated it may not be safe to
associate kthreads with userland processes and this could have
unintended consequences.

I did not observe any problems with this change, but my testing didn't
exhaust the kinds of corner cases that could cause problems.  It is not
that important to account for these test threads under nvmecontrol, so I
am just reverting this change for now.

On a related note, the part of this patch for <= 7.x fails compilation
so reverting this fixes that too.

Suggested by: jhb

11 years agoImplement barriers for AMRv6 and ARMv7
Oleksandr Tymoshenko [Mon, 7 Jan 2013 20:36:51 +0000 (20:36 +0000)]
Implement barriers for AMRv6 and ARMv7

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Reviewed by: ian, cognet

11 years ago- Add dashes before copyright notices.
Gleb Smirnoff [Mon, 7 Jan 2013 19:36:11 +0000 (19:36 +0000)]
- Add dashes before copyright notices.
- Add $FreeBSD$.
- Remove unused define.

11 years agoOnly assign the environ in the startup code when environ is NULL.
Konstantin Belousov [Mon, 7 Jan 2013 17:58:27 +0000 (17:58 +0000)]
Only assign the environ in the startup code when environ is NULL.
Preloaded library could have changed the environment, and
unconditional assingment to the environ undoes the customization.
The binaries needs to be recompiled to get the fix.

Move the common code to set up environ and __progname into the helper.
Note that ia64 possibly not fixed, due to it still using old csu.

Reported and tested by: John Hein <jhein@symmetricom.com>
Reviewed by: kan, scf
Approved by: secteam (simon)
MFC after: 2 weeks

11 years agoOptimise the XHCI interrupt handling.
Hans Petter Selasky [Mon, 7 Jan 2013 16:38:13 +0000 (16:38 +0000)]
Optimise the XHCI interrupt handling.
This patch will save CPU time when the XHCI interrupt is
shared with other devices.
Only check event rings when interrupt bits are set.
Otherwise would indicate hiding possible hardware fault(s).

Tested by: sos @
Submitted by: sos @
MFC after: 1 week

11 years agoext2fs: cleanup de dinode structure.
Pedro F. Giffuni [Mon, 7 Jan 2013 03:36:32 +0000 (03:36 +0000)]
ext2fs: cleanup de dinode structure.

It was plagued with style errors and the offsets had been lost.
While here took the time to update the fields according to the
latest ext4 documentation.

Reviewed by: bde
MFC after: 3 days

11 years agoRelease version check for erratum 727915 workaround in
Oleksandr Tymoshenko [Mon, 7 Jan 2013 02:38:36 +0000 (02:38 +0000)]
Release version check for erratum 727915 workaround in
l2_wbinv_range function implementation causes function
fail to flush caches for chip with RTL number 0x7. I failed
to find official PL310 revision with this RTL number
so further research on this matter required.

11 years agoUpdate copyright following last commit.
Devin Teske [Mon, 7 Jan 2013 00:18:03 +0000 (00:18 +0000)]
Update copyright following last commit.

11 years agoAdd nonInteractive support to f_dialog_yesno/noyes().
Devin Teske [Mon, 7 Jan 2013 00:15:52 +0000 (00:15 +0000)]
Add nonInteractive support to f_dialog_yesno/noyes().

11 years agotmpfs: Replace directory entry linked list with RB-Tree.
Gleb Kurtsou [Sun, 6 Jan 2013 22:15:44 +0000 (22:15 +0000)]
tmpfs: Replace directory entry linked list with RB-Tree.

Use file name hash as a tree key, handle duplicate keys.  Both VOP_LOOKUP
and VOP_READDIR operations utilize same tree for search.  Directory
entry offset (cookie) is either file name hash or incremental id in case
of hash collisions (duplicate-cookies).  Keep sorted per directory list
of duplicate-cookie entries to facilitate cookie number allocation.

Don't fail if previous VOP_READDIR() offset is no longer valid, start
with next dirent instead.  Other file system handle it similarly.

Workaround race prone tn_readdir_last[pn] fields update.

Add tmpfs_dir_destroy() to free all dirents.

Set NFS cookies in tmpfs_dir_getdents(). Return EJUSTRETURN from
tmpfs_dir_getdents() instead of hard coded -1.

Mark directory traversal routines static as they are no longer
used outside of tmpfs_subr.c

11 years agopw: free group returned by gr_add
Mateusz Guzik [Sun, 6 Jan 2013 21:56:58 +0000 (21:56 +0000)]
pw: free group returned by gr_add

11 years agolockmgr: unlock interlock (if requested) when dealing with upgrade/downgrade
Mateusz Guzik [Sun, 6 Jan 2013 21:47:59 +0000 (21:47 +0000)]
lockmgr: unlock interlock (if requested) when dealing with upgrade/downgrade
requests for LK_NOSHARE locks, just like for shared locks.

PR: kern/174969
Reviewed by: attilio
MFC after: 1 week

11 years agoMips Atheros AR71XX: make PCI base slot configurable through hints.
Monthadar Al Jaberi [Sun, 6 Jan 2013 20:50:31 +0000 (20:50 +0000)]
Mips Atheros AR71XX: make PCI base slot configurable through hints.

* Mikrotik RouterBoard 433AH have PCI slot 18 wired to INT0 on the PCI Bus.
  This is different from e.g. Atheros PB42 and Ubiquiti boards.
* Check for hint hint.pcib.0.baseslot=X, where X is number of base slot;
* If hint not supplied print a warning and use default AR71XX_PCI_BASE_SLOT;

PR: kern/174978
Approved by: adrian (mentor)

11 years agoNot using the full domain was a really bad idea.
Peter Wemm [Sun, 6 Jan 2013 19:25:42 +0000 (19:25 +0000)]
Not using the full domain was a really bad idea.

11 years agoUpdate copyrights and dates following last commit.
Devin Teske [Sun, 6 Jan 2013 18:18:09 +0000 (18:18 +0000)]
Update copyrights and dates following last commit.

11 years agoProtect the p->p_pgrp dereference with the process lock.
Konstantin Belousov [Sun, 6 Jan 2013 15:10:10 +0000 (15:10 +0000)]
Protect the p->p_pgrp dereference with the process lock.

MFC after: 3 days

11 years agoJuggle some internal symbols from our antique zlib (that originally came
Peter Wemm [Sun, 6 Jan 2013 14:59:59 +0000 (14:59 +0000)]
Juggle some internal symbols from our antique zlib (that originally came
in from kernel-pppd which is long gone) so that ZFS and DTRACE play nice.

This is a horrible hack to get freefall to compile, and is in dire need
of reconciliation.  This antique zlib-1.04 code needs to go away.

11 years agoSet the correct relocation type for R_ARM_TARGET2 to R_ARM_GOT_PREL. The
Andrew Turner [Sun, 6 Jan 2013 07:14:04 +0000 (07:14 +0000)]
Set the correct relocation type for R_ARM_TARGET2 to R_ARM_GOT_PREL. The
TARGET2 relocation is unused in the current ABI but this change is
required for EABI support.

11 years agoHandle ps-poll data frame if_transmit() failure.
Adrian Chadd [Sun, 6 Jan 2013 04:40:07 +0000 (04:40 +0000)]
Handle ps-poll data frame if_transmit() failure.

If the data frame transmission failures, it may have a node reference
that needs cleaning up.

If the frame is marked as M_ENCAP then it should treat recvif as a node
reference and clear it.

Now - since the mbuf has been freed by calling if_transmit() (even on
failure), the mbuf has to be treated as invalid.  Hence why the ifp is
used.

11 years agoHandle HWMP if_transmit() failure gracefully.
Adrian Chadd [Sun, 6 Jan 2013 04:38:31 +0000 (04:38 +0000)]
Handle HWMP if_transmit() failure gracefully.

If if_transmit() fails, the node ref may need freeing.

This is based on the same logic used by the ageq, which the mesh code
(re) uses for frames which need to be staged before transmitting.
It also does the same thing - if M_ENCAP is set on the mbuf, it treats
the recvif pointer as a node reference and derefs it.

11 years agoFix a signed/unsigned comparison when wchar_t is unsigned by casting the
Andrew Turner [Sun, 6 Jan 2013 03:08:27 +0000 (03:08 +0000)]
Fix a signed/unsigned comparison when wchar_t is unsigned by casting the
wchar_t to a wint_t.

11 years agoWhen WCHAR_MIN == 0 the check if a wchar_t value will always be true. In
Andrew Turner [Sun, 6 Jan 2013 02:50:38 +0000 (02:50 +0000)]
When WCHAR_MIN == 0 the check if a wchar_t value will always be true. In
this case skip the test as gcc complains it is always true.

11 years agoFix the build:
Andrew Turner [Sun, 6 Jan 2013 01:17:36 +0000 (01:17 +0000)]
Fix the build:

 * Use pl310_softc when the softc is otherwise unavailable.
 * Use the correct spelling of sc_rtl_revision.

11 years agoSilence a clang warning by telling it we are only interested in left
Andrew Turner [Sun, 6 Jan 2013 00:49:06 +0000 (00:49 +0000)]
Silence a clang warning by telling it we are only interested in left
shifting the lower 32bits of the floating point value when we demangle it.

11 years agoOnly work around errata when we are on a part where the erratum applies.
Andrew Turner [Sun, 6 Jan 2013 00:42:09 +0000 (00:42 +0000)]
Only work around errata when we are on a part where the erratum applies.

Reviewed by: gonzo

11 years agoExport board serial and board revision obtained from FDT blob
Oleksandr Tymoshenko [Sat, 5 Jan 2013 23:08:58 +0000 (23:08 +0000)]
Export board serial and board revision obtained from FDT blob

11 years agoAdd hw.board.serial and hw.board.revision for exporting board-specific info
Oleksandr Tymoshenko [Sat, 5 Jan 2013 23:08:10 +0000 (23:08 +0000)]
Add hw.board.serial and hw.board.revision for exporting board-specific info

11 years agoFix a segfault when bsdgrep -i is given an empty pattern string.
Mark Johnston [Sat, 5 Jan 2013 22:04:40 +0000 (22:04 +0000)]
Fix a segfault when bsdgrep -i is given an empty pattern string.

PR: bin/172865
Reviewed by: gabor
Approved by: emaste (co-mentor)
MFC after: 1 week

11 years agoUse tabs for indentation.
Konstantin Belousov [Sat, 5 Jan 2013 21:52:38 +0000 (21:52 +0000)]
Use tabs for indentation.

MFC after: 2 weeks

11 years agoDo not round up the size of the UFS filesystem to the fragment size
Konstantin Belousov [Sat, 5 Jan 2013 21:42:14 +0000 (21:42 +0000)]
Do not round up the size of the UFS filesystem to the fragment size
when comparing its size with the size of the media, to determine if
the last disk block is unused.

Submitted by: Andreas Longwitz <longwitz@incore.de>
Reviewed by: pjd
MFC after: 2 weeks

11 years agoFix background color calculation
Oleksandr Tymoshenko [Sat, 5 Jan 2013 21:05:16 +0000 (21:05 +0000)]
Fix background color calculation

Spotted by: ray@

11 years agoShuffle the TX underrun to work the same way as the RX underrun,
Tim Kientzle [Sat, 5 Jan 2013 20:37:40 +0000 (20:37 +0000)]
Shuffle the TX underrun to work the same way as the RX underrun,
as suggested by YongHyeon PYUN.

11 years agoPrefer the new NFS modules
Tim Kientzle [Sat, 5 Jan 2013 20:30:10 +0000 (20:30 +0000)]
Prefer the new NFS modules

11 years agoTeach the kernel to recognize that it is executing inside a bhyve virtual
Neel Natu [Sat, 5 Jan 2013 19:18:50 +0000 (19:18 +0000)]
Teach the kernel to recognize that it is executing inside a bhyve virtual
machine.

Obtained from: NetApp

11 years agoAdd quirk to indicate that the bhyve hostbridge is capable of supporting
Neel Natu [Sat, 5 Jan 2013 18:48:23 +0000 (18:48 +0000)]
Add quirk to indicate that the bhyve hostbridge is capable of supporting
MSI and MSI-X even though it does not advertise the PCI-E capability
itself.

Obtained from: NetApp

11 years agoWhile trying to track down the root cause for
Tim Kientzle [Sat, 5 Jan 2013 17:59:44 +0000 (17:59 +0000)]
While trying to track down the root cause for
TX stalls in this driver, I've also had some
time to evaluate the effectiveness of different
watchdog strategies.

This is the latest attempt, which consolidates
all of the watchdog logic in one place and
consistently detects TX stalls and resets within
a couple of seconds.

11 years ago- Fix handling of the case when multiple patterns are specified in a single
Gabor Kovesdan [Sat, 5 Jan 2013 14:52:31 +0000 (14:52 +0000)]
- Fix handling of the case when multiple patterns are specified in a single
  command line argument, separated by newlines

PR: bin/173673
Submitted by: ache
MFC after: 1 week

11 years agoAdd macros required to enable VMX operation on Intel processors.
Neel Natu [Sat, 5 Jan 2013 04:20:14 +0000 (04:20 +0000)]
Add macros required to enable VMX operation on Intel processors.

Obtained from: NetApp

11 years agoAdd support for scripting (sysinstall style).
Devin Teske [Sat, 5 Jan 2013 02:08:47 +0000 (02:08 +0000)]
Add support for scripting (sysinstall style).

Reviewed by: jilles

11 years agoGrammar fixes and some wordsmithing
Benjamin Kaduk [Sat, 5 Jan 2013 00:27:08 +0000 (00:27 +0000)]
Grammar fixes and some wordsmithing

Discussed with: rmacklem
Approved by: hrs (mentor)
MFC after: 2 weeks

11 years agoFollow calloc convention in other code, this is functionally identical
Xin LI [Sat, 5 Jan 2013 00:23:58 +0000 (00:23 +0000)]
Follow calloc convention in other code, this is functionally identical
to its previous form.

11 years agoFix some minor inaccuracies introduced in r243251.
Benjamin Kaduk [Sat, 5 Jan 2013 00:23:26 +0000 (00:23 +0000)]
Fix some minor inaccuracies introduced in r243251.
Also correct the comment in kern_synch.c which was the source of the
problematic text.

Reviewed by: kib (previous version)
Approved by: hrs (mentor)

11 years agoConstify arguments. While I'm there, also add a static for usage().
Xin LI [Fri, 4 Jan 2013 23:44:22 +0000 (23:44 +0000)]
Constify arguments.  While I'm there, also add a static for usage().

MFC after: 2 weeks