]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH
imp [Mon, 23 Aug 2010 01:42:09 +0000 (01:42 +0000)]
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH

13 years agoIt turns out that the OUTPUT_FORMAT should do the right thing for both endians...
imp [Mon, 23 Aug 2010 01:37:55 +0000 (01:37 +0000)]
It turns out that the OUTPUT_FORMAT should do the right thing for both endians...

13 years agoMF tbemd: differentiate between arm and armeb
imp [Mon, 23 Aug 2010 01:33:27 +0000 (01:33 +0000)]
MF tbemd: differentiate between arm and armeb

13 years agoMinor tweak from tbemd
imp [Mon, 23 Aug 2010 01:07:07 +0000 (01:07 +0000)]
Minor tweak from tbemd

13 years agoRemove unnecessary controller reinitialization by checking
yongari [Mon, 23 Aug 2010 00:31:55 +0000 (00:31 +0000)]
Remove unnecessary controller reinitialization by checking
IFF_DRV_RUNNING flag.

13 years agoClean up SIOCSIFCAP handler and allow RX checksum offloading could
yongari [Mon, 23 Aug 2010 00:24:12 +0000 (00:24 +0000)]
Clean up SIOCSIFCAP handler and allow RX checksum offloading could
be controlled by user.

13 years agoBetter wording and fix wrong explanation.
yongari [Mon, 23 Aug 2010 00:10:43 +0000 (00:10 +0000)]
Better wording and fix wrong explanation.

Submitted by: Ben Kaduk ( minimarmot <> gmail dot com )

13 years agoDocument tunable dev.rl.%unit.prefer_iomap
yongari [Sun, 22 Aug 2010 21:32:48 +0000 (21:32 +0000)]
Document tunable dev.rl.%unit.prefer_iomap

13 years agoIt seems some newer RTL8139 controllers provides only memory space
yongari [Sun, 22 Aug 2010 21:26:35 +0000 (21:26 +0000)]
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

13 years agosh: Remove remnants of '!!' to negate pattern.
jilles [Sun, 22 Aug 2010 21:18:21 +0000 (21:18 +0000)]
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).

13 years agoAdd missing mlink for insmntque1().
ed [Sun, 22 Aug 2010 16:42:46 +0000 (16:42 +0000)]
Add missing mlink for insmntque1().

MFC after: 1 week

13 years agoIntroduce and use devfs_populate_vp() to unlock a vnode before calling
jh [Sun, 22 Aug 2010 16:08:12 +0000 (16:08 +0000)]
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)

13 years agosh: Test that all bytes from 128 to 255 can be used in IFS.
jilles [Sun, 22 Aug 2010 13:09:12 +0000 (13:09 +0000)]
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.

13 years agosh(1): Add a brief summary of arithmetic expressions.
jilles [Sun, 22 Aug 2010 13:04:00 +0000 (13:04 +0000)]
sh(1): Add a brief summary of arithmetic expressions.

13 years agoUTFize my name.
des [Sun, 22 Aug 2010 11:48:32 +0000 (11:48 +0000)]
UTFize my name.

13 years agoPort this to FreeBSD. We miss some suword functions, so we use copyout.
rpaulo [Sun, 22 Aug 2010 11:41:06 +0000 (11:41 +0000)]
Port this to FreeBSD. We miss some suword functions, so we use copyout.

Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    sys/fasttrap_impl.h

13 years agoCall the systrace_probe_func() when the error value.
rpaulo [Sun, 22 Aug 2010 11:30:49 +0000 (11:30 +0000)]
Call the systrace_probe_func() when the error value.

Sponsored by: The FreeBSD Foundation

13 years agoAdd an extra comment to the SDT probes definition. This allows us to get
rpaulo [Sun, 22 Aug 2010 11:18:57 +0000 (11:18 +0000)]
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]

13 years agoRemove an elif and add an or-clause.
rpaulo [Sun, 22 Aug 2010 11:12:07 +0000 (11:12 +0000)]
Remove an elif and add an or-clause.

