]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoUpgrade our copy of llvm/clang to r132879, from upstream's trunk.
dim [Sun, 12 Jun 2011 18:01:31 +0000 (18:01 +0000)]
Upgrade our copy of llvm/clang to r132879, from upstream's trunk.

13 years agoVendor import of llvm trunk r132879:
dim [Sun, 12 Jun 2011 15:42:51 +0000 (15:42 +0000)]
Vendor import of llvm trunk r132879:
http://llvm.org/svn/llvm-project/llvm/trunk@132879

13 years agoI forgot what year it is, apparently.
nwhitehorn [Sun, 12 Jun 2011 15:19:38 +0000 (15:19 +0000)]
I forgot what year it is, apparently.

Submitted by: brucec

13 years agosh: Add test for LC_COLLATE-based character ranges in case.
jilles [Sun, 12 Jun 2011 12:55:46 +0000 (12:55 +0000)]
sh: Add test for LC_COLLATE-based character ranges in case.

13 years agosh: Fix locale-dependent ranges in bracket expressions.
jilles [Sun, 12 Jun 2011 12:54:52 +0000 (12:54 +0000)]
sh: Fix locale-dependent ranges in bracket expressions.

When I added UTF-8 support in r221646, the LC_COLLATE-based ordering broke
because of sign extension of char.

Because of libc restrictions, this does not work for UTF-8. For UTF-8
locales, ranges always use character code order.

13 years ago- Use REG_NOSUB to bypass submatch counting when not necessary. This may
gabor [Sun, 12 Jun 2011 12:51:58 +0000 (12:51 +0000)]
- Use REG_NOSUB to bypass submatch counting when not necessary. This may
  yield in somewhat better performance in a few cases.

Approved by: delphij (mentor)

13 years ago- Fix -w behavior
gabor [Sun, 12 Jun 2011 12:44:02 +0000 (12:44 +0000)]
- Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR: bin/156826
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: delphij (mentor)

13 years agosh: Add test for case pattern matching with iso-8859-1 charset.
jilles [Sun, 12 Jun 2011 12:27:17 +0000 (12:27 +0000)]
sh: Add test for case pattern matching with iso-8859-1 charset.

This also passes on stable/8.

13 years agosh: Read .profile from the home directory (or / if HOME is not set).
jilles [Sun, 12 Jun 2011 10:13:48 +0000 (10:13 +0000)]
sh: Read .profile from the home directory (or / if HOME is not set).

In most cases, login shells are started from the home directory, but not in
all, such as xterm -ls.

This commit depends on r222957 for read_profile() performing parameter
expansion.

PR: bin/50569

13 years agoAdd an MBR to our release media to aid booting some IBM systems.
nwhitehorn [Sun, 12 Jun 2011 00:14:57 +0000 (00:14 +0000)]
Add an MBR to our release media to aid booting some IBM systems.

13 years agoLong-overdue man page for bsdinstall.
nwhitehorn [Sat, 11 Jun 2011 21:44:07 +0000 (21:44 +0000)]
Long-overdue man page for bsdinstall.

13 years ago- Remove $ipv6_gateway_enable check.
hrs [Sat, 11 Jun 2011 21:41:44 +0000 (21:41 +0000)]
- Remove $ipv6_gateway_enable check.
- Use list_net_interfaces() instead of "ifconfig -l".

13 years agoAdd a helper function to check kern.features.* sysctls.
hrs [Sat, 11 Jun 2011 21:40:37 +0000 (21:40 +0000)]
Add a helper function to check kern.features.* sysctls.

Discussed with: dougb

13 years agoAdd self
crees [Sat, 11 Jun 2011 21:27:14 +0000 (21:27 +0000)]
Add self

Approved by: rene (mentor)

13 years agoAdd self to calendar
crees [Sat, 11 Jun 2011 21:26:12 +0000 (21:26 +0000)]
Add self to calendar

Approved by: rene (mentor)

13 years agoMake three one line changes to the rc scripts so that
rmacklem [Sat, 11 Jun 2011 21:14:22 +0000 (21:14 +0000)]
Make three one line changes to the rc scripts so that
they work with the new NFS client being the default,
since the new NFS client's module name is nfscl and
not nfsclient.

13 years agoAssert that page is VPO_BUSY or page owner object is locked in
kib [Sat, 11 Jun 2011 20:15:19 +0000 (20:15 +0000)]
Assert that page is VPO_BUSY or page owner object is locked in
vm_page_undirty(). The assert is not precise due to VPO_BUSY owner
to tracked, so assertion does not catch the case when VPO_BUSY is
owned by other thread.

Reviewed by: alc

13 years agoFix a bug in r222586. Lock the page owner object around the modification
kib [Sat, 11 Jun 2011 20:13:28 +0000 (20:13 +0000)]
Fix a bug in r222586. Lock the page owner object around the modification
of the m->dirty.

Reported and tested by: nwhitehorn
Reviewed by: alc

