]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMFi386: revisions 232570 and 232754
nyan [Sat, 10 Mar 2012 15:08:37 +0000 (15:08 +0000)]
MFi386: revisions 232570 and 232754

  Fix boot2 to handle boot config files that only contain a custom path to
  a loader or kernel.

12 years agoIdle ticks optimization:
mav [Sat, 10 Mar 2012 14:57:21 +0000 (14:57 +0000)]
Idle ticks optimization:
 - Pass number of events to the statclock() and profclock() functions
   same as to hardclock() before to not call them many times in a loop.
 - Rename them into statclock_cnt() and profclock_cnt().
 - Turn statclock() and profclock() into compatibility wrappers,
   still needed for arm.
 - Rename hardclock_anycpu() into hardclock_cnt() for unification.

MFC after: 1 week

12 years agoRemove useless thread_{lock,unlock}() in raccd.
trasz [Sat, 10 Mar 2012 14:38:49 +0000 (14:38 +0000)]
Remove useless thread_{lock,unlock}() in raccd.

12 years agoPerform even more style changes.
ed [Sat, 10 Mar 2012 14:38:34 +0000 (14:38 +0000)]
Perform even more style changes.

- Remove unneeded whitespace for function calls.
- Add empty line at the top of functions without local variables.
- Change while (1) to for (;;).

MFC after: 1 week

12 years agoFix whitespace.
ed [Sat, 10 Mar 2012 14:35:09 +0000 (14:35 +0000)]
Fix whitespace.

MFC after: 1 week

12 years agoMove determination of socket buffer sizes from startup to the first time a
gavin [Sat, 10 Mar 2012 11:25:53 +0000 (11:25 +0000)]
Move determination of socket buffer sizes from startup to the first time a
socket is used.  The previous code structure assumed that AF_INET sockets
were always available, which is an invalid assumption on IPv6-only systems.

This merges the fololowing revisions from NetBSD:
src/usr.bin/ftp/main.c 1.120
src/usr.bin/ftp/util.c 1.156

PR: bin/162661
Tested by: bz
Obtained from: NetBSD
MFC after: 1 week

12 years agoCross-reference sigqueue(2) and kill(2).
trasz [Sat, 10 Mar 2012 10:54:52 +0000 (10:54 +0000)]
Cross-reference sigqueue(2) and kill(2).

12 years agoOptimize tls_get_addr_common(). The change provides around 30% speedup
kib [Sat, 10 Mar 2012 08:49:44 +0000 (08:49 +0000)]
Optimize tls_get_addr_common(). The change provides around 30% speedup
for TLS microbenchmark using global-dynamic TLS model on amd64 (which is
default for PIC dso objects).

Split the slow path into tls_get_addr_slow(), for which inlining is
disabled. This prevents the registers spill on tls_get_addr_common()
entry.

Provide static branch hint to the compiler, indicating that slow path
is not likely to be taken.

While there, do some minimal style adjustments.

Reported and tested by: davidxu
MFC after: 1 week

12 years agoAdd brackets around bare '-1' used as the macro body.
kib [Sat, 10 Mar 2012 08:48:52 +0000 (08:48 +0000)]
Add brackets around bare '-1' used as the macro body.

Noted by: bde
MFC after: 1 week

12 years agoUse ABI to determine bus_addr_t for cnMIPS.
jmallett [Sat, 10 Mar 2012 07:54:41 +0000 (07:54 +0000)]
Use ABI to determine bus_addr_t for cnMIPS.

12 years agoo) Remove some CPU_CNMIPS-related magical thinking about the status register's
jmallett [Sat, 10 Mar 2012 06:54:37 +0000 (06:54 +0000)]
o) Remove some CPU_CNMIPS-related magical thinking about the status register's
   contents for user programs.
o) Conditionalize the installation of an XTLB handler on ABI, not CPU family.

12 years agoGet rid of mainbus.c. The version in nexus.c is being used and is
jmallett [Sat, 10 Mar 2012 06:45:21 +0000 (06:45 +0000)]
Get rid of mainbus.c.  The version in nexus.c is being used and is
perfectly-sufficient and equally-crufty.

12 years agoDon't truncate physical addresses to 32-bits.
jmallett [Sat, 10 Mar 2012 06:43:41 +0000 (06:43 +0000)]
Don't truncate physical addresses to 32-bits.

12 years agoReduce diffs with freebsd32_sysarch.
jmallett [Sat, 10 Mar 2012 06:31:28 +0000 (06:31 +0000)]
Reduce diffs with freebsd32_sysarch.

