]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoremove pre-vap examples
Sam Leffler [Sun, 21 Mar 2010 17:53:54 +0000 (17:53 +0000)]
remove pre-vap examples

14 years agoAdd a priority-based packet scheduler.
Luigi Rizzo [Sun, 21 Mar 2010 16:30:32 +0000 (16:30 +0000)]
Add a priority-based packet scheduler.

Sponsored by: The ONELAB2 Project
Submitted by: Riccardo Panicucci

14 years agoCorrect the type for uio_resid.
Konstantin Belousov [Sun, 21 Mar 2010 16:14:19 +0000 (16:14 +0000)]
Correct the type for uio_resid.

MFC after: 3 days

14 years agono need for ipfw_flush_tables(), we just need ipfw_destroy_tables()
Luigi Rizzo [Sun, 21 Mar 2010 15:54:07 +0000 (15:54 +0000)]
no need for ipfw_flush_tables(), we just need ipfw_destroy_tables()

14 years agorevise documentation
Luigi Rizzo [Sun, 21 Mar 2010 15:52:55 +0000 (15:52 +0000)]
revise documentation

14 years agoAdd some more codec IDs.
Alexander Motin [Sun, 21 Mar 2010 15:14:21 +0000 (15:14 +0000)]
Add some more codec IDs.

14 years agoAdd 'rotate' and 'getactive' verbs to provide some control and information
Matt Jacob [Sun, 21 Mar 2010 15:02:47 +0000 (15:02 +0000)]
Add 'rotate' and 'getactive' verbs to provide some control and information
about what the currently active path is.

Sponsored by: Panasas
MFC after: 1 month

14 years agoAvoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA
Ed Maste [Sun, 21 Mar 2010 15:00:33 +0000 (15:00 +0000)]
Avoid holding the VLAN_LOCK() over the parent interface SIOCGIFMEDIA
ioctl call, as it may sleep.

Reviewed by: rwatson

14 years agoAvoid aliasing which leads to incorrect results when compiling with the
Marius Strobl [Sun, 21 Mar 2010 13:18:08 +0000 (13:18 +0000)]
Avoid aliasing which leads to incorrect results when compiling with the
default strict aliasing rules.

PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days

14 years ago- The firmware of Sun Fire V1280 has a misfeature of setting %wstate to
Marius Strobl [Sun, 21 Mar 2010 13:09:54 +0000 (13:09 +0000)]
- The firmware of Sun Fire V1280 has a misfeature of setting %wstate to
  7 which corresponds to WSTATE_KMIX in OpenSolaris whenever calling into
  it which totally screws us even when restoring %wstate afterwards as
  spill/fill traps can happen while in OFW. The rather hackish OpenBSD
  approach of just setting the equivalent of WSTATE_KERNEL to 7 also is
  no option as we treat %wstate as a bit field. So in order to deal with
  this problem actually implement spill/fill handlers for %wstate 7 which
  just act as the WSTATE_KERNEL ones except of theoretically also handling
  32-bit, turn off interrupts completely so we don't even take IPIs while
  in OFW which should ensure we only take spill/fill traps at most and
  restore %wstate after calling into OFW once we have taken over the trap
  table. While at it, actually set WSTATE_{,PROM}_KMIX before calling into
  OFW just like OpenSolaris does, which should at least help testing this
  change on non-V1280.
- Remove comments referring to the %wstate usage in BSD/OS.
- Remove the no longer used RSF_ALIGN_RETRY macro.
- Correct some trap table addresses in comments.
- Ensure %wstate is set to WSTATE_KERNEL when taking over the trap table.
- Ensure PSTATE_AM is off when entering or exiting to OFW as well as that
  interrupts are also completely off when exiting to OFW as the firmware
  trap table shouldn't be used to handle our interrupts.

14 years agoEliminate a pointless TLB invalidation from pmap_bootstrap(). No mappings
Alan Cox [Sun, 21 Mar 2010 00:21:59 +0000 (00:21 +0000)]
Eliminate a pointless TLB invalidation from pmap_bootstrap().  No mappings
whatsoever are changed between the earlier load_cr3() and this invalidation.

14 years agoI am told by AMD that the machine check hardware on the instruction TLB
Alan Cox [Sun, 21 Mar 2010 00:13:11 +0000 (00:13 +0000)]
I am told by AMD that the machine check hardware on the instruction TLB
won't generate bogus exceptions.  Therefore, the implementation of the
"unofficial" workaround needn't mask L1TP errors by the instruction cache
unit.

14 years agoImprove the KVA space sizing of 186682; on machines with large dTLBs we
Marius Strobl [Sat, 20 Mar 2010 23:00:43 +0000 (23:00 +0000)]
Improve the KVA space sizing of 186682; on machines with large dTLBs we
can actually use all of the available lockable entries of the tiny dTLB
for the kernel TSB. With this change the KVA space sizing happens to be
more in line with the MI one so up to at least 24GB machines KVA doesn't
need to be limited manually. This is just another stopgap though, the
real solution is to take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs
providing it so we don't need to lock the kernel TSB pages into the dTLB
in the first place.

