]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpgrade the netgraph vlan node to support 802.1q, encapsulation type,
adrian [Sun, 11 Mar 2012 19:08:56 +0000 (19:08 +0000)]
Upgrade the netgraph vlan node to support 802.1q, encapsulation type,
PCP and CFI fields.

* Ethernet_type for VLAN encapsulation is tunable, default is 0x8100;
* PCP (Priority code point) and CFI (canonical format indicator) is
  tunable per VID;
* Tunable encapsulation to support 802.1q
* Encapsulation/Decapsulation code improvements

New messages have been added for this netgraph node to support the
new features.

However, the legacy "vlan" id is still supported and compiled in by
default.  It can be disabled in a future release.

TODO:

* Documentation
* Examples

PR: kern/161908
Submitted by: Ivan <rozhuk.im@gmail.com>

12 years ago- remove an extra parenthesis in a closing brace;
luigi [Sun, 11 Mar 2012 17:35:12 +0000 (17:35 +0000)]
- remove an extra parenthesis in a closing brace;
- add the macro NETMAP_RING_FIRST_RESERVED() which returns
  the index of the first non-released buffer in the ring
  (this is useful for code that retains buffers for some time
  instead of processing them immediately)

12 years agoUpdate comment.
kib [Sun, 11 Mar 2012 15:58:27 +0000 (15:58 +0000)]
Update comment.

Submitted by: gianni

12 years agoFix a bug introduced in r223938; on big-endian machines coping a 32-bit
marius [Sun, 11 Mar 2012 13:39:19 +0000 (13:39 +0000)]
Fix a bug introduced in r223938; on big-endian machines coping a 32-bit
quantum bytewise to the address of a 64-bit variable results in writing
to the "wrong" 32-bit half so adjust the address accordingly. This fix
is implemented in a hackish way for two reasons:
o in order to be able to get it into 8.3 with zero impact on the little-
  endian architectures where this bug has no effect and
o to avoid blowing the x86 boot2 out of the water again when compiling
  it with clang, which all sane versions of this fix tested do.
This change fixes booting from UFS1 file systems on big-endian machines.

MFC after: 3 days

12 years agoRemove fifo.h. The only used function declaration from the header is
kib [Sun, 11 Mar 2012 12:19:58 +0000 (12:19 +0000)]
Remove fifo.h. The only used function declaration from the header is
migrated to sys/vnode.h.

Submitted by: gianni

12 years agoReenable -Winline on MIPS now that we're not compiling Cavium's error
jmallett [Sun, 11 Mar 2012 08:12:30 +0000 (08:12 +0000)]
Reenable -Winline on MIPS now that we're not compiling Cavium's error
decoding stuff, which is impossibly-huge.

12 years agoDisable the Simple Executive's error decoding/reporting code.
jmallett [Sun, 11 Mar 2012 06:55:17 +0000 (06:55 +0000)]
Disable the Simple Executive's error decoding/reporting code.

12 years agoDo not try to use libfdt in FreeBSD.
jmallett [Sun, 11 Mar 2012 06:49:31 +0000 (06:49 +0000)]
Do not try to use libfdt in FreeBSD.

12 years agoRemove files not needed by FreeBSD.
jmallett [Sun, 11 Mar 2012 06:18:38 +0000 (06:18 +0000)]
Remove files not needed by FreeBSD.

12 years agoMerge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to
jmallett [Sun, 11 Mar 2012 06:17:49 +0000 (06:17 +0000)]
Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to
make use of it where possible.

This primarily brings in support for newer hardware, and FreeBSD is not yet
able to support the abundance of IRQs on new hardware and many features in the
Ethernet driver.

Because of the changes to IRQs in the Simple Executive, we have to maintain our
own list of Octeon IRQs now, which probably can be pared-down and be specific
to the CIU interrupt unit soon, and when other interrupt mechanisms are added
they can maintain their own definitions.

Remove unmasking of interrupts from within the UART device now that the
function used is no longer present in the Simple Executive.  The unmasking
seems to have been gratuitous as this is more properly handled by the buses
above the UART device, and seems to work on that basis.

12 years agoDisable -Winline on MIPS in preparation for the import of the latest version
jmallett [Sun, 11 Mar 2012 06:11:31 +0000 (06:11 +0000)]
Disable -Winline on MIPS in preparation for the import of the latest version
of the Cavium Simple Executive, which violates large function growth rules
in such a way that simply increasing the large function growth parameter is
insufficient.

12 years agoImport Cavium Octeon SDK 2.3.0 Simple Executive from cnusers.org.
jmallett [Sun, 11 Mar 2012 04:14:00 +0000 (04:14 +0000)]
Import Cavium Octeon SDK 2.3.0 Simple Executive from cnusers.org.