12 years agoAfter r232403, DMA transactions does not cross 4GB boundary for
yongari [Sat, 10 Mar 2012 06:12:14 +0000 (06:12 +0000)]
After r232403, DMA transactions does not cross 4GB boundary for
all PCI devices.  Remove driver workaround for 4GB boundary issue.

12 years agoo) Bump INTRCOUNT_COUNT to 256, since Octeon already has >128.
jmallett [Sat, 10 Mar 2012 05:38:04 +0000 (05:38 +0000)]
o) Bump INTRCOUNT_COUNT to 256, since Octeon already has >128.
   XXX It would be good to use a better way to size intrcnt.
o) Fix literal 4s that are supposed to be sizeof (u_long).
   XXX Why the * 2 here?  Is this an artifact of a different system that this
       code came from?  We seem to allocate twice as much space for intrcnt
       as we admit to in sintrcnt.

12 years agoDon't flood the cabq/mcastq with frames.
adrian [Sat, 10 Mar 2012 04:14:04 +0000 (04:14 +0000)]
Don't flood the cabq/mcastq with frames.

In a very noisy 2.4GHz environment (with HT/40 enabled, making it worse)
I saw the following occur:

* the air was considered "busy" a lot of the time;
* the cabq time is quite short due to staggered beacons being enabled;
* it just wasn't able to keep up TX'ing CABQ frames;
* .. and the cabq would swallow up all the TX ath_buf's.

This patch introduces a twiddle which allows the maximum cabq depth to be
set, forcing further frames to be dropped.

It defaults to the TX buffer count at the moment, so the default behaviour
isn't changed.

I've also started fleshing out a similar setup for the data path, so
it doesn't swallow up all the available TX buffers and preventing management
frames (such as ADDBA) out.

PR: kern/165895

12 years agoEnforce that wtap requires VIMAGE to be useful.
adrian [Sat, 10 Mar 2012 04:02:52 +0000 (04:02 +0000)]
Enforce that wtap requires VIMAGE to be useful.

12 years agoMake boot2 build with Clang again.
jkim [Fri, 9 Mar 2012 23:30:30 +0000 (23:30 +0000)]
Make boot2 build with Clang again.

Submitted by: dim (bsd.sys.mk)
Reviewed by: dim, jhb

12 years agoDocument that we may end up with some suboptimal handling of data
adrian [Fri, 9 Mar 2012 22:58:34 +0000 (22:58 +0000)]
Document that we may end up with some suboptimal handling of data
frames with stations in power saving mode.

I'm not (yet) sure how to handle TX'ing aggregates frames to stations
that are in power saving mode, or whether that's even a feasible thing
to do. So in order to (mostly) not forget, leave a couple of comments
in the code.

The code presently assumes that the aggregation TID state for an ath_node
is locked not by the ath_node lock or a node+TID lock, but behind the
hardware queue said TID maps to.  This assumption is going to be
incorrect for stations in power saving mode as we'll be TX'ing frames
on the multicast queue.

In any case, I'm afraid its a "later problem". :/

12 years agoShould the mcast queue be locked here? In case more multicast traffic
adrian [Fri, 9 Mar 2012 22:41:09 +0000 (22:41 +0000)]
Should the mcast queue be locked here? In case more multicast traffic
comes along?

This commit was brought to you via an Atheros AR5210, associated to an 3x3
HT40 11na access point.  Yes, this driver still works with it.

12 years agoExport intrcnt correctly when running under 32-bit compatibility.
jmallett [Fri, 9 Mar 2012 22:30:54 +0000 (22:30 +0000)]
Export intrcnt correctly when running under 32-bit compatibility.

Reviewed by: gonzo, nwhitehorn

12 years agoPerform the parameter validation before assigning it to a signed int
pho [Fri, 9 Mar 2012 21:31:12 +0000 (21:31 +0000)]
Perform the parameter validation before assigning it to a signed int
variable. This fixes the problem seen with readdir(3) fuzzing.

Submitted by: bde
MFC after: 1 week

12 years agoPartially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
dim [Fri, 9 Mar 2012 21:02:39 +0000 (21:02 +0000)]
Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
and fixing the format string in sbin/fsdb/fsdbutil.c instead.

Note the remark "Work around a problem with format string warnings and
ntohs macros" was actually incorrect.  The DIP(dp, di_nlink) macro
invocation actually returned an int, due to its ternary expression, even
though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode
are both defined as int16_t.

MFC after: 2 weeks

12 years agoAfter r232745, which makes sure __bswap16(), ntohs() and htons() return
dim [Fri, 9 Mar 2012 20:50:15 +0000 (20:50 +0000)]
After r232745, which makes sure __bswap16(), ntohs() and htons() return
__uint16_t, we can partially undo r228668.

