]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoExplain remedy for -J error from old make
sjg [Thu, 13 Jun 2013 18:39:17 +0000 (18:39 +0000)]
Explain remedy for -J error from old make

11 years agoAdd a missing comma.
jkim [Thu, 13 Jun 2013 18:33:54 +0000 (18:33 +0000)]
Add a missing comma.

11 years ago- Document GCC support for AMD Family 10h processors (amdfam10).
jkim [Thu, 13 Jun 2013 18:31:09 +0000 (18:31 +0000)]
- Document GCC support for AMD Family 10h processors (amdfam10).
- Document Clang support for AMD Jaguar processors (btver2).

11 years agoAdd a new CPUTYPE supported by Clang 3.3 for AMD Jaguar processors (btver2).
jkim [Thu, 13 Jun 2013 18:26:12 +0000 (18:26 +0000)]
Add a new CPUTYPE supported by Clang 3.3 for AMD Jaguar processors (btver2).

11 years agoBe more agressive about bootstrapping ctfmerge and ctfconvert so
brooks [Thu, 13 Jun 2013 18:26:04 +0000 (18:26 +0000)]
Be more agressive about bootstrapping ctfmerge and ctfconvert so
builds from existing releases have a chance of working properly.

Sponsored by: DARPA, AFRL
MFC after: 3 days

11 years agoUse portable string comparison
emaste [Thu, 13 Jun 2013 13:05:08 +0000 (13:05 +0000)]
Use portable string comparison

We support == in /bin/sh now, but it ought to be avoided, and my use of
it was accidental.

11 years agoFix two issues with the spin loops in the umtx(2) implementation.
kib [Thu, 13 Jun 2013 09:33:22 +0000 (09:33 +0000)]
Fix two issues with the spin loops in the umtx(2) implementation.

- When looping, check for the pending suspension.  Otherwise, other
  usermode thread which races with the looping one, could try to
  prevent the process from stopping or exiting.

- Add missed checks for the faults from casuword*().  The code is
  structured in a way which makes the loops exit if the specified
  address is invalid, since both fuword() and casuword() return -1 on
  the fault.  But if the address is mapped readonly, the typical value
  read by fuword() is different from -1, while casuword() returns -1.
  Absent the checks for casuword() faults, this is interpreted as the
  race with other thread and causes non-interruptible spinning in the
  kernel.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

11 years agoRevert r251649:
mav [Thu, 13 Jun 2013 08:34:23 +0000 (08:34 +0000)]
Revert r251649:
ken@ noticed that with recently added d_gone() disk method GEOM already
holds reference on the periph, so we don't need another one.

11 years agoRemove some duplicate code by making KHELP_DECLARE_MOD() a wrapper around
lstewart [Thu, 13 Jun 2013 08:07:42 +0000 (08:07 +0000)]
Remove some duplicate code by making KHELP_DECLARE_MOD() a wrapper around
KHELP_DECLARE_MOD_UMA().

MFC after: 3 days

11 years agoImprove locking strategy between keys hash and ID hash.
glebius [Thu, 13 Jun 2013 06:07:19 +0000 (06:07 +0000)]
Improve locking strategy between keys hash and ID hash.

Before this change state creating sequence was:

1) lock wire key hash
2) link state's wire key
3) unlock wire key hash
4) lock stack key hash
5) link state's stack key
6) unlock stack key hash
7) lock ID hash
8) link into ID hash
9) unlock ID hash

What could happen here is that other thread finds the state via key
hash lookup after 6), locks ID hash and does some processing of the
state. When the thread creating state unblocks, it finds the state
it was inserting already non-virgin.

Now we perform proper interlocking between key hash locks and ID hash
lock:

1) lock wire & stack hashes
2) link state's keys
3) lock ID hash
4) unlock wire & stack hashes
5) link into ID hash
6) unlock ID hash

To achieve that, the following hacking was performed in pf_state_key_attach():

- Key hash mutex is marked with MTX_DUPOK.
- To avoid deadlock on 2 key hash mutexes, we lock them in order determined
  by their address value.
- pf_state_key_attach() had a magic to reuse a > FIN_WAIT_2 state. It unlinked
  the conflicting state synchronously. In theory this could require locking
  a third key hash, which we can't do now.
  Now we do not remove the state immediately, instead we leave this task to
  the purge thread. To avoid conflicts in a short period before state is
  purged, we push to the very end of the TAILQ.
- On success, before dropping key hash locks, pf_state_key_attach() locks
  ID hash and returns.

Tested by: Ian FREISLICH <ianf clue.co.za>

11 years agoRemove unused variable sc_tx_bufsz.
kevlo [Thu, 13 Jun 2013 05:46:19 +0000 (05:46 +0000)]
Remove unused variable sc_tx_bufsz.
The variable is initialized but not used.

Reviewed by: yongari

11 years agoRevert revision 251648. style(9) requires an empty line here.
grog [Thu, 13 Jun 2013 04:11:21 +0000 (04:11 +0000)]
Revert revision 251648.  style(9) requires an empty line here.

Reported by: mdf@