Sponsored by: The FreeBSD Foundation

13 years agoBump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
rpaulo [Sun, 22 Aug 2010 11:09:53 +0000 (11:09 +0000)]
Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
calling bzero.

Sponsored by: The FreeBSD Foundation

13 years agoFix style issues.
rpaulo [Sun, 22 Aug 2010 11:08:18 +0000 (11:08 +0000)]
Fix style issues.

Sponsored by: The FreeBSD Foundation

13 years agoFix keyword expansion properties.
jilles [Sun, 22 Aug 2010 11:07:46 +0000 (11:07 +0000)]
Fix keyword expansion properties.

13 years agoDestroy the helper device when unloading.
rpaulo [Sun, 22 Aug 2010 11:05:37 +0000 (11:05 +0000)]
Destroy the helper device when unloading.

Sponsored by: The FreeBSD Foundation

13 years agoAdd more compatibility structure members needed by the upcoming fasttrap
rpaulo [Sun, 22 Aug 2010 11:04:43 +0000 (11:04 +0000)]
Add more compatibility structure members needed by the upcoming fasttrap
DTrace device.

Sponsored by: The FreeBSD Foundation

13 years agosh: Add a test for breaking from a loop outside the current function.
jilles [Sun, 22 Aug 2010 11:04:30 +0000 (11:04 +0000)]
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.

13 years agoKernel DTrace support for:
rpaulo [Sun, 22 Aug 2010 10:53:32 +0000 (10:53 +0000)]
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

13 years agoAdd a function compatibility function dtrace_instr_size_isa() that on
rpaulo [Sun, 22 Aug 2010 10:40:15 +0000 (10:40 +0000)]
Add a function compatibility function dtrace_instr_size_isa() that on
FreeBSD does the same as dtrace_dis_isize().

Sponsored by: The FreeBSD Foundation

13 years agoAdd the FreeBSD definition for the fasttrap ioctls.
rpaulo [Sun, 22 Aug 2010 10:13:56 +0000 (10:13 +0000)]
Add the FreeBSD definition for the fasttrap ioctls.

Sponsored by: The FreeBSD Foundation

13 years agoAdd support for whiteouts on tmpfs.
ed [Sun, 22 Aug 2010 05:36:06 +0000 (05:36 +0000)]
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

13 years agoDocument newly introduced tunable dev.bge.%d.forced_udpcsum.
yongari [Sun, 22 Aug 2010 01:40:59 +0000 (01:40 +0000)]
Document newly introduced tunable dev.bge.%d.forced_udpcsum.
While I'm here also mention tunable dev.bge.%d.forced_collapse.

13 years agoIt seems all Broadcom controllers have a bug that can generate UDP
yongari [Sun, 22 Aug 2010 01:39:09 +0000 (01:39 +0000)]
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

13 years agoLoad tunable from loader.conf(5) instead of device.hints(5).
yongari [Sat, 21 Aug 2010 23:13:16 +0000 (23:13 +0000)]
Load tunable from loader.conf(5) instead of device.hints(5).

13 years agoRemove LIBELF_PIC.
rpaulo [Sat, 21 Aug 2010 17:53:16 +0000 (17:53 +0000)]
Remove LIBELF_PIC.

Sponsored by: The FreeBSD Foundation

13 years agoDon't link drti.o with libelf_pic.a. This means that all software with
rpaulo [Sat, 21 Aug 2010 17:29:59 +0000 (17:29 +0000)]
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

13 years agoModify clang so that when TOOLS_PREFIX is defined we register the
rpaulo [Sat, 21 Aug 2010 15:46:33 +0000 (15:46 +0000)]
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

13 years agoAdd clang to the cross-tools build stage.
rpaulo [Sat, 21 Aug 2010 15:39:06 +0000 (15:39 +0000)]
Add clang to the cross-tools build stage.