14 years agoDo not create *.gmon files for PIE executables on i386.
Jilles Tjoelker [Sat, 20 Mar 2010 22:58:54 +0000 (22:58 +0000)]
Do not create *.gmon files for PIE executables on i386.

Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o.
This problem is i386-specific, the other architectures are OK.

If you have problems with PIE executables such as samba and cups leaving
behind gmon files, rebuild them after installing this change.

PR: ports/143924
Reviewed by: kib
MFC after: 3 days

14 years ago- While SPARC V9 allows tininess to be detected either before or after
Marius Strobl [Sat, 20 Mar 2010 22:32:13 +0000 (22:32 +0000)]
- While SPARC V9 allows tininess to be detected either before or after
  rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
  UltraSPARC processors defines that in all cases tinyness is detected
  before rounding, therefore rounding up to the smallest normalised
  number should set the underflow flag.
- If an infinite result is rounded down, the result should have an
  exponent 1 less than the value for infinity.

PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days

14 years agoDivision should take both arguments' signs into account when the
Marius Strobl [Sat, 20 Mar 2010 22:12:15 +0000 (22:12 +0000)]
Division should take both arguments' signs into account when the
the dividend is infinity or zero and the divisor is not the same.

PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days

14 years agoFPU_DEBUG requires <stdio.h>.
Marius Strobl [Sat, 20 Mar 2010 21:27:44 +0000 (21:27 +0000)]
FPU_DEBUG requires <stdio.h>.

PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days

14 years agoEnsure that __fpu_ftox() both returns the high bits and res[1] contains
Marius Strobl [Sat, 20 Mar 2010 21:15:56 +0000 (21:15 +0000)]
Ensure that __fpu_ftox() both returns the high bits and res[1] contains
the low bits also in the default case.

PR: 144900
Obtained from: OpenBSD
MFC after: 3 days

14 years ago- Remove a bogus forward declaration.
Marius Strobl [Sat, 20 Mar 2010 21:04:47 +0000 (21:04 +0000)]
- Remove a bogus forward declaration.
- Fix whitespace.

14 years ago- spread tcp timer callout load evenly across cpus if net.inet.tcp.per_cpu_timers...
Kip Macy [Sat, 20 Mar 2010 19:47:30 +0000 (19:47 +0000)]
- spread tcp timer callout load evenly across cpus if net.inet.tcp.per_cpu_timers is set to 1
- don't default to acquiring tcbinfo lock exclusively in rexmt

MFC after: 7 days

14 years agoFix command example, presumed leftovers of old markup.
Gavin Atkinson [Sat, 20 Mar 2010 16:34:51 +0000 (16:34 +0000)]
Fix command example, presumed leftovers of old markup.

MFC after: 1 week

14 years agoEscape characters unsafe for XML output in GEOM class, instance and
Jaakko Heinonen [Sat, 20 Mar 2010 16:16:13 +0000 (16:16 +0000)]
Escape characters unsafe for XML output in GEOM class, instance and
provider names.

- Characters in range 0x01-0x1f except '\t', '\n', and '\r' are replaced
  with '?'. Those characters are disallowed in XML.
- '&', '<', '>', '\'', '"' and characters in range 0x7f-0xff are
  replaced with XML numeric character reference.

If the kern.geom.confxml sysctl provides invalid XML, libgeom
geom_xml2tree() fails and utilities using it do not work. Unsafe
characters are common in msdosfs and cd9660 labels.

PR: kern/104389
Submitted by: Doug Steinwand (original version)
Reviewed by: pjd
Discussed on: freebsd-geom
MFC after: 3 weeks

14 years agoCorrect MAXPHYS and DFLTPHYS description.
Alexander Motin [Sat, 20 Mar 2010 15:30:26 +0000 (15:30 +0000)]
Correct MAXPHYS and DFLTPHYS description.

14 years agoTweak language to make one point potentially clearer for non-native spekers
Gavin Atkinson [Sat, 20 Mar 2010 14:42:16 +0000 (14:42 +0000)]
Tweak language to make one point potentially clearer for non-native spekers

PR: bin/121424
Submitted by: "Julian H. Stacey" <jhs berklix.org>

14 years agoRevisit locking in the 64-bit AIM PMAP. The PVO head for a page is
Nathan Whitehorn [Sat, 20 Mar 2010 14:35:24 +0000 (14:35 +0000)]
Revisit locking in the 64-bit AIM PMAP. The PVO head for a page is
generally protected by the VM page queue mutex. Instead of extending the
table lock to cover the PVO heads, add some asserts that the page queue
mutex is in fact held. This fixes several LORs and possible deadlocks.

This also adds an optimization to moea64_kextract() useful for
direct-mapped quantities, like UMA buffers. Being able to use this from
inside UMA removes an additional LOR.

14 years agoRemove some stale entries from MAINTAINERS:
Gavin Atkinson [Sat, 20 Mar 2010 12:39:28 +0000 (12:39 +0000)]
Remove some stale entries from MAINTAINERS:
 - aradford@amcc.com bounces.
 - gad said to drop pkill(1) and ps(1).
 - jmallett said to drop libufs.
 - joerg said to drop fdc(4) and sppp(4)