Note the remark "Work around a clang false positive with format string
warnings and ntohs macros (see LLVM PR 11313)" was actually incorrect.

Before r232745, on some arches, the ntohs() macros did in fact return
int, not uint16_t, so clang was right in warning about the %hu format
string.

MFC after: 2 weeks

12 years agoMove i386's intr_machdep.c to the x86 tree and share it with amd64.
jhb [Fri, 9 Mar 2012 20:43:29 +0000 (20:43 +0000)]
Move i386's intr_machdep.c to the x86 tree and share it with amd64.

12 years agoAdd casts to __uint16_t to the __bswap16() macros on all arches which
dim [Fri, 9 Mar 2012 20:34:31 +0000 (20:34 +0000)]
Add casts to __uint16_t to the __bswap16() macros on all arches which
didn't already have them.  This is because the ternary expression will
return int, due to the Usual Arithmetic Conversions.  Such casts are not
needed for the 32 and 64 bit variants.

While here, add additional parentheses around the x86 variant, to
protect against unintended consequences.

MFC after: 2 weeks

12 years agoAllow a native i386 kernel to be built with 'nodevice atpic'. Just as on
jhb [Fri, 9 Mar 2012 19:42:48 +0000 (19:42 +0000)]
Allow a native i386 kernel to be built with 'nodevice atpic'.  Just as on
amd64, if 'device isa' is present quiesce the 8259A's during boot and
resume from suspend.

While here, be more selective on amd64 about which kernel configurations
need elcr.c.

MFC after: 2 weeks

12 years agoMFamd64:
jhb [Fri, 9 Mar 2012 19:20:19 +0000 (19:20 +0000)]
MFamd64:
- Return failure for a suspend attempt if we have no wake address.
- Use intr_disable()/intr_restore() instead of ACPI_DISABLE_IRQS().
- Invoke intr_suspend() earlier and call intr_resume() if suspend
  fails.
- Use pause in the loop waiting for CPU to suspend.
- Restore PAT MSR, switchtime, switchticks, and MTRRs on resume.

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

12 years agoMake kern.sched.idlespinthresh default value adaptive depending of HZ.
mav [Fri, 9 Mar 2012 19:09:08 +0000 (19:09 +0000)]
Make kern.sched.idlespinthresh default value adaptive depending of HZ.
Otherwise with HZ above 8000 CPU may never skip timer ticks on idle.

12 years agoImprove error reporting in diskinfo(8) by not displaying errno when
trasz [Fri, 9 Mar 2012 18:34:14 +0000 (18:34 +0000)]
Improve error reporting in diskinfo(8) by not displaying errno when
it doesn't make sense.

12 years agoRevert r232692 as the correct place to fix this is at the syscall level.
pho [Fri, 9 Mar 2012 17:19:50 +0000 (17:19 +0000)]
Revert r232692 as the correct place to fix this is at the syscall level.

12 years agoCast the expression in __bswap16(x) to __uint16_t because it is promoted
tijl [Fri, 9 Mar 2012 16:39:34 +0000 (16:39 +0000)]
Cast the expression in __bswap16(x) to __uint16_t because it is promoted
to int.

Reviewed by: dim

12 years agoRemove the use of toupper() from rtld_printf.c. Use of the libc function
kib [Fri, 9 Mar 2012 16:21:40 +0000 (16:21 +0000)]
Remove the use of toupper() from rtld_printf.c.  Use of the libc function
relies on working TLS, which is particulary not true for LD_DEBUG uses.

MFC after: 1 week

12 years agoRemove PAE special-case 2GB DMA boundary and always use a 4GB boundary
jhb [Fri, 9 Mar 2012 16:05:11 +0000 (16:05 +0000)]
Remove PAE special-case 2GB DMA boundary and always use a 4GB boundary
now that DMA tags in PAE kernels support 4GB boundaries.

Reviewed by: yongari

12 years agoFix a warning reported by bz@
tuexen [Fri, 9 Mar 2012 15:42:47 +0000 (15:42 +0000)]
Fix a warning reported by bz@

MFC after: 3 days.

12 years agoRemove undesired sysctl(3) xref
emaste [Fri, 9 Mar 2012 15:25:27 +0000 (15:25 +0000)]
Remove undesired sysctl(3) xref

Submitted by: bde

12 years agoAdd support for stf interfaces.
tuexen [Fri, 9 Mar 2012 13:15:40 +0000 (13:15 +0000)]
Add support for stf interfaces.

MFC after: 3days.