Submitted by: Dimitry Andric <dimitry at andric.com>

13 years agoMake sure the boot2 stage is compiled with gcc, as clang has no
rpaulo [Sat, 21 Aug 2010 15:01:59 +0000 (15:01 +0000)]
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>

13 years agoWe need to pull bsd.own.mk before modifying the CC variable. Otherwise
rpaulo [Sat, 21 Aug 2010 14:59:37 +0000 (14:59 +0000)]
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>

13 years agoSkip a KASSERT which isn't appropriate when not employing page coloring.
marius [Sat, 21 Aug 2010 14:28:48 +0000 (14:28 +0000)]
Skip a KASSERT which isn't appropriate when not employing page coloring.
Reported by: Michael Moll

13 years agoUpdate for the new tests.
rpaulo [Sat, 21 Aug 2010 14:14:24 +0000 (14:14 +0000)]
Update for the new tests.

Sponsored by: The FreeBSD Foundation

13 years agoAdd a sysname char * to struct opensolaris_utsname.
rpaulo [Sat, 21 Aug 2010 14:09:24 +0000 (14:09 +0000)]
Add a sysname char * to struct opensolaris_utsname.

Sponsored by: The FreeBSD Foundation

13 years agoAdd the definition of LIBELF_PIC.
rpaulo [Sat, 21 Aug 2010 14:08:04 +0000 (14:08 +0000)]
Add the definition of LIBELF_PIC.

Sponsored by: The FreeBSD Foundation

13 years agoUse double quotes when checking the value of MACHINE_ARCH.
rpaulo [Sat, 21 Aug 2010 14:02:04 +0000 (14:02 +0000)]
Use double quotes when checking the value of MACHINE_ARCH.

Sponsored by: The FreeBSD Foundation

13 years agoAdd a Makefile for dtruss.
rpaulo [Sat, 21 Aug 2010 13:56:29 +0000 (13:56 +0000)]
Add a Makefile for dtruss.

Sponsored by: The FreeBSD Foundation

13 years agoPort plockstat to FreeBSD. This will be connected to the build later.
rpaulo [Sat, 21 Aug 2010 13:54:33 +0000 (13:54 +0000)]
Port plockstat to FreeBSD. This will be connected to the build later.

Sponsored by: The FreeBSD Foundation

13 years agoLink drti.o with a PIC version of libelf. This is needed because
rpaulo [Sat, 21 Aug 2010 13:48:04 +0000 (13:48 +0000)]
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

13 years agoAdd libelf to the prebuild libs.
rpaulo [Sat, 21 Aug 2010 13:42:12 +0000 (13:42 +0000)]
Add libelf to the prebuild libs.

This is needed for the DTrace instrumentation object.

Sponsored by: The FreeBSD Foundation

13 years agoImport dtruss from Brendan Gregg's DTraceToolkit.
rpaulo [Sat, 21 Aug 2010 13:15:56 +0000 (13:15 +0000)]
Import dtruss from Brendan Gregg's DTraceToolkit.

Sponsored by: The FreeBSD Foundation

13 years agoPort the DTrace helper ioctls to FreeBSD and add a helper member to
rpaulo [Sat, 21 Aug 2010 11:58:08 +0000 (11:58 +0000)]
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

13 years agoAdd libdtrace support for tracing userland programs.
rpaulo [Sat, 21 Aug 2010 11:50:53 +0000 (11:50 +0000)]
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

13 years agoAdd sysname to struct opensolaris_utsname. This is needed by one DTrace
rpaulo [Sat, 21 Aug 2010 11:41:32 +0000 (11:41 +0000)]
Add sysname to struct opensolaris_utsname. This is needed by one DTrace
test.

Sponsored by: The FreeBSD Foundation

13 years agoUse double quotes when checking the value of MACHINE_ARCH.
rpaulo [Sat, 21 Aug 2010 11:14:50 +0000 (11:14 +0000)]
Use double quotes when checking the value of MACHINE_ARCH.