11 years agoRelax some unnecessary unsigned type changes in ext2fs.
pfg [Thu, 13 Jun 2013 03:23:24 +0000 (03:23 +0000)]
Relax some unnecessary unsigned type changes in ext2fs.

While the changes in r245820 are in line with the ext2 spec,
the code derived from UFS can use negative values so it is
better to relax some types to keep them as they were, and
somewhat more similar to UFS. While here clean some casts.

Some of the original types are still wrong and will require
more work.

Discussed with: bde
MFC after: 3 days

11 years agoSet the FreeBSD capability bit to indicate that LNA diversity is enabled.
adrian [Thu, 13 Jun 2013 02:20:45 +0000 (02:20 +0000)]
Set the FreeBSD capability bit to indicate that LNA diversity is enabled.

This is true for the AR9485 and AR933x SoC.

11 years agoReturn HAL_ANT_VARIABLE for now, until it's unstubbed.
adrian [Thu, 13 Jun 2013 02:19:53 +0000 (02:19 +0000)]
Return HAL_ANT_VARIABLE for now, until it's unstubbed.

This is needed by the slow antenna diversity logic for the AR9485/AR9462
as it's only engaged if the TX diveristy is set to VARIABLE.

11 years agoFix a typo: s/KLSI/CATC/
kevlo [Thu, 13 Jun 2013 01:33:01 +0000 (01:33 +0000)]
Fix a typo: s/KLSI/CATC/

11 years agoAdd PF_IEEE80211 definition.
kevlo [Thu, 13 Jun 2013 01:29:54 +0000 (01:29 +0000)]
Add PF_IEEE80211 definition.

Reviewed by: rpaulo

11 years agoRenumber clauses to reduce diffs to other versions
emaste [Thu, 13 Jun 2013 00:19:30 +0000 (00:19 +0000)]
Renumber clauses to reduce diffs to other versions

NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.

11 years agoTurn libc.so into an ld script rather than a symlink pointing to the
jlh [Wed, 12 Jun 2013 21:12:05 +0000 (21:12 +0000)]
Turn libc.so into an ld script rather than a symlink pointing to the
real shared object and libssp_nonshared.a.

This was the last showstopper that prevented from enabling SSP for ports
by default.  portmgr@ performed a buildworld which showed no significant
breakage with this patch.

Details:

On i386 for PIC objects, gcc uses the __stack_chk_fail_local hidden
symbol instead of calling __stack_chk_fail directly [1].  This happen
not only with our gcc-4.2.1 but also with the latest gcc-4.8.  If you
want the very nasty details, see [2].

OTOH the problem doesn't exist on other architectures.  It also doesn't
exist with Clang as the latter will somehow manage to create the
function in the object file at compile time (contrary to only
referencing it through a symbol that will be brought in at link time).

In a perfect world, when an object file is compiled with
-fstack-protector, it will be linked into a binary or a DSO with this
same flag as well, so GCC will add libssp_nonshared.a to the linker
command-line.  Unfortunately, we don't control softwares in ports and we
may have such broken DSO.  This is the whole point of this patch.

You can reproduce the problem on i386 by compiling a source file into an
object file with "-fstack-protector-all -fPIE" and linking it
into a binary without "-fstack-protector".

This ld script automatically proposes libssp_nonshared.a along with the
real libc DSO to the linker.  It is important to understand that the
object file contained in this library will be pulled in the resulting
binary _only if_ the linker notices one of its symbols is needed (i.e.
one of the SSP symbol is missing).

A theorical performance impact could be when compiling, but my testing
showed less than 0.1% of difference.

[1] For 32-bit code gcc saves the PIC register setup by using
    __stack_chk_fail_local hidden function instead of calling
    __stack_chk_fail directly.  See comment line 19460 in:
    src/contrib/gcc/config/i386/i386.c

[2] When compiling a source file to an object file, if you use something
    which is external to the compilation unit, GCC doesn't know yet if
    this symbol will be inside or outside the DSO.  So it expects the
    worst case and routes the symbol through the GOT, which means
    additional space and extra relocation for rtld(1).

    Declaring a symbol has hidden tells GCC to use the optimal route (no
    GOT), but on the other hand this means the symbol has to be provided
    in the same DSO (namely libssp_nonshared.a).

    On i386, GCC actually uses an hidden symbol for SSP in PIC objects
    to save PIC register setup, as said in [1].

PR: ports/138228
PR: ports/168010
Reviewed by: kib, kan

11 years agoHandle DW_TAG_unspecified_type
emaste [Wed, 12 Jun 2013 20:11:49 +0000 (20:11 +0000)]
Handle DW_TAG_unspecified_type

2011-11-14  Jim Ingham  <jingham@apple.com>

        * dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type.
        (read_tag_unspecified_type): New function, add a type for the
        DW_TAG_unspecified_type die.

Obtained from: Apple, gdb-1752

11 years agoHandle DW_TAG_rvalue_reference_type
emaste [Wed, 12 Jun 2013 20:05:19 +0000 (20:05 +0000)]
Handle DW_TAG_rvalue_reference_type

