]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoDisable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot
Martin Matuska [Sat, 13 Nov 2010 21:09:18 +0000 (21:09 +0000)]
Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot
and VFS_RELE on a non-existing hold on snapshot parent's z_vfs.

This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4
(bug IDs: 67921396794830) - not applicable to FreeBSD.

This fixes the process hang if umounting a manually mounted snapshot.

Reported by: Alexander Zagrebin <alexz@visp.ru>
Approved by: delphij (mentor)
MFC after: 1 week

13 years agoWhen printing media with more than one media option set aggregate these
Marius Strobl [Sat, 13 Nov 2010 21:03:19 +0000 (21:03 +0000)]
When printing media with more than one media option set aggregate these
in a comma delimited list instead of repeating "mediaopt" for each one.
This matches how the options of the active media are printed with
print_media_word() and brings us in line what NetBSD does.

MFC after: 2 weeks

13 years agoAdd the switch config for the XS Stick.
Nick Hibma [Sat, 13 Nov 2010 20:45:16 +0000 (20:45 +0000)]
Add the switch config for the XS Stick.

It speaks AT commands on 2 out of 3 serial ports, but it has not been
verified to work at all speaking PPP yet.

13 years agoThe fixes for mips/mips arm/arm compat hacks broke if TARGET or
Warner Losh [Sat, 13 Nov 2010 20:41:47 +0000 (20:41 +0000)]
The fixes for mips/mips arm/arm compat hacks broke if TARGET or
TARGET_ARCH wasn't defined.  Fix it for that case.

Submitted by: Garrett Cooper

13 years agoDefault to little endian output when building for little endian. This
Warner Losh [Sat, 13 Nov 2010 20:30:24 +0000 (20:30 +0000)]
Default to little endian output when building for little endian.  This
got lost as a result of a mismerge a few months back and I didn't
notice until I collapsed tbemd into -head.

Submitted by: similar patch by kan@

13 years agoCorrect mips/arm elimination of sym
Warner Losh [Sat, 13 Nov 2010 20:28:06 +0000 (20:28 +0000)]
Correct mips/arm elimination of sym

13 years agoFix compiler warnings.
Hans Petter Selasky [Sat, 13 Nov 2010 19:26:45 +0000 (19:26 +0000)]
Fix compiler warnings.

Submitted by: Alexander Best (arundel)
Approved by: thompsa (mentor)

13 years agoFix LibUSB v1.0 compliancy.
Hans Petter Selasky [Sat, 13 Nov 2010 19:25:11 +0000 (19:25 +0000)]
Fix LibUSB v1.0 compliancy.

1) We need to allow the USB callback to free the USB transfer itself.
2) The USB transfer buffer should only be automatically freed when
freeing the USB transfer.

Fixed by: hselasky
Submitted by: Gustau Perez i Querol
Approved by: thompsa (mentor)

13 years agoAdd legacy names for mips:mips and arm with TARGET_BIG_ENDIAN, for the moment.
Warner Losh [Sat, 13 Nov 2010 18:39:24 +0000 (18:39 +0000)]
Add legacy names for mips:mips and arm with TARGET_BIG_ENDIAN, for the moment.

13 years agoLet the linker pick the right output format automatically
Warner Losh [Sat, 13 Nov 2010 18:38:35 +0000 (18:38 +0000)]
Let the linker pick the right output format automatically

13 years agoRemove references to the long-gone ramdisk
Doug Barton [Sat, 13 Nov 2010 18:10:44 +0000 (18:10 +0000)]
Remove references to the long-gone ramdisk

Submitted by: Garrett Cooper <yanegomi@gmail.com>

13 years agoAdd for existing protocol entries the missing SCTP port allocations
Michael Tuexen [Sat, 13 Nov 2010 17:52:04 +0000 (17:52 +0000)]
Add for existing protocol entries the missing SCTP port allocations
and add protocol entries for protocols which have SCTP port allocations.
These entries are according to
http://www.iana.org/assignments/port-numbers
as of today. Also add SCTP port allocation entires for the
echo, daytime, and chargen service.
Discussed with rwatson@

MFC after: 3 days.

13 years agoIn printfile(), exit the process instead of only printing the warning.
Konstantin Belousov [Sat, 13 Nov 2010 16:49:07 +0000 (16:49 +0000)]
In printfile(), exit the process instead of only printing the warning.
This fixes verbose mode when either -i specified non-existent kldfile
id, or the file was unloaded between two kldnext(2) calls.

While there, fix printfile() definition to be style(9)-compliant.

Submitted by: arundel
MFC after: 1 week

13 years agoUse "cylinder" instead of "cyl" for consistency.
Joel Dahl [Sat, 13 Nov 2010 15:28:44 +0000 (15:28 +0000)]
Use "cylinder" instead of "cyl" for consistency.

Reviewed by: phk

13 years agoNow there is no functional difference from i386 version.
Yoshihiro Takahashi [Sat, 13 Nov 2010 15:24:56 +0000 (15:24 +0000)]
Now there is no functional difference from i386 version.
So use i386 version.