Sponsored by: The FreeBSD Foundation

13 years agoThe DTrace instrumentation object is going to be i386/amd64 only.
rpaulo [Sat, 21 Aug 2010 11:09:03 +0000 (11:09 +0000)]
The DTrace instrumentation object is going to be i386/amd64 only.

Sponsored by: The FreeBSD Foundation

13 years agoWrap remaining ieee80211_ratectl_node_init() calls missed in r211314.
bschmidt [Sat, 21 Aug 2010 11:06:21 +0000 (11:06 +0000)]
Wrap remaining ieee80211_ratectl_node_init() calls missed in r211314.

MFC after: 1 week

13 years agoPort most of the DTrace tests to FreeBSD.
rpaulo [Sat, 21 Aug 2010 11:04:38 +0000 (11:04 +0000)]
Port most of the DTrace tests to FreeBSD.

Sponsored by: The FreeBSD Foundation

13 years agoInstall a PIC libelf. This will be needed by the DTrace runtime
rpaulo [Sat, 21 Aug 2010 10:40:12 +0000 (10:40 +0000)]
Install a PIC libelf. This will be needed by the DTrace runtime
instrumentation object (dtri.o).

Sponsored by: The FreeBSD Foundation

13 years agoRevert part of r211505. Some of the removed casts are actually safe so
rpaulo [Sat, 21 Aug 2010 10:31:26 +0000 (10:31 +0000)]
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

13 years agomake sure thread lock is locked.
davidxu [Fri, 20 Aug 2010 23:51:34 +0000 (23:51 +0000)]
make sure thread lock is locked.

13 years agoAdd dedicated routines to toggle lockmgr flags such as LK_NOSHARE and
jhb [Fri, 20 Aug 2010 19:46:50 +0000 (19:46 +0000)]
Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and
LK_CANRECURSE after a lock is created.  Use them to implement macros that
otherwise manipulated the flags directly.  Assert that the associated
lockmgr lock is exclusively locked by the current thread when manipulating
these flags to ensure the flag updates are safe.  This last change required
some minor shuffling in a few filesystems to exclusively lock a brand new
vnode slightly earlier.

Reviewed by: kib
MFC after: 3 days

13 years agooptp may be NULL.
ume [Fri, 20 Aug 2010 17:52:49 +0000 (17:52 +0000)]
optp may be NULL.

13 years agoRevert r211434. Offline discussions have convinced me that this should
mjacob [Fri, 20 Aug 2010 17:20:05 +0000 (17:20 +0000)]
Revert r211434. Offline discussions have convinced me that this should
be left alone for now.

13 years agoReduce redundant code.
davidxu [Fri, 20 Aug 2010 13:42:48 +0000 (13:42 +0000)]
Reduce redundant code.

Submitted by: kib

13 years ago In current implementation, thread cancellation is done in signal handler,
davidxu [Fri, 20 Aug 2010 05:15:39 +0000 (05:15 +0000)]
  In current implementation, thread cancellation is done in signal handler,
which does not know what is the state of interrupted system call, for
example, open() system call opened a file and the thread is still cancelled,
result is descriptor leak, there are other problems which can cause resource
leak or undeterminable side effect when a thread is cancelled. However, this
is no longer true in new implementation.

  In defering mode, a thread is canceled if cancellation request is pending and
later the thread enters a cancellation point, otherwise, a later
pthread_cancel() just causes SIGCANCEL to be sent to the target thread, and
causes target thread to abort system call, userland code in libthr then checks
cancellation state, and cancels the thread if needed. For example, the
cancellation point open(), the thread may be canceled at start,
but later, if it opened a file descriptor, it is not canceled, this avoids
file handle leak. Another example is read(), a thread may be canceled at start
of the function, but later, if it read some bytes from a socket, the thread
is not canceled, the caller then can decide if it should still enable cancelling
or disable it and continue reading data until it thinks it has read all
bytes of a packet, and keeps a protocol stream in health state, if user ignores
partly reading of a packet without disabling cancellation, then second iteration
of read loop cause the thread to be cancelled.
An exception is that the close() cancellation point always closes a file handle
despite whether the thread is cancelled or not.

  The old mechanism is still kept, for a functions which is not so easily to