Submitted by: linimon
Approved by: gad, jmallett, joerg (via linimon)

14 years agowollman@ has OK'd dropping his maintainership of zic(8)
Gavin Atkinson [Sat, 20 Mar 2010 11:05:11 +0000 (11:05 +0000)]
wollman@ has OK'd dropping his maintainership of zic(8)

Submitted by: linimon
Approved by: wollman (via linimon)

14 years agoChop off excessive long hostnames to keep the table structure intact.
Ed Schouten [Sat, 20 Mar 2010 09:29:25 +0000 (09:29 +0000)]
Chop off excessive long hostnames to keep the table structure intact.

This makes lastlogin(8) use exactly the same printf format as last(1).

14 years agoSibyte provides a 64-bit read-only counter that counts at half the processor
Neel Natu [Sat, 20 Mar 2010 05:49:06 +0000 (05:49 +0000)]
Sibyte provides a 64-bit read-only counter that counts at half the processor
frequency. This counter can be accessed coherently from both cores.

Use this as the preferred timecounter for the SWARM kernels.

The CP0 COUNT register is unusable as the timecounter on SMP platforms because
the COUNT registers on different CPUs are not guaranteed to be in sync.

14 years agoMake sure that the registers 'v0' and 'v1' are properly sign-extended
Neel Natu [Sat, 20 Mar 2010 05:21:14 +0000 (05:21 +0000)]
Make sure that the registers 'v0' and 'v1' are properly sign-extended
when sb_load64() returns.

Some 32-bit arithmetic operations (e.g. subu) have unpredicatable results
when operating on 64-bit registers that are not properly sign-extended.

14 years agoGet rid of unused macro MIPS_MEM_RID.
Neel Natu [Sat, 20 Mar 2010 05:10:44 +0000 (05:10 +0000)]
Get rid of unused macro MIPS_MEM_RID.

Suggested by: Alexandr Rybalko (ray@dlink.ua)

14 years agoThis change enables use of physical memory that is beyond the direct
Neel Natu [Sat, 20 Mar 2010 05:07:15 +0000 (05:07 +0000)]
This change enables use of physical memory that is beyond the direct
mapped kseg0 region.

The basic idea is to use KVA from the kseg2 region for mapping page
table pages that lie beyond the direct mapped region.

The TLB miss handler can now recursively fault into the TLB invalid
handler if it dereferences a kseg2 page table page address that is not
in the TLB.

Tested by: JC (c.jayachandran@gmail.com)

14 years agoEnable MSI by default for SiI3124.
Alexander Motin [Sat, 20 Mar 2010 04:40:15 +0000 (04:40 +0000)]
Enable MSI by default for SiI3124.

14 years agoDon't check for boot_verbose in the environment. The loader does
Marcel Moolenaar [Sat, 20 Mar 2010 04:22:22 +0000 (04:22 +0000)]
Don't check for boot_verbose in the environment. The loader does
that already and sets RB_VERBOSE. The loader has always done it.

14 years agoLet unin(4) attach to U3 controllers found on G5 machines.
Nathan Whitehorn [Sat, 20 Mar 2010 03:58:00 +0000 (03:58 +0000)]
Let unin(4) attach to U3 controllers found on G5 machines.

Submitted by: Andreas Tobler

14 years agoAdd support for the Samsung S3C2xx0 family of ARM SoCs written by
Warner Losh [Sat, 20 Mar 2010 03:39:35 +0000 (03:39 +0000)]
Add support for the Samsung S3C2xx0 family of ARM SoCs written by
Andrew Turner.  The kernel supports the LN2410SBC evaluation board,
and likely others.  These parts (or similar ones) are in some open
hardware designs for phones.

Submitted by: Andrew Turner

14 years ago- Map EBDA if available and add 64KB above 1MB (high memory), just in case.
Jung-uk Kim [Fri, 19 Mar 2010 21:15:43 +0000 (21:15 +0000)]
- Map EBDA if available and add 64KB above 1MB (high memory), just in case.
- Print the initial memory map when bootverbose is set.
- Change the page fault address format from linear to %cs:%ip style.
- Move duplicate code into a newly added function.
- Add strictly aligned memory access for distant future. ;-)

14 years agoThe same code is used to import and to create pool.
Pawel Jakub Dawidek [Fri, 19 Mar 2010 20:14:27 +0000 (20:14 +0000)]
The same code is used to import and to create pool.
The order of operations is the following:
1. Try to open vdev by remembered path and guid.
2. If 1 failed, try to find vdev which guid matches and ignore the path.
3. If 2 failed this means either that the vdev we're looking for is gone
   or that pool is being created and vdev doesn't contain proper guid yet.
   To be able to handle pool creation we open vdev by path anyway.

Because of 3 it is possible that we open wrong vdev on import which can lead to
confusions.

The solution for this is to check spa_load_state. On pool creation it will be
equal to SPA_LOAD_NONE and we can open vdev only by path immediately and if it
is not equal to SPA_LOAD_NONE we first open by path+guid and when that fails,
we open by guid. We no longer open wrong vdev on import.