13 years agoFollow up r222980 on PowerPC: add sound(4) and common device drivers
nwhitehorn [Sat, 11 Jun 2011 12:34:08 +0000 (12:34 +0000)]
Follow up r222980 on PowerPC: add sound(4) and common device drivers
to PowerPC GENERIC (along with a small rearrangement).

13 years agoEnable sound support by default on i386 and amd64.
joel [Sat, 11 Jun 2011 09:08:46 +0000 (09:08 +0000)]
Enable sound support by default on i386 and amd64.

The generic sound driver has been added, along with enough
device-specific drivers to support the most common audio
chipsets.

We've discussed enabling it from time to time over the years
and we've received numerous requests from users, so we decided
that shipping 9.0 with working audio by default would be the
best thing to do.

Bug reports should be sent to the multimedia@ mailing list, as
usual.

Approved by:    mav
No objection:   re

13 years agoMonitor and emit events for XenStore changes to XenBus trees
gibbs [Sat, 11 Jun 2011 04:59:01 +0000 (04:59 +0000)]
Monitor and emit events for XenStore changes to XenBus trees
of the devices we manage.  These changes can be due to writes
we make ourselves or due to changes made by the control domain.
The goal of these changes is to insure that all state transitions
can be detected regardless of their source and to allow common
device policies (e.g. "onlined" backend devices) to be centralized
in the XenBus bus code.

sys/xen/xenbus/xenbusvar.h:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbus_if.m:
Add a new method for XenBus drivers "localend_changed".
This method is invoked whenever a write is detected to
a device's XenBus tree.  The default implementation of
this method is a no-op.

sys/xen/xenbus/xenbus_if.m:
sys/dev/xen/netfront/netfront.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Change the signature of the "otherend_changed" method.
This notification cannot fail, so it should return void.

sys/xen/xenbus/xenbusb_back.c:
Add "online" device handling to the XenBus Back Bus
support code.  An online backend device remains active
after a front-end detaches as a reconnect is expected
to occur in the near future.

sys/xen/interface/io/xenbus.h:
Add comment block further explaining the meaning and
driver responsibilities associated with the XenBus
Closed state.

sys/xen/xenbus/xenbusb.c:
sys/xen/xenbus/xenbusb.h:
sys/xen/xenbus/xenbusb_back.c:
sys/xen/xenbus/xenbusb_front.c:
sys/xen/xenbus/xenbusb_if.m:
o Register a XenStore watch against the local XenBus tree
  for all devices.
o Cache the string length of the path to our local tree.
o Allow the xenbus front and back drivers to hook/filter both
  local and otherend watch processing.
o Update the device ivar version of "state" when we detect
  a XenStore update of that node.

sys/dev/xen/control/control.c:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbusb.c:
sys/xen/xenbus/xenbusb.h:
sys/xen/xenbus/xenbusvar.h:
sys/xen/xenstore/xenstorevar.h:
Allow clients of the XenStore watch mechanism to attach
a single uintptr_t worth of client data to the watch.
This removes the need to carefully place client watch
data within enclosing objects so that a cast or offsetof
calculation can be used to convert from watch to enclosing
object.

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

13 years agoAdd "context" subcommand to fetch and display SGE context.
np [Sat, 11 Jun 2011 04:55:15 +0000 (04:55 +0000)]
Add "context" subcommand to fetch and display SGE context.

13 years ago- driver ioctl to get SGE context for any given queue.
np [Sat, 11 Jun 2011 04:50:54 +0000 (04:50 +0000)]
- driver ioctl to get SGE context for any given queue.
- sysctls to display the context id, cidx, and pidx of all kinds of queues.

MFC after: 3 days

13 years agoSupport SIGHUP for reloading /etc/rtadvd.conf.
hrs [Sat, 11 Jun 2011 03:25:10 +0000 (03:25 +0000)]
Support SIGHUP for reloading /etc/rtadvd.conf.

13 years agoAdd the model number for the Montvale processor (marketed as Itanium 2 9100).
marcel [Sat, 11 Jun 2011 02:22:11 +0000 (02:22 +0000)]
Add the model number for the Montvale processor (marketed as Itanium 2 9100).
At this time we're missing just one: Tukwila (Itanium 2 9300).

13 years agoAdd comments about the validation.
delphij [Sat, 11 Jun 2011 01:19:19 +0000 (01:19 +0000)]
Add comments about the validation.