fix a cancellation problem, the rough mechanism is used.

Reviewed by: kib@

13 years agoIf thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR
davidxu [Fri, 20 Aug 2010 04:28:30 +0000 (04:28 +0000)]
If thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR
immediately, this is used for implementing reliable pthread cancellation.

13 years agoAccording to specification, function fcntl() is a cancellation point only
davidxu [Fri, 20 Aug 2010 04:15:05 +0000 (04:15 +0000)]
According to specification, function fcntl() is a cancellation point only
when cmd argument is F_SETLKW.

13 years agoFPU EMU is 32-bit only for now, so mark it as a powerpc-only feature.
nwhitehorn [Fri, 20 Aug 2010 01:23:17 +0000 (01:23 +0000)]
FPU EMU is 32-bit only for now, so mark it as a powerpc-only feature.
This fixes powerpc64 LINT.

13 years agoFix mbuf leakages and remove unneccessary duplicate mbuf frees.
anchie [Thu, 19 Aug 2010 23:16:44 +0000 (23:16 +0000)]
Fix mbuf leakages and remove unneccessary duplicate mbuf frees.
Use the right copy of an mbuf for the IP6_EXTHDR_CHECK.

Reported by: zec, hrs
Approved by: bz (mentor)

13 years agoRevert a minor part of revision 211364:
delphij [Thu, 19 Aug 2010 22:55:17 +0000 (22:55 +0000)]
Revert a minor part of revision 211364:

 - Imply -h if single file is grepped, this is the GNU behaviour

This is already done by code above the change and have caused a regression
since this instance of code does not check Hflag.

Reported by: davidxu
Pointy hat to: delphij

13 years agoRevert part of the r211149 as I erroneously ported the logical_cpus from
attilio [Thu, 19 Aug 2010 22:37:43 +0000 (22:37 +0000)]
Revert part of the r211149 as I erroneously ported the logical_cpus from
Yahoo! patchset as a mask (and according manipulating variables) while
it is actually a CPU count.

Submitted by: neel
MFC after: 1 month
X-MFC: 211149

13 years ago'\0' -> 0
edwin [Thu, 19 Aug 2010 21:59:39 +0000 (21:59 +0000)]
'\0' -> 0

Fix silly mistake by being overly zeaolous[sp] of applying the style rules.

13 years agoEliminate the ambiguous queue setting logic for
jfv [Thu, 19 Aug 2010 17:00:33 +0000 (17:00 +0000)]
Eliminate the ambiguous queue setting logic for
the VF, it made it possible to have 2 queues which
we don't want, the HOST is unable to handle it.

13 years agoRemove unused KTRACE includes.
jhb [Thu, 19 Aug 2010 16:41:27 +0000 (16:41 +0000)]
Remove unused KTRACE includes.

13 years agoThere isn't really a need to hold the ktrace mutex just to read the value
jhb [Thu, 19 Aug 2010 16:40:30 +0000 (16:40 +0000)]
There isn't really a need to hold the ktrace mutex just to read the value
of p_traceflag that is stored in the kinfo_proc structure.  It is still
racey even with the lock and the code will read a consistent snapshot of
the flag without the lock.

13 years agoCall dev_rel() in error paths.
jh [Thu, 19 Aug 2010 16:39:00 +0000 (16:39 +0000)]
Call dev_rel() in error paths.

Reported by: kib
Reviewed by: kib
MFC after: 2 weeks

