Commit Graph

157399 Commits

Author SHA1 Message Date
Pyun YongHyeon
b817ddc741 Document tunable dev.rl.%unit.prefer_iomap 2010-08-22 21:32:48 +00:00
Pyun YongHyeon
c6a3d2bb77 It seems some newer RTL8139 controllers provides only memory space
register mapping. I'm not sure whether it comes from the fact that
controllers live behind certain PCI brdge(PLX PCI 6152 33BC) and
the bridge has some issues in handling I/O space register mapping.
Unfortunately it's not possible to narrow down to an exact
controller that shows this issue because RealTek used the same PCI
device/revision id again. In theory, it's possible to check parent
PCI bridge device and change rl(4) to use memory space register
mapping if the parent PCI bridge is PLX PCI 6152. But I didn't try
to do that and we wouldn't get much benefit with added complexity.

Blindly switching to use memory space register mapping for rl(4)
may make most old controllers not to work. At least, I don't want
to take potential risk from such change. So use I/O space register
mapping by default but give users chance to override it via a
tunable. The tunable to use memory space register mapping would be
given by adding the following line to /boot/loader.conf file.

dev.rl.%d.prefer_iomap="0"

This change makes P811B quad-port work with this tunable.

Tested by:	Nikola Kalpazanov ( n.kalpazanov <> gmail dot com )
MFC after:	1 week
2010-08-22 21:26:35 +00:00
Jilles Tjoelker
8fdbdb5d50 sh: Remove remnants of '!!' to negate pattern.
This Almquist extension was disabled long ago.

In pathname generation, components starting with '!!' were treated as
containing wildcards, causing unnecessary readdir (which could fail, causing
pathname generation to fail while it should not).
2010-08-22 21:18:21 +00:00
Ed Schouten
cd1c27af36 Add missing mlink for insmntque1().
MFC after:	1 week
2010-08-22 16:42:46 +00:00
Jaakko Heinonen
0f6bb099ae Introduce and use devfs_populate_vp() to unlock a vnode before calling
devfs_populate(). This is a prerequisite for the automatic removal of
empty directories which will be committed in the future.

Reviewed by:	kib (previous version)
2010-08-22 16:08:12 +00:00
Jilles Tjoelker
394357b2b6 sh: Test that all bytes from 128 to 255 can be used in IFS.
To avoid multibyte issues, this test forces ISO8859-1 charset.

This also passes on stable/8.
2010-08-22 13:09:12 +00:00
Jilles Tjoelker
36cf3efe41 sh(1): Add a brief summary of arithmetic expressions. 2010-08-22 13:04:00 +00:00
Dag-Erling Smørgrav
b8370f59bd UTFize my name. 2010-08-22 11:48:32 +00:00
Rui Paulo
4e41f3537a Port this to FreeBSD. We miss some suword functions, so we use copyout.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:41:06 +00:00
Rui Paulo
b3d354c9ce Call the systrace_probe_func() when the error value.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:30:49 +00:00
Rui Paulo
79856499bd Add an extra comment to the SDT probes definition. This allows us to get
use '-' in probe names, matching the probe names in Solaris.[1]

Add userland SDT probes definitions to sys/sdt.h.

Sponsored by:	The FreeBSD Foundation
Discussed with:	rwaston [1]
2010-08-22 11:18:57 +00:00
Rui Paulo
5b5779d000 Remove an elif and add an or-clause.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:12:07 +00:00
Rui Paulo
258f5a255e Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
calling bzero.

Sponsored by:	The FreeBSD Foundation
2010-08-22 11:09:53 +00:00
Rui Paulo
9f3a1843ed Fix style issues.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:08:18 +00:00
Jilles Tjoelker
f1c0b09653 Fix keyword expansion properties. 2010-08-22 11:07:46 +00:00
Rui Paulo
de788cde7b Destroy the helper device when unloading.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:05:37 +00:00
Rui Paulo
6c44520886 Add more compatibility structure members needed by the upcoming fasttrap
DTrace device.