12 years agoFix a bug reported by Peter Holm which results in a crash:
tuexen [Fri, 9 Mar 2012 13:12:33 +0000 (13:12 +0000)]
Fix a bug reported by Peter Holm which results in a crash:
Verify in sctp_peeloff() that the socket is a one-to-many
style SCTP socket.

MFC after: 3 days.

12 years agoClean up x86 endian.h:
tijl [Fri, 9 Mar 2012 11:48:56 +0000 (11:48 +0000)]
Clean up x86 endian.h:
- Remove extern "C". There are no functions with external linkage here. [1]
- Rename bswapNN_const(x) to bswapNN_gen(x) to indicate that these macros
  are generic implementations that can take non-constant arguments. [1]
- Split up __GNUCLIKE_ASM && __GNUCLIKE_BUILTIN_CONSTANT_P and deal with
  each separately.
- Replace _LP64 with __amd64__ because asm instructions are machine
  dependent, not ABI dependent.

Submitted by: bde [1]
Reviewed by: bde

12 years ago"Did you still want the not yet? I think we just arrived at yet."
jmallett [Fri, 9 Mar 2012 09:32:20 +0000 (09:32 +0000)]
"Did you still want the not yet? I think we just arrived at yet."

Submitted by: thompsa

12 years agoInsert extra paranoia into the ath(4) driver.
adrian [Fri, 9 Mar 2012 08:36:30 +0000 (08:36 +0000)]
Insert extra paranoia into the ath(4) driver.

This function must be called with both the source and destination TXQs
locked or things will get hairy.

I added this as part of some debugging in a PR but it turned out to not
be the cause.  I still think it's -correct- so, here it is.

12 years agoEnable COMPAT_FREEBSD32 for the Octeon kernel config by default.
jmallett [Fri, 9 Mar 2012 07:53:44 +0000 (07:53 +0000)]
Enable COMPAT_FREEBSD32 for the Octeon kernel config by default.

12 years agoBe more polite when setting state->nextevent inside cpu_new_callout().
mav [Fri, 9 Mar 2012 07:30:48 +0000 (07:30 +0000)]
Be more polite when setting state->nextevent inside cpu_new_callout().
Hardclock is not the only who wakes idle CPU since kdtrace cyclic addition.

MFC after: 2 weeks

12 years agoMake sure not to tar up CVS directories if this ports tree is a CVS
nwhitehorn [Fri, 9 Mar 2012 02:23:03 +0000 (02:23 +0000)]
Make sure not to tar up CVS directories if this ports tree is a CVS
checkout.

PR: bin/165868
MFC after: 5 days

12 years agoFix a variety of grammar and style nits
eadler [Fri, 9 Mar 2012 01:32:05 +0000 (01:32 +0000)]
Fix a variety of grammar and style nits

PR: docs/165841
Submitted by: Robert Simmons <rsimmons0@gmail.com>
Approved by: brd
MFC after: 1 week

12 years agoDecomission mnt_noasync. Introduce MNTK_NOASYNC mnt_kern_flag which
kib [Fri, 9 Mar 2012 00:12:05 +0000 (00:12 +0000)]
Decomission mnt_noasync. Introduce MNTK_NOASYNC mnt_kern_flag which
allows a filesystem to request VFS to not allow MNTK_ASYNC.

MFC after: 1 week

12 years agoCorrectly initialise the TXQ link pointer to the last descriptor in
adrian [Thu, 8 Mar 2012 23:53:38 +0000 (23:53 +0000)]
Correctly initialise the TXQ link pointer to the last descriptor in
the last buffer in the list.

The current behaviour (due to me, so pointy hat is firmly on my head here)
was incorrect - it was setting the link pointer to the last descriptor
of the _first_ buffer in the TXQ.  Instead, it should have set it to the
last descriptor in the _last_ buffer in the TXQ.

This showed up as occasional TX stalls with frames in the TXQ but no
TX progress being made.  Further inspection showed the TXQ looked like
it contained multiple "lists" of frames - there'd be a list of correct
frames, then a NULL link pointer, but there'd be a next buffer in the
list.

Since this code is only called upon an interface reset, it's likely
this only began showing up when I started doing stress testing
in environments which annoy the radios enough to cause lockups.

I've not yet any TX stalls with this patch applied.

PR: kern/165866

12 years agoAdd missing \n's.
adrian [Thu, 8 Mar 2012 23:46:42 +0000 (23:46 +0000)]
Add missing \n's.

This showed up when testing the wtap module, as it attaches with
no radiotap tx/rx configuration.

12 years agoSave more of config space for PCI Express and PCI-X devices.
kan [Thu, 8 Mar 2012 21:09:34 +0000 (21:09 +0000)]
Save more of config space for PCI Express and PCI-X devices.