MFC after: 2 weeks

14 years agoSplit eventhandler_register() into an internal part and a wrapper function
Bjoern A. Zeeb [Fri, 19 Mar 2010 19:51:03 +0000 (19:51 +0000)]
Split eventhandler_register() into an internal part and a wrapper function
that provides the allocated and setup eventhandler entry.

Add a new wrapper for VIMAGE that allocates extra space to hold the
callback function and argument in addition to an extra wrapper function.
While the wrapper function goes as normal callback function the
argument points to the extra space allocated holding the original func
and arg that the wrapper function can then call.

Provide an iterator function for the virtual network stack (vnet) that
will call the callback function for each network stack.

Provide a new set of macros for VNET that in the non-VIMAGE case will
just call eventhandler_register() while in the VIMAGE case it will use
vimage_eventhandler_register() passing in the extra iterator function
but will only register once rather than per-vnet.
We need a special macro in case we are interested in the tag returned
as we must check for curvnet and can neither simply assign the
return value, nor not change it in the non-vnet0 case without that.

Sponsored by: ISPsystem
Discussed with: jhb
Reviewed by: zec (earlier version), jhb
MFC after: 1 month

14 years agoBack out revision 205307.
Xin LI [Fri, 19 Mar 2010 16:09:57 +0000 (16:09 +0000)]
Back out revision 205307.

For the record:

CPU_ENABLE_SSE enables some code that dynamically enables SSE support
but not necessarily enforce execution of SSE instructions.

14 years agoSlightly improve my previous commit.
Ed Schouten [Fri, 19 Mar 2010 15:53:02 +0000 (15:53 +0000)]
Slightly improve my previous commit.

Just comment out the atrun line instead of completely removing it. It is
not a bad idea to leave it as a reference in case someone decides to
install atrun by hand afterwards.

14 years agopmap amd64/i386: fix a typo in a comment
Andriy Gapon [Fri, 19 Mar 2010 14:48:32 +0000 (14:48 +0000)]
pmap amd64/i386: fix a typo in a comment

MFC after: 3 days

14 years agovfs_mount.9: drop cross-reference to a removed manual
Andriy Gapon [Fri, 19 Mar 2010 14:35:38 +0000 (14:35 +0000)]
vfs_mount.9: drop cross-reference to a removed manual

MFC after: 3 days

14 years agoUse the same policy for rejecting / not-reject ACPI tables with incorrect
John Baldwin [Fri, 19 Mar 2010 12:43:18 +0000 (12:43 +0000)]
Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.

Tested by: Alastair Hogge  agh of coolrhaug com
MFC after: 1 week

14 years agoDon't add the atrun-line to the crontab when MK_AT is set.
Ed Schouten [Fri, 19 Mar 2010 11:59:02 +0000 (11:59 +0000)]
Don't add the atrun-line to the crontab when MK_AT is set.

This prevents spurious calls to sendmail every 5 minutes.

MFC after: 1 week

14 years agoRegen
Konstantin Belousov [Fri, 19 Mar 2010 11:14:37 +0000 (11:14 +0000)]
Regen

14 years agoRemove empty line.
Konstantin Belousov [Fri, 19 Mar 2010 11:13:42 +0000 (11:13 +0000)]
Remove empty line.

MFC after: 2 weeks

14 years agoConvert aio syscall registration to SYSCALL_INIT_HELPER.
Konstantin Belousov [Fri, 19 Mar 2010 11:11:34 +0000 (11:11 +0000)]
Convert aio syscall registration to SYSCALL_INIT_HELPER.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoImplement compat32 shims for mqueuefs.
Konstantin Belousov [Fri, 19 Mar 2010 11:10:24 +0000 (11:10 +0000)]
Implement compat32 shims for mqueuefs.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoImplement compat32 shims for ksem syscalls.
Konstantin Belousov [Fri, 19 Mar 2010 11:08:43 +0000 (11:08 +0000)]
Implement compat32 shims for ksem syscalls.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoMove SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding
Konstantin Belousov [Fri, 19 Mar 2010 11:04:42 +0000 (11:04 +0000)]
Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding
sysv_{msg,sem,shm}.c files.

Mark SysV IPC freebsd32 syscalls as NOSTD and add required
SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto
register/unregister on module load.

This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded
as modules.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoMove SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to
Konstantin Belousov [Fri, 19 Mar 2010 11:01:51 +0000 (11:01 +0000)]
Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to
sysv_ipc.c.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoIntroduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and
Konstantin Belousov [Fri, 19 Mar 2010 10:56:30 +0000 (10:56 +0000)]
Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and
neccessary support functions to allow registering dynamically loaded
syscalls from the MOD_LOAD handlers. Helpers handle registration
failures semi-automatically.

Reviewed by: jhb
MFC after: 2 weeks