13 years agoRemove unused includes.
Yoshihiro Takahashi [Sat, 13 Nov 2010 15:23:20 +0000 (15:23 +0000)]
Remove unused includes.

13 years agoSome device drivers calculate various timing related things based on
Bernhard Schmidt [Sat, 13 Nov 2010 14:59:54 +0000 (14:59 +0000)]
Some device drivers calculate various timing related things based on
the currently selected rate. The calculations of course need a valid
rate. To make that possible before any call to node_rate() is done,
initialize ni_txrate on none_node_init() calls.

MFC after: 1 week

13 years agoFix a locking issue reported by brucec@ affecting
Michael Tuexen [Sat, 13 Nov 2010 12:52:44 +0000 (12:52 +0000)]
Fix a locking issue reported by brucec@ affecting
1-to-1 style sockets which have not yet been
accepted.

MFC after: 3 days.

13 years agoRemove unused variables.
Edward Tomasz Napierala [Sat, 13 Nov 2010 11:54:04 +0000 (11:54 +0000)]
Remove unused variables.

13 years agoMemory stats are reported in bytes, not pages.
Rebecca Cran [Sat, 13 Nov 2010 11:43:20 +0000 (11:43 +0000)]
Memory stats are reported in bytes, not pages.

PR: docs/151283
Submitted by: Bas Smeelen <b.smeelen at ose.nl>
MFC after: 3 days

13 years agoUse 'z' modifier for size_t printing.
Konstantin Belousov [Sat, 13 Nov 2010 11:11:51 +0000 (11:11 +0000)]
Use 'z' modifier for size_t printing.

13 years agoFix bug in jn(3) and jnf(3) that led to -inf results
Ulrich Spörlein [Sat, 13 Nov 2010 10:54:10 +0000 (10:54 +0000)]
Fix bug in jn(3) and jnf(3) that led to -inf results

Explanation by Steve:
jn[f](n,x) for certain ranges of x uses downward recursion to compute
the value of the function.  The recursion sequence that is generated is
proportional to the actual desired value, so a normalization step is
taken.  This normalization is j0[f](x) divided by the zeroth sequence
member.  As Bruce notes, near the zeros of j0[f](x) the computed value
can have giga-ULP inaccuracy. I found for the 1st zero of j0f(x) only
the leading decimal digit is correct.  The solution to the issue is
fairly straight forward.  The zeros of j0(x) and j1(x) never coincide,
so as j0(x) approaches a zero, the normalization constant switches to
j1[f](x) divided by the 2nd sequence member.  The expectation is that
j1[f](x) is a more accurately computed value.

PR: bin/144306
Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
Reviewed by: bde
MFC after: 7 days

13 years agoSync with OpenBSD, primarily better signal and terminal handling.
Xin LI [Sat, 13 Nov 2010 10:38:06 +0000 (10:38 +0000)]
Sync with OpenBSD, primarily better signal and terminal handling.

Obtained from: OpenBSD
MFC after: 2 weeks

13 years agoSet FD_CLOEXEC for the output file only when the file has been specified
Jaakko Heinonen [Sat, 13 Nov 2010 09:28:49 +0000 (09:28 +0000)]
Set FD_CLOEXEC for the output file only when the file has been specified
with the -o option. Setting the flag for stderr (the default) could
cause the traced process to redirect stderr to a random file.

PR: bin/152151
Submitted by: ashish
MFC after: 5 days

13 years agoUpdate to vendor release 1.20.00.19.
Xin LI [Sat, 13 Nov 2010 08:58:36 +0000 (08:58 +0000)]
Update to vendor release 1.20.00.19.

Bug fixes:
  * Fixed "inquiry data fails comparion at DV1 step"
  * Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
  * Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0

Many thanks to Areca for continuing to support FreeBSD.

This commit is intended for MFC before 8.2-RELEASE.

Submitted by:   Ching-Lung Huang <ching2048 areca com tw>

13 years agoBreak out the rules which generate crunchgen'ed binaries into a separate
Adrian Chadd [Sat, 13 Nov 2010 03:11:27 +0000 (03:11 +0000)]
Break out the rules which generate crunchgen'ed binaries into a separate
.mk file so they can be reused.

Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries that
require tools built in the local architecture. sh and csh both require this.
It was previously hardcoded in rescue/rescue/Makefile .

Introduce a new option, CRUNCH_SHLIBS, which lists the shared libraries
to link against. These override the static libraries listed in CRUNCH_LIBS.
Some build environments may wish to use a handful of shared libraries
(eg libc.so) so other small, dynamic binaries can be run in the environment.

Remove the now-shared code from rescue/rescue/Makefile and introduce the
CRUNCH_BUILDTOOLS option for the above shells.

13 years agoWe still support PLIP devices, so mention them in addition to ethernet.
Rebecca Cran [Sat, 13 Nov 2010 01:21:55 +0000 (01:21 +0000)]
We still support PLIP devices, so mention them in addition to ethernet.

