]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix some compile warnings.
Hans Petter Selasky [Fri, 20 Apr 2012 14:29:45 +0000 (14:29 +0000)]
Fix some compile warnings.

MFC after: 1 week

12 years agoThe value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP
Jaakko Heinonen [Fri, 20 Apr 2012 10:08:30 +0000 (10:08 +0000)]
The value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP
from setfflags() in this case. This fixes the return value of
chflags(path, -1).

Discussed with: bde
MFC after: 2 weeks

12 years agoMove the interface media check to a taskqueue, some interfaces (usb) sleep
Andrew Thompson [Fri, 20 Apr 2012 10:06:28 +0000 (10:06 +0000)]
Move the interface media check to a taskqueue, some interfaces (usb) sleep
during SIOCGIFMEDIA and we were holding locks.

12 years agoAdd linkstate to bridge(4), set the link to up when at least one underlying
Andrew Thompson [Fri, 20 Apr 2012 09:55:50 +0000 (09:55 +0000)]
Add linkstate to bridge(4), set the link to up when at least one underlying
interface is up, otherwise the link is down.

This, among other things, allows carp to work on a bridge.

Prodded by: glebius
Tested by: Alexander Lunev

12 years agoIntroduce the matching PCI ath(4) fixup code from ar71xx_pci into
Adrian Chadd [Fri, 20 Apr 2012 08:26:05 +0000 (08:26 +0000)]
Introduce the matching PCI ath(4) fixup code from ar71xx_pci into
ar724x_pci.c.

* Move out the code which populates the firmware into ar71xx_fixup.c
* Shuffle around the ar724x fixup code to match what the ar71xx fixup
  code does.

I've validated this on an AR7240 with AR9285 on-board NIC. It doesn't
yet load, as the AR9285 EEPROM code needs to be made "flash aware."

TODO:

* Validate that I haven't broken AR71xx
* Test AR9285/AR9287 onboard NICs, complete with EEPROM code changes
* Port over the needed BAR hacks for AR7240, AR7241 and AR7242 from
  Linux OpenWRT.  The current WAR has only been tested on the AR7240
  and I'm not sure the way the BAR register is treated is "right".
  The "fixup" method here is right when setting the BAR for local access -
  ie, the BAR address is either 0xffff (AR7240) or 0x1000ffff (AR7241/AR7242),
  but the ath9k-fixup.c code (Linux OpenWRT) does this when setting the
  initial "fixup" BAR.  It then restores the original BAR.
  I'll have to read the ar724x PCI bus glue to see what other special cases
  await.

12 years agoThis update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops
Kirk McKusick [Fri, 20 Apr 2012 07:00:28 +0000 (07:00 +0000)]
This update uses the MNT_VNODE_FOREACH_ACTIVE interface that loops
over just the active vnodes associated with a mount point to replace
MNT_VNODE_FOREACH_ALL in the vfs_msync, ffs_sync_lazy, and qsync
routines.

The vfs_msync routine is run every 30 seconds for every writably
mounted filesystem. It ensures that any files mmap'ed from the
filesystem with modified pages have those pages queued to be
written back to the file from which they are mapped.

The ffs_lazy_sync and qsync routines are run every 30 seconds for
every writably mounted UFS/FFS filesystem. The ffs_lazy_sync routine
ensures that any files that have been accessed in the previous
30 seconds have had their access times queued for updating in the
filesystem. The qsync routine ensures that any files with modified
quotas have those quotas queued to be written back to their
associated quota file.

In a system configured with 250,000 vnodes, less than 1000 are
typically active at any point in time. Prior to this change all
250,000 vnodes would be locked and inspected twice every minute
by the syncer. For UFS/FFS filesystems they would be locked and
inspected six times every minute (twice by each of these three
routines since each of these routines does its own pass over the
vnodes associated with a mount point). With this change the syncer
now locks and inspects only the tiny set of vnodes that are active.

Reviewed by: kib
Tested by:   Peter Holm
MFC after:   2 weeks

12 years agoThis change creates a new list of active vnodes associated with
Kirk McKusick [Fri, 20 Apr 2012 06:50:44 +0000 (06:50 +0000)]
This change creates a new list of active vnodes associated with
a mount point. Active vnodes are those with a non-zero use or hold
count, e.g., those vnodes that are not on the free list. Note that
this list is in addition to the list of all the vnodes associated
with a mount point.

To avoid adding another set of linkage pointers to the vnode
structure, the active list uses the existing linkage pointers
used by the free list (previously named v_freelist, now renamed
v_actfreelist).

This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops
over just the active vnodes associated with a mount point (typically
less than 1% of the vnodes associated with the mount point).