14 years agoFOr SYSCALL_MODULE_HELPER, use "sys/<syscallname>" module name.
Konstantin Belousov [Fri, 19 Mar 2010 10:52:54 +0000 (10:52 +0000)]
FOr SYSCALL_MODULE_HELPER, use "sys/<syscallname>" module name.
FOr SYSCALL32_MODULE_HELPER, use "sys32/<syscallname>" module name.
This avoids modules name conflict when compat32 syscall does not
need shims.

Note that SYSCALL_MODULE_HELPER is going to be unused in the tree by
several next commits.

Suggested by: jhb
MFC after: 2 weeks

14 years agoMake freebsd32_copyiniov() available outside of freebsd32_misc.
Konstantin Belousov [Fri, 19 Mar 2010 10:49:03 +0000 (10:49 +0000)]
Make freebsd32_copyiniov() available outside of freebsd32_misc.

MFC after: 2 weeks

14 years agoProperly handle compat32 calls to sctp generic sendmsd/recvmsg functions that
Konstantin Belousov [Fri, 19 Mar 2010 10:46:54 +0000 (10:46 +0000)]
Properly handle compat32 calls to sctp generic sendmsd/recvmsg functions that
take iov.

Reviewed by: tuexen
MFC after: 2 weeks

14 years agoRemove dead statement.
Konstantin Belousov [Fri, 19 Mar 2010 10:44:02 +0000 (10:44 +0000)]
Remove dead statement.

Reviewed by: tuexen
MFC after: 2 weeks

14 years agoFix two style issues.
Konstantin Belousov [Fri, 19 Mar 2010 10:41:32 +0000 (10:41 +0000)]
Fix two style issues.

MFC after: 2 weeks

14 years agoMake sure the snmp_pf module will first refresh its entires if necessary,
Shteryana Shopova [Fri, 19 Mar 2010 09:53:25 +0000 (09:53 +0000)]
Make sure the snmp_pf module will first refresh its entires if necessary,
then find a specific entry, and get the requested value. So far, it found
the specific entry, refreshed the entry list if necessary, and got the
requested value from the found entry. The problem is that refreshing nukes
all old entries and replaces them with new ones and the obtained entry
pointer was no longer valid after the refresh.

Reviewed by: bz, philip
MFC after: 1 week

14 years agoFix typo in comment
Warner Losh [Fri, 19 Mar 2010 05:40:47 +0000 (05:40 +0000)]
Fix typo in comment

14 years agoSSE is enabled by default about 5 years ago so there is no point pretending
Xin LI [Fri, 19 Mar 2010 01:16:53 +0000 (01:16 +0000)]
SSE is enabled by default about 5 years ago so there is no point pretending
that we support I486 and I586 CPUs in the GENERIC kernel, users wants these
support would have to build a custom kernel to explicitly disable SSE
anyways.

MFC after: 1 month

14 years ago- Added support for 5709S/5716S PHYs.
David Christensen [Thu, 18 Mar 2010 21:00:53 +0000 (21:00 +0000)]
- Added support for 5709S/5716S PHYs.
- Update copyright to 2010.
- Add new debug code for RV2P block.
- Improve output formatting for various debug functions.

MFC after: 2 weeks

14 years ago- Added support for 5709S/5716S PHYs.
David Christensen [Thu, 18 Mar 2010 20:57:57 +0000 (20:57 +0000)]
- Added support for 5709S/5716S PHYs.

Submitted by: pyunyh
MFC after: 2 weeks

14 years agoturn 205266 in to a no-op until the problem can be properly diagnosed
Kip Macy [Thu, 18 Mar 2010 20:30:25 +0000 (20:30 +0000)]
turn 205266 in to a no-op until the problem can be properly diagnosed

14 years agoDetect illegal access to unmapped memory within real mode emulator to aid
Jung-uk Kim [Thu, 18 Mar 2010 20:15:34 +0000 (20:15 +0000)]
Detect illegal access to unmapped memory within real mode emulator to aid
debugging.  Update copyright date while I am here.

14 years agoProperly progress through the list of IPv6 addresses using in6_addr size.
Ed Schouten [Thu, 18 Mar 2010 20:13:04 +0000 (20:13 +0000)]
Properly progress through the list of IPv6 addresses using in6_addr size.

Right now if a jail has multiple IPv6 addresses, it will print them
shifting only 4 bytes at a time. Example:

2001:4dd0:ff41::b23f:a9
2001:4dd0:ff41::b23f:aa

Becomes:

2001:4dd0:ff41::b23f:a9
ff41::b23f:a9:2001:4dd0

By casting to in6_addr, it uses the correct offsets.

MFC after: 1 week

14 years agoUpdate to 9.6.2-P1, the latest patchfix release which deals with
Doug Barton [Thu, 18 Mar 2010 19:00:35 +0000 (19:00 +0000)]
Update to 9.6.2-P1, the latest patchfix release which deals with
the problems related to the handling of broken DNSSEC trust chains.

This fix is only relevant for those who have DNSSEC validation
enabled and configure trust anchors from third parties, either
manually, or through a system like DLV.