Expand pci_save_state and pci_restore_state to save more of
the config state for PCI Express and PCI-X devices. Various
writable control registers are present in PCI Express that
can potentially be lost over suspend/resume cycle.

This change is modeled after similar functionality in Linux.

Reviewed by: wlosh,jhb
MFC after:  1 month

12 years agoAdd support for ns timestamps and birthtime to the ext2/3 driver.
pfg [Thu, 8 Mar 2012 21:06:05 +0000 (21:06 +0000)]
Add support for ns timestamps and birthtime to the ext2/3 driver.

When using big inodes there is sufficient space in ext3 to
keep extra resolution and birthtime (creation) timestamps.
The appropriate fields in the on-disk inode have been approved
for a long time but support for this in ext3 has not been
widely  distributed.

In preparation for ext4 most linux distributions have enabled
by default such bigger inodes and some people use nanosecond
timestamps in ext3. We now support those when the inode is big
enough and while we do recognize the EXT4F_ROCOMPAT_EXTRA_ISIZE,
we maintain the extra timestamps even when they are not used.

An additional note by Bruce Evans:
We blindly accept unrepresentable tv_nsec in VOP_SETATTR(), but
all file  systems have always done that.  When POSIX gets around
to  specifying the behaviour, it will probably require certain
rounding to the fs's resolution and not rejecting the request.
This unfortunately means that syscalls that set times can't
really tell if they succeeded without reading back the times
using stat() or similar and checking that they were set close
enough.

Reviewed by: bde
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoFree up allocated memory used by posix_fadvise(2).
pho [Thu, 8 Mar 2012 20:34:13 +0000 (20:34 +0000)]
Free up allocated memory used by posix_fadvise(2).

12 years agoAdd KTR_VFS traces to track modifications to a vnode's writecount.
jhb [Thu, 8 Mar 2012 20:27:20 +0000 (20:27 +0000)]
Add KTR_VFS traces to track modifications to a vnode's writecount.

12 years agoAdd a new sched_clear_name() method to the scheduler interface to clear
jhb [Thu, 8 Mar 2012 19:41:05 +0000 (19:41 +0000)]
Add a new sched_clear_name() method to the scheduler interface to clear
the cached name used for KTR_SCHED traces when a thread's name changes.
This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's
name changes, most commonly via execve().

MFC after: 2 weeks

12 years agoCorrect markup, use proper reference for sysctl(3)
emaste [Thu, 8 Mar 2012 15:27:29 +0000 (15:27 +0000)]
Correct markup, use proper reference for sysctl(3)

Submitted by: brueffer@

12 years agoDocument P_ORPHAN.
kib [Thu, 8 Mar 2012 13:00:49 +0000 (13:00 +0000)]
Document P_ORPHAN.

MFC after: 3 days

12 years agosyscall() fuzzing can trigger this panic. Return EINVAL instead.
pho [Thu, 8 Mar 2012 12:49:08 +0000 (12:49 +0000)]
syscall() fuzzing can trigger this panic. Return EINVAL instead.

MFC after: 1 week

12 years agoMerge from OpenBSD:
glebius [Thu, 8 Mar 2012 09:20:00 +0000 (09:20 +0000)]
Merge from OpenBSD:

  revision 1.146
  date: 2010/05/12 08:11:11;  author: claudio;  state: Exp;  lines: +2 -3
  bzero() the full compressed update struct before setting the values.
  This is needed because pf_state_peer_hton() skips some fields in certain
  situations which could result in garbage beeing sent to the other peer.
  This seems to fix the pfsync storms seen by stephan@ and so dlg owes me
  a whiskey.

I didn't see any storms, but this definitely fixes a useless memory
allocation on the receiving side, due to non zero scrub_flags field
in a pfsync_state_peer structure.

12 years agoAdd new USB device IDs.
hselasky [Thu, 8 Mar 2012 07:22:41 +0000 (07:22 +0000)]
Add new USB device IDs.

PR: usb/165815
MFC after: 1 week

12 years agoWork around broken BIOS memory reporting
emaste [Thu, 8 Mar 2012 02:00:52 +0000 (02:00 +0000)]
Work around broken BIOS memory reporting

Andrzej has a machine with 32GB of RAM, but only 16GB is reported by the
smbios.memory.enabled.  Thus, use the greater of hw.realmem and the smbios
value.

Reported by: Andrzej Tobola <ato of iem pw edu pl>

12 years agoRemove unactionable message about label geometry
emaste [Thu, 8 Mar 2012 01:48:44 +0000 (01:48 +0000)]
Remove unactionable message about label geometry