Reviewed by: kib
Tested by:   Peter Holm
MFC after:   2 weeks

12 years agoFix build.
Xin LI [Fri, 20 Apr 2012 04:40:39 +0000 (04:40 +0000)]
Fix build.

12 years agoDo a better job at determining the username of the login session.
Ed Schouten [Thu, 19 Apr 2012 21:12:08 +0000 (21:12 +0000)]
Do a better job at determining the username of the login session.

When multiple users share the same UID, the old code will simply pick an
arbitrary username to attach to the utmpx entries. Make the code a bit
more accurate by first checking whether getlogin() returns a username
which corresponds to the uid of the calling process. If this fails,
simply fall back to picking an arbitrary username.

Reported by: saurik on GitHub
MFC after: 2 weeks

12 years ago- Update the rest of struct ithd references.
Sergey Kandaurov [Thu, 19 Apr 2012 16:13:15 +0000 (16:13 +0000)]
- Update the rest of struct ithd references.
- net_ih and softclock_ih cookies have gone away.

MFC after: 1 week

12 years agoWhitespace changes.
Michael Tuexen [Thu, 19 Apr 2012 15:30:15 +0000 (15:30 +0000)]
Whitespace changes.

MFC after: 3 days

12 years agoDocument swi_remove(9).
Sergey Kandaurov [Thu, 19 Apr 2012 15:29:09 +0000 (15:29 +0000)]
Document swi_remove(9).

Reviewed by: jhb
MFC after: 1 week

12 years agoProperly use SHA1_Final() instead of SHA_Final().
Ed Schouten [Thu, 19 Apr 2012 15:28:15 +0000 (15:28 +0000)]
Properly use SHA1_Final() instead of SHA_Final().

In this case it doesn't really matter, as long as we turn a TTY name
into a set of shuffled bytes. Still, for correctness we should use the
proper function.

MFC after: 2 weeks

12 years agoUse the same pattern for mbuf logging everywhere.
Michael Tuexen [Thu, 19 Apr 2012 13:11:17 +0000 (13:11 +0000)]
Use the same pattern for mbuf logging everywhere.

MFC after: 3 days

12 years agoFix reported errno.
Michael Tuexen [Thu, 19 Apr 2012 12:47:18 +0000 (12:47 +0000)]
Fix reported errno.

MFC after: 3 days

12 years agoFix a bug where we copy out more data from a mbuf chain that are
Michael Tuexen [Thu, 19 Apr 2012 12:43:19 +0000 (12:43 +0000)]
Fix a bug where we copy out more data from a mbuf chain that are
actually in it. This happens when SCTP receives an unknown chunk, which
requires the sending of an ERROR chunk, and there is no final padding but
the chunk is not 4-byte aligned.
Reported by yueting via rwatson@

MFC after: 3 days

12 years agoAdd to GEOM RAID class module for reading non-degraded RAID5 volumes and
Alexander Motin [Thu, 19 Apr 2012 12:30:12 +0000 (12:30 +0000)]
Add to GEOM RAID class module for reading non-degraded RAID5 volumes and
some environment to differentiate 4 possible RAID5 on-disk layouts.

Tested with Intel and AMD RAID BIOSes.

MFC after: 2 weeks

12 years agoStop using the hardware register value byte order swapping for now,
Adrian Chadd [Thu, 19 Apr 2012 03:26:21 +0000 (03:26 +0000)]
Stop using the hardware register value byte order swapping for now,
at least until I can root cause what's going on.

The only platform I've seen this on is the AR9220 when attached to
the AR71xx CPUs.  I get immediate PCIe bus errors and all subsequent
accesses cause further MIPS bus exceptions.  I don't have any other
big-endian platforms to test this on.

If I get a chance (or two), I'll try to whack this on a bus analyser
and see exactly what happens.

I'd rather leave this on, especially for slower, embedded platforms.
But the #ifdef hell is something I'm trying to avoid.

12 years agoUpdate file(1) to version 5.11.
David E. O'Brien [Thu, 19 Apr 2012 03:20:13 +0000 (03:20 +0000)]
Update file(1) to version 5.11.

12 years agoAdd my birth date/place to the calendar as new committer.
Devin Teske [Wed, 18 Apr 2012 22:56:46 +0000 (22:56 +0000)]
Add my birth date/place to the calendar as new committer.

Approved by: emaste (mentor)

12 years agoDelete a no longer useful VNASSERT missed during changes in 234400.
Kirk McKusick [Wed, 18 Apr 2012 19:34:20 +0000 (19:34 +0000)]
Delete a no longer useful VNASSERT missed during changes in 234400.

Suggested by: kib