14 years agoFor those of us mere mortals who do not aspire to the lofty heights
Doug Barton [Thu, 18 Mar 2010 18:58:17 +0000 (18:58 +0000)]
For those of us mere mortals who do not aspire to the lofty heights
of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
the 'make universe' goodnes without using unecessary time and resources.

14 years agoUnbreak build by removing a code bit that is only related to other code
Rui Paulo [Thu, 18 Mar 2010 15:28:17 +0000 (15:28 +0000)]
Unbreak build by removing a code bit that is only related to other code
in my branch.

14 years agoAdd support for retrieving labeled pf filter rule counters.
Shteryana Shopova [Thu, 18 Mar 2010 14:54:31 +0000 (14:54 +0000)]
Add support for retrieving labeled pf filter rule counters.

PR: bin/132847
Submitted by: Szalai Andras <szalai (dot) bandi (at) gmail.com>

14 years agoSimplify loops.
Pawel Jakub Dawidek [Thu, 18 Mar 2010 13:11:43 +0000 (13:11 +0000)]
Simplify loops.

14 years agoFix a couple of bugs with 802.11n:
Rui Paulo [Thu, 18 Mar 2010 11:06:38 +0000 (11:06 +0000)]
Fix a couple of bugs with 802.11n:
o Process the BAR frame on the adhoc, mesh and sta modes
o Fix the format of the ADDBA reply frame
o Fix references to the spec section numbers

Also, print the all the MCS rates in bootverbose.

Sponsored by: iXsystems, Inc.
Obtained from: //depot/user/rpaulo/80211n/...

14 years agoAdd ddb support to the "new" link layer code ("new-arp"):
Bjoern A. Zeeb [Thu, 18 Mar 2010 09:09:59 +0000 (09:09 +0000)]
Add ddb support to the "new" link layer code ("new-arp"):
 - show all lltables [1] (optional flag to also show the llentries as well)
 - show lltable <struct lltable *>
 - show llentry <struct llentry *>

MFC after: 6 days

14 years agoRemove an unneeded variable.
Ed Schouten [Thu, 18 Mar 2010 07:35:20 +0000 (07:35 +0000)]
Remove an unneeded variable.

Reported by: tinderbox

14 years agoRemove two pieces of code (one disabled in revision 39665 and another derived
Xin LI [Thu, 18 Mar 2010 00:27:17 +0000 (00:27 +0000)]
Remove two pieces of code (one disabled in revision 39665 and another derived
from the first one) that is not used for the last 12 years.

14 years agoNeed to set the proper flag bit when inserting ARP
Qing Li [Thu, 18 Mar 2010 00:23:39 +0000 (00:23 +0000)]
Need to set the proper flag bit when inserting ARP
entries into the kernel.

MFC after: 3 days

14 years agoo) Add a keyword to displaying elapsed time in integer seconds, "etimes".
Juli Mallett [Wed, 17 Mar 2010 22:57:58 +0000 (22:57 +0000)]
o) Add a keyword to displaying elapsed time in integer seconds, "etimes".
o) Give slightly better (i.e. any) documentation of the format of "etime".

Reviewed by: jilles

14 years agoRemove two instances of the evil hack to get the ifnet. mii_ifp is
Warner Losh [Wed, 17 Mar 2010 22:45:53 +0000 (22:45 +0000)]
Remove two instances of the evil hack to get the ifnet.  mii_ifp is
set early enough that we don't need to do these hacks anymore.

14 years agoo Add support for UltraSparc-IV+:
Marius Strobl [Wed, 17 Mar 2010 22:45:09 +0000 (22:45 +0000)]
o Add support for UltraSparc-IV+:
  - Swap the configuration of the first and second large dTLB as with
    US-IV+ these can only hold entries of certain page sizes each, which
    we happened to chose the non-working way around.
  - Additionally ensure that the large iTLB is set up to hold 8k pages
    (currently this happens to be a NOP though).
  - Add a workaround for US-IV+ erratum #2.
  - Turn off dTLB parity error reporting as otherwise we get seemingly
    false positives when copying in the user window by simulating a
    fill trap on return to usermode. Given that these parity errors can
    be avoided by disabling multi issue mode and the problem could be
    reproduced with a second machine this appears to be a silicon bug of
    some sort.
  - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While
    at it, turn of interrupts across the whole cheetah_cache_flush() for
    simplicity instead of around every flush. This should have next to no
    impact as for cheetah-class machines we typically only need to flush
    the caches a few times during boot when recovering from peeking/poking
    non-existent PCI devices, if at all.
  - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+
    documentation doesn't seem to mention that these CPUs also ignore the
    address like previous cheetah-class CPUs do. Again the code changing
    LSU_IC is executed seldom enough that the negligible optimization of
    using %g0 instead should have no real impact.

  With these changes FreeBSD runs stable on V890 equipped with US-IV+
  and -j128 buildworlds in a loop for days are no problem. Unfortunately,
  the performance isn't were it should be as a buildworld on a 4x1.5GHz
  US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less
  powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether
  this is related to the supposed silicon bug mentioned above or due to
  another issue. The documentation (which contains a sever bug in the
  description of the bits added to the context registers though) at least
  doesn't mention any requirements for changes in the CPU handling besides
  those implemented and the cache as well as the TLB configurations and
  handling look fine.