Sponsored by:	The FreeBSD Foundation
2010-08-22 11:04:43 +00:00
Jilles Tjoelker
193da04bd8 sh: Add a test for breaking from a loop outside the current function.
It is unwise to rely on this but I'd like to know if this would break.
2010-08-22 11:04:30 +00:00
Rui Paulo
c6f5742f90 Kernel DTrace support for:
o uregs  (sson@)
o ustack (sson@)
o /dev/dtrace/helper device (needed for USDT probes)

The work done by me was:
Sponsored by:	The FreeBSD Foundation
2010-08-22 10:53:32 +00:00
Rui Paulo
58f668bba5 Add a function compatibility function dtrace_instr_size_isa() that on
FreeBSD does the same as dtrace_dis_isize().

Sponsored by:	The FreeBSD Foundation
2010-08-22 10:40:15 +00:00
Rui Paulo
5e3caca7f6 Add the FreeBSD definition for the fasttrap ioctls.
Sponsored by:	The FreeBSD Foundation
2010-08-22 10:13:56 +00:00
Ed Schouten
99d57a6bd8 Add support for whiteouts on tmpfs.
Right now unionfs only allows filesystems to be mounted on top of
another if it supports whiteouts. Even though I have sent a patch to
daichi@ to let unionfs work without it, we'd better also add support for
whiteouts to tmpfs.

This patch implements .vop_whiteout and makes necessary changes to
lookup() and readdir() to take them into account. We must also make sure
that when adding or removing a file, we honour the componentname's
DOWHITEOUT and ISWHITEOUT, to prevent duplicate filenames.

MFC after:	1 month
2010-08-22 05:36:06 +00:00
Pyun YongHyeon
8024e98228 Document newly introduced tunable dev.bge.%d.forced_udpcsum.
While I'm here also mention tunable dev.bge.%d.forced_collapse.
2010-08-22 01:40:59 +00:00
Pyun YongHyeon
35f945cd62 It seems all Broadcom controllers have a bug that can generate UDP
datagrams with checksum value 0 when TX UDP checksum offloading is
enabled.  Generating UDP checksum value 0 is RFC 768 violation.
Even though the probability of generating such UDP datagrams is
low, I don't want to see FreeBSD boxes to inject such datagrams
into network so disable UDP checksum offloading by default.  Users
still override this behavior by setting a sysctl variable or loader
tunable, dev.bge.%d.forced_udpcsum.

I have no idea why this issue was not reported so far given that
bge(4) is one of the most commonly used controller on high-end
server class systems. Thanks to andre@ who passed the PR to me.

PR:	kern/104826
2010-08-22 01:39:09 +00:00
Pyun YongHyeon
7e32f79a44 Load tunable from loader.conf(5) instead of device.hints(5). 2010-08-21 23:13:16 +00:00
Rui Paulo
21022fe7e9 Remove LIBELF_PIC.
Sponsored by:	The FreeBSD Foundation
2010-08-21 17:53:16 +00:00
Rui Paulo
029a737371 Don't link drti.o with libelf_pic.a. This means that all software with
userland SDT probes must be linked with libelf explicitly.

Requested by:	kib
Sponsored by:	The FreeBSD Foundation
2010-08-21 17:29:59 +00:00
Rui Paulo
2aedda247b Modify clang so that when TOOLS_PREFIX is defined we register the
CLANG_PREFIX macro. This changes the default header search path when we
are building clang as part of cross-tools.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	freebsd-current
2010-08-21 15:46:33 +00:00
Rui Paulo
ad8a0e422c Add clang to the cross-tools build stage.
Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-21 15:39:06 +00:00
Rui Paulo
934f2f338c Make sure the boot2 stage is compiled with gcc, as clang has no
problems compiling it, but it just gets too big at the moment, even
with -Os.  This is not applicable to gptboot, though.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-21 15:01:59 +00:00
Rui Paulo
3a060e4a1a We need to pull bsd.own.mk before modifying the CC variable. Otherwise
it will be overwritten when we include bsd.lib.mk.