13 years agoFix a whitespace nit and remove a questioning comment. STAILQ_CONCAT()
jhb [Thu, 19 Aug 2010 16:38:58 +0000 (16:38 +0000)]
Fix a whitespace nit and remove a questioning comment.  STAILQ_CONCAT()
does require the STAILQ the existing list is being added to to already
be initialized (it is CONCAT() vs MOVE()).

13 years agoMigrate if_arge to use the PLL cpuops.
adrian [Thu, 19 Aug 2010 16:29:08 +0000 (16:29 +0000)]
Migrate if_arge to use the PLL cpuops.

This has been lightly tested on the AR7161 and AR9132.

13 years agoImplement PLL generalisation in preparation for use in if_arge.
adrian [Thu, 19 Aug 2010 16:25:15 +0000 (16:25 +0000)]
Implement PLL generalisation in preparation for use in if_arge.

* Add a function to write to the relevant PLL register
* Break out the PLL configuration for the AR71XX into the CPU ops,
  lifted from if_arge.c.
* Add the AR91XX PLL configuration ops, using the AR91XX register
  definitions.

13 years agoadd the PLL set functions to cpuops
adrian [Thu, 19 Aug 2010 16:15:30 +0000 (16:15 +0000)]
add the PLL set functions to cpuops

13 years agoRemove an unused macro. exit1() invokes ktrprocexit() directly.
jhb [Thu, 19 Aug 2010 15:55:50 +0000 (15:55 +0000)]
Remove an unused macro.  exit1() invokes ktrprocexit() directly.

13 years agoRemove unneeded casts in inline assembly in contrib/gcc/longlong.h,
rpaulo [Thu, 19 Aug 2010 12:59:57 +0000 (12:59 +0000)]
Remove unneeded casts in inline assembly in contrib/gcc/longlong.h,
which are apparently "heinous" GNU extensions, so clang can
compile this without using the -fheinous-gnu-extensions option.

Results in *no* binary change, neither with clang, nor with gcc.

Submitted by: Dimitry Andric <dimitry at andric.com>

13 years agoFix mistaken indenting.
adrian [Thu, 19 Aug 2010 12:52:49 +0000 (12:52 +0000)]
Fix mistaken indenting.

13 years agoAdd some initial AR724X chipset support.
adrian [Thu, 19 Aug 2010 11:53:55 +0000 (11:53 +0000)]
Add some initial AR724X chipset support.

This is untested but should at least allow an AR724X to boot.

The current code is lacking the detail needed to expose the PCIe bus.
It is also lacking any NIC, PLL or flush/WB code.

13 years agoAdd initial Atheros AR91XX support.
adrian [Thu, 19 Aug 2010 11:40:10 +0000 (11:40 +0000)]
Add initial Atheros AR91XX support.

This works well enough to bring a system up to single-user mode
using an MDROOT.

Known Issues:

* The EHCI USB doesn't currently work and will panic the kernel during
  attach.
* The onboard ethernet won't work until the PLL routines have been
  fleshed out and shoe-horned into if_arge.
* The WMAC device glue (and quite likely the if_ath support)
  hasn't yet been implemented.

13 years agoMFp4: anchie_soc2009 branch:
anchie [Thu, 19 Aug 2010 11:31:03 +0000 (11:31 +0000)]
MFp4: anchie_soc2009 branch:

Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971.

The implementation consists of a kernel module that gets packets from
the nd6 code, sends them to user space on a dedicated socket and reinjects
them back for further processing.

Hooks are used from nd6 code paths to divert relevant packets to the
send implementation for processing in user space.  The hooks are only
triggered if the send module is loaded. In case no user space
application is connected to the send socket, processing continues
normaly as if the module would not be loaded. Unloading the module
is not possible at this time due to missing nd6 locking.

The native SeND socket is similar to a raw IPv6 socket but with its own,
internal pseudo-protocol.

Approved by: bz (mentor)

13 years agoexpand_number(3) takes a uint64_t * now; intmax_t was never correct
des [Thu, 19 Aug 2010 11:20:24 +0000 (11:20 +0000)]
expand_number(3) takes a uint64_t * now; intmax_t was never correct
except by accident.