13 years agoAdd an (off by default) check for negative permissions (where the
Brooks Davis [Sat, 13 Nov 2010 00:40:43 +0000 (00:40 +0000)]
Add an (off by default) check for negative permissions (where the
group on a object has less permissions that everyone).  These
permissions will not work reliably over NFS if you have more than
14 supplemental groups and are usually not what you mean.

MFC after: 1 week

13 years agoSimilar to r212647, remove the workaround in sys/net/vnet.h for an ld
Dimitry Andric [Fri, 12 Nov 2010 22:59:50 +0000 (22:59 +0000)]
Similar to r212647, remove the workaround in sys/net/vnet.h for an ld
bug (incorrect placement of __start_SECNAME in some cases) that was
fixed in r210245.

There is already an UPDATING entry about needing a recent ld.

MFC after: 1 month

13 years agoecho(1): Clarify portability and mention literal "--" handling.
Jilles Tjoelker [Fri, 12 Nov 2010 22:43:40 +0000 (22:43 +0000)]
echo(1): Clarify portability and mention literal "--" handling.

MFC after: 1 week

13 years agosh(1): Document r214304 (special builtin is illegal function name).
Jilles Tjoelker [Fri, 12 Nov 2010 22:40:18 +0000 (22:40 +0000)]
sh(1): Document r214304 (special builtin is illegal function name).

13 years agosh(1): Update for r214492. "${v+"hi}there"}".
Jilles Tjoelker [Fri, 12 Nov 2010 22:28:47 +0000 (22:28 +0000)]
sh(1): Update for r214492. "${v+"hi}there"}".

The part hi}there is not a quoted string but nevertheless the closing brace
does not terminate the expansion.

13 years agoAdd a queue to hold packets while we await an ARP reply.
George V. Neville-Neil [Fri, 12 Nov 2010 22:03:02 +0000 (22:03 +0000)]
Add a queue to hold packets while we await an ARP reply.

When a fast machine first brings up some non TCP networking program
it is quite possible that we will drop packets due to the fact that
only one packet can be held per ARP entry.  This leads to packets
being missed when a program starts or restarts if the ARP data is
not currently in the ARP cache.

This code adds a new sysctl, net.link.ether.inet.maxhold, which defines
a system wide maximum number of packets to be held in each ARP entry.
Up to maxhold packets are queued until an ARP reply is received or
the ARP times out.  The default setting is the old value of 1
which has been part of the BSD networking code since time
immemorial.

Expose the time we hold an incomplete ARP entry by adding
the sysctl net.link.ether.inet.wait, which defaults to 20
seconds, the value used when the new ARP code was added..

Reviewed by: bz, rpaulo
MFC after: 3 weeks

13 years agoWarn users that acpi.ko is deprecated and exit immediately unless the user
Jung-uk Kim [Fri, 12 Nov 2010 21:11:49 +0000 (21:11 +0000)]
Warn users that acpi.ko is deprecated and exit immediately unless the user
set FORCE_BUILD.  This is to avoid foot-shooting while making MFC to stable
branches easier.

Discussed with: jhb

13 years agoMFamd64: (based on) r209957
Jung-uk Kim [Fri, 12 Nov 2010 20:55:14 +0000 (20:55 +0000)]
MFamd64: (based on) r209957

Move logic of building ACPI headers for acpi_wakeup.c into better places,
remove intermediate makefile and shell script, and reduce diff between i386
and amd64.

13 years agoDon't print an empty line when printing mapping arrays.
Michael Tuexen [Fri, 12 Nov 2010 20:46:33 +0000 (20:46 +0000)]
Don't print an empty line when printing mapping arrays.

MFC after: 3 days.

13 years agoFix more issues with the SACK/NR-SACK generation code.
Michael Tuexen [Fri, 12 Nov 2010 20:45:21 +0000 (20:45 +0000)]
Fix more issues with the SACK/NR-SACK generation code.

MFC after: 3 days.

13 years agoPartially revert r215182. There appears to be a silicon bug on the 970
Nathan Whitehorn [Fri, 12 Nov 2010 20:26:34 +0000 (20:26 +0000)]
Partially revert r215182. There appears to be a silicon bug on the 970
that causes AP bringup to fail if some of the Cell HID-register code
is anywhere in the instruction stream. Pending a better solution, cache
performance on SMP Cell systems running without a hypervisor will be
suboptimal.

13 years agoAdd firmware downloader for Atheros AR3011 based USB Bluetooth devices.
Maksim Yevmenkin [Fri, 12 Nov 2010 19:43:12 +0000 (19:43 +0000)]
Add firmware downloader for Atheros AR3011 based USB Bluetooth devices.

Hardware donated by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after: 3 weeks

13 years agoFix regression introduced in r215132. Caller always holds a driver
Pyun YongHyeon [Fri, 12 Nov 2010 19:33:13 +0000 (19:33 +0000)]
Fix regression introduced in r215132. Caller always holds a driver
lock before accessing mii, so locking is not needed here.

Reported by: Rob Farmer (rfarmer <> predatorlabs dot net)

