]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoChanges from John Baldwin adding to last commit,
jfv [Wed, 16 Jun 2010 16:37:36 +0000 (16:37 +0000)]
Changes from John Baldwin adding to last commit,
change rxeof api for poll friendliness, and
eliminate unnecessary link tasklet use. Thanks John!

14 years agoCorrect the function name in a KASSERT.
jh [Wed, 16 Jun 2010 16:02:17 +0000 (16:02 +0000)]
Correct the function name in a KASSERT.

14 years agoCall free and freeaddrinfo before exiting.
brucec [Wed, 16 Jun 2010 15:49:17 +0000 (15:49 +0000)]
Call free and freeaddrinfo before exiting.

PR: bin/144730
PR: bin/144974
Submitted by: Earl R. Lapus <earl.lapus at gmail.com>
Approved by: rrs (mentor)
MFC after: 1 month

14 years ago* Allow partial MB/GB values to be entered in the slice and label editors.
brucec [Wed, 16 Jun 2010 15:40:13 +0000 (15:40 +0000)]
* Allow partial MB/GB values to be entered in the slice and label editors.
* Don't strdup the name when calling deviceRegister because the string is
copied within new_device.
* Use a subtype of 165, not 3, when creating a slice in noninteractive
mode.

PR: bin/135333
PR: bin/66350
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoFreq sysctls are quite heavy due to set of malloc()/free() calls. Avoid
mav [Wed, 16 Jun 2010 15:09:45 +0000 (15:09 +0000)]
Freq sysctls are quite heavy due to set of malloc()/free() calls. Avoid
reading current frequency on every period. Instead do it only after
changing and periodically from time to time if somebody else change it.