It's not clear to a user what they should do after seeing the "geometry
does not match label" kernel message, and it does not appear to present
a problem in practice.  Thus, just remove the messages.

Approved by: marcel

12 years ago- Clean up extra ${.OBJDIR}.
hrs [Thu, 8 Mar 2012 01:47:12 +0000 (01:47 +0000)]
- Clean up extra ${.OBJDIR}.
- Add ${IMAGE} for the supported image files.  This fixes the install target
  on FreeBSD/pc98.
- Use "mkdir -p" instead of "-mkdir" consistently.

Reviewed by: nwhitehorn

12 years agoInbound TCP-MD5 digest validation is now supported
emaste [Thu, 8 Mar 2012 01:37:01 +0000 (01:37 +0000)]
Inbound TCP-MD5 digest validation is now supported

12 years agoMake parallel build more safer.
jkim [Wed, 7 Mar 2012 23:57:49 +0000 (23:57 +0000)]
Make parallel build more safer.

Reviewed by: tijl

12 years agoMake the mps(4) module depend on the cam module.
ken [Wed, 7 Mar 2012 22:39:11 +0000 (22:39 +0000)]
Make the mps(4) module depend on the cam module.

Submitted by: Mykola Dzham <i@levsha.me>
MFC after: 3 days

12 years agoAdd lib32 part for libutil after its version bump to 9.
pluknet [Wed, 7 Mar 2012 20:46:59 +0000 (20:46 +0000)]
Add lib32 part for libutil after its version bump to 9.

PR: misc/165523
Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoRemove the PAE-specific 2GB DMA boundary since HEAD now supports a proper 4G
jhb [Wed, 7 Mar 2012 18:57:09 +0000 (18:57 +0000)]
Remove the PAE-specific 2GB DMA boundary since HEAD now supports a proper 4G
boundary for PAE.

12 years agoUse bus_get_dma_tag() to inherit the 4G boundary restriction from the
jhb [Wed, 7 Mar 2012 18:53:56 +0000 (18:53 +0000)]
Use bus_get_dma_tag() to inherit the 4G boundary restriction from the
parent PCI bus and remove the home-grown version in this driver.

12 years agoUse bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint.
jhb [Wed, 7 Mar 2012 18:52:46 +0000 (18:52 +0000)]
Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint.

Tested by: emaste

12 years agoSimplify the PCI bus dma tag code a bit. First, don't create a tag at
jhb [Wed, 7 Mar 2012 18:50:33 +0000 (18:50 +0000)]
Simplify the PCI bus dma tag code a bit.  First, don't create a tag at
all for platforms that only have 32-bit bus addresses.  Second, remove
the 'tag_valid' flag from the softc.  Instead, if we don't create a
tag in pci_attach_common(), just cache the value of our parent's tag
so that we always have a valid tag to return.

12 years agoImprove multi-line kernel ident parsing
emaste [Wed, 7 Mar 2012 18:46:21 +0000 (18:46 +0000)]
Improve multi-line kernel ident parsing

Instead of blindly grabbing the line with 'Version string' and the
following one from the core info file, take all lines after 'Version
string' until the one one that matches the field format in the core info
file.  This provides compatibility with VendorBSD modifications that have
a different kernel ident format.

Reviewed by: jhb

12 years agoIn batch mode, exit after receiving SIGINT, instead of immediate
kib [Wed, 7 Mar 2012 18:05:45 +0000 (18:05 +0000)]
In batch mode, exit after receiving SIGINT, instead of immediate
output of the next display.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoMove struct if_data basic description to a more suitable place, and remove
pluknet [Wed, 7 Mar 2012 14:53:53 +0000 (14:53 +0000)]
Move struct if_data basic description to a more suitable place, and remove
a bit of .Bx 4.4 history.

MFC after: 1 week

12 years agoo Sync LOCK_PROFILING manpage with the current code: remove
maxim [Wed, 7 Mar 2012 14:50:14 +0000 (14:50 +0000)]
o Sync LOCK_PROFILING manpage with the current code: remove
unexistent sysctls, add new ones.

Reviewed by: gjb
Sponsored by: Nginx, Inc.

12 years agoReflect that if_output changed to take a struct route as its fourth
pluknet [Wed, 7 Mar 2012 11:29:43 +0000 (11:29 +0000)]
Reflect that if_output changed to take a struct route as its fourth
argument (r191148).

MFC after: 1 week