13 years agoCreate C1 state when _CST is valid but _CST does not have one. Some BIOSes
Jung-uk Kim [Fri, 12 Nov 2010 17:10:12 +0000 (17:10 +0000)]
Create C1 state when _CST is valid but _CST does not have one.  Some BIOSes
do not report C1 state in _CST object, probably because it is a mandatory
state with or without existence of the optional _CST.

Reviewed by: avg

13 years agoUpdate xz to release 5.0.0
Martin Matuska [Fri, 12 Nov 2010 16:53:17 +0000 (16:53 +0000)]
Update xz to release 5.0.0

Approved by: delphij (mentor)
MFC after: 1 week

13 years agoAdd 'jid' as a possible sort order to the help screen.
Sergey Kandaurov [Fri, 12 Nov 2010 16:50:11 +0000 (16:50 +0000)]
Add 'jid' as a possible sort order to the help screen.

PR: bin/150992
Submitted by: Frederic Culot <frederic at culot dot org>
Approved by: avg (mentor)
MFC after: 5 days

13 years agoRevert to libgcc for sparc64.
Ed Schouten [Fri, 12 Nov 2010 15:52:27 +0000 (15:52 +0000)]
Revert to libgcc for sparc64.

I've had a report of a sparc64 system where cc1 generates illegal
instructions. We still have to diagnose this properly, but instead of
hosing all sparc64 boxes out there, fall back to libgcc to prevent more
damage.

Reported by: Florian Smeets

13 years agosh: Remove unused man page for echo builtin.
Jilles Tjoelker [Fri, 12 Nov 2010 15:40:00 +0000 (15:40 +0000)]
sh: Remove unused man page for echo builtin.

The information in sh(1) about the echo builtin is equivalent, though less
extensive.

The echo(1) man page (bin/echo/echo.1) is different.

Unfortunately, sh's echo builtin and /bin/echo have gone out of sync and
this probably cannot be fixed any more.

Reported by: uqs (list of untouched files)
MFC after: 1 week

13 years agoMake POLL_ERR and POLL_HUP different.
Jilles Tjoelker [Fri, 12 Nov 2010 15:30:49 +0000 (15:30 +0000)]
Make POLL_ERR and POLL_HUP different.

The kernel currently does not generate any of the POLL_* constants, but
some applications use them and break if they are not all distinct.

PR: kern/126076
MFC after: 1 week

13 years agoAdd CPU support code for the IBM Cell Broadband Engine.
Nathan Whitehorn [Fri, 12 Nov 2010 15:20:10 +0000 (15:20 +0000)]
Add CPU support code for the IBM Cell Broadband Engine.

13 years agosh(1): Modernize the introduction a bit.
Jilles Tjoelker [Fri, 12 Nov 2010 14:40:20 +0000 (14:40 +0000)]
sh(1): Modernize the introduction a bit.

In particular, remove the text about ksh-like features, which are usually
taken for granted nowadays. The original Bourne shell is fading away and for
most users our /bin/sh is one of the most minimalistic they know.

13 years agoThe first customer of the SO_USER_COOKIE option:
Luigi Rizzo [Fri, 12 Nov 2010 13:05:17 +0000 (13:05 +0000)]
The first customer of the SO_USER_COOKIE option:
the "sockarg" ipfw option matches packets associated to
a local socket and with a non-zero so_user_cookie value.
The value is made available as tablearg, so it can be used
as a skipto target or pipe number in ipfw/dummynet rules.

Code by Paul Joe, manpage by me.

Submitted by: Paul Joe
MFC after: 1 week

13 years agoThis commit implements the SO_USER_COOKIE socket option, which lets
Luigi Rizzo [Fri, 12 Nov 2010 13:02:26 +0000 (13:02 +0000)]
This commit implements the SO_USER_COOKIE socket option, which lets
you tag a socket with an uint32_t value. The cookie can then be
used by the kernel for various purposes, e.g. setting the skipto
rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has
been implemented; however there is nothing ipfw-specific in its
implementation).

The ipfw-related code that uses the optopn will be committed separately.

This change adds a field to 'struct socket', but the struct is not
part of any driver or userland-visible ABI so the change should be
harmless.

See the discussion at
http://lists.freebsd.org/pipermail/freebsd-ipfw/2009-October/004001.html

Idea and code from Paul Joe, small modifications and manpage
changes by myself.

Submitted by: Paul Joe
MFC after: 1 week

13 years agomove the initialization of BINMAKE earler, so it is
Luigi Rizzo [Fri, 12 Nov 2010 12:48:41 +0000 (12:48 +0000)]
move the initialization of BINMAKE earler, so it is
available throughout the entire build process.

Submitted by: Matteo Landi
MFC after: 3 days

13 years agoStop documenting vgonel() after its converting to the static function:
Sergey Kandaurov [Fri, 12 Nov 2010 12:07:36 +0000 (12:07 +0000)]
Stop documenting vgonel() after its converting to the static function:
 svn r147332 (by jeff): "Don't make vgonel() globally visible".
While here, specify the vnode locking scheme for vgone().

Discussed on: freebsd-hackers@
Approved by: kib (mentor)
MFC after: 10 days