2012-05-21  Jim Ingham <jingham@apple.com>

      * dwarf2read.c (process_die): Handle DW_TAG_rvalue_reference_type.
      (read_type_die): Ditto.
      (dwarf_tag_name): Ditto.

      * elf/dwarf2.h: Add DW_TAG_rvalue_reference_type.

Obtained from: Apple, gdb-1820

11 years agoFix build after r251654.
mav [Wed, 12 Jun 2013 19:21:23 +0000 (19:21 +0000)]
Fix build after r251654.

11 years agoUpgrade our copy of llvm/clang to 3.3 release.
dim [Wed, 12 Jun 2013 18:48:53 +0000 (18:48 +0000)]
Upgrade our copy of llvm/clang to 3.3 release.

Release notes are still in the works, these will follow soon.

MFC after: 1 month

11 years agoReplicate r242422 from ata(4) to mvs(4):
mav [Wed, 12 Jun 2013 18:08:11 +0000 (18:08 +0000)]
Replicate r242422 from ata(4) to mvs(4):
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt).  All other ATA PIO commands transfer one sector or 512 bytes
at one time.  Hardcode these exceptions in mvs(4) with ATA_CAM option.
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.

11 years agoClean up swapfile memory disk on shutdown
crees [Wed, 12 Jun 2013 16:44:17 +0000 (16:44 +0000)]
Clean up swapfile memory disk on shutdown

Make the md unit number configurable so that it can be predicted

PR: bin/168544
Submitted by: wblock (based on)
Approved by: kevlo

11 years agoUse CAM_DIR_NONE for requests without data.
mav [Wed, 12 Jun 2013 16:13:05 +0000 (16:13 +0000)]
Use CAM_DIR_NONE for requests without data.
Wrong values there confuse some drivers.

MFC after: 1 week

11 years agoTurn DIAGNOSTICs to INVARIANTS in ext2fs.
pfg [Wed, 12 Jun 2013 15:24:48 +0000 (15:24 +0000)]
Turn DIAGNOSTICs to INVARIANTS in ext2fs.

This is done to be consistent with what other filesystems and
particularly ffs already does (see r173464).

MFC after: 5 days

11 years agoTie in the LNA diversity configuration functions into the HAL.
adrian [Wed, 12 Jun 2013 15:23:17 +0000 (15:23 +0000)]
Tie in the LNA diversity configuration functions into the HAL.

11 years agoSet the antenna "config group" field.
adrian [Wed, 12 Jun 2013 15:18:10 +0000 (15:18 +0000)]
Set the antenna "config group" field.

The reference HAL pushes a config group parameter to the driver layer
to inform it which particular chip behaviour to implement.

This particular value tags it as an AR9285.

11 years agoMigrate the LNA mixing diversity machinery from the AR9285 HAL to the driver.
adrian [Wed, 12 Jun 2013 14:52:57 +0000 (14:52 +0000)]
Migrate the LNA mixing diversity machinery from the AR9285 HAL to the driver.

The AR9485 chip and AR933x SoC both implement LNA diversity.
There are a few extra things that need to happen before this can be
flipped on for those chips (mostly to do with setting up the different
bias values and LNA1/LNA2 RSSI differences) but the first stage is
putting this code into the driver layer so it can be reused.

This has the added benefit of making it easier to expose configuration
options and diagnostic information via the ioctl API.  That's not yet
being done but it sure would be nice to do so.

Tested:

* AR9285, with LNA diversity enabled
* AR9285, with LNA diversity disabled in EEPROM

11 years agoMake CAM return and GEOM DISK pass through new GEOM::lunid attribute.
mav [Wed, 12 Jun 2013 13:36:20 +0000 (13:36 +0000)]
Make CAM return and GEOM DISK pass through new GEOM::lunid attribute.

SPC-4 specification states that serial number may be property of device,
but not a specific logical unit.  People reported about FC storages using
serial number in that way, making it unusable for purposes of LUN multipath
detection.  SPC-4 states that designators associated with logical unit from
the VPD page 83h "Device Identification" should be used for that purpose.
Report first of them in the new attribute in such preference order: NAA,
EUI-64, T10 and SCSI name string.

While there, make GEOM DISK properly report GEOM::ident in XML output also
using d_getattr() method, if available.  This fixes serial numbers reporting
for SCSI disks in `geom disk list` output and confxml.

Discussed with: gibbs, ken
Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

11 years agoAdd new script to run release builds. The script is heavily based upon
gjb [Wed, 12 Jun 2013 13:15:28 +0000 (13:15 +0000)]
Add new script to run release builds.  The script is heavily based upon
the release/generate-release.sh script by nwhitehorn.

This script can use optional configuration file to override defaults,
making running multiple serialzied builds with different specific
configurations or architecture-specific tunings quite easy.

Sample overrideable options are included in the release.conf.sample
file.

Approved by: kib (mentor)
MFC After: 2 weeks
X-MFC-To: stable/9 only