Pointed out by:	Dimitry Andric <dimitry at andric.com>
2010-08-21 14:59:37 +00:00
Marius Strobl
760d65b894 Skip a KASSERT which isn't appropriate when not employing page coloring.
Reported by: Michael Moll
2010-08-21 14:28:48 +00:00
Rui Paulo
7d924a46c2 Update for the new tests.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:14:24 +00:00
Rui Paulo
cd306d6fa1 Add a sysname char * to struct opensolaris_utsname.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:09:24 +00:00
Rui Paulo
60b77a1e4b Add the definition of LIBELF_PIC.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:08:04 +00:00
Rui Paulo
013abb0056 Use double quotes when checking the value of MACHINE_ARCH.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:02:04 +00:00
Rui Paulo
7672c57a48 Add a Makefile for dtruss.
Sponsored by:	The FreeBSD Foundation
2010-08-21 13:56:29 +00:00
Rui Paulo
6544c91941 Port plockstat to FreeBSD. This will be connected to the build later.
Sponsored by:	The FreeBSD Foundation
2010-08-21 13:54:33 +00:00
Rui Paulo
513bdf9ac0 Link drti.o with a PIC version of libelf. This is needed because
drti.o depends on libelf and this avoids linking every other drti.o
program (namely programs with USDT probes) with libelf.

Sponsored by:	The FreeBSD Foundation
2010-08-21 13:48:04 +00:00
Rui Paulo
9510083e01 Add libelf to the prebuild libs.
This is needed for the DTrace instrumentation object.

Sponsored by:	The FreeBSD Foundation
2010-08-21 13:42:12 +00:00
Rui Paulo
e60cf26f21 Port the DTrace helper ioctls to FreeBSD and add a helper member to
dof_helper_t (needed by drti.o).

Sponsored by:	The FreeBSD Foundation
2010-08-21 11:58:08 +00:00
Rui Paulo
0f2bd1e89d Add libdtrace support for tracing userland programs.
Summary of changes:
* Implement a compatibility shim between Solaris libproc and our
libproc and remove several ifdefs because of this.
* Port the drti to FreeBSD.
* Implement the missing DOODAD sections
* Link with libproc and librtld_db
* Support for ustack, jstack and uregs (by sson@)
* Misc bugfixing

When writing the SUWN_dof section, we had to resort to building the ELF
file layout by "hand". This is the job of libelf, but our libelf doesn't
support this yet. When libelf is fixed, we can remove the code under
#ifdef BROKEN_LIBELF.

Sponsored by:	The FreeBSD Foundation
2010-08-21 11:50:53 +00:00
Rui Paulo
e0be1c75f0 Add sysname to struct opensolaris_utsname. This is needed by one DTrace
test.

Sponsored by:	The FreeBSD Foundation
2010-08-21 11:41:32 +00:00
Rui Paulo
d6f390f2f1 Use double quotes when checking the value of MACHINE_ARCH.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:14:50 +00:00
Rui Paulo
0c0b3feeed The DTrace instrumentation object is going to be i386/amd64 only.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:09:03 +00:00
Bernhard Schmidt
87d87e1d20 Wrap remaining ieee80211_ratectl_node_init() calls missed in r211314.
MFC after:	1 week
2010-08-21 11:06:21 +00:00
Rui Paulo
b2db760808 Port most of the DTrace tests to FreeBSD.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:04:38 +00:00
Rui Paulo
9329096b80 Install a PIC libelf. This will be needed by the DTrace runtime
instrumentation object (dtri.o).

Sponsored by:	The FreeBSD Foundation
2010-08-21 10:40:12 +00:00
Rui Paulo
28be8b2ba9 Revert part of r211505. Some of the removed casts are actually safe so
put them back in again. Also, clang only complained about the lvalue
cast.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Pointed out:	bde
2010-08-21 10:31:26 +00:00
David Xu
b274870405 make sure thread lock is locked. 2010-08-20 23:51:34 +00:00