o Re-arrange cheetah_init() so it's easier to add support for SPARC64
  V up to VIIIfx CPUs, which only require parts of this initialization.

14 years agoSet the device capabilities to include dynamic link-state for
Qing Li [Wed, 17 Mar 2010 22:12:12 +0000 (22:12 +0000)]
Set the device capabilities to include dynamic link-state for
those modern drivers.

Reviewed by: imp (and suggested by imp)
MFC after: 3 days

14 years agoCache line align various structures and move volatile counters to
Kip Macy [Wed, 17 Mar 2010 21:18:28 +0000 (21:18 +0000)]
Cache line align various structures and move volatile counters to
not share a cache line with (mostly) immutable state

Reviewed by: jeff@
MFC after: 7 days

14 years ago- cache line align arcs_lock array (h/t Marius Nuennerich)
Kip Macy [Wed, 17 Mar 2010 21:10:09 +0000 (21:10 +0000)]
- cache line align arcs_lock array (h/t Marius Nuennerich)
- fix ARCS_LOCK_PAD to use architecture defined CACHE_LINE_SIZE
- cache line align buf_hash_table ht_locks array

MFC after: 7 days

14 years agoAdd macros for the VER.impl of SPARC64 II to VIIIfx.
Marius Strobl [Wed, 17 Mar 2010 21:00:39 +0000 (21:00 +0000)]
Add macros for the VER.impl of SPARC64 II to VIIIfx.

14 years ago- Add TTE and context register bits for the additional page sizes supported
Marius Strobl [Wed, 17 Mar 2010 20:23:14 +0000 (20:23 +0000)]
- Add TTE and context register bits for the additional page sizes supported
  by UltraSparc-IV and -IV+ as well as SPARC64 V, VI, VII and VIIIfx CPUs.
- Replace TLB_PCXR_PGSZ_MASK and TLB_SCXR_PGSZ_MASK with TLB_CXR_PGSZ_MASK
  which just is the complement of TLB_CXR_CTX_MASK instead of trying to
  assemble it from the page size bits which vary across CPUs.
- Add macros for the remainder of the SFSR bits, which are useful for at
  least debugging purposes.

14 years agoFix 2 bugs in mxge_attach()
Andrew Gallatin [Wed, 17 Mar 2010 20:13:09 +0000 (20:13 +0000)]
Fix 2 bugs in mxge_attach()

- Don't leak slice resources when mxge_alloc_rings() fails

- Start taskq threads only after we know attach will succeed.  At
  boot time, taskqueue_terminate() will loop infinately, waiting
  for the threads to exit, and hang the system.

Submitted by: Panasas
MFC After: 3 days

14 years ago- Add quirk handling for Sun Fire V1280. The firmware of these machines
Marius Strobl [Wed, 17 Mar 2010 20:01:01 +0000 (20:01 +0000)]
- Add quirk handling for Sun Fire V1280. The firmware of these machines
  provides no ino-bitmap properties so forge them using the default set
  of controller interrupts and let schizo_setup_intr() take care of the
  children, hoping for non-fancy routing.
- Add quirk handling for Sun Fire V890. When booting these machines from
  disk a Schizo comes up with PCI error residing which triggers as soon
  as we register schizo_pci_bus() even when clearing it from all involved
  registers (it's no longer indicated once we're in schizo_pci_bus()
  though). Thus make PCI bus errors non-fatal until we actually touch the
  bus. With this change schizo_pci_bus() typically triggers once during
  attach in this case. Obviously this approach isn't exactly race free
  but it's about the best we can do about this problem as we're not
  guaranteed that the interrupt will actually trigger on V890 either, as
  it certainly doesn't when for example netbooting them.

14 years agouse CACHE_LINE_SIZE instead of hardcoding 128 for lock pad
Kip Macy [Wed, 17 Mar 2010 20:00:22 +0000 (20:00 +0000)]
use CACHE_LINE_SIZE instead of hardcoding 128 for lock pad

pointed out by Marius Nuennerich and jhb@

14 years agoWe actually can generate a host number.
Matt Jacob [Wed, 17 Mar 2010 18:53:58 +0000 (18:53 +0000)]
We actually can generate a host number.

MFC after: 1 month

14 years agoAdd pcb reference counting to the pcblist sysctl handler functions
Bjoern A. Zeeb [Wed, 17 Mar 2010 18:28:27 +0000 (18:28 +0000)]
Add pcb reference counting to the pcblist sysctl handler functions
to ensure type stability while caching the pcb pointers for the
copyout.

Reviewed by: rwatson
MFC after: 7 days

14 years agoAdd "Massachusetts".
David E. O'Brien [Wed, 17 Mar 2010 15:31:06 +0000 (15:31 +0000)]
Add "Massachusetts".

14 years agoVendor import of BIND 9.6.2-P1
Doug Barton [Wed, 17 Mar 2010 05:53:04 +0000 (05:53 +0000)]
Vendor import of BIND 9.6.2-P1