13 years agoThis commit marks the first formal contribution of the "Five New TCP Congestion
Lawrence Stewart [Fri, 12 Nov 2010 06:41:55 +0000 (06:41 +0000)]
This commit marks the first formal contribution of the "Five New TCP Congestion
Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details
about the project are available at: http://caia.swin.edu.au/freebsd/5cc/

- Add a KPI and supporting infrastructure to allow modular congestion control
  algorithms to be used in the net stack. Algorithms can maintain per-connection
  state if required, and connections maintain their own algorithm pointer, which
  allows different connections to concurrently use different algorithms. The
  TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
  programmatically query or change the congestion control algorithm respectively
  from within an application at runtime.

- Integrate the framework with the TCP stack in as least intrusive a manner as
  possible. Care was also taken to develop the framework in a way that should
  allow integration with other congestion aware transport protocols (e.g. SCTP)
  in the future. The hope is that we will one day be able to share a single set
  of congestion control algorithm modules between all congestion aware transport
  protocols.

- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
  and use it to decouple the meaning of recovery from a congestion event and
  recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
  congestion control protocols don't generally need to recover from packet loss
  and need a different way to note a congestion recovery episode within the
  stack.

- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
  and ensures the stack always uses the appropriate mechanisms for recovering
  from packet loss during a congestion recovery episode.

- Extract the NewReno congestion control algorithm from the TCP stack and
  massage it into module form. NewReno is always built into the kernel and will
  remain the default algorithm for the forseeable future. Implementations of
  additional different algorithms will become available in the near future.

- Bump __FreeBSD_version to 900025 and note in UPDATING that rebuilding code
  that relies on the size of "struct tcpcb" is required.

Many thanks go to the Cisco University Research Program Fund at Community
Foundation Silicon Valley and the FreeBSD Foundation. Their support of our work
at the Centre for Advanced Internet Architectures, Swinburne University of
Technology is greatly appreciated.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco URP, FreeBSD Foundation
Reviewed by: rpaulo
Tested by: David Hayes (and many others over the years)
MFC after: 3 months

13 years agoRemove use of a separate ofw_pmap on 32-bit CPUs. Many Open Firmware
Nathan Whitehorn [Fri, 12 Nov 2010 05:12:38 +0000 (05:12 +0000)]
Remove use of a separate ofw_pmap on 32-bit CPUs. Many Open Firmware
mappings need to end up in the kernel anyway since the kernel begins
executing in OF context. Separating them adds needless complexity,
especially since the powerpc64 and mmu_oea64 code gave up on it a long
time ago.

As a side effect, the PPC ofw_machdep code is no longer AIM-specific,
so move it to powerpc/ofw.

13 years agoRemove or conditionalize some hypervisor-unfriendly instruction sequences.
Nathan Whitehorn [Fri, 12 Nov 2010 04:22:00 +0000 (04:22 +0000)]
Remove or conditionalize some hypervisor-unfriendly instruction sequences.

13 years agoAdd some platform KOBJ extensions and continue integrating PowerPC
Nathan Whitehorn [Fri, 12 Nov 2010 04:18:19 +0000 (04:18 +0000)]
Add some platform KOBJ extensions and continue integrating PowerPC
hypervisor infrastructure support:
- Fix coexistence of multiple platform modules in the same kernel
- Allow platform modules to provide an SMP topology
- PowerPC hypervisors limit the amount of memory accessible in real mode.
  Allow the platform modules to specify the maximum real-mode address,
  and modify the bits of the kernel that need to allocate
  real-mode-accessible buffers to respect this limits.

13 years agoFix an error in r215067. An existing /chosen/mmu but missing translations
Nathan Whitehorn [Fri, 12 Nov 2010 04:13:48 +0000 (04:13 +0000)]
Fix an error in r215067. An existing /chosen/mmu but missing translations
property just means we shouldn't add any translations, not that we should
panic.

13 years agoCentralize CPU idle routines into powerpc/cpu.c and use the same
Nathan Whitehorn [Fri, 12 Nov 2010 03:43:22 +0000 (03:43 +0000)]
Centralize CPU idle routines into powerpc/cpu.c and use the same
cpu_idle_hook mechanism that x86 uses for overriding the idle routine.
This is required for supporting ilding the CPU under PowerPC hypervisors.

13 years agoThe first releases SIFTR will ship in will be 7.4 and 8.2.
Lawrence Stewart [Fri, 12 Nov 2010 01:40:29 +0000 (01:40 +0000)]
The first releases SIFTR will ship in will be 7.4 and 8.2.

MFC after: 3 days

13 years agoStandardise all Swinburne related copyright/licence statements throughout the
Lawrence Stewart [Fri, 12 Nov 2010 00:44:18 +0000 (00:44 +0000)]
Standardise all Swinburne related copyright/licence statements throughout the
tree in preparation for another large code import. Swinburne University is the
legal entity that owns copyright and the 2-clause BSD licence is acceptable.

13 years agoThe university does not require that its CRICOS number be included in source
Lawrence Stewart [Fri, 12 Nov 2010 00:19:42 +0000 (00:19 +0000)]
The university does not require that its CRICOS number be included in source
code. Remove all references from the tree.