12 years agoFix a memory leak of M_VNODE_MARKER introduced in 234386.
Kirk McKusick [Wed, 18 Apr 2012 19:30:22 +0000 (19:30 +0000)]
Fix a memory leak of M_VNODE_MARKER introduced in 234386.

Found by:  Peter Holm

12 years agoAdd myself as a new committer.
Devin Teske [Wed, 18 Apr 2012 18:35:19 +0000 (18:35 +0000)]
Add myself as a new committer.

Approved by: emaste (mentor)

12 years agoCompensate for the replacement of uart_cpu_{amd64|i386}.c with
Marcel Moolenaar [Wed, 18 Apr 2012 17:44:05 +0000 (17:44 +0000)]
Compensate for the replacement of uart_cpu_{amd64|i386}.c with
uart_cpu_x86.c

Pointy hat: marcel

12 years agoUnbreak tinderbox.
Josh Paetzel [Wed, 18 Apr 2012 16:47:57 +0000 (16:47 +0000)]
Unbreak tinderbox.

Fix FreeBSD paradigms in the upstream code.

PR: bin/166933
Submitted by: Garrett Cooper <yanegomi@gmail.com>

12 years agoSet SIGCANCEL to SIGTHR as part of some cleanup of DTrace code.
George V. Neville-Neil [Wed, 18 Apr 2012 16:29:55 +0000 (16:29 +0000)]
Set SIGCANCEL to SIGTHR as part of some cleanup of DTrace code.

Reviewed by: davidxu@
MFC after: 1 week

12 years agoo FreeBSD 8.3-RELEASE added.
Maxim Konovalov [Wed, 18 Apr 2012 15:23:21 +0000 (15:23 +0000)]
o FreeBSD 8.3-RELEASE added.

12 years agoReturn EOPNOTSUPP rather than EPERM for the SF_SNAPSHOT flag because
Jaakko Heinonen [Wed, 18 Apr 2012 15:22:08 +0000 (15:22 +0000)]
Return EOPNOTSUPP rather than EPERM for the SF_SNAPSHOT flag because
tmpfs doesn't support snapshots.

Suggested by: bde

12 years agoThe part about exec atime no longer applies in the comment.
Jaakko Heinonen [Wed, 18 Apr 2012 15:19:00 +0000 (15:19 +0000)]
The part about exec atime no longer applies in the comment.

Pointed out by: bde

12 years agoStyle.
Edward Tomasz Napierala [Wed, 18 Apr 2012 13:50:17 +0000 (13:50 +0000)]
Style.

12 years agoFix typo in comment
Thomas Quinot [Wed, 18 Apr 2012 12:50:13 +0000 (12:50 +0000)]
Fix typo in comment