14 years agoPut gone device timer into a structure tag that can hold more than 32 seconds. Oops.
Matt Jacob [Wed, 17 Mar 2010 02:48:14 +0000 (02:48 +0000)]
Put gone device timer into a structure tag that can hold more than 32 seconds. Oops.

Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM
or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've
turned off autologin and find them, or rather don't, via camcontrol rescan.

MFC after: 1 month

14 years agoRevamp the interrupt code based on the previous commit:
Marcel Moolenaar [Wed, 17 Mar 2010 00:37:15 +0000 (00:37 +0000)]
Revamp the interrupt code based on the previous commit:
o   Introduce XIV, eXternal Interrupt Vector, to differentiate from
    the interrupts vectors that are offsets in the IVT (Interrupt
    Vector Table). There's a vector for external interrupts, which
    are based on the XIVs.

o   Keep track of allocated and reserved XIVs so that we can assign
    XIVs without hardcoding anything. When XIVs are allocated, an
    interrupt handler and a class is specified for the XIV. Classes
    are:
    1.  architecture-defined: XIV 15 is returned when no external
interrupt are pending,
    2.  platform-defined: SAL reports which XIV is used to wakeup
an AP (typically 0xFF, but it's 0x12 for the Altix 350).
    3.  inter-processor interrupts: allocated for SMP support and
non-redirectable.
    4.  device interrupts (i.e. IRQs): allocated when devices are
discovered and are redirectable.

o   Rewrite the central interrupt handler to call the per-XIV
    interrupt handler and rename it to ia64_handle_intr(). Move
    the per-XIV handler implementation to the file where we have
    the XIV allocation/reservation. Clock interrupt handling is
    moved to clock.c. IPI handling is moved to mp_machdep.c.

o   Drop support for the Intel 8259A because it was broken. When
    XIV 0 is received, the CPU should initiate an INTA cycle to
    obtain the interrupt vector of the 8259-based interrupt. In
    these cases the interrupt controller we should be talking to
    WRT to masking on signalling EOI is the 8259 and not the I/O
    SAPIC. This requires adriver for the Intel 8259A which isn't
    available for ia64. Thus stop pretending to support ExtINTs
    and instead panic() so that if we come across hardware that
    has an Intel 8259A, so have something real to work with.

o   With XIVs for IPIs dynamically allocatedi and also based on
    priority, define the IPI_* symbols as variables rather than
    constants. The variable holds the XIV allocated for the IPI.

o   IPI_STOP_HARD delivers a NMI if possible. Otherwise the XIV
    assigned to IPI_STOP is delivered.

14 years agoBetter way to find out available file system types is to use lsvfs(1).
Pawel Jakub Dawidek [Tue, 16 Mar 2010 23:19:55 +0000 (23:19 +0000)]
Better way to find out available file system types is to use lsvfs(1).
Using 'sysctl vfs' is not only ugly, but is also not reliable - not all
file system types create entries in vfs sysctl tree.

Reviewed by: imp
MFC after: 1 week

14 years ago- reduce contention by breaking up ARC state locks in to 16 for data
Kip Macy [Tue, 16 Mar 2010 22:17:21 +0000 (22:17 +0000)]
- reduce contention by breaking up ARC state locks in to 16 for data
  and 16 for metadata
- export L2ARC tunables as sysctls
- add several kstats to track L2ARC state more precisely
- avoid holding a contended lock when atomically incrementing a
  contended counter (no lock protection needed for atomics)

14 years agoAdd missing headers. While there, arrange headers alphabetically.
Konstantin Belousov [Tue, 16 Mar 2010 20:42:54 +0000 (20:42 +0000)]
Add missing headers. While there, arrange headers alphabetically.

MFC after: 3 days

14 years agoAdd missing headers.
Konstantin Belousov [Tue, 16 Mar 2010 20:41:45 +0000 (20:41 +0000)]
Add missing headers.

MFC after: 3 days

14 years agoFix a long standing regression of readdir(3) in fdescfs(5) introduced
Jung-uk Kim [Tue, 16 Mar 2010 19:59:14 +0000 (19:59 +0000)]
Fix a long standing regression of readdir(3) in fdescfs(5) introduced
in r1.48.  We were stopping at the first null pointer when multiple file
descriptors were opened and one in the middle was closed.  This restores
traditional behaviour of fdescfs.

MFC after: 3 days

14 years agoVerify interface up status using its link state only
Qing Li [Tue, 16 Mar 2010 17:59:12 +0000 (17:59 +0000)]
Verify interface up status using its link state only
if the interface has such capability. The interface
capability flag indicates whether such capability
exists. This approach is much more backward compatible.
Physical device driver changes will be part of another
commit.

Also updated the ifconfig utility to show the LINKSTATE
capability if present.

Reviewed by: rwatson, imp, juli
MFC after: 3 days

14 years agoRevert r205090.
Pyun YongHyeon [Tue, 16 Mar 2010 17:45:16 +0000 (17:45 +0000)]
Revert r205090.
It's hard to know when the mail box register write will get flushed to
the hardware and it may take longer.

Pointed out by: scottl