12 years agoUpdate ifa_rtrequest() description after post-4.4BSD change made in r85074.
pluknet [Wed, 7 Mar 2012 09:42:19 +0000 (09:42 +0000)]
Update ifa_rtrequest() description after post-4.4BSD change made in r85074.
3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of
``sockaddr *''. While here, un-document RTM_RESOLVE cmd argument for
ifa_rtrequest() that became a stub after separating L2 tables in r186119.

MFC after: 1 week

12 years agoThe pipe_poll() performs lockless access to the vnode to test
kib [Wed, 7 Mar 2012 07:31:50 +0000 (07:31 +0000)]
The pipe_poll() performs lockless access to the vnode to test
fifo_iseof() condition, allowing the v_fifoinfo to be reset and freed
by fifo_cleanup().

Precalculate EOF at the places were fo_wgen is changed, and cache the
state in a new pipe state flag PIPE_SAMEWGEN.

Reported and tested by: bf
Submitted by: gianni
MFC after: 1 week (a backport)

12 years agoMove the vlan buffer space into the union which also fixes an unused variable
thompsa [Wed, 7 Mar 2012 07:22:53 +0000 (07:22 +0000)]
Move the vlan buffer space into the union which also fixes an unused variable
warning with !INET & !INET6.

Spotted by: pluknet

12 years agoAdd support for the MosChip MCS9904 four serial ports
remko [Wed, 7 Mar 2012 06:42:21 +0000 (06:42 +0000)]
Add support for the MosChip MCS9904 four serial ports
controller.

PR: 165804
Submitted by: Eugene Grosbein
MFC after: 1 week

12 years agoFix typo and bump the document date which I also forgot.
thompsa [Wed, 7 Mar 2012 06:25:17 +0000 (06:25 +0000)]
Fix typo and bump the document date which I also forgot.

Spotted by: Andrey Zonov

12 years agoGet rid of duplicated versions of the KSU bits.
jmallett [Tue, 6 Mar 2012 23:08:02 +0000 (23:08 +0000)]
Get rid of duplicated versions of the KSU bits.

12 years agoAdd the ability to set which packet layers are used for the load balance hash
thompsa [Tue, 6 Mar 2012 22:58:13 +0000 (22:58 +0000)]
Add the ability to set which packet layers are used for the load balance hash
calculation.

12 years agoBreak long lines.
ray [Tue, 6 Mar 2012 22:45:54 +0000 (22:45 +0000)]
Break long lines.

Approved by: adri (mentor)

12 years agoRemove EoL whitespaces.
ray [Tue, 6 Mar 2012 22:16:10 +0000 (22:16 +0000)]
Remove EoL whitespaces.

Approved by: adri (mentor)

12 years agoFix build of libc.so after r232620. This caused a duplicate definition
dim [Tue, 6 Mar 2012 21:56:30 +0000 (21:56 +0000)]
Fix build of libc.so after r232620.  This caused a duplicate definition
of __getCurrentRuneLocale().

Pointy hat to: me

12 years agoModify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios.
adrian [Tue, 6 Mar 2012 21:20:16 +0000 (21:20 +0000)]
Modify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios.

* Added verify_mesh_*_len functions that verify the length
  according to the amendment spec and return number of destination addresses
  for allocation of appropriate struct size in memory;
* Modified hwmp_recv_action_meshpath to allocate HWMP ie instead of
  storing them on the stack and store all available field according the flags;
* Modify hwmp_add_mesh* to work with all cases of HWMP according to amendment.
* Modify hwmp_send_* to calculate correct len of bytes for the HWMP ie.
* Added new M_80211_MESH_* malloc defines.
* Added macros with magic numbers for HWMP ie sizes according to amendment.
* Added the external address to all HWMP ie structs.

Submitted by: monthadar@gmail.com

12 years agoAdd a note to clarify why we create a relocated copy of boot1 in lower
jhb [Tue, 6 Mar 2012 20:45:13 +0000 (20:45 +0000)]
Add a note to clarify why we create a relocated copy of boot1 in lower
memory.

12 years agoRemove unused file.
jmallett [Tue, 6 Mar 2012 20:23:29 +0000 (20:23 +0000)]
Remove unused file.

12 years agoAfter r232498, programs built with -ansi or -std=c89 including <ctype.h>
dim [Tue, 6 Mar 2012 20:15:23 +0000 (20:15 +0000)]
After r232498, programs built with -ansi or -std=c89 including <ctype.h>
would not compile anymore, due to plain 'inline' keywords.  Fix this by
using __inline instead.

Reported by: Jia-Shiun Li <jiashiun@gmail.com>
Discussed with: theraven