MFC after: 3 weeks

13 years agoexpand_number(3) takes a uint64_t * now.
des [Thu, 19 Aug 2010 11:19:21 +0000 (11:19 +0000)]
expand_number(3) takes a uint64_t * now.

MFC after: 3 weeks

13 years agoAdd missing licence.
adrian [Thu, 19 Aug 2010 11:18:50 +0000 (11:18 +0000)]
Add missing licence.

13 years agostyle(9) pick from imp@ .
adrian [Thu, 19 Aug 2010 11:16:52 +0000 (11:16 +0000)]
style(9) pick from imp@ .

13 years agoUTFize my name.
des [Thu, 19 Aug 2010 09:28:59 +0000 (09:28 +0000)]
UTFize my name.

13 years agoThis patch to pc-sysinstall allows the setting of a new config
imp [Thu, 19 Aug 2010 06:11:06 +0000 (06:11 +0000)]
This patch to pc-sysinstall allows the setting of a new config
variable for installation, which lets the user/front-end select
between MBR or GPT partitioning schemes when doing a dedicated disk
installation.

PR: 149772
Submitted by: Kris Moore

13 years agoAdded "-m" option to "disk-list" to list memory disks along with
imp [Thu, 19 Aug 2010 06:07:49 +0000 (06:07 +0000)]
Added "-m" option to "disk-list" to list memory disks along with
standard disks.

PR: 149749
Submitted by: John Hixson

13 years agoSimple patch to add support zpool virtual devices that are not
imp [Thu, 19 Aug 2010 06:05:05 +0000 (06:05 +0000)]
Simple patch to add support zpool virtual devices that are not
currently supported.

PR: 149599
Submitted by: John Hixson

13 years agoSome cleanup, changed some echo's to echo_log, check for PROGDIR so
imp [Thu, 19 Aug 2010 06:02:31 +0000 (06:02 +0000)]
Some cleanup, changed some echo's to echo_log, check for PROGDIR so
that different PROGDIR's can be set.

PR: 148806
Submitted by: John Hixson

13 years agoUpdates to pc-sysinstall that allow FTP installation of FreeBSD.
imp [Thu, 19 Aug 2010 06:01:25 +0000 (06:01 +0000)]
Updates to pc-sysinstall that allow FTP installation of FreeBSD.

PR: 148661
Submitted by: John Hixson

13 years agoVarious updates to support new pc-sysinstall directive
imp [Thu, 19 Aug 2010 05:59:27 +0000 (05:59 +0000)]
Various updates to support new pc-sysinstall directive
"installPackages" that will install packages and all package
dependencies.

PR: 148606
Submitted by: John Hixon

13 years agoFirst cut at mips n64 ABI support
imp [Thu, 19 Aug 2010 03:31:26 +0000 (03:31 +0000)]
First cut at mips n64 ABI support

13 years agoUnbreak the LINT kernel on powerpc64. Note that the LINT kernel
nwhitehorn [Thu, 19 Aug 2010 03:19:26 +0000 (03:19 +0000)]
Unbreak the LINT kernel on powerpc64. Note that the LINT kernel
configuration is TARGET_ARCH specific and must be generated with
TARGET_ARCH set.

Reviewed by: imp

13 years agoRemove now unused 'reg'.
adrian [Thu, 19 Aug 2010 02:15:39 +0000 (02:15 +0000)]
Remove now unused 'reg'.

13 years agoInitialise the USB system using cpuops rather than the AR71XX specific method.
adrian [Thu, 19 Aug 2010 02:14:53 +0000 (02:14 +0000)]
Initialise the USB system using cpuops rather than the AR71XX specific method.

13 years agoMigrate the CPU reset path to use the new cpuops.
adrian [Thu, 19 Aug 2010 02:12:04 +0000 (02:12 +0000)]
Migrate the CPU reset path to use the new cpuops.