11 years agoUse direct custom implementations instead of g_handleattr() for CFI and NAND
mav [Wed, 12 Jun 2013 12:51:43 +0000 (12:51 +0000)]
Use direct custom implementations instead of g_handleattr() for CFI and NAND
d_getattr().  Since these drivers use disk(9) KPI and not directly GEOM, use
of that function means KPI layering violation, causing extra g_io_deliver()
call for the request.

11 years agoAdd missing copyright notice.
nwhitehorn [Wed, 12 Jun 2013 12:38:12 +0000 (12:38 +0000)]
Add missing copyright notice.

11 years agoAcquire periph reference when handling d_getattr() method call.
mav [Wed, 12 Jun 2013 09:07:15 +0000 (09:07 +0000)]
Acquire periph reference when handling d_getattr() method call.

While GEOM in general has provider opened while sending BIO_GETATTR,
GEOM DISK does not really need to open disk to read medium-unrelated
attributes for own use.

Proposed by: ken

11 years agostyle(9)
grog [Wed, 12 Jun 2013 07:53:59 +0000 (07:53 +0000)]
style(9)

MFC after: 2 weeks

11 years agoHandle some expression regressions.
grog [Wed, 12 Jun 2013 07:52:49 +0000 (07:52 +0000)]
Handle some expression regressions.
Explicitly use GNU cpp for preprocessing.
Remove explicit debugging code.
Change some variable names to be less confusing.
Improve some comments.
Improve indentation.

PR: 162211
168785
MFC after: 2 weeks

11 years agoMFV r251644:
delphij [Wed, 12 Jun 2013 07:07:06 +0000 (07:07 +0000)]
MFV r251644:

Poor ZFS send / receive performance due to snapshot
hold / release processing (by smh@)

Illumos ZFS issues:
  3740 Poor ZFS send / receive performance due to snapshot
       hold / release processing

MFC after:      2 weeks

11 years agoRemove the AR9285 specific structure for LNA diversity and use the HAL.
adrian [Wed, 12 Jun 2013 06:01:53 +0000 (06:01 +0000)]
Remove the AR9285 specific structure for LNA diversity and use the HAL.

The AR9300 HAL update included the LNA diversity configuration information
so it can be used in the AR9485 configuration code.

11 years agoMerge latest NetBSD changes.
eadler [Tue, 11 Jun 2013 21:47:16 +0000 (21:47 +0000)]
Merge latest NetBSD changes.
This adds some new NetBSD releases and makes some simple formatting changes.

With this commit NetBSD and FreeBSD should have identical files.
DragonflyFBSD has the version immediately prior to this commit.

When committing to this file please try to coordinate with all three groups.

Submitted by: Alan Barrett <apb@cequrux.com>

11 years agopthread_testcancel(3): Update list of cancellation points.
jilles [Tue, 11 Jun 2013 21:40:20 +0000 (21:40 +0000)]
pthread_testcancel(3): Update list of cancellation points.

This should be a fairly complete list of cancellation points in libc, libthr
and librt, including standard as well as non-standard functions.

11 years agocxgbe/tom: Allow caller to select the queue (control or data) used to
np [Tue, 11 Jun 2013 21:20:23 +0000 (21:20 +0000)]
cxgbe/tom: Allow caller to select the queue (control or data) used to
send the CPL_SET_TCB_FIELD request in t4_set_tcb_field().

MFC after: 1 week

11 years agoBorrow the algorithm from kvm_getprocs() to fix procstat_getprocs() to
jhb [Tue, 11 Jun 2013 20:00:49 +0000 (20:00 +0000)]
Borrow the algorithm from kvm_getprocs() to fix procstat_getprocs() to
handle the case where the process tables grows in between the calls to
fetch the size and fetch the table.

MFC after: 1 week

11 years agoMFV r251626:
delphij [Tue, 11 Jun 2013 19:35:44 +0000 (19:35 +0000)]
MFV r251626:

ZFS event processing should work on R/O root filesystems

Illumos ZFS issues:
  3749 zfs event processing should work on R/O root filesystems

MFC after:      2 weeks

11 years agoMFV r251624:
delphij [Tue, 11 Jun 2013 19:29:31 +0000 (19:29 +0000)]
MFV r251624:

txg commit callbacks don't work

Illumos ZFS issues:
  3747 txg commit callbacks don't work

MFC after:      2 weeks

11 years agoMFV r251623:
delphij [Tue, 11 Jun 2013 19:25:49 +0000 (19:25 +0000)]
MFV r251623:

zpool create should treat -O mountpoint and -m the same

Illumos ZFS issues:
  3745 zpool create should treat -O mountpoint and -m the same

MFC after:      2 weeks

11 years agoMFV r251622:
delphij [Tue, 11 Jun 2013 19:22:20 +0000 (19:22 +0000)]
MFV r251622:

ZFS shouldn't ignore errors unmounting snapshots

Illumos ZFS issues:
  3744 zfs shouldn't ignore errors unmounting snapshots

MFC after:      2 weeks

11 years agoMFV r251621:
delphij [Tue, 11 Jun 2013 19:16:14 +0000 (19:16 +0000)]
MFV r251621:

ZFS needs a refcount audit

Illumos ZFS issues:
  3741 zfs needs a refcount audit