MFC after: 3 days

13 years agoGarbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
Dimitry Andric [Thu, 11 Nov 2010 23:45:19 +0000 (23:45 +0000)]
Garbage collect gnu/usr.bin/binutils/{gasp,gdb,gdbreplay}, as these have
not been connected to the build for more than 6 years.

Obtained from: projects/binutils-2.17

13 years agoDo not build or install gasp.info anymore, as gasp has not been built or
Dimitry Andric [Thu, 11 Nov 2010 23:41:36 +0000 (23:41 +0000)]
Do not build or install gasp.info anymore, as gasp has not been built or
installed for more than 6 years.

Obtained from: projects/binutils-2.17

13 years agoFix typo, and re-wrap paragraph.
Dimitry Andric [Thu, 11 Nov 2010 23:00:37 +0000 (23:00 +0000)]
Fix typo, and re-wrap paragraph.

13 years agoUse -fPIC to build libexec/rtld-elf on sparc64, so it will also be able
Dimitry Andric [Thu, 11 Nov 2010 22:53:55 +0000 (22:53 +0000)]
Use -fPIC to build libexec/rtld-elf on sparc64, so it will also be able
to link with newer binutils, without overflowing the GOT.

Obtained from: projects/binutils-2.17

13 years agoMake sure to specify the alignment of minbrk and curbrk. They were correctly
Dimitry Andric [Thu, 11 Nov 2010 22:35:42 +0000 (22:35 +0000)]
Make sure to specify the alignment of minbrk and curbrk. They were correctly
aligned by accident with earlier binutils, but no longer are, causing link
failures.

Submitted by: nwhitehorn
Obtained from: projects/binutils-2.17

13 years agoVendor import of xz (stripped)
Martin Matuska [Thu, 11 Nov 2010 22:21:30 +0000 (22:21 +0000)]
Vendor import of xz (stripped)
Git revision: e45929260cd902036efd40c5610a8d0a50d5712b
Release: 5.0.0

Approved by: delphij (mentor)

13 years agoFix style.
Edward Tomasz Napierala [Thu, 11 Nov 2010 21:53:46 +0000 (21:53 +0000)]
Fix style.

Submitted by: bde

13 years agoRemove some unneeded spaces from the __sym_compat() macro, since newer
Dimitry Andric [Thu, 11 Nov 2010 21:36:52 +0000 (21:36 +0000)]
Remove some unneeded spaces from the __sym_compat() macro, since newer
versions of gas are more fussy about spaces surrounding '@' signs in
versioned symbol names.

13 years agoAdd a GPIO driver for the Gateworks Cambria platform.
Andrew Thompson [Thu, 11 Nov 2010 20:18:33 +0000 (20:18 +0000)]
Add a GPIO driver for the Gateworks Cambria platform.

The external gpio pins are connected to a PLD on the i2c bus, unfortunatley
this device does not conform by failing to send an ack after each byte written.
The iicbb driver will abort the transfer when the address is not ack'd and it
would introduce a lot of churn to be able to pass a flag down to
iicbb_start/iicbb_write. Instead we do bad things by grabbing the iicbus but
then doing our own bit banging.

13 years agoMove identical copies of apm_bios.h to sys/x86/include, replace them with
Jung-uk Kim [Thu, 11 Nov 2010 19:36:21 +0000 (19:36 +0000)]
Move identical copies of apm_bios.h to sys/x86/include, replace them with
stubs, and adjust PC98 stub accordingly.

Reviewed by: imp, nyan

13 years agoAdd compat shim for apm(4) to translate APM BIOS function numbers from i386
Jung-uk Kim [Thu, 11 Nov 2010 19:20:33 +0000 (19:20 +0000)]
Add compat shim for apm(4) to translate APM BIOS function numbers from i386
to PC98-specific ones.  Any binaries using apm ioctl(4) commands but built
for i386 should also work on PC98 now.

Reviewed by: imp, nyan

13 years agoUse the same treatment as in linker_set.h for the __start and __stop
Dimitry Andric [Thu, 11 Nov 2010 19:18:52 +0000 (19:18 +0000)]
Use the same treatment as in linker_set.h for the __start and __stop
symbols of the set_vnet and set_pcpu sections, so those symbols will
always be emitted in kernel modules, if they use vnet.h or pcpu.h.

Also, for pcpu.h, make the __(start|stop)_set_pcpu declarations, and
associated macros invisible to userland, to prevent it picking up these
symbols.

Reviewed by: kib

13 years agoRevert r103230, which depended on ld preserving the __start_xxx and
Dimitry Andric [Thu, 11 Nov 2010 19:17:59 +0000 (19:17 +0000)]
Revert r103230, which depended on ld preserving the __start_xxx and
__stop_xxx symbols for custom sections, even when these were not
referenced (at link time).  This behaviour was changed again in binutils
commit 0b8ed435c3fe8bd09a08c23920e65bfb03251221.

This time, put the __GLOBL macro definition in cdefs.h, so it can be
reused in a few other places where it will be needed.