Also dynamically decrease sampling frequency up to 4 times on inactivity,

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 2
jchandra [Wed, 16 Jun 2010 14:13:36 +0000 (14:13 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 2

Update libc Makefiles.
Add makecontext implementation.

Changes from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs(mentor), jmallett

14 years agoMove ARM nexus rman initialization to attach routine.
raj [Wed, 16 Jun 2010 14:10:39 +0000 (14:10 +0000)]
Move ARM nexus rman initialization to attach routine.

This fixes a panic, which started to trigger after r209129 cleanup.

Submitted by: Andrew Turner

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 1.
jchandra [Wed, 16 Jun 2010 12:55:14 +0000 (12:55 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 1.

Update libc assembly code to use macros that work on both o32 and n64.
Merge string functions from NetBSD.

The changes are from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs (mentor), jmallett

14 years agoRemove redundant assignment.
pjd [Wed, 16 Jun 2010 12:42:20 +0000 (12:42 +0000)]
Remove redundant assignment.

MFC after: 3 days

14 years agodevice.hints: do not install when WITHOUT_BOOT is set
avg [Wed, 16 Jun 2010 08:20:01 +0000 (08:20 +0000)]
device.hints: do not install when WITHOUT_BOOT is set

Forced commit to fix commit message in r209228.

Discussed with: imp
MFC after: 2 weeks

14 years agodevice.hints: do install when WITHOUT_BOOT is set
avg [Wed, 16 Jun 2010 07:52:44 +0000 (07:52 +0000)]
device.hints: do install when WITHOUT_BOOT is set

Discussed with: imp
MFC after: 2 weeks

14 years agoEliminate unnecessary page queues locking.
alc [Wed, 16 Jun 2010 00:41:21 +0000 (00:41 +0000)]
Eliminate unnecessary page queues locking.

14 years agoAllow boot.config to have different values than just -h.
imp [Tue, 15 Jun 2010 23:55:42 +0000 (23:55 +0000)]
Allow boot.config to have different values than just -h.

Submitted by: bsdrp by way of freenas and olivier cochard-labbe
MFC after: 3 days

14 years agolibedit: Reduce surprising behaviour with filename completion some more:
jilles [Tue, 15 Jun 2010 22:23:21 +0000 (22:23 +0000)]
libedit: Reduce surprising behaviour with filename completion some more:
* Quote '*', '?' and '['. While it may be more useful to expand them to
  matching pathnames, this at least matches with the completion we do.
* '@' is a regular character for filenames. Some other shells do
  @<hostname> completion but we do not.
* Prefix names starting with '-' and '+' with './' so they are not seen as
  options.

14 years agoTurn off cache if there's more than one kernel mapping, and one is writable.
cognet [Tue, 15 Jun 2010 22:16:02 +0000 (22:16 +0000)]
Turn off cache if there's more than one kernel mapping, and one is writable.

Submitted by:   Mark Tinguely

14 years agoModify the console mouse pointer drawing routine to use single-byte writes
nwhitehorn [Tue, 15 Jun 2010 22:01:38 +0000 (22:01 +0000)]
Modify the console mouse pointer drawing routine to use single-byte writes
instead of 4-byte ones. Because the mouse pointer can start part way
through a character cell, 4-byte memory operations are not necessarily
aligned, triggering a fatal alignment exception when the console pointer
was moved on PowerPC G5 systems.

MFC after: 3 days

14 years agosh: Add filename completion.
jilles [Tue, 15 Jun 2010 21:58:40 +0000 (21:58 +0000)]
sh: Add filename completion.

This uses the new libedit completion function with quoting support.

Unlike NetBSD, there is no 'set +o tabcomplete' option to disable
completion. I do not see any reason for such a special treatment, as
completion is rather useful and it is possible to do
  bind ^I ed-insert
to disable completion and insert a tab character instead.

Submitted by: Guy Yur

14 years agolibedit: Allow simple quoting in filename completion.
jilles [Tue, 15 Jun 2010 21:34:57 +0000 (21:34 +0000)]
libedit: Allow simple quoting in filename completion.

The completer recognizes characters escaped with backslashes as being
literal parts of a word, and adds backslashes to avoid almost all
misinterpretation. In particular, filenames containing spaces can be
completed correctly.

For bug compatibility with the NetBSD version, the improved completion
function has a new name, _el_fn_sh_complete, and _el_fn_complete is
unchanged.

Submitted by: Guy Yur

14 years agoChange to have legacy interrupts use the same
jfv [Tue, 15 Jun 2010 21:11:51 +0000 (21:11 +0000)]
Change to have legacy interrupts use the same
handler had a flaw, thanks to John Baldwin for
finding it. Change which queue legacy tasks are
enqueued on.

MFC: soonest

14 years agolibedit: Fix a bug that could make completion listings incomplete.
jilles [Tue, 15 Jun 2010 21:00:53 +0000 (21:00 +0000)]
libedit: Fix a bug that could make completion listings incomplete.

The element matches[0] is the common prefix and is not counted in len, so
subtracting 1 is not needed. A counter for the number of matches per line
was incremented twice.

Submitted by: Guy Yur

14 years agoImplement flexible BPF timestamping framework.
jkim [Tue, 15 Jun 2010 19:28:44 +0000 (19:28 +0000)]
Implement flexible BPF timestamping framework.

- Allow setting format, resolution and accuracy of BPF time stamps per
listener.  Previously, we were only able to use microtime(9).  Now we can
set various resolutions and accuracies with ioctl(2) BIOCSTSTAMP command.
Similarly, we can get the current resolution and accuracy with BIOCGTSTAMP
command.  Document all supported options in bpf(4) and their uses.

- Introduce new time stamp 'struct bpf_ts' and header 'struct bpf_xhdr'.
The new time stamp has both 64-bit second and fractional parts.  bpf_xhdr
has this time stamp instead of 'struct timeval' for bh_tstamp.  The new
structures let us use bh_tstamp of same size on both 32-bit and 64-bit
platforms without adding additional shims for 32-bit binaries.  On 64-bit
platforms, size of BPF header does not change compared to bpf_hdr as its
members are already all 64-bit long.  On 32-bit platforms, the size may
increase by 8 bytes.  For backward compatibility, struct bpf_hdr with
struct timeval is still the default header unless new time stamp format is
explicitly requested.  However, the behaviour may change in the future and
all relevant code is wrapped around "#ifdef BURN_BRIDGES" for now.

- Add experimental support for tagging mbufs with time stamps from a lower
layer, e.g., device driver.  Currently, mbuf_tags(9) is used to tag mbufs.
The time stamps must be uptime in 'struct bintime' format as binuptime(9)
and getbinuptime(9) do.

Reviewed by: net@

14 years agoAdd a new column to the output of vmstat -z to indicate the number
sbruno [Tue, 15 Jun 2010 19:28:37 +0000 (19:28 +0000)]
Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation.

Expand the debugger hook, db_show_uma, to display these results as well.

This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.

Reviewed by: rwatson alc
Approved by: scottl (mentor) peter
Obtained from: Yahoo Inc.

14 years agoWhen Emulate3Button is active, do not set select() timeout in states when
mav [Tue, 15 Jun 2010 19:19:04 +0000 (19:19 +0000)]
When Emulate3Button is active, do not set select() timeout in states when
it is not needed. No need to kick CPU every 20ms without a purpose.

Reviewed by: philip@

14 years agoWhen updating individual CPU's lowest Cx state to use, never set it to a
jhb [Tue, 15 Jun 2010 19:14:39 +0000 (19:14 +0000)]
When updating individual CPU's lowest Cx state to use, never set it to a
state lower than the lowest one supported by the current CPU.  This closes
some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx
states for individual CPUs were changing (e.g. unplugging the AC adapter
of a laptop) that could result in panics.

Submitted by: Giovanni Trematerra
Tested by: David Demelier  demelier dot david of gmail
MFC after: 3 days

14 years agoRestore the machine check register banks on resume. For banks being
jhb [Tue, 15 Jun 2010 18:51:41 +0000 (18:51 +0000)]
Restore the machine check register banks on resume.  For banks being
monitored via CMCI, reset the interrupt threshold to 1 on resume.

Reviewed by: jkim
MFC after: 2 weeks

14 years agoEliminate unnecessary page queues locking.
alc [Tue, 15 Jun 2010 18:37:31 +0000 (18:37 +0000)]
Eliminate unnecessary page queues locking.

14 years agoAllow population of /cfg and /data. Begin the move to making all
imp [Tue, 15 Jun 2010 18:18:31 +0000 (18:18 +0000)]
Allow population of /cfg and /data.  Begin the move to making all
slice creation overrideable too, but there's a few problems doing that
for the duplicated partitions (s1 and s2), so just comment that it
needs work.

MFC after: 3 days

14 years agoCreate a make.conf. not needed for runtime, but some ports want to spam it
imp [Tue, 15 Jun 2010 18:16:45 +0000 (18:16 +0000)]
Create a make.conf.  not needed for runtime, but some ports want to spam it
at compile or install time.

MFC after: 3 days

14 years agoRemove two obsoleted comments, add a note about 32bit compatibility.
kib [Tue, 15 Jun 2010 18:16:04 +0000 (18:16 +0000)]
Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after: 1 month

14 years agomake these convenience functions more convenient by accepting all
imp [Tue, 15 Jun 2010 18:11:37 +0000 (18:11 +0000)]
make these convenience functions more convenient by accepting all
args, not just the first.  makes mechanical conversion of old style
more forgiving.

MFC after: 3 days

14 years agoRemove even two more unneeded files from libllvmsupport.
ed [Tue, 15 Jun 2010 17:28:16 +0000 (17:28 +0000)]
Remove even two more unneeded files from libllvmsupport.

14 years agoRemove unneeded files from the build.
ed [Tue, 15 Jun 2010 17:08:03 +0000 (17:08 +0000)]
Remove unneeded files from the build.

I used the following command to determine which source files were
unneeded:

| for i in `find lib/clang -name '*.o'`
| do
|  MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
|  usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
|  sort | uniq -d | wc -l`"
|  [ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done

This should slightly improve the build times.

14 years agoRename CRITSECT_ASSERT to CRITICAL_ASSERT.
kib [Tue, 15 Jun 2010 14:59:35 +0000 (14:59 +0000)]
Rename CRITSECT_ASSERT to CRITICAL_ASSERT.

Suggested by: jhb
MFC after: 1 month

14 years agoMake mandoc/mdocml happy.
edwin [Tue, 15 Jun 2010 11:37:33 +0000 (11:37 +0000)]
Make mandoc/mdocml happy.

Submitted by: Uli(?) via gmane.comp.time.tz

14 years agoMake all tests in libdialog compilable.
ae [Tue, 15 Jun 2010 10:01:49 +0000 (10:01 +0000)]
Make all tests in libdialog compilable.
Fix coredump in menu3.c.

Approved by: kib (mentor)

14 years agoFix the syscall module name after r205320.
kib [Tue, 15 Jun 2010 09:30:36 +0000 (09:30 +0000)]
Fix the syscall module name after r205320.

Submitted by: Vladislav Movchan <vladislav.movchan gmail com>
MFC after: 1 week

14 years agoUse critical sections instead of disabling local interrupts to ensure
kib [Tue, 15 Jun 2010 09:19:33 +0000 (09:19 +0000)]
Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by: bde
Tested by: pho
MFC after: 1 month

14 years agoAdd assert to check that the (current) thread is in critical section.
kib [Tue, 15 Jun 2010 09:18:27 +0000 (09:18 +0000)]
Add assert to check that the (current) thread is in critical section.

MFC after: 1 month

14 years agoSet the comment at the right place for PMC uncore classes.
fabient [Tue, 15 Jun 2010 09:12:31 +0000 (09:12 +0000)]
Set the comment at the right place for PMC uncore classes.

Submitted by: rstone
MFC after: 1 month

14 years agoAdd a periodic zfs scrub script.
netchild [Tue, 15 Jun 2010 08:58:16 +0000 (08:58 +0000)]
Add a periodic zfs scrub script.

Features:
 - configurable amount of days between scrubs (default value or per pool)
 - do not scrub directly after pool creation (respects the configured
   number of days between scrubs)
 - do not scrub if a scrub is in progress
 - tells how to see the status of the scrub
 - tells how many days since the last scrub if it skips the scrubbing
 - warns if a non-existent pool is specified explicitely
   (default: no pools specified -> all currently imported pools are
   handled)
 - runs late in the periodic run to not slow down the other periodic daily
   scripts

Discussed on: fs@

14 years ago* Include sys/systm.h for KASSERT()
ae [Tue, 15 Jun 2010 08:53:13 +0000 (08:53 +0000)]
* Include sys/systm.h for KASSERT()
* Remove unneeded includes and comment
* Replace home made OFFSETOF() macro with standard offsetof()

Pointed out by: bde
Approved by: kib (mentor)

14 years agosound/pcm: use non-const string as a value with SYSCTL_STRING
avg [Tue, 15 Jun 2010 07:06:54 +0000 (07:06 +0000)]
sound/pcm: use non-const string as a value with SYSCTL_STRING

Although the sysctls are marked with CTLFLAG_RD and the values will stay
immutable, current sysctl implementation stores value pointer in
void* type, which means that const qualifier is discarded anyway
and some newer compilers complaint about that.
We can't use de-const trick in sysctl implementation, because in that
case we could miss an opposite situation where a const value is used
with CTLFLAG_RW sysctl.

Complaint from: gcc 4.4, clang
MFC after: 2 weeks

14 years agoerr() takes a printf format.
ed [Tue, 15 Jun 2010 04:47:16 +0000 (04:47 +0000)]
err() takes a printf format.

Submitted by: Pawel Worach
Spotted by: clang

14 years agoAdd MODULE_DEPEND() macros to the experimental NFS client and
rmacklem [Tue, 15 Jun 2010 00:25:04 +0000 (00:25 +0000)]
Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

Tested by: kib
PR: kern/144458
Reviewed by: kib
MFC after: 1 week

14 years agoUse literal format strings. Found by clang.
emaste [Mon, 14 Jun 2010 23:51:35 +0000 (23:51 +0000)]
Use literal format strings.  Found by clang.

14 years agoFix typos that broke duration calculations on protection frames. A similar
jkim [Mon, 14 Jun 2010 23:01:50 +0000 (23:01 +0000)]
Fix typos that broke duration calculations on protection frames.  A similar
fix was done for ral(4) long ago and it must be copy-and-paste bugs.

Found by: clang

14 years agoFor the target port groups structures, don't allocate the initial element.
ken [Mon, 14 Jun 2010 22:02:18 +0000 (22:02 +0000)]
For the target port groups structures, don't allocate the initial element.
This makes things easier for target implementations to calculate how many
elements they need to allocate.

Discussed with: mjacob, gibbs
MFC after: 1 week

14 years ago'unit' can be negative, so use signed type for it.
pjd [Mon, 14 Jun 2010 21:58:55 +0000 (21:58 +0000)]
'unit' can be negative, so use signed type for it.

Found by: Coverity Prevent
CID: 3731
MFC after: 3 days

14 years agoBIO_DELETE contains range we want to delete and doesn't provide any useful
pjd [Mon, 14 Jun 2010 21:56:24 +0000 (21:56 +0000)]
BIO_DELETE contains range we want to delete and doesn't provide any useful
data, so there is no need to copy it to userland.

MFC after: 3 days

14 years agoCorrect various log messages.
pjd [Mon, 14 Jun 2010 21:46:48 +0000 (21:46 +0000)]
Correct various log messages.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

14 years agoFix typos.
pjd [Mon, 14 Jun 2010 21:44:58 +0000 (21:44 +0000)]
Fix typos.

MFC after: 3 days

14 years agoInitialize gctl_seq for synchronization requests.
pjd [Mon, 14 Jun 2010 21:44:20 +0000 (21:44 +0000)]
Initialize gctl_seq for synchronization requests.

Reported by: hiroshi@soupacific.com
Analysed by: Mikolaj Golub <to.my.trociny@gmail.com>
Tested by: hiroshi@soupacific.com, Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

14 years agoPlug memory leak.
pjd [Mon, 14 Jun 2010 21:41:22 +0000 (21:41 +0000)]
Plug memory leak.

Found by: Coverity Prevent
CID: 7057
MFC after: 3 days

14 years agoPlug memory leak.
pjd [Mon, 14 Jun 2010 21:37:25 +0000 (21:37 +0000)]
Plug memory leak.

Found by: Coverity Prevent
CID: 7056
MFC after: 3 days

14 years agoPlug memory leak.
pjd [Mon, 14 Jun 2010 21:33:18 +0000 (21:33 +0000)]
Plug memory leak.

Found by: Coverity Prevent
CID: 7051
MFC after: 3 days

14 years agoPlug memory leaks.
pjd [Mon, 14 Jun 2010 21:25:20 +0000 (21:25 +0000)]
Plug memory leaks.

Found by: Coverity Prevent
CID: 7052, 7053, 7054, 7055
MFC after: 3 days

14 years ago* Fix a bug where the length of the ASCONF-ACK was calculated wrong due
tuexen [Mon, 14 Jun 2010 21:25:07 +0000 (21:25 +0000)]
* Fix a bug where the length of the ASCONF-ACK was calculated wrong due
  to using an uninitialized variable.
* Fix a bug where a NULL pointer was dereferenced when interfaces
  come and go at a high rate.
* Fix a bug where inps where not deregistered from iterators.
* Fix a race condition in freeing an association.
* Fix a refcount problem related to the iterator.
Each of the above bug results in a panic. It shows up when
interfaces come and go at a high rate.

Obtained from: rrs (partly)
MFC after: 3 days

14 years agoRemove macros that are not really needed. The idea was to have them in case
pjd [Mon, 14 Jun 2010 21:18:58 +0000 (21:18 +0000)]
Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by: Coverity Prevent
CID: 5243
MFC after: 3 days

14 years agoEliminate dead code.
pjd [Mon, 14 Jun 2010 21:01:13 +0000 (21:01 +0000)]
Eliminate dead code.

Found by: Coverity Prevent
CID: 5158
MFC after: 3 days

14 years agoFix ACPI suspend/resume on amd64, which was broken since r208833.
jkim [Mon, 14 Jun 2010 20:08:26 +0000 (20:08 +0000)]
Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.

14 years agoEliminate checks for a page having a NULL object in vm_pageout_scan()
alc [Mon, 14 Jun 2010 19:54:19 +0000 (19:54 +0000)]
Eliminate checks for a page having a NULL object in vm_pageout_scan()
and vm_pageout_page_stats().  These checks were recently introduced by
the first page locking commit, r207410, but they are not needed.  At
the same time, eliminate some redundant accesses to the page's object
field.  (These accesses should have neen eliminated by r207410.)

Make the assertion in vm_page_flag_set() stricter.  Specifically, only
managed pages should have PG_WRITEABLE set.

Add a comment documenting an assertion to vm_page_flag_clear().

It has long been the case that fictitious pages have their wire count
permanently set to one.  Add comments to vm_page_wire() and
vm_page_unwire() documenting this.  Add assertions to these functions
as well.

Update the comment describing vm_page_unwire().  Much of the old
comment had little to do with vm_page_unwire(), but a lot to do with
_vm_page_deactivate().  Move relevant parts of the old comment to
_vm_page_deactivate().

Only pages that belong to an object can be paged out.  Therefore, it
is pointless for vm_page_unwire() to acquire the page queues lock and
enqueue such pages in one of the paging queues.  Generally speaking,
such pages are immediately freed after the call to vm_page_unwire().
Previously, it was the call to vm_page_free() that reacquired the page
queues lock and removed these pages from the paging queues.  Now, we
will never acquire the page queues lock for this case.  (It is also
worth noting that since both vm_page_unwire() and vm_page_free()
occurred with the page locked, the page daemon never saw the page with
its object field set to NULL.)

Change the panic with vm_page_unwire() to provide a more precise message.

Reviewed by: kib@

14 years agoFurther unbreak powerpc & sparc64.
marcel [Mon, 14 Jun 2010 19:39:20 +0000 (19:39 +0000)]
Further unbreak powerpc & sparc64.

14 years agoAdd Clang to OptionalObsoleteFiles.inc.
ed [Mon, 14 Jun 2010 19:10:30 +0000 (19:10 +0000)]
Add Clang to OptionalObsoleteFiles.inc.

This means you can now deinstall Clang by running make delete-old with
WITHOUT_CLANG set.

14 years agoFix TX retry rate handling. tx->linkq is an index to a rate table
bschmidt [Mon, 14 Jun 2010 18:26:10 +0000 (18:26 +0000)]
Fix TX retry rate handling. tx->linkq is an index to a rate table
beginning with the highest available rate. Currently we always use
54m for the first retry no matter what AMRR has choosen. Fix this
by setting the index to the next lower rate.

Approved by: rpaulo (mentor)
Tested by: Brandon Gooch <jamesbrandongooch at gmail.com>
MFC after: 2 weeks

14 years agoUpdate vfs_busy(9) and vfs_unbusy(9) manual pages to better match the
jh [Mon, 14 Jun 2010 17:31:46 +0000 (17:31 +0000)]
Update vfs_busy(9) and vfs_unbusy(9) manual pages to better match the
current behaviour of the functions.

Discussed with: attilio

14 years agoPass the -N flag to linked via -Wl.
rdivacky [Mon, 14 Jun 2010 17:02:19 +0000 (17:02 +0000)]
Pass the -N flag to linked via -Wl.

Approved by: ed (mentor)

14 years agoTemporarily bring back the ARM bootinfo (and make tinderbox happy).
raj [Mon, 14 Jun 2010 16:05:21 +0000 (16:05 +0000)]
Temporarily bring back the ARM bootinfo (and make tinderbox happy).

BI will be eliminated for good when powerpc transition to FDT is complete.

14 years agoRemove unused files.
rpaulo [Mon, 14 Jun 2010 15:52:50 +0000 (15:52 +0000)]
Remove unused files.

14 years agoUpdate for hostapd & wpa_supplicant 0.6.10.
rpaulo [Mon, 14 Jun 2010 15:38:30 +0000 (15:38 +0000)]
Update for hostapd & wpa_supplicant 0.6.10.

14 years agoMFV hostapd & wpa_supplicant 0.6.10.
rpaulo [Mon, 14 Jun 2010 15:37:48 +0000 (15:37 +0000)]
MFV hostapd & wpa_supplicant 0.6.10.

14 years agorandom(6): avoid dead assignments
uqs [Mon, 14 Jun 2010 13:03:25 +0000 (13:03 +0000)]
random(6): avoid dead assignments

Found by: clang static analyzer

14 years agosc_lastrs is also used in case the sending station is not known, for
bschmidt [Mon, 14 Jun 2010 08:24:00 +0000 (08:24 +0000)]
sc_lastrs is also used in case the sending station is not known, for
example in a split IBSS scenario. Therefore always assign sc_lastrs.
This removes a hack I committed in r206457.

Approved by: rpaulo (mentor)

14 years agoFix bug introduced in SVN rev 194985. When calling pic_assign_cpu()
mav [Mon, 14 Jun 2010 07:38:53 +0000 (07:38 +0000)]
Fix bug introduced in SVN rev 194985. When calling pic_assign_cpu()
for pre-bound IRQs during boot, submit there LAPIC ID, same as in other
places, not CPU ID.

14 years agoVirtualize pci_remap_msi_irq() call from general MSI code. It allows MSI
mav [Mon, 14 Jun 2010 07:10:37 +0000 (07:10 +0000)]
Virtualize pci_remap_msi_irq() call from general MSI code. It allows MSI
(FSB interrupts) to be used by non-PCI devices, such as HPET.

14 years agoUnbreak Clang on PowerPC.
ed [Mon, 14 Jun 2010 06:23:47 +0000 (06:23 +0000)]
Unbreak Clang on PowerPC.

It seems GCC 4.2.1 on PowerPC miscompiles Clang, causing it to crash
when building even simple Hello World applications. Switch back to -O1
for this architecture.

Submitted by: nwhitehorn

14 years agoIf the compressed data is larger than the uncompressed,
kientzle [Mon, 14 Jun 2010 02:56:45 +0000 (02:56 +0000)]
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

Thanks to:  Boris Samorodov

14 years agoSeparate _posix1e_acl_id_to_name() into a separate file, to
kientzle [Mon, 14 Jun 2010 02:26:13 +0000 (02:26 +0000)]
Separate _posix1e_acl_id_to_name() into a separate file, to
break an unnecessary dependency on getpwuid() and getgrgid().

MFC after: 1 month

14 years ago- Because hostapd calls iv_key_set() before if_init(), make sure key_set
thompsa [Mon, 14 Jun 2010 00:40:23 +0000 (00:40 +0000)]
- Because hostapd calls iv_key_set() before if_init(), make sure key_set
  callback function will be executed, and that the key won't be deleted during
  the init process.
- txmic and rxmic are written into the chip the same place regardless of
  opmode.
- Make the hardware generate 802.11 sequence numbers.

Submitted by: Akinori Furukoshi
Obtained from: git://gitorious.org/run/run.git

14 years agoFix build breakages on ia64 introduced some commits ago.
marcel [Sun, 13 Jun 2010 23:37:16 +0000 (23:37 +0000)]
Fix build breakages on ia64 introduced some commits ago.

14 years agoImport wpa_supplicant & hostapd 0.6.9.
rpaulo [Sun, 13 Jun 2010 20:32:04 +0000 (20:32 +0000)]
Import wpa_supplicant & hostapd 0.6.9.

14 years agoUpdate a branch missed in r207537.
marius [Sun, 13 Jun 2010 20:29:55 +0000 (20:29 +0000)]
Update a branch missed in r207537.

MFC after: 3 days

14 years agolibedit: Add basic filename completion code from NetBSD.
jilles [Sun, 13 Jun 2010 17:04:42 +0000 (17:04 +0000)]
libedit: Add basic filename completion code from NetBSD.

This will be used to provide filename completion in sh(1).

Changes from the NetBSD code:
* wide character support disabled, as in the rest of libedit
* config.h and related portability stuff reduced/disabled, as in the rest
  of libedit

Submitted by: Guy Yur
Obtained from: NetBSD

14 years agostyle(9) fixes:
imp [Sun, 13 Jun 2010 16:54:11 +0000 (16:54 +0000)]
style(9) fixes:

o make cmd scoped to the whole do_rules function, since it really is
  scoped to the whole fucnion.  Making it static was the wrong way to
  fix referencing it outside of the block in which it was declared
  (and conforms to the style of the rest of the file).
o remove a couple of meaningless blank lines
o properly wrap one line.

14 years agoMerge from tbemd, with minor tweaks:
imp [Sun, 13 Jun 2010 16:35:20 +0000 (16:35 +0000)]
Merge from tbemd, with minor tweaks:

Search from most specific ($MACHINE) to least specific
($MACHINE_CPUARCH) when looking for the tty file to use.  Also add an
.error case if none exist.

14 years agoEnable ofwdump(8) on ARM as this is a useful tool to inspect a flattened
raj [Sun, 13 Jun 2010 13:30:26 +0000 (13:30 +0000)]
Enable ofwdump(8) on ARM as this is a useful tool to inspect a flattened
device tree.

14 years agoConvert Marvell ARM platforms to FDT convention.
raj [Sun, 13 Jun 2010 13:28:53 +0000 (13:28 +0000)]
Convert Marvell ARM platforms to FDT convention.

The following systems are involved:

  - DB-88F5182
  - DB-88F5281
  - DB-88F6281
  - DB-78100
  - SheevaPlug

This overhaul covers the following major changes:

  - All integrated peripherals drivers for Marvell ARM SoC, which are
    currently in the FreeBSD source tree are reworked and adjusted so they
    derive config data out of the device tree blob (instead of hard coded /
    tabelarized values).

  - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say
    good by to obio / mbus drivers and numerous hard-coded config data.

Note that world needs to be built WITH_FDT for the affected platforms.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation.

14 years agoInitial FDT infrastructure elements for ARM.
raj [Sun, 13 Jun 2010 13:12:52 +0000 (13:12 +0000)]
Initial FDT infrastructure elements for ARM.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoImprove style.
raj [Sun, 13 Jun 2010 13:08:23 +0000 (13:08 +0000)]
Improve style.

14 years agoConnect FDT infrastructure to the build system.
raj [Sun, 13 Jun 2010 13:02:43 +0000 (13:02 +0000)]
Connect FDT infrastructure to the build system.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoProvide identify method for the fdtbus(4).
raj [Sun, 13 Jun 2010 12:58:31 +0000 (12:58 +0000)]
Provide identify method for the fdtbus(4).

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoDo not set WITH_FDT by default based on arch, as this does not work for
raj [Sun, 13 Jun 2010 12:53:44 +0000 (12:53 +0000)]
Do not set WITH_FDT by default based on arch, as this does not work for
a bootstrap stage tool.

FDT-enabled platforms will have to specify WITH_FDT explicitly at buildworld
time for now until TBEMD is complete, which is going to provide means for such
arch based selection of build components.

Discussed with: imp

14 years agoFix conditional FDT support in loader(8).
raj [Sun, 13 Jun 2010 12:46:32 +0000 (12:46 +0000)]
Fix conditional FDT support in loader(8).

14 years agoDisable usage of posix_spawn() inside LLVM.
ed [Sun, 13 Jun 2010 12:39:22 +0000 (12:39 +0000)]
Disable usage of posix_spawn() inside LLVM.

Even though it's nice to use posix_spawn() instead of manually using
fork()/exec(), it's better to disable this. FreeBSD 7 doesn't support
this interface. When enabled, we can't build tblgen, which prevents us
from building FreeBSD 9 on 7.

Tested by: raj

14 years agoUnbreak the build on less common architectures.
ed [Sun, 13 Jun 2010 11:27:44 +0000 (11:27 +0000)]
Unbreak the build on less common architectures.

Submitted by: Andreas Tobler <andreast list fgznet ch>

14 years ago* Improve compatibility with existing application code by permitting the
kaiw [Sun, 13 Jun 2010 10:58:50 +0000 (10:58 +0000)]
* Improve compatibility with existing application code by permitting the
  use of `elf_getbase()` on non-archive members. This change is needed
  for gcc LTO (-flto) to work properly.
* Style fix: paranthesize returned values.
* Document the current behaviour of `elf_getbase()`.

Tested by: gerald, Steve Kargl (original patch)
Obtained from: elftoolchain
MFC after: 3 days

14 years agoIn NFS clients, instead of inconsistently using #ifdef
kib [Sun, 13 Jun 2010 05:24:27 +0000 (05:24 +0000)]
In NFS clients, instead of inconsistently using #ifdef
DIAGNOSTIC and #ifndef DIAGNOSTIC for debug assertions, prefer
KASSERT(). Also change one #ifdef DIAGNOSTIC in the new nfs server.

Submitted by: Mikolaj Golub <to.my.trociny gmail com>
MFC after: 2 weeks

14 years agoAdd a utility macro to simplify calculating an aggregate sum from a DPCPU
lstewart [Sun, 13 Jun 2010 02:39:55 +0000 (02:39 +0000)]
Add a utility macro to simplify calculating an aggregate sum from a DPCPU
counter variable.

Sponsored by: FreeBSD Foundation
Reviewed by: jhb, rpaulo, rwatson (previous version of patch)
MFC after: 1 week

14 years agoMerge from tbemd:
imp [Sun, 13 Jun 2010 01:27:29 +0000 (01:27 +0000)]
Merge from tbemd:

Convert from using MACHINE_ARCH to MACHINE_CPUARCH.  Hoist path statement
up into the top Makefile rather than repeating it on every arch Makefile.

14 years agoIn threaded processes, destroy the mutex atexit_mutex when we've
cperciva [Sun, 13 Jun 2010 01:13:36 +0000 (01:13 +0000)]
In threaded processes, destroy the mutex atexit_mutex when we've
finished using it.  This allows the mutex's allocated memory to be
freed.

This is one sense a rather silly change, since at this point we're
less than a microsecond away from calling _exit; but fixing this
memory leak is likely to make life easier for anyone trying to
track down other memory leaks.

14 years agocxgb(4): add knob to get packet timestamps from the hardware.
np [Sat, 12 Jun 2010 22:33:04 +0000 (22:33 +0000)]
cxgb(4): add knob to get packet timestamps from the hardware.

The T3 ASIC can provide an incoming packet's timestamp instead of its RSS hash.
The timestamp is just a counter running off the card's clock.  With a 175MHz
clock an increment represents ~5.7ns and the 32 bit value wraps around in ~25s.

# sysctl -d dev.cxgbc.0.pkt_timestamp
dev.cxgbc.0.pkt_timestamp: provide packet timestamp instead of connection hash

# sysctl -d dev.cxgbc.0.core_clock
dev.cxgbc.0.core_clock: core clock frequency (in KHz)
# sysctl dev.cxgbc.0.core_clock
dev.cxgbc.0.core_clock: 175000