MFC after:      2 weeks

11 years agoMFV r251620:
delphij [Tue, 11 Jun 2013 19:12:06 +0000 (19:12 +0000)]
MFV r251620:

ZFS comments need cleaner, more consistent style

Illumos ZFS issues:
  3741 zfs comments need cleaner, more consistent style

MFC after:      2 weeks

11 years agoBump the CPU/WCPU column width by one so that it fits values from 100% up
jhb [Tue, 11 Jun 2013 19:05:29 +0000 (19:05 +0000)]
Bump the CPU/WCPU column width by one so that it fits values from 100% up
to 999.99% CPU.  It still won't be aligned if you have a multithreaded
process using more than 1000% CPU (e.g. idle process on an idle 12-way
system), but 100% is a common case.

Submitted by: Jeremy Chadwick (partial)
MFC after: 1 week

11 years agoMFV r251619:
delphij [Tue, 11 Jun 2013 19:02:36 +0000 (19:02 +0000)]
MFV r251619:

ZFS needs better comments.

Illumos ZFS issues:
  3741 zfs needs better comments

MFC after:      2 weeks

11 years agoAdd the name of the file that could not be opened to the error message
ghelmer [Tue, 11 Jun 2013 18:46:46 +0000 (18:46 +0000)]
Add the name of the file that could not be opened to the error message
regarding the failure.

Suggested while working on PR bin/113239.

11 years agoPrevent races running the queue by serializing access to the
ghelmer [Tue, 11 Jun 2013 18:43:27 +0000 (18:43 +0000)]
Prevent races running the queue by serializing access to the
queue directory.

PR: bin/113239

11 years agoMove the check whether the clear flag is set. This has 2 advantages
flo [Tue, 11 Jun 2013 17:46:32 +0000 (17:46 +0000)]
Move the check whether the clear flag is set. This has 2 advantages

- When operating on a core file (-M) and -c is specified we don't clear
  the message buffer of the running system.
- If we don't have permission to clear the buffer print the error message
  only. That's what Linux does in this case, where this feature was ported
  from, and it ensures that the error message doesn't get lost in the noise.

Discussed with: antoine, cognet
Approved by: cognet

11 years agoStore a reference to the vnode associated with a file descriptor in the
jhb [Tue, 11 Jun 2013 15:37:07 +0000 (15:37 +0000)]
Store a reference to the vnode associated with a file descriptor in the
linux_file structure and use it instead of directly accessing td_fpop
when destroying the linux_file structure.  The td_fpop pointer is not
valid when a cdevpriv destructor is run, and the type-specific close
method has already been called, so f_vnode may not be valid (and the
vnode might have been recycled without our own reference).

Tested by: Julian Stecklina <jsteckli@os.inf.tu-dresden.de>
MFC after: 1 week

11 years agoDon't update provider properties and don't set DISKFLAG_OPEN if d_open()
mav [Tue, 11 Jun 2013 10:06:07 +0000 (10:06 +0000)]
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error.  GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.

11 years agoMake the default choice for FTP media access use "auto".
dteske [Tue, 11 Jun 2013 03:37:29 +0000 (03:37 +0000)]
Make the default choice for FTP media access use "auto".

11 years agos/file system/filesystem/g
pfg [Tue, 11 Jun 2013 02:47:07 +0000 (02:47 +0000)]
s/file system/filesystem/g

Based on r96755 from UFS.

MFC after: 3 days

11 years agoVendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
dim [Mon, 10 Jun 2013 20:45:12 +0000 (20:45 +0000)]
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502