Reviewed by: kib

13 years agoBump .Dd due to additions in r214279.
Rebecca Cran [Thu, 11 Nov 2010 19:13:16 +0000 (19:13 +0000)]
Bump .Dd due to additions in r214279.

MFC after: 3 days

13 years agoAccording to specs for MmAllocateContiguousMemorySpecifyCache() physically
Bernhard Schmidt [Thu, 11 Nov 2010 18:43:31 +0000 (18:43 +0000)]
According to specs for MmAllocateContiguousMemorySpecifyCache() physically
contiguous memory with requested restrictions must be allocated.

Submitted by: Paul B Mahol <onemda at gmail.com>

13 years agoFix the SACK/NR-SACK generation code.
Michael Tuexen [Thu, 11 Nov 2010 18:41:03 +0000 (18:41 +0000)]
Fix the SACK/NR-SACK generation code.

MFC after: 3 days.

13 years agoamd64: introduce minidump version 2
Andriy Gapon [Thu, 11 Nov 2010 18:35:28 +0000 (18:35 +0000)]
amd64: introduce minidump version 2

After KVA space was increased to 512GB on amd64 it became impractical
to use PTEs as entries in the minidump map of dumped pages, because size
of that map alone would already be 1GB.
Instead, we now use PDEs as page map entries and employ two stage lookup
in libkvm: virtual address -> PDE -> PTE -> physical address.  PTEs are
now dumped as regular pages.  Fixed page map size now is 2MB.

libkvm keeps support for accessing amd64 minidumps of version 1.
Support for 1GB pages is added.

Many thanks to Alan Cox for his guidance, numerous reviews, suggestions,
enhancments and corrections.

Reviewed by: alc [kernel part]
MFC after: 15 days

13 years agoAdd basic WOL support for MCP ethernet controllers. It seems the
Pyun YongHyeon [Thu, 11 Nov 2010 18:08:50 +0000 (18:08 +0000)]
Add basic WOL support for MCP ethernet controllers. It seems the
controller does not perform automatic switching from 1000Mbps link
to 10/100Mbps link when WOL is activated. Implement establishing
10/100Mps link with auto-negotiation in driver. Link status change
handler was modified to remove taskqueue based approach since driver
now needs synchronous handling for link establishment.

Submitted by: Yamagi Burmeister (lists <> yamagi.org ) (initial version)
Tested by: Yamagi Burmeister (lists <> yamagi.org )
MFC after: 1 week

13 years agomake it possible to actually enable hwpstate_verbose
Andriy Gapon [Thu, 11 Nov 2010 17:30:49 +0000 (17:30 +0000)]
make it possible to actually enable hwpstate_verbose

Either via the tunable or the sysctl.

MFC after: 3 days

13 years agoSet symbol visibility to hidden.
Ed Schouten [Thu, 11 Nov 2010 16:53:25 +0000 (16:53 +0000)]
Set symbol visibility to hidden.

Not doing so may cause all sorts of random libraries to expose
libcompiler_rt's functions, which should of course not be done.

Discussed with: kan, kib

13 years agoFix a few more places to use cpumask_t rather than 'u_int'. These are
John Baldwin [Thu, 11 Nov 2010 16:06:47 +0000 (16:06 +0000)]
Fix a few more places to use cpumask_t rather than 'u_int'.  These are
just cosmetic.

13 years agoReplace libgcc.a by libcompiler_rt.a.
Ed Schouten [Thu, 11 Nov 2010 15:48:27 +0000 (15:48 +0000)]
Replace libgcc.a by libcompiler_rt.a.

libcompiler_rt.a is a BSD licensed C language runtime, which implements
many routines which are linked into binaries on architectures where
certain functionality is missing (e.g. 64 bits mul/div on i386).

Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
features, such as an unwinder for exception handling, are missing.
That's why only libgcc.a is replaced for now, because this one does seem
to be complete.

Tested by: rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
and many others. Thanks!
Obtained from: user/ed/compiler-rt

13 years agoDon't use ${LIB} to obtain the library name.
Ed Schouten [Thu, 11 Nov 2010 15:24:57 +0000 (15:24 +0000)]
Don't use ${LIB} to obtain the library name.

Once we use libcompiler_rt, the LIB-line must go, to prevent libgcc.a
from being built. Therefore, just hardcode the name.

Obtained from: user/ed/compiler-rt

13 years agoImport libcompiler_rt into HEAD and add Makefiles.
Ed Schouten [Thu, 11 Nov 2010 15:13:11 +0000 (15:13 +0000)]
Import libcompiler_rt into HEAD and add Makefiles.

Obtained from: user/ed/compiler-rt

13 years agoadd hint for at45d flash device sitting of spibus0
Bernd Walter [Thu, 11 Nov 2010 15:02:14 +0000 (15:02 +0000)]
add hint for at45d flash device sitting of spibus0

13 years agoCorrect RAM size of the MPC8555CDS board.
Rafal Jaworowski [Thu, 11 Nov 2010 13:48:48 +0000 (13:48 +0000)]
Correct RAM size of the MPC8555CDS board.