13 years agoImplement fully asynchronous partial truncation with softupdates journaling
jeff [Fri, 10 Jun 2011 22:48:35 +0000 (22:48 +0000)]
Implement fully asynchronous partial truncation with softupdates journaling
to resolve errors which can cause corruption on recovery with the old
synchronous mechanism.

 - Append partial truncation freework structures to indirdeps while
   truncation is proceeding.  These prevent new block pointers from
   becoming valid until truncation completes and serialize truncations.
 - On completion of a partial truncate journal work waits for zeroed
   pointers to hit indirects.
 - softdep_journal_freeblocks() handles last frag allocation and last
   block zeroing.
 - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it
   is only implemented in one place.
 - Block allocation failure handling moved up one level so it does not
   proceed with buf locks held.  This permits us to do more extensive
   reclaims when filesystem space is exhausted.
 - softdep_sync_metadata() is broken into two parts, the first executes
   once at the start of ffs_syncvnode() and flushes truncations and
   inode dependencies.  The second is called on each locked buf.  This
   eliminates excessive looping and rollbacks.
 - Improve the mechanism in process_worklist_item() that handles
   acquiring vnode locks for handle_workitem_remove() so that it works
   more generally and does not loop excessively over the same worklist
   items on each call.
 - Don't corrupt directories by zeroing the tail in fsck.  This is only
   done for regular files.
 - Push a fsync complete record for files that need it so the checker
   knows a truncation in the journal is no longer valid.

Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts)
Tested by: pho

13 years agosh: Do parameter expansion on ENV before using it.
jilles [Fri, 10 Jun 2011 22:42:00 +0000 (22:42 +0000)]
sh: Do parameter expansion on ENV before using it.

This is required by POSIX, and allows things like ENV=\$HOME/.shrc.

Note that tilde expansion is explicitly not performed.

13 years ago - Eliminate an incorrect include path from the mthca build.
jeff [Fri, 10 Jun 2011 22:38:31 +0000 (22:38 +0000)]
 - Eliminate an incorrect include path from the mthca build.

13 years ago - Add support for referencing quota structures without needing the inode
jeff [Fri, 10 Jun 2011 22:19:44 +0000 (22:19 +0000)]
 - Add support for referencing quota structures without needing the inode
   pointer for softupdates.

Submitted by: mckusick

13 years ago - If the fsync in ufs_direnter fails SUJ can later panic because we have
jeff [Fri, 10 Jun 2011 22:18:25 +0000 (22:18 +0000)]
 - If the fsync in ufs_direnter fails SUJ can later panic because we have
   partially added a name.  Allow ufs_direnter() to continue in the
   hopes that it is a transient error.  If it is not, the directory
   is corrupted already from IO errors and writing this new block
   is not likely to make things worse.

13 years ago - When printing bufs with show buf the lblkno is often more useful than
jeff [Fri, 10 Jun 2011 22:15:36 +0000 (22:15 +0000)]
 - When printing bufs with show buf the lblkno is often more useful than
   the blkno.  Print them both.

13 years agoInclude sys/xen in cscope tag file generation.
gibbs [Fri, 10 Jun 2011 20:51:41 +0000 (20:51 +0000)]
Include sys/xen in cscope tag file generation.

13 years ago- Fix races on detach handling of AAC_IFFLAGS_* mask
attilio [Fri, 10 Jun 2011 20:23:56 +0000 (20:23 +0000)]
- Fix races on detach handling of AAC_IFFLAGS_* mask
- Fix races on setting AAC_AIFFLAGS_ALLOCFIBS
- Remove some unused AAC_IFFLAGS_* bits.
  Please note that the kthread still makes a difference between the
  total mask and AAC_AIFFLAGS_ALLOCFIBS because more flags may be
  added in the future to aifflags.

Sponsored by: Sandvine Incorporated
Reported and reviewed by: emaste
MFC after: 2 weeks

13 years agoRemove C constructs that are incompatible with C++ from various
gibbs [Fri, 10 Jun 2011 20:10:30 +0000 (20:10 +0000)]
Remove C constructs that are incompatible with C++ from various
OpenSolaris and ZFS header files.  These changes are sufficient
to allow a C++ program to use the libzfs library.

Note: The majority of these files already included 'extern "C"'
      declarations, so the intention of providing C++ compatibility
      already existed even if it wasn't provided.

cddl/compat/opensolaris/include/assert.h:
Wrap our compatibility assert implementation in
'extern "C"'.  Since this is a compatibility header
I matched the Solaris style of doing this explicitly
rather than rely on FreeBSD's __BEGIN/END_DECLS macro.

sys/cddl/compat/opensolaris/sys/kstat.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h:
Rename parameters in function declarations that conflict
with C++ keywords.  This was the solution preferred by
members of the Illumos community.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h:
In C, nested structures are visible in the global namespace,
but in C++, they take on the namespace of the structure in
which they are contained.  Flatten nested structure
definitions within struct zfs_cmd so these structures are
visible in the global namespace when compiled in both
languages.

Sponsored by:  Spectra Logic Corporation

13 years agoMake sure to drop the IEEE80211_RATE_BASIC flag even for MCS rates.
bschmidt [Fri, 10 Jun 2011 17:06:25 +0000 (17:06 +0000)]
Make sure to drop the IEEE80211_RATE_BASIC flag even for MCS rates.

Reported by: Maciej Milewski <milu at dat dot pl>
Tested by: Maciej Milewski <milu at dat dot pl>