12 years agoVMware environments are not unusual now. Add VMware partitions recognition
Dmitry Morozovsky [Wed, 18 Apr 2012 11:59:03 +0000 (11:59 +0000)]
VMware environments are not unusual now.  Add VMware partitions recognition
(both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part.

Reviewed by: ae
Approved by: ae
MFC after: 2 weeks

12 years agoFix string buffer overflow when preparing the line of output.
Konstantin Belousov [Wed, 18 Apr 2012 10:23:42 +0000 (10:23 +0000)]
Fix string buffer overflow when preparing the line of output.

PR: bin/161739
Submitted by: Jeremy Chadwick <freebsd jdc parodius com>
MFC after: 1 week

12 years agoSome improvements to GEOM MULTIPATH:
Alexander Motin [Wed, 18 Apr 2012 09:42:14 +0000 (09:42 +0000)]
Some improvements to GEOM MULTIPATH:
 - Implement "configure" command to allow switching operation mode of
running device on-fly without destroying and recreation.
 - Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
In this mode all paths not marked FAIL may handle reads same time,
but unlike Active/Active only one path handles write requests at any
point in time. It allows to closer follow original write request order
if above layers need it for data consistency (not waiting for requisite
write completion before sending dependent write).
 - Hide duplicate messages about device status change.
 - Remove periodic thread wake up with 10Hz rate.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

12 years agoAlike to SCSI make adaclose() to not return error if device gone.
Alexander Motin [Wed, 18 Apr 2012 08:55:26 +0000 (08:55 +0000)]
Alike to SCSI make adaclose() to not return error if device gone.
This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS.

MFC after: 1 week

12 years agoFix typo in ".PATH"
Sergey Kandaurov [Wed, 18 Apr 2012 07:02:53 +0000 (07:02 +0000)]
Fix typo in ".PATH"

12 years agoRemove KASSERTS, they do not add any value here since the pointer is about to
Andrew Thompson [Wed, 18 Apr 2012 01:39:14 +0000 (01:39 +0000)]
Remove KASSERTS, they do not add any value here since the pointer is about to
be derefernced anyway.

12 years agoImport jemalloc b57d3ec571c6551231be62b7bf92c084a8c8291c (dev branch,
Jason Evans [Tue, 17 Apr 2012 22:05:55 +0000 (22:05 +0000)]
Import jemalloc b57d3ec571c6551231be62b7bf92c084a8c8291c (dev branch,
prior to 3.0.0 release), which supports atomic operations based on atomic(9).
This should fix build failures for several platforms.

12 years agoDrop export of vdestroy() function from kern/vfs_subr.c as it is
Kirk McKusick [Tue, 17 Apr 2012 21:46:59 +0000 (21:46 +0000)]
Drop export of vdestroy() function from kern/vfs_subr.c as it is
used only as a helper function in that file. Replace sole call to
vbusy() with inline code in vholdl(). Replace sole calls to vfree()
and vdestroy() with inline code in vdropl().

The Clang compiler already inlines these functions, so they do not
show up in a kernel backtrace which is confusing. Also you cannot
set their frame in kgdb which means that it is impossible to view
their local variables. So, while the produced code is unchanged,
the debugging should be easier.

Discussed with: kib
MFC after:      2 weeks

12 years agoUpdate directions on how to disable malloc debugging.
Jason Evans [Tue, 17 Apr 2012 20:35:54 +0000 (20:35 +0000)]
Update directions on how to disable malloc debugging.

12 years agoAdd an UPDATING entry for the contrib/jemalloc import.
Jason Evans [Tue, 17 Apr 2012 20:21:04 +0000 (20:21 +0000)]
Add an UPDATING entry for the contrib/jemalloc import.

12 years agoReplace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL.
Kirk McKusick [Tue, 17 Apr 2012 16:28:22 +0000 (16:28 +0000)]
Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL.
The primary changes are that the user of the interface no longer
needs to manage the mount-mutex locking and that the vnode that
is returned has its mutex locked (thus avoiding the need to check
to see if its is DOOMED or other possible end of life senarios).

To minimize compatibility issues for third-party developers, the
old MNT_VNODE_FOREACH interface will remain available so that this
change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH
will be removed in head.

The reason for this update is to prepare for the addition of the
MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the
active vnodes associated with a mount point (typically less than
1% of the vnodes associated with the mount point).

Reviewed by: kib
Tested by:   Peter Holm
MFC after:   2 weeks

12 years agoFix bug where NFSv4 ACL enforcement code wouldn't unconditionally
Edward Tomasz Napierala [Tue, 17 Apr 2012 14:54:00 +0000 (14:54 +0000)]
Fix bug where NFSv4 ACL enforcement code wouldn't unconditionally
allow the owner to read and write ACL and file attributes when there
was no entry with subject matching the owner.  In other words,
'getfacl meh' shouldn't fail for the owner if the ACL looks like this:

# file: meh
# owner: trasz
# group: wheel
         user:root:------a-------:------:allow

Reported by: kientzle

12 years agoStop treating system processes as special. This fixes panics
Edward Tomasz Napierala [Tue, 17 Apr 2012 14:31:02 +0000 (14:31 +0000)]
Stop treating system processes as special.  This fixes panics
like the one triggered by this:

# kldload geom_vinum
# pwait `pgrep -S gv_worker` &
# kldunload geom_vinum

or this:

GEOM_JOURNAL: Shutting down geom gjournal 3464572051.
panic: destroying non-empty racct: 1 allocated for resource 6

which were tracked by jh@ to be caused by checking p->p_flag,
while it wasn't initialised yet.  Basically, during fork, the code
checked p_flag, concluded the process isn't marked as P_SYSTEM,
incremented the counter, and later on, when exiting, checked that
the process was marked as P_SYSTEM, and thus didn't decrement it.

Also, I believe there wasn't any good reason for checking P_SYSTEM
in the first place.

Tested by: jh

12 years agoFix panic, triggered like this: "int main() { thr_exit(); }"
Edward Tomasz Napierala [Tue, 17 Apr 2012 13:44:40 +0000 (13:44 +0000)]
Fix panic, triggered like this: "int main() { thr_exit(); }"

Submitted by: Mateusz Guzik

12 years agoEnforce upper bound on the input buffer length.
Edward Tomasz Napierala [Tue, 17 Apr 2012 13:28:14 +0000 (13:28 +0000)]
Enforce upper bound on the input buffer length.

Reported by: Mateusz Guzik

12 years agoAdd some more SCSI mode pages from SPC-4 spec.
Alexander Motin [Tue, 17 Apr 2012 11:13:03 +0000 (11:13 +0000)]
Add some more SCSI mode pages from SPC-4 spec.

MFC after: 1 week

12 years agoFix panic at boot with SD/MMC readers with no media present, introduced
Edward Tomasz Napierala [Tue, 17 Apr 2012 10:44:28 +0000 (10:44 +0000)]
Fix panic at boot with SD/MMC readers with no media present, introduced
at r234177.  Note that this is a temporary fix, until I come up with something
prettier.

12 years agoImport jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,
Jason Evans [Tue, 17 Apr 2012 07:22:14 +0000 (07:22 +0000)]
Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,
prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc.
The code being imported by this commit diverged from
lib/libc/stdlib/malloc.c in March 2010, which means that a portion of
the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries
for all subsequent releases.

12 years agoRun the fatal proc as a proc, rather than where it currently is.
Adrian Chadd [Tue, 17 Apr 2012 06:02:41 +0000 (06:02 +0000)]
Run the fatal proc as a proc, rather than where it currently is.

Otherwise the reset path will sleep, which it can't do in this context.

12 years agoFix the RX free list locking creation and destruction to be consistent
Adrian Chadd [Tue, 17 Apr 2012 04:52:57 +0000 (04:52 +0000)]
Fix the RX free list locking creation and destruction to be consistent
even in the face of errors.

If the RX descriptor list fails, the RX lock won't be initialised, but
then the DMA free path wil try freeing it.

This commit is brought to you by a working mwl(4).

12 years agoAdd missing #include
Adrian Chadd [Tue, 17 Apr 2012 04:31:50 +0000 (04:31 +0000)]
Add missing #include

12 years agoStyle(9) and white space fixes.
Adrian Chadd [Tue, 17 Apr 2012 01:34:49 +0000 (01:34 +0000)]
Style(9) and white space fixes.

12 years agoProtect the PCI space registers behind a mutex.
Adrian Chadd [Tue, 17 Apr 2012 01:22:59 +0000 (01:22 +0000)]
Protect the PCI space registers behind a mutex.

Obtained from: Linux/OpenWRT, Atheros

12 years agoAdd x2apic MSR definitions
Peter Grehan [Tue, 17 Apr 2012 00:54:38 +0000 (00:54 +0000)]
Add x2apic MSR definitions

Reviewed by: jhb
Obtained from: bhyve via Neel via NetApp

12 years agoFix a Clang warning.
Jung-uk Kim [Mon, 16 Apr 2012 23:29:12 +0000 (23:29 +0000)]
Fix a Clang warning.

Submitted by: arundel

12 years agoRegen for r234359.
Jung-uk Kim [Mon, 16 Apr 2012 23:17:29 +0000 (23:17 +0000)]
Regen for r234359.

12 years agoCorrect an argument type of iopl syscall for Linuxulator. This also fixes
Jung-uk Kim [Mon, 16 Apr 2012 23:16:18 +0000 (23:16 +0000)]
Correct an argument type of iopl syscall for Linuxulator.  This also fixes
a warning from Clang, i. e., "args->level < 0 is always false".

12 years agoRegen for r234357.
Jung-uk Kim [Mon, 16 Apr 2012 22:59:51 +0000 (22:59 +0000)]
Regen for r234357.

12 years agoCorrect arguments of stat64, fstat64 and lstat64 syscalls for Linuxulator.
Jung-uk Kim [Mon, 16 Apr 2012 22:58:28 +0000 (22:58 +0000)]
Correct arguments of stat64, fstat64 and lstat64 syscalls for Linuxulator.

12 years agoWork around an issue on 32-bit PowerPC, where clang executable can get
Dimitry Andric [Mon, 16 Apr 2012 21:36:55 +0000 (21:36 +0000)]
Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time.

Reviewed by: nwhitehorn

12 years agoBump __FreeBSD_version due to the import of a new clang 3.1 prerelease
Dimitry Andric [Mon, 16 Apr 2012 21:28:04 +0000 (21:28 +0000)]
Bump __FreeBSD_version due to the import of a new clang 3.1 prerelease
snapshot.

12 years agoRegen for r234352.
Jung-uk Kim [Mon, 16 Apr 2012 21:24:23 +0000 (21:24 +0000)]
Regen for r234352.

12 years agoUpgrade our copy of llvm/clang to trunk r154661, in preparation of the
Dimitry Andric [Mon, 16 Apr 2012 21:23:25 +0000 (21:23 +0000)]
Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after: 2 weeks

12 years ago- Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27
Jung-uk Kim [Mon, 16 Apr 2012 21:22:02 +0000 (21:22 +0000)]
- Implement pipe2 syscall for Linuxulator.  This syscall appeared in 2.6.27
but GNU libc used it without checking its kernel version, e. g., Fedora 10.
- Move pipe(2) implementation for Linuxulator from MD files to MI file,
sys/compat/linux/linux_file.c.  There is no MD code for this syscall at all.
- Correct an argument type for pipe() from l_ulong * to l_int *.  Probably
this was the source of MI/MD confusion.

Reviewed by: emulation

12 years ago- Use _PATH_TMP instead of hardcoded /tmp
Baptiste Daroussin [Mon, 16 Apr 2012 20:41:25 +0000 (20:41 +0000)]
- Use _PATH_TMP instead of hardcoded /tmp
- more style(9) fixes
- some refactoring
- better error detection
- Add the DPADD to Makefile

Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: des (mentor)

12 years ago- When interrupt is not requested for VM86 call, make a fake exit point and
Jung-uk Kim [Mon, 16 Apr 2012 19:31:44 +0000 (19:31 +0000)]
- When interrupt is not requested for VM86 call, make a fake exit point and
push the address onto stack as we do for INTn emulation.  This avoids stack
underflow when we encounter RETF instruction in VM86 mode.  Lack of this
exit point actually caused page fault in VM86 mode with VESA module when we
resume from suspend state[1].
- Remove unnecessary CLI and STI instructions from BIOS interrupt emulation.
INTn and IRET must be able to emulate the flag correctly.

Reported by: gavin [1]
Tested by: gavin (early revision)
MFC after: 3 days

12 years agoSync with Bryan Venteicher's virtio git repo:
Peter Grehan [Mon, 16 Apr 2012 18:29:12 +0000 (18:29 +0000)]
Sync with Bryan Venteicher's virtio git repo:

d04e609bdd1973cc7d2e8b38b7dcfae057b0962d
virtio_blk: Use correct temporary variable in vtblk_poll_request

Obtained from: Bryan Venteicher  bryanv at daemoninthecloset dot org

12 years agoTurn on PREEMPTION by default. After fixing several bugs over time, the
Marius Strobl [Mon, 16 Apr 2012 18:29:07 +0000 (18:29 +0000)]
Turn on PREEMPTION by default. After fixing several bugs over time, the
last show-stopper keeping PREEMPTION from being usable on sparc64 should
have been dealt with in r230662.
At least on 2-way systems, PREEMPTION causes a little bit of a degradation
in worldstone performance. However, FreeBSD seems to have started building
up regressions in !PREEMPTION cases so sparc64 better should not be an
oddball in this regard.

MFC after: 1 week

12 years agoSync tmpfs_chflags() with the recent changes to UFS:
Jaakko Heinonen [Mon, 16 Apr 2012 18:10:34 +0000 (18:10 +0000)]
Sync tmpfs_chflags() with the recent changes to UFS:

- Add a check for unsupported file flags.
- Return EPERM when an user without PRIV_VFS_SYSFLAGS privilege attempts
  to toggle SF_SETTABLE flags.

12 years agotmpfs: Allow update mounts only for certain options.
Jaakko Heinonen [Mon, 16 Apr 2012 18:07:42 +0000 (18:07 +0000)]
tmpfs: Allow update mounts only for certain options.

Since r230208 update mounts were allowed if the list of mount options
contained the "export" option. This is not correct as tmpfs doesn't
really support updating all options.

Reviewed by: kevlo, trociny

12 years agoVMware environment is frequent nowadays. Add VMFS id.
Dmitry Morozovsky [Mon, 16 Apr 2012 17:30:19 +0000 (17:30 +0000)]
VMware environment is frequent nowadays.  Add VMFS id.

MFC after: 2 weeks

12 years agoAdd myself to committers-ports
Armin Pirkovitsch [Mon, 16 Apr 2012 15:08:01 +0000 (15:08 +0000)]
Add myself to committers-ports

Approved by:  beat (mentor)

12 years agoWhen we receive an ICMP unreach need fragmentation datagram, we take
Gleb Smirnoff [Mon, 16 Apr 2012 13:49:03 +0000 (13:49 +0000)]
When we receive an ICMP unreach need fragmentation datagram, we take
proposed MTU value from it and update the TCP host cache. Then
tcp_mss_update() is called on the corresponding tcpcb. It finds the
just allocated entry in the TCP host cache and updates MSS on the
tcpcb. And then we do a fast retransmit of what we have in the tcp
send buffer.

This sequence gets broken if the TCP host cache is exausted. In this
case allocation fails, and later called tcp_mss_update() finds nothing
in cache. The fast retransmit is done with not reduced MSS and is
immidiately replied by remote host with new ICMP datagrams and the
cycle repeats. This ping-pong can go up to wirespeed.

To fix this:
- tcp_mss_update() gets new parameter - mtuoffer, that is like
  offer, but needs to have min_protoh subtracted.
- tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify().
- tcp_mtudisc() now accepts not a useless error argument, but proposed
  MTU value, that is passed to tcp_mss_update() as mtuoffer.

Reported by: az
Reported by: Andrey Zonov <andrey zonov.org>
Reviewed by: andre (previous version of patch)

12 years ago#include <net/vnet.h> is no longer needed here.
Marko Zec [Mon, 16 Apr 2012 13:41:46 +0000 (13:41 +0000)]
#include <net/vnet.h> is no longer needed here.

Spotted by: Ed Maste
MFC after: 3 days.

12 years agozfsboot: honor -q if it's present in boot.config
Andriy Gapon [Mon, 16 Apr 2012 10:43:06 +0000 (10:43 +0000)]
zfsboot: honor -q if it's present in boot.config

Before r228267 the option was honored but the original content of
boot.config was not preserved.  I tried to fix that but missed the idea.
Now the proper way of doing things is taken from i386/boo2.
Also, a comment is added to explain this a little bit unobvious
behavior.

Inspired by: jhb
MFC after: 5 days

12 years agointpm: add ATI IXP400 pci id
Andriy Gapon [Mon, 16 Apr 2012 10:33:46 +0000 (10:33 +0000)]
intpm: add ATI IXP400 pci id

PR: kern/136762
Submitted by: Aurelien Mere <freebsd@amc-os.com>
Tested by: Jens Link <jens.link@gmx.de>
MFC after: 5 days

12 years agoReplace the C implementation of __aeabi_read_tp with an assembly version.
Andrew Turner [Mon, 16 Apr 2012 09:38:20 +0000 (09:38 +0000)]
Replace the C implementation of __aeabi_read_tp with an assembly version.
This ensures we follow the ABI by preserving registers r1-r3.

Reviewed by: jmallett, imp

12 years agoFix typo miror -> mirror
Martin Matuska [Mon, 16 Apr 2012 08:19:43 +0000 (08:19 +0000)]
Fix typo miror -> mirror

Reported by: Glen Barber <gjb@FreeBSD.org>
MFC after: 3 days

12 years agoWhen searching for uninitialized memory usage add ensure that the entire
Eitan Adler [Sun, 15 Apr 2012 23:56:03 +0000 (23:56 +0000)]
When searching for uninitialized memory usage add ensure that the entire
struct is set to zero.

PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days

12 years agoAdd in the AP96 phy configuration from openwrt.
Adrian Chadd [Sun, 15 Apr 2012 22:59:56 +0000 (22:59 +0000)]
Add in the AP96 phy configuration from openwrt.

* arge0 doesn't (yet) work via the switch PHY ports; I'm not sure why.
* arge1 maps to the WAN port. That works.

TODO:

* The PLL register needs a different (non-default) value for Gigabit
  Ethernet.  The board setup code needs to be extended a bit to allow
  for non-default pll_1000 values - right now, those values come out
  of hard-coded values in the per-chip set_pll_ge() routines.

Obtained from: Linux / OpenWRT

12 years agoThe AR913x MII speed configuration matches the AR71xx MII configuration.
Adrian Chadd [Sun, 15 Apr 2012 22:34:22 +0000 (22:34 +0000)]
The AR913x MII speed configuration matches the AR71xx MII configuration.
So share the code.

Don't do it for the AR724x - that has a completely different set of PLL
and MII configuration parameters.

12 years agoProvide better description for vfs.tmpfs.memory_reserved sysctl.
Gleb Kurtsou [Sun, 15 Apr 2012 21:59:28 +0000 (21:59 +0000)]
Provide better description for vfs.tmpfs.memory_reserved sysctl.

Suggested by: Anton Yuzhaninov <citrin@citrin.ru>

12 years agoMigrate the net80211 TX aggregation state to be from per-AC to per-TID.
Adrian Chadd [Sun, 15 Apr 2012 20:29:39 +0000 (20:29 +0000)]
Migrate the net80211 TX aggregation state to be from per-AC to per-TID.

TODO:

* Test mwl(4) more thoroughly!

Reviewed by: bschmidt (for iwn)

12 years agoDrop this down from 512 to 128 for now.
Adrian Chadd [Sun, 15 Apr 2012 19:54:22 +0000 (19:54 +0000)]
Drop this down from 512 to 128 for now.

This may result in a bit of a throughput drop.  However, any throughput
drop at this point should be investigated and root caused, as it's likely
because TX scheduling (all the way down to how preemption, scheduler work,
etc) is happening in a sub-optimal fashion.

This also makes it much more likely to be reloadable on a live machine.
Allocating 5120 TX ath_buf entries via contigmalloc is very unlikely
after a few hours of using X/Chromium.

12 years ago- Fix style(9) bugs + inconsistencies
Baptiste Daroussin [Sun, 15 Apr 2012 18:32:14 +0000 (18:32 +0000)]
- Fix style(9) bugs + inconsistencies

Submitted by: marius
Approved by: des (mentor)

12 years agoUse the M_AMPDU_MPDU flag to determine when to manually set the seqno and
Bernhard Schmidt [Sun, 15 Apr 2012 18:25:17 +0000 (18:25 +0000)]
Use the M_AMPDU_MPDU flag to determine when to manually set the seqno and
use a BA queue.

12 years agoAdd myself to the calendar
Guido Falsi [Sun, 15 Apr 2012 17:28:47 +0000 (17:28 +0000)]
Add myself to the calendar

Approved by: creees (mentor)

12 years agoDo not do double initialisation
Baptiste Daroussin [Sun, 15 Apr 2012 16:00:32 +0000 (16:00 +0000)]
Do not do double initialisation
style(9) says for (;;) not while (1)

Reported by: culot
Approved by: des

12 years agoStyle.
Edward Tomasz Napierala [Sun, 15 Apr 2012 15:15:16 +0000 (15:15 +0000)]
Style.

12 years agoadd usr.sbin/pkg which is a bootstrap tool for pkgng.
Baptiste Daroussin [Sun, 15 Apr 2012 15:13:36 +0000 (15:13 +0000)]
add usr.sbin/pkg which is a bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS

Approved by: des (mentor)

12 years agoRemove FSIRAND and FSMAXSWAP ifdefs, removing code unconditionally.
Edward Tomasz Napierala [Sun, 15 Apr 2012 15:13:29 +0000 (15:13 +0000)]
Remove FSIRAND and FSMAXSWAP ifdefs, removing code unconditionally.

Reviewed by: kib, mckusick
Sponsored by: The FreeBSD Foundation

12 years agoCorrect my name in the copyright statement.
Dag-Erling Smørgrav [Sun, 15 Apr 2012 13:39:39 +0000 (13:39 +0000)]
Correct my name in the copyright statement.

12 years agoImprove m4 compatibility with GNU m4 extension ** (exponent)
Baptiste Daroussin [Sun, 15 Apr 2012 13:25:51 +0000 (13:25 +0000)]
Improve m4 compatibility with GNU m4 extension ** (exponent)

Submitted by: Marc Espie (espie@OpenBSD.org)
Approved by: des@ (mentor)

12 years agoFix the mask logic when reading PCI configuration space registers.
Adrian Chadd [Sun, 15 Apr 2012 02:38:01 +0000 (02:38 +0000)]
Fix the mask logic when reading PCI configuration space registers.

12 years agoOverride some default values to work around various issues in the deep,
Adrian Chadd [Sun, 15 Apr 2012 00:04:23 +0000 (00:04 +0000)]
Override some default values to work around various issues in the deep,
dirty and murky past.

* Override the default cache line size to be something reasonable if
  it's set to 0.  Some NICs initialise with '0' (eg embedded ones)
  and there are comments in the driver stating that various OSes (eg
  older Linux ones) would incorrectly program things and 0 out this
  register.

* Just default to overriding the latency timer.  Every other driver
  does this.

* Use a default cache line size of 32 bytes.  It should be "reasonable
  enough".

Obtained from: Linux ath9k, Atheros

12 years agoFix a typo.
Davide Italiano [Sat, 14 Apr 2012 23:59:58 +0000 (23:59 +0000)]
Fix a typo.

Approved by: gnn (mentor)
MFC after: 2 days

12 years agoFix some style bugs introduced in a previous commit (r233045)
Davide Italiano [Sat, 14 Apr 2012 23:53:31 +0000 (23:53 +0000)]
Fix some style bugs introduced in a previous commit (r233045)

Reported by: glebius, jmallet
Reviewed by: jmallet
Approved by: gnn (mentor)
MFC after: 2 days

12 years agoSend always HBs when in PF state.
Michael Tuexen [Sat, 14 Apr 2012 21:01:44 +0000 (21:01 +0000)]
Send always HBs when in PF state.

MFC after: 1 week
X-MFC with: r234296

12 years agoBugfix: Don't send HBs on path which are not idle.
Michael Tuexen [Sat, 14 Apr 2012 20:22:01 +0000 (20:22 +0000)]
Bugfix: Don't send HBs on path which are not idle.

MFC after: 1 week