13 years agoFix typo in the comment.
Rafal Jaworowski [Thu, 11 Nov 2010 13:46:28 +0000 (13:46 +0000)]
Fix typo in the comment.

13 years agoReturn IEEE 1275 compliant error codes.
Rafal Jaworowski [Thu, 11 Nov 2010 13:42:46 +0000 (13:42 +0000)]
Return IEEE 1275 compliant error codes.

Submitted by: nwhitehorn

13 years agoUse local TLB_UNLOCKED marker instead of MTX_UNOWNED for Book-E PowerPC trap
Rafal Jaworowski [Thu, 11 Nov 2010 13:35:23 +0000 (13:35 +0000)]
Use local TLB_UNLOCKED marker instead of MTX_UNOWNED for Book-E PowerPC trap
routines.

This unbreaks Book-E build after the recent machine/mutex.h removal.

While there move tlb_*lock() prototypes to machine/tlb.h.

Submitted by: jhb

13 years agoFix regression introduced in r215088: gpart(8) reports
Andrey V. Elsukov [Thu, 11 Nov 2010 12:13:41 +0000 (12:13 +0000)]
Fix regression introduced in r215088: gpart(8) reports
"arg0 'provider': Invalid argument" after creating new partition
table.
Move code for search of existing geom into g_part_find_geom
function and use this function instead of g_part_parm_geom
in g_part_ctl_create.

Approved by: kib (mentor)

13 years agoThe softdep_setup_freeblocks() adds worklist items before
Konstantin Belousov [Thu, 11 Nov 2010 11:54:01 +0000 (11:54 +0000)]
The softdep_setup_freeblocks() adds worklist items before
deallocate_dependencies() is done. This opens a race between softdep
thread and the thread that does the truncation:
  A write of the indirect block causes the freeblks to become
  ALLCOMPLETE while softdep_setup_freeblocks() dropped softdep lock. And
  then, softdep_disk_write_complete() would reassign the workitem to the
  mount point worklist, causing premature processing of the workitem, or
  journal write exhaust the fb_jfreeblkhd and handle_written_jfreeblk does
  the same reassign.
indir_trunc() then would find the indirect block that is locked (with lock
owned by kernel) but without any dependencies, causing it to hang in
getblk() waiting for buffer lock.

Do not mark freeblks as DEPCOMPLETE until deallocate_dependencies()
finished.

Analyzed, suggested and reviewed by: jeff
Tested by: pho

13 years agoUpgrade to OpenSSH 5.6p1.
Dag-Erling Smørgrav [Thu, 11 Nov 2010 11:46:19 +0000 (11:46 +0000)]
Upgrade to OpenSSH 5.6p1.

13 years agoChange #ifdef INVARIANTS panic into KASSERT, and print some useful
Konstantin Belousov [Thu, 11 Nov 2010 11:41:52 +0000 (11:41 +0000)]
Change #ifdef INVARIANTS panic into KASSERT, and print some useful
information to diagnose the issue, in handle_complete_freeblocks().

Reviewed by: jeff
Tested by: pho

13 years agoIn journal_mount(), only set MNTK_SUJ flag after the jblocks are mapped.
Konstantin Belousov [Thu, 11 Nov 2010 11:38:57 +0000 (11:38 +0000)]
In journal_mount(), only set MNTK_SUJ flag after the jblocks are mapped.
I believe there is a window otherwise where jblocks can be accessed
without proper initialization.

Reviewed by: jeff
Tested by: pho

13 years agoAdd function lbn_offset to calculate offset of the indirect block of
Konstantin Belousov [Thu, 11 Nov 2010 11:35:42 +0000 (11:35 +0000)]
Add function lbn_offset to calculate offset of the indirect block of
given level.

Reviewed by: jeff
Tested by: pho

13 years agoFix typo. Function is called ffs_blkfree.
Konstantin Belousov [Thu, 11 Nov 2010 11:26:59 +0000 (11:26 +0000)]
Fix typo. Function is called ffs_blkfree.

13 years agoRemove unneeded conditional.
Edward Tomasz Napierala [Thu, 11 Nov 2010 08:15:12 +0000 (08:15 +0000)]
Remove unneeded conditional.

Discussed with: kib

13 years agoFix so that a multicast packet can be sent
Randall Stewart [Thu, 11 Nov 2010 05:40:39 +0000 (05:40 +0000)]
Fix so that a multicast packet can be sent
even if there is no route out to that mcast address. The code in
in_pcb inadvertantly would error (no route) even though
the user may have specified the address with the
proper socket option (to specify the egress interface).
Thanks bz for reminding me I forgot to commit this ;-)

Reviewed by: bz
MFC after: 1 week

13 years agoAdd support for the IMISS, DLMISS, and DSMISS traps required to run
Nathan Whitehorn [Thu, 11 Nov 2010 02:40:00 +0000 (02:40 +0000)]
Add support for the IMISS, DLMISS, and DSMISS traps required to run
FreeBSD on a G2 core.

PR: powerpc/111296
Submitted by: Andrew Turner