13 years agoskel/.shrc: Improve commented CDPATH example for POSIX requirements.
jilles [Fri, 10 Jun 2011 13:47:11 +0000 (13:47 +0000)]
skel/.shrc: Improve commented CDPATH example for POSIX requirements.

POSIX says an empty entry in CDPATH shall not result in the new directory
being printed, while any non-empty entry shall result in the new directory
being printed, including ".". Therefore, the value of CDPATH should almost
always start with a colon, not dot and colon.

Our sh does not print the name for empty entries as well as "." entries.

MFC after: 1 week

13 years agoFix some off-by-one errors with the ending address of candidate regions
jhb [Fri, 10 Jun 2011 13:24:56 +0000 (13:24 +0000)]
Fix some off-by-one errors with the ending address of candidate regions
when attempting to grow a window.

13 years agoImplement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
jhb [Fri, 10 Jun 2011 12:30:16 +0000 (12:30 +0000)]
Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
Host-PCI bridge drivers and nexus.

13 years agoObtain bswap64() function implementation from
rodrigc [Fri, 10 Jun 2011 01:13:15 +0000 (01:13 +0000)]
Obtain bswap64() function implementation from
version 1.3 of src/common/lib/libc/gen/bswap64.c in NetBSD.

Obtained from: NetBSD

13 years agosh: Do parameter expansion before printing PS4 (set -x).
jilles [Thu, 9 Jun 2011 23:12:23 +0000 (23:12 +0000)]
sh: Do parameter expansion before printing PS4 (set -x).

The function name expandstr() and the general idea of doing this kind of
expansion by treating the text as a here document without end marker is from
dash.

All variants of parameter expansion and arithmetic expansion also work (the
latter is not required by POSIX but it does not take extra code and many
other shells also allow it).

Command substitution is prevented because I think it causes too much code to
be re-entered (for example creating an unbounded recursion of trace lines).

Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would
be quite useful.

13 years agoMFV: Update to less v444.
delphij [Thu, 9 Jun 2011 22:52:57 +0000 (22:52 +0000)]
MFV: Update to less v444.

MFC after: 2 weeks

13 years agocxgbetool: a tool for the cxgbe(4) driver.
np [Thu, 9 Jun 2011 20:21:45 +0000 (20:21 +0000)]
cxgbetool: a tool for the cxgbe(4) driver.

13 years agoContrary to when returning in all-good cases at the end of functions we
bz [Thu, 9 Jun 2011 19:52:28 +0000 (19:52 +0000)]
Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by: Mark Johnston (1)
Reported by: attilio (2)
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week

13 years agoAdd -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
nwhitehorn [Thu, 9 Jun 2011 19:47:30 +0000 (19:47 +0000)]
Add -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
clang, which would otherwise complain about some 64-bit bridge mode
instructions.

13 years agoIntel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's,
mav [Thu, 9 Jun 2011 16:30:13 +0000 (16:30 +0000)]
Intel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's,
but has only 2 SATA ports instead of 4. The worst part is that SStatus and
SError registers for missing ports are not implemented and return wrong
values (0xffffffff), that caused infinite reset loop.

Just ignore that SError value while I found no better way to identify them.

13 years agoMinor typo, fix 2 attributions
dougb [Thu, 9 Jun 2011 06:10:39 +0000 (06:10 +0000)]
Minor typo, fix 2 attributions

13 years agoTidy up r222866.
jkim [Wed, 8 Jun 2011 23:44:59 +0000 (23:44 +0000)]
Tidy up r222866.