11 years agoVendor import of llvm tags/RELEASE_33/final r183502 (effectively, 3.3
dim [Mon, 10 Jun 2013 20:36:52 +0000 (20:36 +0000)]
Vendor import of llvm tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_33/final@183502

11 years agoAdd another comment about WB195 (AR9285+AR3011) when using ASPM.
adrian [Mon, 10 Jun 2013 20:10:34 +0000 (20:10 +0000)]
Add another comment about WB195 (AR9285+AR3011) when using ASPM.

11 years agoThere is a one-to-one correspondence between the MSI-X vector # and the Status Descri...
davidcs [Mon, 10 Jun 2013 17:12:22 +0000 (17:12 +0000)]
There is a one-to-one correspondence between the MSI-X vector # and the Status Descriptor Ring Index. Hence there is no need to check the Interrupt Source Register.

Approved by: George Neville-Neil

11 years agoRevert r251590. It unexpectedly broke the build and there were some
marcel [Mon, 10 Jun 2013 15:22:27 +0000 (15:22 +0000)]
Revert r251590. It unexpectedly broke the build and there were some
questions on locking. As part of commit-bit grooming, I'd like Steve
to handle this, but can't leave things broken in the mean time.

11 years agoHandle options that override other options
emaste [Mon, 10 Jun 2013 13:55:03 +0000 (13:55 +0000)]
Handle options that override other options

This is a workaround for WITH_LDNS_UTILS forcing BIND_UTILS off.  It can
be reverted when we no longer have these conflicting options, or made more
general if we grow more cases like this.

11 years agoAvoid unnecessary controller reinitialization by checking driver
yongari [Mon, 10 Jun 2013 07:31:49 +0000 (07:31 +0000)]
Avoid unnecessary controller reinitialization by checking driver
running state.  fxp(4) requires controller reinitialization for the
following cases.
 o RX lockup condition on i82557
 o promiscuous mode change
 o multicast filter change
 o WOL configuration
 o TSO/VLAN hardware tagging/checksum offloading configuration
 o MAC reprogramming after speed/duplex/flow-control resolution
 o Any events that result in MAC reprogramming(link UP/DOWN,
   remote link partner's restart of auto-negotiation etc)
 o Microcode loading/unloading
Apart from above cases which come from hardware limitation, upper
stack also blindly reinitializes controller whenever an IP address
is assigned. After r194573, fxp(4) no longer needs to reinitialize
the controller to program multicast filter after upping the
interface. So keeping track of driver running state should remove
all unnecessary controller reinitializations.

This change will also address endless controller reinitialization
triggered by dhclient(8).

Tested by: hrs, Alban Hertroys <haramrae@gmail.com>

11 years agoAdd implementations of acoshl(), asinhl(), and atanhl(). This is a
das [Mon, 10 Jun 2013 06:04:58 +0000 (06:04 +0000)]
Add implementations of acoshl(), asinhl(), and atanhl().  This is a
merge of the work done by bde and myself.

11 years agoFix some bugs in the complex trig tests so that they test both double
das [Mon, 10 Jun 2013 06:03:03 +0000 (06:03 +0000)]
Fix some bugs in the complex trig tests so that they test both double
and float precision properly.

11 years agoRegen.
rpaulo [Mon, 10 Jun 2013 05:45:53 +0000 (05:45 +0000)]
Regen.

11 years agoUse STRUCT_USB_HOST_ID to make sure we have the right ELF section.
rpaulo [Mon, 10 Jun 2013 05:45:16 +0000 (05:45 +0000)]
Use STRUCT_USB_HOST_ID to make sure we have the right ELF section.

11 years agoRevise the interface between vm_object_madvise() and vm_page_dontneed() so
alc [Mon, 10 Jun 2013 01:48:21 +0000 (01:48 +0000)]
Revise the interface between vm_object_madvise() and vm_page_dontneed() so
that pointless calls to pmap_is_modified() can be easily avoided when
performing madvise(..., MADV_FREE).

Sponsored by: EMC / Isilon Storage Division

11 years agoAdd vfs_mounted and vfs_unmounted events so that components can be informed
marcel [Sun, 9 Jun 2013 23:51:26 +0000 (23:51 +0000)]
Add vfs_mounted and vfs_unmounted events so that components can be informed
about mount and unmount events. This is used by Juniper to implement a more
optimal implementation of NetBSD's veriexec.

Submitted by: stevek@juniper.net
Obtained from: Juniper Networks, Inc

11 years ago- The method introduced as part of r234898 for not altering the boot path
marius [Sun, 9 Jun 2013 23:50:30 +0000 (23:50 +0000)]
- The method introduced as part of r234898 for not altering the boot path
  when booting from ZFS turned out to also cause the boot path not being
  adjusted if booting from CD-ROM with firmware versions that do not employ
  the "cdrom" alias in that case. So shuffle the code around instead in order
  to achieve the original intent. Ideally, we shouldn't fiddle with the boot
  path when booting from UFS on a disk either; unfortunately, there doesn't
  seem to be an universal way of telling disks and CD-ROMs apart, though. [1]
- Use NULL instead of 0 for pointers.

PR: 179289
MFC after: 1 week

11 years agoChange the set and unset ctlreqs by making the index argument optional.
marcel [Sun, 9 Jun 2013 23:34:26 +0000 (23:34 +0000)]
Change the set and unset ctlreqs by making the index argument optional.
This allows setting attributes on tables. One simply does not provide
an index in that case. Otherwise the entry corresponding the index has
the attribute set or unset.

Use this change to fix a relatively longstanding bug in our GPT scheme
that's the result of rev 198097 (relatively harmless) followed by rev
237057 (damaging). The damaging part being that our GPT scheme always
has the active flag set on the PMBR slice. This is in violation with
EFI. Existing EFI implementions for both x86 and ia64 reject the GPT.
As such, GPT disks created by us aren't usable under EFI because of
that.

After this change, GPT disks never have the active flag set on the PMBR
slice. In order to make the GPT disk bootable under some x86 BIOSes,
the reason of rev 198097, one must now set the active attribute on the
gpt table. The kernel will apply this to the PMBR slice For (S)ATA:
gpart set -a active ada0

To fix an existing GPT disk that has the active flag set in the PMBR,
and that does not need the flag, use (again for (S)ATA):
gpart unset -a active ada0

The EBR, MBR & PC98 schemes, which also impement at least 1 attribute,
now check to make sure the entry passed is valid. They do not have
attributes that apply to the table.

11 years agoRemove stub implementation.
marcel [Sun, 9 Jun 2013 23:12:43 +0000 (23:12 +0000)]
Remove stub implementation.

11 years agoIncrease the maximum KVM available on TI chips. Not sure why we suddenly need
cognet [Sun, 9 Jun 2013 22:51:11 +0000 (22:51 +0000)]
Increase the maximum KVM available on TI chips. Not sure why we suddenly need
that much, but that lets me boot with 1GB of RAM.

11 years agoModify nfsstat.c so that it prints out an error when a non-root
rmacklem [Sun, 9 Jun 2013 21:54:19 +0000 (21:54 +0000)]
Modify nfsstat.c so that it prints out an error when a non-root
user attempts to use the "-m" option and it fails.

Requested by: danny@cs.huji.ac.il
MFC after: 2 weeks

11 years agoAdd :ifname modifier to specify interface-specific routes into
hrs [Sun, 9 Jun 2013 18:11:36 +0000 (18:11 +0000)]
Add :ifname modifier to specify interface-specific routes into
{,ipv6_}static_routes and rc.d/routing.  For example:

 static_routes="foo bar:em0"
 route_foo="-net 10.0.0.0/24 -gateway 192.168.2.1"
 route_bar="-net 192.168.1.0/24 -gateway 192.168.0.2"

At boot time, all of the static routes are installed as before.
The differences are:

- "/etc/rc.d/netif start/stop <if>" now configures static routes
  with :<if> if any.
- "/etc/rc.d/routing start/stop <af> <if>" works as well.  <af> cannot be
  omitted when <if> is specified, but a keyword "any" or "all" can be used
  for <af> and <if>.

11 years agoFix a bug that the gateway address was not shown when a -gateway modifier
hrs [Sun, 9 Jun 2013 17:40:06 +0000 (17:40 +0000)]
Fix a bug that the gateway address was not shown when a -gateway modifier
was used.

11 years ago- Add file system type number (vfc_typenum) in the list. This is useful
hrs [Sun, 9 Jun 2013 16:33:32 +0000 (16:33 +0000)]
- Add file system type number (vfc_typenum) in the list.  This is useful
  for debugging when changing vfs.typenumhash configuration.
- Refactor fmt_flags().

MFC after: 1 week

11 years agoFix a bug introduced by r251236; product of bug was the following error in
dteske [Sun, 9 Jun 2013 15:36:13 +0000 (15:36 +0000)]
Fix a bug introduced by r251236; product of bug was the following error in
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

NOTE: Previously mentioned in r251557

Problem caused by removal of $retval to capture exit status of call to
f_dialog_input_rclist().

While we're here, enhance f_dialog_input_rclist() to accept a default-item
to make selecting multiple values to-add more efficient.

11 years agoMake recv() and send() cancellation points, as required by POSIX.
jilles [Sun, 9 Jun 2013 14:31:59 +0000 (14:31 +0000)]
Make recv() and send() cancellation points, as required by POSIX.

Call the recvfrom() and sendto() functions overridden by libthr instead of
the _recvfrom() and _sendto() versions that are not cancellation points.

11 years agoFix the way atomic_is_lock_free() is defined for Clang.
ed [Sun, 9 Jun 2013 08:28:23 +0000 (08:28 +0000)]
Fix the way atomic_is_lock_free() is defined for Clang.

When using Clang atomics, atomic types are not placed in a structure.
There is thus no reason why we should get the __val member.

11 years agoPrint file names without stdio buffering to avoid mixing buffered and
jh [Sun, 9 Jun 2013 08:06:26 +0000 (08:06 +0000)]
Print file names without stdio buffering to avoid mixing buffered and
unbuffered ouput.

PR: bin/176886
Reviewed by: mjg

11 years agoMinor mdoc fixes.
joel [Sun, 9 Jun 2013 07:15:43 +0000 (07:15 +0000)]
Minor mdoc fixes.

11 years agoAdd freebsd-update.conf(5) to OptionalObsoleteFiles.inc
gjb [Sun, 9 Jun 2013 06:13:51 +0000 (06:13 +0000)]
Add freebsd-update.conf(5) to OptionalObsoleteFiles.inc

PR: 179437
Approved by: kib (mentor)
MFC after: 1 week

11 years agoe2fs_bpg and e2fs_isize are always unsigned.
pfg [Sun, 9 Jun 2013 01:38:51 +0000 (01:38 +0000)]
e2fs_bpg and e2fs_isize are always unsigned.

The superblock in ext2fs defines all the fields as unsigned but for
some reason the in-memory superblock was carrying e2fs_bpg and
e2fs_isize as signed.

We should preserve the specified types for consistency.

MFC after: 5 days

11 years agolibstand: Reset the seek pointer in ext2fs as done in UFS.
pfg [Sun, 9 Jun 2013 01:19:22 +0000 (01:19 +0000)]
libstand: Reset the seek pointer in ext2fs as done in UFS.

Based on r134760:

Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.

Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.

PR: 177328
Submitted by: Eric van Gyzen
Reviewed by: iedowse
MFC after: 5 days

11 years agoFix a bad calloc(3) call
bapt [Sat, 8 Jun 2013 23:48:13 +0000 (23:48 +0000)]
Fix a bad calloc(3) call

MFC after: 2 weeks

11 years agoMerge the 1 and 2 byte versions of the atomic functions into one.
ed [Sat, 8 Jun 2013 23:45:11 +0000 (23:45 +0000)]
Merge the 1 and 2 byte versions of the atomic functions into one.

After pushing in my fix for the 2 byte functions, I realized that the
functions for 1 and 2 byte operations had become identical. Reduce the
code size by merging the functions for 1 and 2 byte operations together.

While there, slightly improve variable naming and comments.

11 years agoAdd testing utility for behavior of atomic ops.
ed [Sat, 8 Jun 2013 22:44:49 +0000 (22:44 +0000)]
Add testing utility for behavior of atomic ops.

This small utility performs a sequence of atomic operations with random
parameters on an atomic variable. For every type, we also create 16
variables, to ensure that we test the correctness at different
alignments.

11 years agoFix a bug introduced with r251190, in which a small hunk was forgotten in
dteske [Sat, 8 Jun 2013 21:45:32 +0000 (21:45 +0000)]
Fix a bug introduced with r251190, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was the following error when selecting the menu
"Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":

[: -eq: unexpected operator

By running `bsdconfig -d' as root to enable debugging, this turns into:

DEBUG: f_getvar: var=[text] value=[
Error: Expected a number for token 4 of --menu.
Use --help to list options.] r=0
[: -eq: unexpected operator

Indicating that the fourth token for --menu which should be $height was
instead a string (the first item of $menu_list) because it was using the
old size-calculation method and $size was now null (needed to use instead
the new size variables of $height $width and $rows).

11 years agoFix a bug introduced with r249751, in which a small hunk was forgotten in
dteske [Sat, 8 Jun 2013 21:33:09 +0000 (21:33 +0000)]
Fix a bug introduced with r249751, in which a small hunk was forgotten in
the performance conversion process.

The effect of this was, when your /etc/defaults/rc.conf file changed
(based on md5(1)) and re-generating the file startup_rcconf_map.cache in
/var/run/bsdconfig/ you would get a screen-dump of its contents before the
menu would appear.

11 years agoFix a typo in comments.
dteske [Sat, 8 Jun 2013 21:11:26 +0000 (21:11 +0000)]
Fix a typo in comments.

11 years agoDon't silently ignore errors (found while
dteske [Sat, 8 Jun 2013 20:47:43 +0000 (20:47 +0000)]
Don't silently ignore errors (found while
testing with `chflags schg /etc/ttys).

11 years agoPrevent getting hung-up on the following prompt (found while testing with
dteske [Sat, 8 Jun 2013 20:43:13 +0000 (20:43 +0000)]
Prevent getting hung-up on the following prompt (found while testing with
`chflags schg /etc/ttys'):

override rw-r--r--  root/wheel for /etc/ttys? (y/n [n])

Simply by adding `-f' flag to mv(1).

11 years agoFix a one-character typo. The effects of which were "Console"->"Ttys" menu
dteske [Sat, 8 Jun 2013 20:27:16 +0000 (20:27 +0000)]
Fix a one-character typo. The effects of which were "Console"->"Ttys" menu
would not launch (and gave no error). This was easily diagnosed by running
`bsdconfig -d' as root and seeing the following error right after selecting
the "Ttys" sub-menu:

DEBUG: f_getvar: var=[text] value=[
Error: Expected at least 6 tokens for --menu, have 4.
Use --help to list options.] r=0

Typo was introduced by SVN r251361.

11 years agoAdd 8devices CARAMBOLA2 support.
adrian [Sat, 8 Jun 2013 20:21:17 +0000 (20:21 +0000)]
Add 8devices CARAMBOLA2 support.

This is based on the AR933x (Hornet) SoC from Qualcomm Atheros.

It's a much nicer board to do development on - 64MB RAM, 16MB flash.
The development board breaks out the GPIO pins, ethernet, serial (via
a USB<->RS232 chip), USB host and of course a small wifi antenna.

Everything but the wifi works thus far.

11 years agoAdd support for two new winbond SPI flash parts.
adrian [Sat, 8 Jun 2013 20:12:14 +0000 (20:12 +0000)]
Add support for two new winbond SPI flash parts.

The 8devices carambola 2 board uses the 16MB part.

Here's how it looks:

spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
mx25l0: w25q128, sector 65536 bytes, 256 sectors

Tested:

* 8devices Carambola 2 board

11 years agoAdd a prompt to the "Add User" and "Add Group" sub-menu items (under the
dteske [Sat, 8 Jun 2013 19:13:49 +0000 (19:13 +0000)]
Add a prompt to the "Add User" and "Add Group" sub-menu items (under the
"Login Management" module): Use default values for all account details?

If you select "Yes" (the default is "No"), you'll jump past all the prompts
and jump straight to the review screen with all-default values.

Makes adding a lot of users/groups faster/easier if you don't need to
customize more than one or two different values from their defaults.

11 years agoMinor markup.
pluknet [Sat, 8 Jun 2013 18:25:08 +0000 (18:25 +0000)]
Minor markup.