]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoChange some headers such that lang/gcc* ports no longer patch them.
Tijl Coosemans [Tue, 14 Feb 2012 12:50:20 +0000 (12:50 +0000)]
Change some headers such that lang/gcc* ports no longer patch them.

The lang/gcc* ports patch headers where they think something is
non-standard. These patched headers override the system headers which means
you have to rebuild these ports whenever you do installworld to make sure
they contain the latest changes.

12 years agoCleanup of xlocale:
David Chisnall [Tue, 14 Feb 2012 12:03:23 +0000 (12:03 +0000)]
Cleanup of xlocale:

- Address performance regressions encountered by das@ by caching per-thread
  data in TLS where available.
- Add a __NO_TLS flag to cdefs.h to indicate where not available.
- Reorganise the xlocale.h definitions into xlocale/*.h so that they can be
  included from multiple places.
- Export the POSIX2008 subset of xlocale when POSIX2008 says it should be
  exported, independently of whether xlocale.h is included.
- Fix the bug where programs using ctype functions always assumed ASCII unless
  recompiled.
- Fix some style(9) violations.

Reviewed by: brooks (mentor)
Approved by: dim (mentor)

12 years agoFix a bug where the wrong protocol overhead was used. This can lead
Michael Tuexen [Tue, 14 Feb 2012 12:00:34 +0000 (12:00 +0000)]
Fix a bug where the wrong protocol overhead was used. This can lead
to a deadlock of an association when an IPv6 socket was used to
communcate with IPv4 and an ICMPv4 fragmentation needed message
was received.
While there, simplify the code a bit.

MFC after: 3 days.

12 years agoReplace PRIdMAX with "jd" in a printf call. Cast the corresponding value to
Tijl Coosemans [Tue, 14 Feb 2012 11:24:24 +0000 (11:24 +0000)]
Replace PRIdMAX with "jd" in a printf call. Cast the corresponding value to
intmax_t instead of uintmax_t, because the original type is off_t.

12 years agoFix various issues with the NFS and RPC related scripts:
Doug Barton [Tue, 14 Feb 2012 10:51:24 +0000 (10:51 +0000)]
Fix various issues with the NFS and RPC related scripts:

1. Add new functionality to the force_depend method to incorporate the
   tests for whether the service is enabled and/or already running.
2. Add a new option to bypass checking only that the service is enabled
   at boot time, and always check if it is running.
3. Use this new functionality to greatly simplify the rc.d scripts that
   use force_depend.
4. Add a force_depend for statd in lockd
5. Remove the check that either nfs_server or nfs_client is _enable'd
   from statd and lockd. This was always overkill, and prevented using
   the {one|force}start options, as well as stop'ing on the command line.
6. The yp* scripts had some of their arguments in various weird orders.
   Bring them into line with the model.
7. If mountd fails to create /var/db/mountdtab, err out.

Ideas, suggestions, and/or review from delphij and jilles.
Pointy hats are completely my responsibility however.

12 years agoreadlink len-1
Kevin Lo [Tue, 14 Feb 2012 10:17:03 +0000 (10:17 +0000)]
readlink len-1

12 years agoproperly sort dev/oce entries
Luigi Rizzo [Tue, 14 Feb 2012 10:11:53 +0000 (10:11 +0000)]
properly sort dev/oce entries

12 years agoRemove unnecessary cast
Kevin Lo [Tue, 14 Feb 2012 10:11:45 +0000 (10:11 +0000)]
Remove unnecessary cast

12 years agoRestore message in man page on VFS timestamp precision.
Ed Schouten [Tue, 14 Feb 2012 09:29:37 +0000 (09:29 +0000)]
Restore message in man page on VFS timestamp precision.

Requested by: bde, jhb

12 years agoDo not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
Alexander Motin [Tue, 14 Feb 2012 09:19:30 +0000 (09:19 +0000)]
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

MFC after: 3 days

12 years agoDisable jail support in ifconfig when either building a rescue
Robert Millan [Tue, 14 Feb 2012 07:14:42 +0000 (07:14 +0000)]
Disable jail support in ifconfig when either building a rescue
image or MK_JAIL knob has been set to "no".

Reviewed by: bz
Approved by: adrian (mentor)

12 years agoAdd a rudimentary test to run through all the available counters on a
George V. Neville-Neil [Tue, 14 Feb 2012 04:18:59 +0000 (04:18 +0000)]
Add a rudimentary test to run through all the available counters on a
system and then execute a program with pmcstat in counting mode.

The program will verify that all counters fire and that the code neither
panics the system nor locks it up.  This should be considered a first pass
conformance test for new sets of counters being added to hwpmc(4).

12 years agowctob() returns EOF and not WEOF.
Xin LI [Tue, 14 Feb 2012 02:03:17 +0000 (02:03 +0000)]
wctob() returns EOF and not WEOF.

Noticed by: Zhihao Yuan <lichray gmail com>
MFC after: 1 week

12 years agoFor RTL8168/8111D controller, make sure to wake PHY from power down
Pyun YongHyeon [Tue, 14 Feb 2012 00:54:40 +0000 (00:54 +0000)]
For RTL8168/8111D controller, make sure to wake PHY from power down
mode.  Otherwise, PHY access times out under certain conditions.

12 years ago- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
Marius Strobl [Tue, 14 Feb 2012 00:18:35 +0000 (00:18 +0000)]
- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by: jhb
MFC after: 3 days

12 years agoEnable TLS support for ARM toolchain
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:18:18 +0000 (00:18 +0000)]
Enable TLS support for ARM toolchain

Reviewed by: cognet

12 years agoAdd thread-local storage support for arm:
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:17:43 +0000 (00:17 +0000)]
Add thread-local storage support for arm:

- Switch to Variant I TCB layout
- Use function from rtld for TCB allocation/deallocation

12 years agoAdd thread-local storage support for ARM to rtld-elf
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:16:34 +0000 (00:16 +0000)]
Add thread-local storage support for ARM to rtld-elf

Reviewed by:    cognet
Obtained from:  NetBSD

12 years agoAdd ARM relocations types used for thread-local storage
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:12:55 +0000 (00:12 +0000)]
Add ARM relocations types used for thread-local storage

Reviewed by: cognet

12 years agoAdd __aeabi_read_tp function required for thread-local storage
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:12:15 +0000 (00:12 +0000)]
Add __aeabi_read_tp function required for thread-local storage

Reviewed by: cognet

12 years agoMinor cleanup and added missing svn keywords.
Christian Brueffer [Mon, 13 Feb 2012 23:02:51 +0000 (23:02 +0000)]
Minor cleanup and added missing svn keywords.

12 years agoUse if_maddr_*lock() routines to lock the per-interface multicast
John Baldwin [Mon, 13 Feb 2012 19:35:35 +0000 (19:35 +0000)]
Use if_maddr_*lock() routines to lock the per-interface multicast
address list rather than manipulating the lock directly.

12 years ago- use struct ifnet as explicit type of the argument to the
Luigi Rizzo [Mon, 13 Feb 2012 18:56:34 +0000 (18:56 +0000)]
- use struct ifnet as explicit type of the argument to the
  txsync() and rxsync() callbacks, removing some variables made
  useless by this change;

- add generic lock and irq handling routines. These can be useful
  in case there are no driver locks that we can reuse;

- add a few macros to reduce differences with the Linux version.

12 years agoUse the non-sleeping variang of t4_wr_mbox in code that can be called
Navdeep Parhar [Mon, 13 Feb 2012 18:41:32 +0000 (18:41 +0000)]
Use the non-sleeping variang of t4_wr_mbox in code that can be called
with locks held.

MFC after: 1 day

12 years agoAdd a sysctl to report the firmware build number.
Ed Maste [Mon, 13 Feb 2012 16:48:49 +0000 (16:48 +0000)]
Add a sysctl to report the firmware build number.

Some older firmware versions have issues that can be worked around by
avoiding certain operations.  Add a sysctl dev.aac.#.firmware_build to
make it easy for scripts or userland tools to detect the firmware
version.

12 years agoFix write(1) to support wide characters.
Gleb Smirnoff [Mon, 13 Feb 2012 14:40:15 +0000 (14:40 +0000)]
Fix write(1) to support wide characters.

Submitted by: amdmi3
PR: bin/164317

12 years agoNo need to optimise for a node with no hooks, my braino.
Gleb Smirnoff [Mon, 13 Feb 2012 13:07:56 +0000 (13:07 +0000)]
No need to optimise for a node with no hooks, my braino.

12 years agoPolish diff against upstream.
Ed Schouten [Mon, 13 Feb 2012 11:59:59 +0000 (11:59 +0000)]
Polish diff against upstream.

- Revert unneeded whitespace changes.
- Revert modifications to loginrec.c, as the upstream version already
  does the right thing.
- Fix indentation and whitespace of local changes.

Approved by: des
MFC after: 1 month

12 years agoAdd missed EOL when die() was converted to use rtld_fdputstr() instead
Konstantin Belousov [Mon, 13 Feb 2012 11:15:29 +0000 (11:15 +0000)]
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().

Reported by: amdmi3
PR: bin/165075
MFC after: 3 days

12 years agoCorrect the 802.11s mesh configuration structure and related tidbits.
Adrian Chadd [Mon, 13 Feb 2012 07:47:36 +0000 (07:47 +0000)]
Correct the 802.11s mesh configuration structure and related tidbits.

* Change the mesh IE size to be IEEE80211_MESH_CONF_SZ rather than the
  size of the structure;
* conf_cap is now a uint8_t rather than a uint16_t (uint16_t in D3.0,
  uint8_t in the amendment spec);
* Update mesh config capability bits - earlier bits were from draft X,
  current is amendment spec;
* Update the following to be an enum rather than #define and added
  a VENDOR entry too from the amendment spec;
  IEEE80211_MESHCONF_PATH_*
  IEEE80211_MESHCONF_METRIC_*
  IEEE80211_MESHCONF_CC_*
  IEEE80211_MESHCONF_SYNC_*
  IEEE80211_MESHCONF_AUTH_*
* Kept IEEE80211_MESHCONF_FORM_* and IEEE80211_MESHCONF_CAP_* as
  defines because they are defined in a way that we need to mask in/out
  information;
* In IEEE80211_MESHCONF_CAP_* IEEE80211_MESHCONF_CAP_TBTTA is removed
  and 0x80 is made reserved as defined in the amendment spec.

Submitted by: monthadar@gmail.com
Reviewed by: rpaulo

12 years agoRe-generate /etc/devd/usb.conf
Hans Petter Selasky [Mon, 13 Feb 2012 07:47:16 +0000 (07:47 +0000)]
Re-generate /etc/devd/usb.conf

MFC after: 1 day

12 years agoFix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"
Ed Maste [Mon, 13 Feb 2012 01:44:12 +0000 (01:44 +0000)]
Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"

When performing a firmware upgrade via atacontrol[1] the subsequent
command may time out producing the error message above.  When this
happens the callout could still be active, and the system would then
panic due to a destroyed semaphore.

Instead, ensure that the callout is done first, via callout_drain.

Note that this fix applies to the "old" ata(4) and so isn't applicable
to the default configuration in HEAD.  It is still applicable to
stable/8.

[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html

Submitted by:   Nima Misaghian
Reviewed by:    rstone, attilio, mav
Obtained from:  SVOS
MFC after:      3 days

12 years agoMissing conditions in checking whether an inode has been written.
Kirk McKusick [Mon, 13 Feb 2012 01:33:39 +0000 (01:33 +0000)]
Missing conditions in checking whether an inode has been written.

Found and tested by: Peter Holm
MFC after:           2 weeks (to 9 only)

12 years agoAttempt to address some potential vap->iv_bss race conditions.
Adrian Chadd [Mon, 13 Feb 2012 00:28:41 +0000 (00:28 +0000)]
Attempt to address some potential vap->iv_bss race conditions.

There are unfortunately a number of situations where vap->iv_bss is changed
or freed by some code in net80211.  Because multiple threads can concurrently
be doing work (and the vap->iv_bss access isn't at all done behind any kind
of lock), it's quite possible that:

* a change will occur in one thread - eg, by a call through
  ieee80211_sta_join1();
* a state change occurs in another thread - eg an RX is scheduled
  in the ath tasklet and it calls ieee80211_input_mimo_all(), which
  does dereference vap->iv_bss;
* these two executing concurrently, causing things to explode.

Another instance is ath_beacon_alloc() which takes an ieee80211_node *.
It's called with the vap->iv_bss node from ath_newstate(). If the node has
changed in the meantime (say it's been freed elsewhere) the reference
that it grabbed _before_ refcounting it may be stale.

I would _prefer_ that these sorts of things were serialised somewhere but
that may be a bit much to ask.  Instead, the best we can (currently) hope
is that the underlying bss node is still (somewhat) valid.

There is a related PR (kern/164382) described by the first case above.
That should be fixed by properly serialising the RX path and reset path
so an RX can't occur at the same time as the vap free/shutdown path.

This is inspired by some related fixes in r212127.

PR: kern/165060

12 years agoPrevent periodic scripts that run longer than the expected period from
Brooks Davis [Sun, 12 Feb 2012 23:18:05 +0000 (23:18 +0000)]
Prevent periodic scripts that run longer than the expected period from
starting up before the previous script finishes.  This prevents an
infinite number of them from piling up and slowing a system down.

Since all the refactoring to make this happen required churning the
indenting of most of this file, make the indentation more consistent.

Reviewed by: simon
MFC after: 1 week

12 years agoFix a typo.
Robert Millan [Sun, 12 Feb 2012 19:29:34 +0000 (19:29 +0000)]
Fix a typo.

Approved by: kib (mentor)
Reported by: lwhsu, Niclas Zeising <zeising@daemonic.se>
MFC after: 5 days

12 years agoGlobally replace u_int*_t from (non-contributed) man pages.
Ed Schouten [Sun, 12 Feb 2012 18:29:56 +0000 (18:29 +0000)]
Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after: 1 month

12 years agostart watchdogd before most of other daemons/servers
Andriy Gapon [Sun, 12 Feb 2012 14:58:50 +0000 (14:58 +0000)]
start watchdogd before most of other daemons/servers

The main benefit is that watchdogd would shutdown after most of other
daemons/servers and thus, for example, would remedy a system hang caused
by unlucky X server shutdown.

Reviewed by: dougb (earlier version)
MFC after: 2 weeks

12 years agoMove WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid "universe"
Robert Millan [Sun, 12 Feb 2012 14:55:27 +0000 (14:55 +0000)]
Move WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid "universe"
target processing them as if they were standalone kernel config files.

Approved by: kib (mentor)
MFC after: 5 days

12 years agonewvers.sh: unbreak git/git-svn support
Andriy Gapon [Sun, 12 Feb 2012 14:54:19 +0000 (14:54 +0000)]
newvers.sh: unbreak git/git-svn support

MFC after: 2 weeks

12 years agoAvoid using BEFORE in the utx rc script.
Ed Schouten [Sun, 12 Feb 2012 07:45:48 +0000 (07:45 +0000)]
Avoid using BEFORE in the utx rc script.

Requested by: dougb

12 years agoInclude target names in diagnostic output.
Max Khon [Sun, 12 Feb 2012 05:34:01 +0000 (05:34 +0000)]
Include target names in diagnostic output.

Submitted by: Garrett Cooper

12 years ago- Use fixed-width integer types.
Max Khon [Sun, 12 Feb 2012 05:14:12 +0000 (05:14 +0000)]
- Use fixed-width integer types.
- Prefer to use C99 stdint types.

This fixes ng_cisco on 64-bit architectures.

MFC after: 1 week

12 years agoAnd of course, I forgot to add -a to the usage.
Ed Schouten [Sat, 11 Feb 2012 21:50:44 +0000 (21:50 +0000)]
And of course, I forgot to add -a to the usage.

12 years agoAttempt to implement who -a.
Ed Schouten [Sat, 11 Feb 2012 21:49:23 +0000 (21:49 +0000)]
Attempt to implement who -a.

According to POSIX, -a is equal to -bdlprtTu.  It seems this is not true
in practice, as -b normally restricts the output to BOOT_TIME entries
and all implementations that I know of don't.

12 years agosh: Make 'hash' return 1 if at least one utility is not found.
Jilles Tjoelker [Sat, 11 Feb 2012 21:06:45 +0000 (21:06 +0000)]
sh: Make 'hash' return 1 if at least one utility is not found.

Reported by: lme

12 years agoMove utmpx handling out of init(8).
Ed Schouten [Sat, 11 Feb 2012 20:47:16 +0000 (20:47 +0000)]
Move utmpx handling out of init(8).

This has the following advantages:

- During boot, the BOOT_TIME record is now written right after the file
  systems become writable, but before users are allowed to log in. This
  means that they can't cause `hidden logins' by logging in right before
  init(8) kicks in.

- The pututxline(3) function may potentially block on file locking,
  though this is very rare to occur. By placing it in an rc script, the
  user can still kill it with ^C if needed.

- Most importantly: jails don't use init(8). This means that a force
  reboot of a system running jails will leave stale entries in the
  accounting database of the jails individually.

12 years agoMFp4 204292:
Bjoern A. Zeeb [Sat, 11 Feb 2012 20:43:01 +0000 (20:43 +0000)]
MFp4 204292:

Ignore the NAT_T extension types so we can at least dump the SADB from
the in-base libipsec/setkey without error when NAT_T support is present
in the kernel, though not printing the additional information yet.
However in case there is no NAT_T support in kernel still consider them
to be an error.

MFC after: 8 weeks

12 years agoReplace utxrm(8) by utx(8).
Ed Schouten [Sat, 11 Feb 2012 20:28:42 +0000 (20:28 +0000)]
Replace utxrm(8) by utx(8).

At first, I added a utility called utxrm(8) to remove stale entries from
the user accounting database. It seems there are cases in which we need
to perform different operations on the database as well. Simply rename
utxrm(8) to utx(8) and place the old code under the "rm" command.

In addition to "rm", this tool supports "boot" and "shutdown", which are
going to be used by an rc-script which I am going to commit separately.

12 years agoClose a race due to dropping of the map lock between creating map entry
Konstantin Belousov [Sat, 11 Feb 2012 17:29:07 +0000 (17:29 +0000)]
Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.
Other thread might execute vmspace_fork() in between (e.g. by fork(2)),
resulting in the mapping becoming private.

Noted and reviewed by: alc
MFC after: 1 week

12 years agoNice range comparison.
Pawel Jakub Dawidek [Sat, 11 Feb 2012 16:41:52 +0000 (16:41 +0000)]
Nice range comparison.

MFC after: 3 days

12 years agoReverting last change r231449 (fix bin/164947) due to concerns voiced
Martin Cracauer [Sat, 11 Feb 2012 16:34:03 +0000 (16:34 +0000)]
Reverting last change r231449 (fix bin/164947) due to concerns voiced
on src-committers and the fact that I can only take care of this in a
week.

12 years agoThe PTRACESTOP() macro is used only once. Inline the only use and remove
Konstantin Belousov [Sat, 11 Feb 2012 14:49:25 +0000 (14:49 +0000)]
The PTRACESTOP() macro is used only once. Inline the only use and remove
the macro.

MFC after: 1 week

12 years agoProperly name the sysctl to "iflistl" rather than "iflist2", which had been
Bjoern A. Zeeb [Sat, 11 Feb 2012 13:41:38 +0000 (13:41 +0000)]
Properly name the sysctl to "iflistl" rather than "iflist2", which had been
the prototype name and slipped in in r231505.

Spotted in a reply from: bde
MFC after: 3 days

12 years agoFlesh out support for SAS1078 and SAS1078DE (which are said to actually
Marius Strobl [Sat, 11 Feb 2012 12:03:44 +0000 (12:03 +0000)]
Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip):
- The I/O port resource may not be available with these. However, given
  that we actually only need this resource for some controllers that
  require their firmware to be up- and downloaded (which excludes the
  SAS1078{,DE}) just handle failure to allocate this resource gracefully
  when possible. While at it, generally put non-fatal resource allocation
  failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
  gather elements of these controllers.

Tested by: Slawa Olhovchenkov

PR: 149220 (remaining part)

12 years agoAdd myself to calendar.
Damjan Marion [Sat, 11 Feb 2012 11:24:30 +0000 (11:24 +0000)]
Add myself to calendar.

Approved by:     cognet (mentor)

12 years agoUse the correct constant (with same value) for comparying the SA type.
Bjoern A. Zeeb [Sat, 11 Feb 2012 11:11:43 +0000 (11:11 +0000)]
Use the correct constant (with same value) for comparying the SA type.

PR: kern/142741
Submitted by: Matthijs Kooiman (matthijs stdin.nl)
MFC after: 3 days

12 years agoSet read buffer size to multiple of sizeof(struct futx).
Ed Schouten [Sat, 11 Feb 2012 11:11:13 +0000 (11:11 +0000)]
Set read buffer size to multiple of sizeof(struct futx).

If the utmpx database gets updated while an application is reading it,
there is a chance the reading application processes partially
overwritten entries. To solve this, make sure we always read a multiple
of sizeof(struct futx) at a time.

MFC after: 2 weeks

12 years agoDepend on the relevant header files.
Bjoern A. Zeeb [Sat, 11 Feb 2012 08:34:33 +0000 (08:34 +0000)]
Depend on the relevant header files.

12 years agoStart to try to hide LRO (and some TSO) bits behind #ifdefs as especially
Bjoern A. Zeeb [Sat, 11 Feb 2012 08:33:52 +0000 (08:33 +0000)]
Start to try to hide LRO (and some TSO) bits behind #ifdefs as especially
the symbols are not there when compiling a kernel without IP support and
we do have users doing so.

12 years agoRemove unused variable mii
Kevin Lo [Sat, 11 Feb 2012 08:12:52 +0000 (08:12 +0000)]
Remove unused variable mii

12 years agoUse the more common macro to set the if_baudrate to 10Gbit/s. Just use
Bjoern A. Zeeb [Sat, 11 Feb 2012 07:47:06 +0000 (07:47 +0000)]
Use the more common macro to set the if_baudrate to 10Gbit/s.  Just use
UL not ULL, which should make 32bit archs more happy.

12 years agoMake use of the read-only variant of the IF_ADDR_*LOCK() macros introduced
Bjoern A. Zeeb [Sat, 11 Feb 2012 07:43:33 +0000 (07:43 +0000)]
Make use of the read-only variant of the IF_ADDR_*LOCK() macros introduced
in r229614 rather than the compat one.

12 years agoIn the days before r208307 addswap was running early in the second stage
Doug Barton [Sat, 11 Feb 2012 06:21:16 +0000 (06:21 +0000)]
In the days before r208307 addswap was running early in the second stage
of rcorder. Somehow in the intervening period addswap got moved to the
very end, which is almost certainly not what we want.

This change moves it to right after kld so that for users who need it,
they'll get it ASAP.

12 years agoSwitch getifaddrs(3) to the new API introduced in r231505. Also remove
Bjoern A. Zeeb [Sat, 11 Feb 2012 06:05:40 +0000 (06:05 +0000)]
Switch getifaddrs(3) to the new API introduced in r231505.  Also remove
conditional code parts not used by or applicable to FreeBSD.

The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.

This restores carp(4) config support in HEAD after r231504.

Reviewed by: glebius, brooks
MFC After: 3 months

12 years agoIntroduce a new NET_RT_IFLISTL API to query the address list. It works
Bjoern A. Zeeb [Sat, 11 Feb 2012 06:02:16 +0000 (06:02 +0000)]
Introduce a new NET_RT_IFLISTL API to query the address list.  It works
on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
will allow us to extend both the msghdrl structs and eventually if_data
in the future without breaking the ABI.

Bump __FreeBSD_version to allow ports to more easily detect the new API.

Reviewed by: glebius, brooks
MFC after: 3 days

12 years agoBackout changes from r228571. Remove if_data from struct ifa_msghdr again.
Bjoern A. Zeeb [Sat, 11 Feb 2012 05:59:54 +0000 (05:59 +0000)]
Backout changes from r228571.  Remove if_data from struct ifa_msghdr again.
While this breaks carp on HEAD temporary, it restores the upgrade path from
stable, and head before 20111215.

Reviewed by: glebius, brooks

12 years agoMake code more stable by checking NULL pointers.
David Xu [Sat, 11 Feb 2012 04:12:12 +0000 (04:12 +0000)]
Make code more stable by checking NULL pointers.

12 years agoAdd handlers for TLS-related relocation entries
Oleksandr Tymoshenko [Sat, 11 Feb 2012 00:54:57 +0000 (00:54 +0000)]
Add handlers for TLS-related relocation entries

12 years agoReturn BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
Kenneth D. Merry [Sat, 11 Feb 2012 00:28:30 +0000 (00:28 +0000)]
Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
probe routine.

This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to
override the in-tree version of the driver.

MFC after: 3 days

12 years agoDe-obfuscate acpi_acquire_global_lock(). It seems the function was directly
Jung-uk Kim [Fri, 10 Feb 2012 23:30:29 +0000 (23:30 +0000)]
De-obfuscate acpi_acquire_global_lock().  It seems the function was directly
translated from i386 assembly version.

12 years ago- Reverse logic so base tls is fixed up with correct number
Oleksandr Tymoshenko [Fri, 10 Feb 2012 23:24:33 +0000 (23:24 +0000)]
- Reverse logic so base tls is fixed up with correct number

12 years agoFix bin/164947: tee looses data when writing to non-blocking file descriptors
Martin Cracauer [Fri, 10 Feb 2012 22:16:17 +0000 (22:16 +0000)]
Fix bin/164947: tee looses data when writing to non-blocking file descriptors

tee was not handling EAGAIN

patch submitted by Diomidis Spinellis <dds@aueb.gr>. Thanks so much

reproduced and re-tested locally

12 years agoAdd a test program for recently added ptrace(2) interfaces.
Konstantin Belousov [Fri, 10 Feb 2012 21:33:12 +0000 (21:33 +0000)]
Add a test program for recently added ptrace(2) interfaces.

MFC after: 1 week

12 years agoIn cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
Konstantin Belousov [Fri, 10 Feb 2012 21:26:25 +0000 (21:26 +0000)]
In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
both 64bit and 32bit binaries, not for 64bit only.

The set of the flag is not neccessary there, because the only current
user of the cpu_set_user_tls() is create_thread(), which calls
cpu_set_upcall() before and cpu_set_upcall() itself sets PCB_FULL_IRET.
Change the function for consistency and preserve existing KPI for now.

MFC after: 1 week

12 years agoAdd a driver for Emulex OneConnect ethernet cards (10 Gbit PCIe)
Luigi Rizzo [Fri, 10 Feb 2012 21:03:04 +0000 (21:03 +0000)]
Add a driver for Emulex OneConnect ethernet cards (10 Gbit PCIe)
A manpage will come in a future commit.

Submitted by:   Naresh Raju Gottumukkala (emulex)

12 years agoRemove debug output
Oleksandr Tymoshenko [Fri, 10 Feb 2012 19:58:04 +0000 (19:58 +0000)]
Remove debug output

12 years ago- Fix spelling of R_MIPS_RELGOT
Oleksandr Tymoshenko [Fri, 10 Feb 2012 19:17:14 +0000 (19:17 +0000)]
- Fix spelling of R_MIPS_RELGOT
- Add R_MIPS_JALR relocation
- Add TLS relocation types

Obtained from: NetBSD

12 years agoReduce diffs against i386.
Yoshihiro Takahashi [Fri, 10 Feb 2012 15:34:36 +0000 (15:34 +0000)]
Reduce diffs against i386.

MFC after: 1 week

12 years agoRemove unneeded newline. It fits in 80 columns now.
Ed Schouten [Fri, 10 Feb 2012 14:55:47 +0000 (14:55 +0000)]
Remove unneeded newline. It fits in 80 columns now.

Pointed out by: jh

12 years agoCorrect date. It seems to be 2012.
Ed Schouten [Fri, 10 Feb 2012 13:51:02 +0000 (13:51 +0000)]
Correct date. It seems to be 2012.

12 years agoUnbreak build.
Ed Schouten [Fri, 10 Feb 2012 13:47:40 +0000 (13:47 +0000)]
Unbreak build.

libprocstat still uses __si_namebuf.

12 years agoDetect file modification properly by using tv_nsec.
Ed Schouten [Fri, 10 Feb 2012 13:40:32 +0000 (13:40 +0000)]
Detect file modification properly by using tv_nsec.

POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.

MFC after: 2 weeks

12 years agoMerge si_name and __si_namebuf.
Ed Schouten [Fri, 10 Feb 2012 12:40:50 +0000 (12:40 +0000)]
Merge si_name and __si_namebuf.

The si_name pointer always points to the __si_namebuf member inside the
same object. Remove it and rename __si_namebuf to si_name.

12 years agoRemove direct access to si_name.
Ed Schouten [Fri, 10 Feb 2012 12:35:57 +0000 (12:35 +0000)]
Remove direct access to si_name.

Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.

MFC after: 2 weeks

12 years agoBe more helpful about alternate superblocks.
Edward Tomasz Napierala [Fri, 10 Feb 2012 12:01:19 +0000 (12:01 +0000)]
Be more helpful about alternate superblocks.

12 years agoRemove outdated piece of information.
Ed Schouten [Fri, 10 Feb 2012 11:20:13 +0000 (11:20 +0000)]
Remove outdated piece of information.

devtoname() always returns a pathname to the device. It will never
return a #major/minor string.

MFC after: 2 weeks

12 years agoEnforce the hardware chainmask when allowing the user to override the
Adrian Chadd [Fri, 10 Feb 2012 10:10:41 +0000 (10:10 +0000)]
Enforce the hardware chainmask when allowing the user to override the
chainmask.

This way a disabled radio chain can't be enabled by a user.

12 years ago.. oops, use the right chainmask.
Adrian Chadd [Fri, 10 Feb 2012 10:09:16 +0000 (10:09 +0000)]
.. oops, use the right chainmask.

12 years agoAdd in a new driver feature to allow the TX and RX chainmask to be
Adrian Chadd [Fri, 10 Feb 2012 10:01:09 +0000 (10:01 +0000)]
Add in a new driver feature to allow the TX and RX chainmask to be
overridden at attach time.

Some 802.11n NICs may only have one physical antenna connected.
The radios will be very upset if you try enabling radios which aren't
connected to antennas.

This allows hints to override the TX and RX chainmask.

These hints are:

hint.ath.X.rx_chainmask
hint.ath.X.tx_chainmask

They can be set at either boot time or in kenv before the module is loaded.

This and the previous HAL commit were sponsored in late 2011 by Hobnob, Inc.

Sponsored by: Hobnob, Inc.

12 years agoExtend the HAL code to allow the RX and TX chainmask to be overridden
Adrian Chadd [Fri, 10 Feb 2012 09:58:20 +0000 (09:58 +0000)]
Extend the HAL code to allow the RX and TX chainmask to be overridden
by capabilities.

Add an ar5416SetCapability() function, which contains logic to override
the chainmask and update the relevant stream.

This is designed to be called after the attach function, which presets
the TX/RX chainmask and stream.

TODO: check the chainmask against the hardware chainmask so non-existing
chains aren't enabled.

12 years agoAdd alias for the partition with type 0x42 to the MBR scheme.
Andrey V. Elsukov [Fri, 10 Feb 2012 09:55:18 +0000 (09:55 +0000)]
Add alias for the partition with type 0x42 to the MBR scheme.

MFC after: 1 week

12 years agoFix-up value passed by thr_new syscall to make it compatible
Oleksandr Tymoshenko [Fri, 10 Feb 2012 07:03:45 +0000 (07:03 +0000)]
Fix-up value passed by thr_new syscall to make it compatible
with MIPS_TLS_GET/MIPS_TLS_SET sysarch API.

12 years agoSwitch MIPS TLS implementation to Variant I:
Oleksandr Tymoshenko [Fri, 10 Feb 2012 06:53:25 +0000 (06:53 +0000)]
Switch MIPS TLS implementation to Variant I:

Save pointer to the TLS structure taking into account TP_OFFSET
and TCB structure size.

12 years agoLet's be more realistic and limit maximum number of partition to 4k.
Andrey V. Elsukov [Fri, 10 Feb 2012 06:44:30 +0000 (06:44 +0000)]
Let's be more realistic and limit maximum number of partition to 4k.

MFC after: 1 week

12 years agoSwitch MIPS TLS implementation to Variant I
Oleksandr Tymoshenko [Fri, 10 Feb 2012 06:42:50 +0000 (06:42 +0000)]
Switch MIPS TLS implementation to Variant I

12 years agoAdd a missing break. This bug was introduced in r228856.
Kevin Lo [Fri, 10 Feb 2012 06:30:52 +0000 (06:30 +0000)]
Add a missing break. This bug was introduced in r228856.

12 years agoImplement -print-file-name=include (which is undocumented
Tim Kientzle [Fri, 10 Feb 2012 05:05:42 +0000 (05:05 +0000)]
Implement -print-file-name=include (which is undocumented
but used by some Linux boot loaders).  This option prints
out the directory holding the include files needed by
a freestanding program.  The default implementation of
this doesn't work on FreeBSD because of the different
include file layout.  But it's easy to implement:
just return /usr/include (or the cross-compiling equivalent).

Reviewed by: kan
MFC after: 1 week

12 years agoFix date from r231111.
Glen Barber [Fri, 10 Feb 2012 03:34:32 +0000 (03:34 +0000)]
Fix date from r231111.

Pointy-hat to: gjb (myself, approver of r231111)

12 years agoFix debug output for MIPS part of rtld
Oleksandr Tymoshenko [Fri, 10 Feb 2012 03:30:57 +0000 (03:30 +0000)]
Fix debug output for MIPS part of rtld