]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoUse "cylinder" instead of "cyl" for consistency.
joel [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.
nyan [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.
nyan [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
bschmidt [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
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.
trasz [Sat, 13 Nov 2010 11:54:04 +0000 (11:54 +0000)]
Remove unused variables.

13 years agoMemory stats are reported in bytes, not pages.
brucec [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.
kib [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
uqs [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.
delphij [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
jh [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.
delphij [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 [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.
brucec [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 [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
dim [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 [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 [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 [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.
gnn [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
jkim [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
jkim [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.
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.
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
nwhitehorn [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.
emax [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
yongari [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
jkim [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
mm [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.
pluknet [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 [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 [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 [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.
nwhitehorn [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 [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 [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 [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 [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:
pluknet [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
lstewart [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
nwhitehorn [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.
nwhitehorn [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
nwhitehorn [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
nwhitehorn [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
nwhitehorn [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.
lstewart [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
lstewart [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
lstewart [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
dim [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
dim [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.
dim [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
dim [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
dim [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)
mm [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.
trasz [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
dim [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.
thompsa [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
jkim [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
jkim [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
dim [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
dim [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.
brucec [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
bschmidt [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.
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
avg [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
yongari [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
avg [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 [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
jhb [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 [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 [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 [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
ticso [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.
raj [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.
raj [Thu, 11 Nov 2010 13:46:28 +0000 (13:46 +0000)]
Fix typo in the comment.

13 years agoReturn IEEE 1275 compliant error codes.
raj [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
raj [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
ae [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
kib [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.
des [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
kib [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.
kib [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
kib [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.
kib [Thu, 11 Nov 2010 11:26:59 +0000 (11:26 +0000)]
Fix typo. Function is called ffs_blkfree.

13 years agoRemove unneeded conditional.
trasz [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
rrs [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
nwhitehorn [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

13 years agoZero the buffer containing the .gnu_debuglink section before writing
cperciva [Thu, 11 Nov 2010 00:29:19 +0000 (00:29 +0000)]
Zero the buffer containing the .gnu_debuglink section before writing
into it.  Prior to this commit the .gnu_debuglink section can have up
to 3 bytes of uninitialized garbage; as a result, .ko files could
change vary between builds.

Approved by: dim
MFC after: 7 days

13 years agoAdd a man page for usb_quirk module, plus references in other man pages,
n_hibma [Wed, 10 Nov 2010 23:45:44 +0000 (23:45 +0000)]
Add a man page for usb_quirk module, plus references in other man pages,
and updated comments in the usb_quirk.h header file.

The main purpose of this is to expose the quirks for ejecting 3G
modules. usb_modeswitch in Linux does a great job of collecting
information on these, and with the quirks module people can try out the
modeswitch config file entries on FreeBSD, hence the SCSI strings in the
man page.

MFC after: 2 weeks

13 years agoFix typos.
attilio [Wed, 10 Nov 2010 21:06:49 +0000 (21:06 +0000)]
Fix typos.

Submitted by: gianni
MFC after: 3 days

13 years agoEntering deep nap mode on the 970MP requires that both MSR[NAP] and
nwhitehorn [Wed, 10 Nov 2010 20:28:10 +0000 (20:28 +0000)]
Entering deep nap mode on the 970MP requires that both MSR[NAP] and
MSR[DEEPNAP] be set, not just MSR[DEEPNAP]. Fixing this reduces the idle
temperature of my CPUs from 57 to 38 degrees and makes one-shot timer
mode work properly.

Hint from: mav
MFC after: 4 days

13 years agoDisabling CPU NAP modes during SMU commands is a hack needed only on U3
nwhitehorn [Wed, 10 Nov 2010 20:09:05 +0000 (20:09 +0000)]
Disabling CPU NAP modes during SMU commands is a hack needed only on U3
systems. Don't use it on non-U3 systems to allow cpu_idle() to work
correctly.

13 years agoMake APM emulation look more closer to its origin. Use device_get_softc(9)
jkim [Wed, 10 Nov 2010 18:50:12 +0000 (18:50 +0000)]
Make APM emulation look more closer to its origin.  Use device_get_softc(9)
instead of hardcoding acpi(4) unit number as we have device_t for it.

13 years agoAdd my birthday to the calendar so everyone can send me presents.
zack [Wed, 10 Nov 2010 18:45:32 +0000 (18:45 +0000)]
Add my birthday to the calendar so everyone can send me presents.

Approved by: zml (mentor)

13 years agoAllow specification of eject method through quirks, so people can test
n_hibma [Wed, 10 Nov 2010 18:41:38 +0000 (18:41 +0000)]
Allow specification of eject method through quirks, so people can test
drive eject methods before supplying patches.

13 years agoAdd myself as a new committer and add zml as my mentor.
zack [Wed, 10 Nov 2010 18:37:03 +0000 (18:37 +0000)]
Add myself as a new committer and add zml as my mentor.

Approved by: zml (mentor)

13 years agoEnable reservation-based physical memory allocation. Even without the
alc [Wed, 10 Nov 2010 17:57:34 +0000 (17:57 +0000)]
Enable reservation-based physical memory allocation.  Even without the
creation of large page mappings in the pmap, it can provide modest
performance benefits.  In particular, for a "buildworld" on a 2x 1GHz
Ultrasparc IIIi it reduced the wall clock time by 2.2% and the system
time by 12.6%.

Tested by: marius@

13 years agoRemove unexisted since r212541 timer1hz/timer2hz variables.
mav [Wed, 10 Nov 2010 16:42:36 +0000 (16:42 +0000)]
Remove unexisted since r212541 timer1hz/timer2hz variables.

13 years agoIn r212554 name of G_PART_PARM_GEOM and G_PART_PARM_PROVIDER
ae [Wed, 10 Nov 2010 14:38:51 +0000 (14:38 +0000)]
In r212554 name of G_PART_PARM_GEOM and G_PART_PARM_PROVIDER
ctlreq parameters was changed to "arg0". Fix the last place where
it is used.

Approved by: kib (mentor)

13 years agoTypo fix in a comment.
bcr [Wed, 10 Nov 2010 14:33:09 +0000 (14:33 +0000)]
Typo fix in a comment.

Reviewed by: cperciva