12 years agoStop some of the output from wrapping at 80 characters.
adrian [Sun, 11 Mar 2012 02:00:59 +0000 (02:00 +0000)]
Stop some of the output from wrapping at 80 characters.

12 years agoFix promiscuous mode with if_octm:
jmallett [Sun, 11 Mar 2012 00:34:14 +0000 (00:34 +0000)]
Fix promiscuous mode with if_octm:
o) The MAC set must occur before the multicast list is set up as the former
   will enable the CAM unconditionally, while promiscuous mode disables it,
   so if promiscuous mode is to be set this must occur after the MAC is
   programmed.
o) The multicast list must be set up unconditionally as even if flags have
   not changed, if the interface has gone through a reinitialization, the
   state of the CAM as changed by the MAC initialization could be incorrect.
o) Call octm_init when flags change, even if the interface is already running.

12 years agoRemove some headers not used by kernel or world and which are not present in
jmallett [Sat, 10 Mar 2012 23:27:03 +0000 (23:27 +0000)]
Remove some headers not used by kernel or world and which are not present in
other ports.

12 years agoregen
netchild [Sat, 10 Mar 2012 23:11:21 +0000 (23:11 +0000)]
regen

12 years ago- add comments to syscalls.master and linux(32)_dummy about which linux
netchild [Sat, 10 Mar 2012 23:10:18 +0000 (23:10 +0000)]
- add comments to syscalls.master and linux(32)_dummy about which linux
  kernel version introduced the sysctl (based upon a linux man-page)
- add comments to sscalls.master regarding some names of sysctls which are
  different than the linux-names (based upon the linux unistd.h)
- add some dummy sysctls
- name an unimplemented sysctl

MFC after: 1 month

12 years agoServerWorks HT1000 HPET reported to have problems with IRQs >= 16.
mav [Sat, 10 Mar 2012 21:08:07 +0000 (21:08 +0000)]
ServerWorks HT1000 HPET reported to have problems with IRQs >= 16.
Lower (ISA) IRQs are working, but allowed mask is not set correctly.
Block both by default to allow HP BL465c G6 blade system to boot.

Reported by: Attila Nagy <bra@fsn.hu>
MFC after: 1 week

12 years agoStick the if_drv_flags access (check and modify) behind the ifq lock.
adrian [Sat, 10 Mar 2012 20:09:02 +0000 (20:09 +0000)]
Stick the if_drv_flags access (check and modify) behind the ifq lock.

Although access to the flags to check/set OACTIVE is racy due to how
the default if_start() function works, this should remove any races
with read/modify/write between threads.

12 years agoFix a panic introduced in a previous commit - non-beaconing modes (eg STA)
adrian [Sat, 10 Mar 2012 19:58:23 +0000 (19:58 +0000)]
Fix a panic introduced in a previous commit - non-beaconing modes (eg STA)
don't setup the avp mcast queue.

This is a bit annoying though - it turns out the mcast queue isn't
initialised for STA mode but it's then touched to see whether anything
is in it.  That should be fixed in a subsequent commit.

Noticed by: gperez@entel.upc.edu
PR: kern/165895

12 years agoRevert r175376 and tune cpufreq(4) frequency comparison logic instead.
mav [Sat, 10 Mar 2012 18:56:16 +0000 (18:56 +0000)]
Revert r175376 and tune cpufreq(4) frequency comparison logic instead.
Instead of using 25MHz equality threshold, look for the nearest value when
handling dev.cpu.0.freq sysctl and for exact match when it is expected.

ACPI may report extra level with frequency 1MHz above the nominal to
control Intel Turbo Boost operation. It is not a bug, but feature:
dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ...
In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz.

I've found that my Core i7-870 based system has Intel Turbo Boost disabled
by default and without this change it was absolutely invisible and hard
to control.

MFC after: 2 weeks

12 years agoFix reversed logic in previous commit that broke build and earned me quite the
jmallett [Sat, 10 Mar 2012 18:35:38 +0000 (18:35 +0000)]
Fix reversed logic in previous commit that broke build and earned me quite the
pointy hat.

Submitted by: bz

12 years agoFix wrong asresp frame parsing in iwi_checkforqos().
iwasaki [Sat, 10 Mar 2012 17:08:57 +0000 (17:08 +0000)]
Fix wrong asresp frame parsing in iwi_checkforqos().

After 8.0-RELEASE, iwi(4) doesn't send any data frames in infrastructure
mode.

Bacause of the condition `while (frm < efrm)', IEEE80211_VERIFY_LENGTH()
was checking item length beyond the ieee80211_frame region, and returned
from iwi_checkforqos() without setting flags, capinfo and associd.

In infrastructure mode associd is required, so this problem causes
discarding mbuf in ieee80211_start().

PR: kern/165819
Tested/Reviewed/Supported by: bschmidt and adrian
MFC after: 1 week

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)