Julian Elischer [Thu, 15 Nov 2007 02:13:44 +0000 (02:13 +0000)]
When forking, the new thread deserves a name too. Don't just use the
td_startcopy section as it is not the right thing to do
in other cases (e.g. if starting a new thread from one that is already named).
David E. O'Brien [Wed, 14 Nov 2007 22:58:36 +0000 (22:58 +0000)]
Bring in FSF revision 1.9 (Change type of ps_strings from int to u_long).
This fixes a situation where GDB gives incorrect backtraces when a signal
handler is in the call chain.
Marcel Moolenaar [Wed, 14 Nov 2007 20:21:54 +0000 (20:21 +0000)]
o Rename cpu_thread_setup() to cpu_thread_alloc() to better
communicate that it relates to (is called by) thread_alloc()
o Add cpu_thread_free() which is called from thread_free()
to counter-act cpu_thread_alloc().
i386: Have cpu_thread_free() call cpu_thread_clean() to
preserve behaviour.
ia64: Have cpu_thread_free() call mtx_destroy() for the
mutex initialized in cpu_thread_alloc().
Gleb Smirnoff [Wed, 14 Nov 2007 11:25:58 +0000 (11:25 +0000)]
- Merge all the ng_send_fn2* functions into one - ng_send_fn2(),
removing some copy&pasted code.
- Reduce copy and paste in ng_apply_item().
- Resurrect ng_send_fn() as a valid symbol, not a define.
Luigi Rizzo [Wed, 14 Nov 2007 07:38:22 +0000 (07:38 +0000)]
Fix build of the "package" target, ignoring non existing
floppy types (in fact, we have only one left!)
Also cleanup some code, using || and && in some places, and
using "export VAR=value" instead of two separate lines.
Julian Elischer [Wed, 14 Nov 2007 06:21:24 +0000 (06:21 +0000)]
generally we are interested in what thread did something as
opposed to what process. Since threads by default have teh name of the
process unless over-written with more useful information, just print the
thread name instead.
Julian Elischer [Wed, 14 Nov 2007 05:43:55 +0000 (05:43 +0000)]
Apply the same sort of locking done in
sys/dev/acpica/acpi.c rev 1.196 a while ago:
Grab Giant around calls to DEVICE_SUSPEND/RESUME in
acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems. It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE). Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.
Luigi Rizzo [Wed, 14 Nov 2007 05:42:54 +0000 (05:42 +0000)]
Fix picobsd builds. Changes include:
- use proper make configuration for the build, using
${BINMAKE} as evaluated by ${VERSION}/src/Makefile
- remove -lmytinfo from crunch.conf
- remove support for login_access in tinyware/login
- remove "machine i386" from the kernel config file
It might actually be interesting to extend the script to do
a cross build for !i386 ...
Peter Wemm [Tue, 13 Nov 2007 23:00:24 +0000 (23:00 +0000)]
Drastically simplify the i386 pcpu backend by merging parts of the
amd64 mechanism over. Instead of page table hackery that isn't
actually needed, just use 'struct pcpu __pcpu[MAXCPU]' for backing like
all the other platforms do. Get rid of 'struct privatespace' and a
while mess of #ifdef SMP garbage that set it up. As a bonus, this
returns the 4MB of KVA that we stole to implement it the old way.
This also allows you to read the pcpu data for each cpu when reading a
minidump.
Background information: Originally, pcpu stuff was implemented as having
per-cpu page tables and magic to make different data structures appear
at the same actual address. In order to share page tables, we switched
to using the GDT and %fs/%gs to access it. But we still did the evil
magic to set it up for the old way. The "idle stacks" are not used
for the idle process anymore and are just used for a few functions during
bootup, then ignored. (excercise for reader: free these afterwards).
Rink Springer [Tue, 13 Nov 2007 16:12:59 +0000 (16:12 +0000)]
Remove the IEEE80211_C_WEP capability flag - setting it makes net80211 expect
that the driver will handle WEP encryption. However, this does not seem to be
implemented by this driver (or maybe the chipset doesn't support it?)
Removing the flag makes my wpi card work using wpa_supplicant(8) on a
network with 802.1x security (without this change it authenticated fine, but
tcpdump only saw garbage packets)
Reviewed by: benjsc, imp (mentor)
Approved by: imp (mentor), sam
Peter Grehan [Tue, 13 Nov 2007 15:47:55 +0000 (15:47 +0000)]
Split decr_init() into two, with the section that reads the timebase
frequency from OpenFirmware moved out and into a routine that is called
from cpu_startup().
This allows correct reporting of the CPU clockspeed when printing out
CPU information at boot time.
Reported by: numerous
Reviewed by: marcel
MFC after: 1 day
Bjoern A. Zeeb [Mon, 12 Nov 2007 23:53:43 +0000 (23:53 +0000)]
Though we are currently not interested in the EDD3 flag,
Enhanced Disk Drive Specification Ver 3.0 defines that the version
of extension in AH would be 30h.
Correct the check for that to be >=30h instead of >3h.
MFC after: 2 months
John Baldwin [Mon, 12 Nov 2007 21:51:38 +0000 (21:51 +0000)]
Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.
John Baldwin [Mon, 12 Nov 2007 20:02:21 +0000 (20:02 +0000)]
write(1) needs to strip off the leading /dev/ from the tty name for the
current tty as returned from ttyname(3) so it can try to avoid writing to
the current tty if possible. Previously, it did this by trimming off any
leading directory (effectively performing a basename(3) on the path
returned from ttyname(3)). However, this chopped off too much of the path
for ttys who have directories in their name such as pts(4). Instead, just
strip off the leading /dev/ from the path returned by ttyname(3). This
fixes write(1) when using pts(4).
Xin LI [Mon, 12 Nov 2007 18:57:33 +0000 (18:57 +0000)]
Correct a stack overflow which will trigger panics when
mode= is specified, caused by incorrect format string
specified to vfs_scanopt() and subsequently vsscanf().
Jeff Roberson [Mon, 12 Nov 2007 17:33:07 +0000 (17:33 +0000)]
- Fix the ktr header regexp so we match lines with very large indexes.
- Add support for messages where cpu load is added to a remote cpu.
- print unmatched lines to stdout
Colin Percival [Mon, 12 Nov 2007 04:47:57 +0000 (04:47 +0000)]
Add support for "freebsd-update -r newrelease upgrade" -- binary
upgrading to new releases. Important parts of this code include
* automatically determining which optional components (e.g., src,
info, proflibs) are installed.
* merging changes in files which are modified locally and have
changed between the currently running and new release.
* prompting the user to rebuild all 3rd party software before
deleting old shared libraries.
Yes, this is compatible with "freebsd-update rollback" -- you can
test a new -BETA and roll back to the old release if you don't
like it.
Subject to re@ approval, this will be MFCed before 7.0-BETA3 and
6.3-RC1.
* Expand the example descriptions, fix mdoc-bugs in
"(-a and -t vnode are implied)"
and reuse it near the cd9660 example.
* Spell 'backing store' as two words.
Sam Leffler [Sat, 10 Nov 2007 16:23:38 +0000 (16:23 +0000)]
Add private tx/rx buffer management to support large frame sizes
and update the rx code to handle multiple frames in a single usb
transfer. AX772 parts (at least) exhibit many input errors when
operated with a 2K rx buffer and no errors w/ a 4K rx buffer (it's
unclear what the cause of the errors is for 2K so this may just be
covering up the real issue). Larger rx buffer sizes show no
significant performance improvement for AX772. Bypassing the common
buffer management routines also eliminates an extra context switch
on every packet which noticeably improves performance (TCP netperf
rx goes from 45 Mb/s to 85 MB/s).
Hiten Pandya [Sat, 10 Nov 2007 06:04:46 +0000 (06:04 +0000)]
Clean up the rmlock(9) manual page:
* Correct spelling and grammar
* Re-structure sentences in BUGS section for legibility
* Break long lines appropriately
* Break lines at full stops
* Add mdoc(9) commands where applicable
* Remove superfluous .Ft in the SYNOPSIS section
* Various other mdoc(9) fixes
Ariff Abdullah [Sat, 10 Nov 2007 04:32:50 +0000 (04:32 +0000)]
Limit total playback channels to just 1, for ALi M5451.
The reliability of it's multi DAC / playback channels is
not that good. Enabling vchans make the bug more visible
since playback allocation will look for possible free
hardware channels first (i.e: the next DAC, the very first
has been consumed by vchan mixer) which in this case has
been proven faulty.
Reported / Tested by: Sascha Klauder
MFC after: 3 days
Ruslan Ermilov [Fri, 9 Nov 2007 16:02:10 +0000 (16:02 +0000)]
- Fix documentation to match code. Specifically, -c doesn't have
to be specified together with either -u or -t to have an effect,
and exit status of 2 is not possible after a Perl->C conversion.
Stephan Uphoff [Thu, 8 Nov 2007 19:35:36 +0000 (19:35 +0000)]
Use VM_FAULT_DIRTY to fault in pages for write access in
proc_rwmen.
Otherwise copy on write may create an anonymous page that is
not marked as dirty. Since writing data to these pages
in this function also does not dirty these pages they may be
later discarded by the pagedaemon.
John Baldwin [Thu, 8 Nov 2007 15:51:52 +0000 (15:51 +0000)]
Make it easier to add more ptys to the pty(4) driver:
- Use unit2minor() and minor2unit() to generate minor numbers to support
unit numbers higher than 255.
- Use simple string operations on the 'names' array rather than hard-coded
constants and switch statements so that more ptys can be added by simply
expanding the 'names' array.
Colin Percival [Thu, 8 Nov 2007 13:06:38 +0000 (13:06 +0000)]
Two minor improvements uncovered by work on upgrading between releases:
* When installing updates, make sure that securelevel <= 0. Otherwise
we can't remove the schg flag from files.
* When preparing to download updates, check to see if we already have
them sitting in the /files/ directory. This saves bandwidth if users
run "freebsd-update fetch" more than once without installing updates
in between.