- Re-add accidentally removed atomic op. for sysctl(9) handler.
- Remove a period(`.') at the end of a debugging message.
- Consistently spell "low" for "TSC-low" timecounter throughout.

Pointed out by: bde

13 years agoAdd dump.c to the rtsol build. It is needed now that sec2str is non-static
ken [Wed, 8 Jun 2011 21:59:07 +0000 (21:59 +0000)]
Add dump.c to the rtsol build.  It is needed now that sec2str is non-static
and used in rtsold.c.

13 years agosh: Add simple tests for set -x and PS4.
jilles [Wed, 8 Jun 2011 21:58:19 +0000 (21:58 +0000)]
sh: Add simple tests for set -x and PS4.

13 years agoSimply post r222273.
obrien [Wed, 8 Jun 2011 21:29:33 +0000 (21:29 +0000)]
Simply post r222273.

13 years ago- Major reorganization of mbuf handling throughout the driver to
davidch [Wed, 8 Jun 2011 21:18:14 +0000 (21:18 +0000)]
- Major reorganization of mbuf handling throughout the driver to
  increase robustness (no more calls to panic(9)) and simplify
  code.
- Allocate RX/TX data structures as a single buffer rather than
  an array of 4KB pages to simplify code.
- Fixed LRO (aka TPA) code.  Removed kernel module parameter and
  support enabling disabling LRO through ifconfig(8) command line.
  LRO is still disabled by default but should be enabled for best
  performance on an endpoint device.
- Fixed statistcs code and removed kernel module parameter (stats
  should just work).
- Added many software counters to help identify the cause of some
  performance issues.
- Streamlined adapter internal init/stop code paths.
- Fiddled with debug code (adding some here, removing some there).
- Continued style(9) adjustments.

13 years agoIncrease quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
jkim [Wed, 8 Jun 2011 20:08:06 +0000 (20:08 +0000)]
Increase quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
invariant.  For SMP case (TSC-low), it also has to pass SMP synchronization
test and the CPU vendor/model has to be white-listed explicitly.  Currently,
all Intel CPUs and single-socket AMD Family 15h processors are listed here.

Discussed with: hackers

13 years agoIntroduce low-resolution TSC timecounter "TSC-low". It replaces the normal
jkim [Wed, 8 Jun 2011 19:38:31 +0000 (19:38 +0000)]
Introduce low-resolution TSC timecounter "TSC-low".  It replaces the normal
TSC timecounter if TSC frequency is higher than ~4.29 MHz (or 2^32-1 Hz) or
multiple CPUs are present.  The "TSC-low" frequency is always lower than a
preset maximum value and derived from TSC frequency (by being halved until
it becomes lower than the maximum).  Note the maximum value for SMP case is
significantly lower than UP case because we want to reduce (rare but known)
"temporal anomalies" caused by non-serialized RDTSC instruction.  Normally,
it is still higher than "ACPI-fast" timecounter frequency (which was default
timecounter hardware for long time until r222222) to be useful.

13 years agoIn the current code, a double panic condition may lead to dumps
attilio [Wed, 8 Jun 2011 19:28:59 +0000 (19:28 +0000)]
In the current code, a double panic condition may lead to dumps
interleaving.
Signal dumping to happen only for the first panic which should be the
most important.

Sponsored by: Sandvine Incorporated
Submitted by: Nima Misaghian (nmisaghian AT sandvine DOT com)
MFC after: 2 weeks

13 years agoRemove a redundant assignment since r221703.
jkim [Wed, 8 Jun 2011 18:52:42 +0000 (18:52 +0000)]
Remove a redundant assignment since r221703.

13 years ago- Accumulate RA options instead of replacing old ones when a new RA arrived.
hrs [Wed, 8 Jun 2011 16:03:29 +0000 (16:03 +0000)]
- Accumulate RA options instead of replacing old ones when a new RA arrived.
  RFC 4861 6.3.4 clearly defines handling multiple RAs in this way.

- RDNSS/DNSSL options from multiple RAs on a single link will be
  gathered and sent to resolvconf(8).

- Call "resolvconf -d" only after at least one RDNSS or DNSSL option is
  received and then all of them are expired.

- The rtsold.dump output now supports displaying a list of the RA options.

- Use more human-readable expression for logging values of struct timeval.

Discussed with: ume

13 years ago- Improve error handling.
andreast [Wed, 8 Jun 2011 16:00:30 +0000 (16:00 +0000)]
- Improve error handling.
- Add retry loops in the i2c read/write functions.
- Combied the ADC channel selection and readout of the value into
  one iicbus_transfer to avoid possible races.

Reviewed by: nwhitehorn

13 years agoCompile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
nwhitehorn [Wed, 8 Jun 2011 13:23:35 +0000 (13:23 +0000)]
Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
GDB's ability to locate r_debug_state (which is actually the only function
that need be compiled this way).

13 years agoAdd the missing call to ip6_ipsec_filtertunnel() to be able to control
bz [Wed, 8 Jun 2011 10:59:36 +0000 (10:59 +0000)]
Add the missing call to ip6_ipsec_filtertunnel() to be able to control
whether decapsulated IPsec packets will be passed to pfil again depending
on the setting of the net.ip6.ipsec6.filtertunnel sysctl.

PR: kern/157670
Submitted by: Manuel Kasper (mk neon1.net)
MFC after: 2 weeks

13 years agoAdded FreeBSD 8.3.
ru [Wed, 8 Jun 2011 08:16:32 +0000 (08:16 +0000)]
Added FreeBSD 8.3.

13 years agoremove code for dynamic offlining/onlining of CPUs on x86
avg [Wed, 8 Jun 2011 08:12:15 +0000 (08:12 +0000)]
remove code for dynamic offlining/onlining of CPUs on x86

The code has definitely been broken for SCHED_ULE, which is a default
scheduler.  It may have been broken for SCHED_4BSD in more subtle ways,
e.g. with manually configured CPU affinities and for interrupt devilery
purposes.
We still provide a way to disable individual CPUs or all hyperthreading
"twin" CPUs before SMP startup.  See the UPDATING entry for details.

Interaction between building CPU topology and disabling CPUs still
remains fuzzy: topology is first built using all availble CPUs and then
the disabled CPUs should be "subtracted" from it.  That doesn't work
well if the resulting topology becomes non-uniform.

This work is done in cooperation with Attilio Rao who in addition to
reviewing also provided parts of code.

PR: kern/145385
Discussed with: gcooper, ambrisko, mdf, sbruno
Reviewed by: attilio
Tested by: pho, pluknet
X-MFC after: never

13 years agoPull up all vendor changes to mdoc(7).
ru [Wed, 8 Jun 2011 08:08:42 +0000 (08:08 +0000)]
Pull up all vendor changes to mdoc(7).

This also replaces the local fix in r219209 that made .Ac emit
ASCII angle quotes with an official fix.  In the official fix,
ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
but only when nested into the .An macro.

PR: gnu/154822

13 years ago- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
hrs [Wed, 8 Jun 2011 04:06:56 +0000 (04:06 +0000)]
- Disable "resolvconf -d" temporarily to avoid extra invocations of the script
  under a certain condition.
- Fix argv handling.

Spotted by: ume

13 years agoCorrect comments and debug logging in ipsec to better match reality.
bz [Wed, 8 Jun 2011 03:02:11 +0000 (03:02 +0000)]
Correct comments and debug logging in ipsec to better match reality.

MFC after: 3 days

13 years agoUse .Dq instead of hardcoding `` and ''.
delphij [Wed, 8 Jun 2011 00:31:10 +0000 (00:31 +0000)]
Use .Dq instead of hardcoding `` and ''.

Suggested by: gjb

13 years ago- For the case when tl1_align(_trap) is used to call rsf_fatal via
marius [Tue, 7 Jun 2011 23:15:21 +0000 (23:15 +0000)]
- For the case when tl1_align(_trap) is used to call rsf_fatal via
  RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().

13 years agoSilence notice on pool creation, import and access.
mm [Tue, 7 Jun 2011 20:46:31 +0000 (20:46 +0000)]
Silence notice on pool creation, import and access.

Suggested by: Jeremy Chadwick (freebsd-stable@)
Discussed with: pjd
MFC after: 1 week

13 years agoSet curvnet context in a callout-trigerred code path.
zec [Tue, 7 Jun 2011 20:46:03 +0000 (20:46 +0000)]
Set curvnet context in a callout-trigerred code path.

MFC after: 3 days

13 years agoFor the moment document the possible problem introduced with dynamic address
bz [Tue, 7 Jun 2011 19:39:34 +0000 (19:39 +0000)]
For the moment document the possible problem introduced with dynamic address
family detection in world, mostly noticed by ifconfig(8), when running with
an old kernel.

Reported by: Andrzej Tobola (ato iem.pw.edu.pl)
Reported by: gcooper

13 years agoAdd a special mount option "failok" to indicate that the administrator wants
delphij [Tue, 7 Jun 2011 18:48:49 +0000 (18:48 +0000)]
Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

MFC after: 1 month

13 years agoLog the socket address passed as the destination to sendto() and sendmsg()
jhb [Tue, 7 Jun 2011 17:40:33 +0000 (17:40 +0000)]
Log the socket address passed as the destination to sendto() and sendmsg()
via ktrace.

MFC after: 1 week

13 years agoAdapt CATR() to r222813. This is somewhat tricky as we can't afford using
marius [Tue, 7 Jun 2011 17:33:39 +0000 (17:33 +0000)]
Adapt CATR() to r222813. This is somewhat tricky as we can't afford using
more than three temporary register in several places CATR() is used so
this code trades instructions in for registers. Actually, this still isn't
sufficient and CATR() has the side-effect of clobbering %y. Luckily, with
the current uses of CATR() this either doesn't matter or we are able to
(save and) restore it.
Now that there's only one use of AND() and TEST() left inline these.

13 years agoFix a problem with r222813; given that we may only operate on interrupt
marius [Tue, 7 Jun 2011 17:19:14 +0000 (17:19 +0000)]
Fix a problem with r222813; given that we may only operate on interrupt
globals here but clobber %y save and restore the latter.

13 years agoMake automatic hw.snd.default_unit choice a bit more intelligent. Instead
mav [Tue, 7 Jun 2011 17:01:52 +0000 (17:01 +0000)]
Make automatic hw.snd.default_unit choice a bit more intelligent. Instead
of just setting it to the first registered device, reevaluate it for each
device registered, trying to choose best candidate, unless one was forced.
For now use such preference order: play&rec, play, rec.

As side effect, this should workaround the situation when HDMI audio output
of the video card, usually not connected to anything, becomes default, that
requires manual user intervention to make sound working. If at some point
this won't be enough, we can try to fetch some additional priority flags
from the device driver.

13 years agoRemove a gratuitous newline. This should be a non-functional change.
jh [Tue, 7 Jun 2011 16:23:27 +0000 (16:23 +0000)]
Remove a gratuitous newline. This should be a non-functional change.

PR: bin/153667
Submitted by: Craig Leres
MFC after: 1 week

13 years agoFix a bug that prevents tc=xxx from working.
hrs [Tue, 7 Jun 2011 15:40:17 +0000 (15:40 +0000)]
Fix a bug that prevents tc=xxx from working.

13 years agoSince HAL_PHYERR_* is used in the radar code, always include ah_desc.h.
adrian [Tue, 7 Jun 2011 14:00:47 +0000 (14:00 +0000)]
Since HAL_PHYERR_* is used in the radar code, always include ah_desc.h.

13 years ago- Use ELM_MALLOC() for struct rainfo.
hrs [Tue, 7 Jun 2011 12:00:29 +0000 (12:00 +0000)]
- Use ELM_MALLOC() for struct rainfo.

- Fix a missing back pointer assignment in struct prefix to struct rainfo
  when addr="" is specified.  This caused SIGSEGV.

- Insert a prefix element to a tail queue after setting parameters.

13 years agoDo not use LCM from stripesize and user specified alignment value.
ae [Tue, 7 Jun 2011 11:11:11 +0000 (11:11 +0000)]
Do not use LCM from stripesize and user specified alignment value.
When user wants have specific alignment - do what user wants.
Use stripesize as alignment value in case, when some of gpart's
arguments are ommitted for automatic calculation.

Suggested by: mav

13 years ago- Add myself to calendar.freebsd
jlaffaye [Tue, 7 Jun 2011 09:06:15 +0000 (09:06 +0000)]
- Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by: bapt@ (mentor)

13 years agoFlesh out a new HAL method to fetch the radar PHY error frame information.
adrian [Tue, 7 Jun 2011 09:03:28 +0000 (09:03 +0000)]
Flesh out a new HAL method to fetch the radar PHY error frame information.

For the AR5211/AR5212, this is apparently a one byte pulse duration
counter value. It is only coded up here for the AR5212 as I don't have
any AR5211-series hardware to test it on.

This information was extracted from the Madwifi DFS branch along with
some local additions.

Please note - all this does is extract out the radar event duration,
it in no way reflects the presence of a radar. Further code is needed
to take a set of radar events and filter them to extract out correct
radar pulse trains (and ignore other events.)

For further information, please see:

http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection

This includes references to the relevant patents which describe what
is going on.

Obtained from: Madwifi

13 years agoetire the cpumask_t type and replace it with cpuset_t usage.
attilio [Tue, 7 Jun 2011 08:46:13 +0000 (08:46 +0000)]
etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32.  MAXCPU, then, can now arbitrarely bumped to whatever
value.  Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
  The most notable are cpusetobj_ffs() (which calculates a ffs(3)
  for a cpuset_t object), cpusetobj_strprint() (which prepares a string
  representing a cpuset_t object) and cpusetobj_strscan() (which
  creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
  With the moving from cpumask_t to cpuset_t they are now inefficient
  and not really useful.  Anyway, for the time being, please note that
  access to pcpu datas is protected by sched_pin() in order to avoid
  migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
  and userland.  While this is not directly related to the patch itself,
  it is good to understand that concept and possibly use the patch
  as a reference on how to deal with cpuset_t objects in userland, when
  accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
  set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes.  However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
  several revision of the patches and really helped in improving
  stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
  patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
  patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
  the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
  implementations of the patch.
- Other people have made contributions on other patches that have been
  already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
  count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
  which has been instrumental.
- Sandvine for having offered offices and infrastructure during
  development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).

13 years agoMFC
attilio [Tue, 7 Jun 2011 08:24:29 +0000 (08:24 +0000)]
MFC

13 years agoAdd an UPDATE entry.
attilio [Tue, 7 Jun 2011 08:07:41 +0000 (08:07 +0000)]
Add an UPDATE entry.

13 years agoBring back the number of CPU to 32.
attilio [Tue, 7 Jun 2011 08:05:23 +0000 (08:05 +0000)]
Bring back the number of CPU to 32.

13 years agoFix indentation.
ae [Tue, 7 Jun 2011 06:57:22 +0000 (06:57 +0000)]
Fix indentation.

13 years agoSync ng_nat with recent (r222806) ipfw_nat changes:
ae [Tue, 7 Jun 2011 06:48:42 +0000 (06:48 +0000)]
Sync ng_nat with recent (r222806) ipfw_nat changes:

  Make a behaviour of the libalias based in-kernel NAT a bit closer to
  how natd(8) does work. natd(8) drops packets only when libalias returns
  PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
  always did drop packets that were not aliased, even if they should
  not be aliased and just are going through.

Also add SCTP support: mark response packets to skip firewall processing.

MFC after: 1 month

13 years agoMake a behaviour of the libalias based in-kernel NAT a bit closer to
ae [Tue, 7 Jun 2011 06:42:29 +0000 (06:42 +0000)]
Make a behaviour of the libalias based in-kernel NAT a bit closer to
how natd(8) does work. natd(8) drops packets only when libalias returns
PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
always did drop packets that were not aliased, even if they should
not be aliased and just are going through.

PR: kern/122109, kern/129093, kern/157379
Submitted by: Alexander V. Chernikov (previous version)
MFC after: 1 month

13 years agoamdsbwd: update to support SB8xx southbridges
avg [Tue, 7 Jun 2011 06:18:02 +0000 (06:18 +0000)]
amdsbwd: update to support SB8xx southbridges

Many thanks to Tino <tinotom@gmail.com> for drawing my attention to
this, for doing a lot of testing and providing great feedback.
Many thanks to AMD for continuing to release public specifications for
their chipsets.

PR: kern/157568
Tested by: Tino <tinotom@gmail.com>
MFC after: 1 week

13 years agoSet pca.p_bufr to NULL when we haven't allocated a buffer.
ken [Tue, 7 Jun 2011 05:04:37 +0000 (05:04 +0000)]
Set pca.p_bufr to NULL when we haven't allocated a buffer.

Otherwise, p_bufr is set to garbage on the stack, and if that garbage
happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf()
will get called and attempt to fill the non-existent buffer.

This is really only relevant for tprintf() (and only when the priority is
not -1), but set it in uprintf() and ttyprintf() for completeness.

The next step, to avoid log buffer scrambling, would be to add the
PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics.

Submitted by: rmacklem
Found by: pho

13 years agoLower WARNS level to 3 to eliminate alignment warnings related to
marcel [Tue, 7 Jun 2011 04:38:33 +0000 (04:38 +0000)]
Lower WARNS level to 3 to eliminate alignment warnings related to
casting inherent in CMSG_DATA().

13 years agoUse p4prio_to_tsprio to calculate TS priority instead of using
davidxu [Tue, 7 Jun 2011 02:50:14 +0000 (02:50 +0000)]
Use p4prio_to_tsprio to calculate TS priority instead of using
p4prio_to_rtpprio which is for RT priority.

PR: kern/157657
Submitted by: krivenok.dmitry at gmail dot com
MFC after: 3 days

13 years agoFix making kernel dumps from the debugger by creating a command
marcel [Tue, 7 Jun 2011 01:28:12 +0000 (01:28 +0000)]
Fix making kernel dumps from the debugger by creating a command
for it. Do not not expect a developer to call doadump(). Calling
doadump does not necessarily work when it's declared static. Nor
does it necessarily do what was intended in the context of text
dumps. The dump command always creates a core dump.

Move printing of error messages from doadump to the dump command,
now that we don't have to worry about being called from DDB.

13 years agoCall set_cputicker() to have the time counter use the ITC register.
marcel [Tue, 7 Jun 2011 01:06:49 +0000 (01:06 +0000)]
Call set_cputicker() to have the time counter use the ITC register.
Note that the ITC frequency is fixed.

13 years agoo Bump the EFI loader version to 3.1.
marcel [Tue, 7 Jun 2011 00:59:31 +0000 (00:59 +0000)]
o   Bump the EFI loader version to 3.1.
o   Add the about, pbvm and reboot commands.
o   Trim the banner (suppress maker and date).

13 years agoAdd ia64_sync_icache() and use it to make the I-cache coherent
marcel [Tue, 7 Jun 2011 00:39:15 +0000 (00:39 +0000)]
Add ia64_sync_icache() and use it to make the I-cache coherent
after loading the kernel's text segment. The kernel will do the
same for loaded modules, so don't worry about that.

13 years agoAdd myself to committers-ports.dot
jlaffaye [Mon, 6 Jun 2011 23:48:48 +0000 (23:48 +0000)]
Add myself to committers-ports.dot

Approved by: tabthorpe@ (mentor)

13 years agoValidate INT 15h and 16h vectors more strictly. Traditionally these entry
jkim [Mon, 6 Jun 2011 23:03:37 +0000 (23:03 +0000)]
Validate INT 15h and 16h vectors more strictly.  Traditionally these entry
points are fixed addresses and (U)EFI CSM specification also mandated that.
Unfortunately, (U)EFI CSM specification does not specifically mention this
is to call service routine via interrupt vector table or to jump directly
to the entry point.  As a result, some CSM seems to install two routines
and acts differently, depending on how it was executed, unfortunately.
When INT 15h is used, it calls a function pointer (which is probably a UEFI
service function).  When it jumps directly to the entry point, it executes
a simple and traditional INT 15h service routine.  Therefore, actually there
are two possible fixes, i. e., this fix or jumping directly to the fixed
entry point.  However, we chose this fix because a) keyboard typematic
support via BIOS is becoming extremely rarer and b) we cannot support random
service routine installed by a firmware or a boot loader.  This should fix
Lenovo X220 laptop, specifically.

Reviewed by: delphij
MFC after: 3 days

13 years agoRevert r222152. The root cause was analysed and better fix is upcoming.
jkim [Mon, 6 Jun 2011 22:18:40 +0000 (22:18 +0000)]
Revert r222152.  The root cause was analysed and better fix is upcoming.

Discussed with: delphij