12 years agoDisable the option VFS_ALLOW_NONMPSAFE by default on all the supported
attilio [Tue, 6 Mar 2012 20:01:25 +0000 (20:01 +0000)]
Disable the option VFS_ALLOW_NONMPSAFE by default on all the supported
platforms.
This will make every attempt to mount a non-mpsafe filesystem to the
kernel forbidden, unless it is expressely compiled with
VFS_ALLOW_NONMPSAFE option.

This patch is part of the effort of killing non-MPSAFE filesystems
from the tree.

No MFC is expected for this patch.

12 years ago- Remove one more no-op #ifndef
gonzo [Tue, 6 Mar 2012 19:19:33 +0000 (19:19 +0000)]
- Remove one more no-op #ifndef

12 years agoAt the risk of reducing source compatibility with old NetBSD and Sprite:
jmallett [Tue, 6 Mar 2012 19:01:32 +0000 (19:01 +0000)]
At the risk of reducing source compatibility with old NetBSD and Sprite:
o) Get rid of some unused macros related to features we don't intend to
   provide.
o) Get rid of macro definitions for MIPS-I CPUs.  We are not likely to
   support anything that predartes MIPS-III.
o) Respell MIPS3_* macros as MIPS_*, which is how most of them were being
   used already.
o) Eliminate a duplicate and mostly-unused set of exception vector macros.

There's still considerable duplication and lots more obsolete in our headers,
but this reduces one of the larger files to a size where one could reckon
about the correctness of its contents with a mere few hours of contemplation.

There is, of course, a question of whether we need definitions for fields,
registers and configurations that we are unlikely to ever use or implement,
even if they're not obsolete since 1991.  FreeBSD is not a processor
reference manual, and things that aren't used may be wrong, or may be
duplicated because nobody could possibly actually know whether they're
already defined.

12 years agoProvide wbwd(4), a driver for the watchdog timer found on various
bz [Tue, 6 Mar 2012 18:44:52 +0000 (18:44 +0000)]
Provide wbwd(4), a driver for the watchdog timer found on various
Winbond Super I/O chips.

With minor efforts it should be possible the extend the driver to support
further chips/revisions available from Winbond.  In the simplest case
only new IDs need to be added, while different chipsets might require
their own function to enter extended function mode, etc.

Sponsored by: Sandvine Incorporated ULC (in 2011)
Reviewed by: emaste, brueffer
MFC after: 2 weeks

12 years agoFix building with WITHOUT_INET_SUPPORT set.
bz [Tue, 6 Mar 2012 18:39:07 +0000 (18:39 +0000)]
Fix building with WITHOUT_INET_SUPPORT set.

Reviewed by: jamie (actually provided the real fix)
MFC after: 3 days

12 years agoProperly mask off bits that are not supported in the IAP counters.
gnn [Tue, 6 Mar 2012 17:17:03 +0000 (17:17 +0000)]
Properly mask off bits that are not supported in the IAP counters.
This fixes a bug where users would see massively large counts, near
to 2**64 -1, due to the bits not being cleared.

MFC after: 3 weeks

12 years agoUse = rather than == for expressions to test(1) builtin(1) in sh(1) to
bz [Tue, 6 Mar 2012 14:19:36 +0000 (14:19 +0000)]
Use = rather than == for expressions to test(1) builtin(1) in sh(1) to
comply with standards.

On modern branches there is an undocumented alias (see r219084) but on
stable/7 this is still an error.

Sponsored by: Cisco Systems, Inc.
MFC after: 3 days

12 years agoAdd LUN resizing to CTL. Also make it possible to explicitly set
trasz [Tue, 6 Mar 2012 13:43:57 +0000 (13:43 +0000)]
Add LUN resizing to CTL.  Also make it possible to explicitly set
size when creating file-backed or device-backed LUN.

Reviewed by: ken (earlier version)
Sponsored by: The FreeBSD Foundation

12 years agoRemove some duplicated copyright notices.
theraven [Tue, 6 Mar 2012 12:53:44 +0000 (12:53 +0000)]
Remove some duplicated copyright notices.

Approved by: dim (mentor)

12 years agoRemove if_watchdog remnants after if_timer/if_watchdog removal in r199975.
pluknet [Tue, 6 Mar 2012 12:20:37 +0000 (12:20 +0000)]
Remove if_watchdog remnants after if_timer/if_watchdog removal in r199975.
This part was missed in r199992.

MFC after: 1 week

12 years agoMake racct and rctl correctly handle jail renaming. Previously
trasz [Tue, 6 Mar 2012 11:05:50 +0000 (11:05 +0000)]
Make racct and rctl correctly handle jail renaming.  Previously
they would continue using old name, the one jail was created with.

PR: bin/165207