rwatson [Tue, 25 Dec 2007 17:52:02 +0000 (17:52 +0000)]
Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument. This will allow DDB to detect the broad category of
reason why the debugger has been entered, which it can use for the
purposes of deciding which DDB script to run.
Assign approximate why values to all current consumers of the
kdb_enter() interface.
imp [Tue, 25 Dec 2007 06:22:33 +0000 (06:22 +0000)]
Spring forward into the late 1970's by following item 5 in the yacc
manual's Appendix D ("Old Features Supported but not Encouraged") in
the Seventh Edition Unix Programmer's Manual (January, 1979) by
retiring the " = {" method of of action specification in favor of a
plain "{". It is no longer necessary for this bootstrap program to
be compatible with 6th Edition systems. Some yaccs in the wild do not
support this old syntax any more, and compatibility with those systems
is more important these days (as there are easily 7 orders of magnitude
more of them than real v6 systems today).
Reviewed by: jhb@ and dds@ (the latter gave the reference).
edwin [Tue, 25 Dec 2007 00:52:24 +0000 (00:52 +0000)]
Add the ability to clean up all shared memory segments which are
unused in one go.
From the original PR:
I've observed that linux apps running under the linuxulator
have a habit of leaving behind shared memory segments which
are unused, but which eventually cause the system to run
out of free segments and these apps will stop working.
ipcrm(1) currently only allows removal of unused message
queues, shared memory segments and semaphores on an individual
basis, or those having a matching (non-zero) key. However
it would often be convenient to just do a complete cleanup
of everything, usually as root.
ume [Mon, 24 Dec 2007 16:32:14 +0000 (16:32 +0000)]
Add sysctl mibs for _TSP, _TC1 and _TC2 which is user overridable
but is blocked on user_override mib.
Not a few people want to use a passive cooling without their ACPI
BIOS support.
kib [Mon, 24 Dec 2007 13:47:16 +0000 (13:47 +0000)]
Move the check for the snp device being already attached after the
fget() call, that is sleeping point, and possibly dropping Giant.
The snp_target == NULL implies the snp_tty == NULL. Remove the code
that is put under snp_target == NULL and snp_tty != NULL clause.
In snpclose(), do the snp_detach() before scheduling the snp device
destruction. Otherwise, after the return from snpclose(), the snp
device is already removed from the snp_list, but tty is still in
snooped state. Any attempt to do i/o on such tty cause panic because
ttytosnp() returns NULL.
marcel [Mon, 24 Dec 2007 01:01:59 +0000 (01:01 +0000)]
Various fixes:
o BSD disklabels have relative offsets. Even for the BSD in MBR slice
setup, except when the mbroffset ioctl is supported. Since we don't
support that ioctl, bsdlabel(8) expects relative offsets. So, when
reading an existing disklabel, correct for disklabels that mistakenly
have the mbroffset offsets.
o Don't take the geometry seriously, because it's untrustworthy. We do
expect the numbers to be within range. This means that the secperunit
field will not be computed from secpercyl and ncyls, but simply is
the mediasize in sectors.
o Don't enforce partitions to be aligned to track boundaries. The
default label, constructed by bsdlabel(8), puts partition a at offset
BBSIZE bytes, which commonly means sector 16.
kensmith [Mon, 24 Dec 2007 00:43:11 +0000 (00:43 +0000)]
For the INDEX file to be used on disc1 of the 7.0-RELEASE the longest
"build dependencies" field is 5,108 characters which overflows the
length of the junk buffer by a teeny bit. This whole section needs
much more error checking but for now just completely ignore stuff
we have no interest in instead of copying it to someplace we don't
use in the process.
Insta-MFC probably coming since this is holding up 7.0-RC1...
ticso [Sun, 23 Dec 2007 14:57:35 +0000 (14:57 +0000)]
- remove code from oroginal file, which is not required on BWCT boards
- Be more chatty on startup, since we have enough code space on
AT91RM9200
- init DS1672 charging
- init USART GPIO
jhb [Fri, 21 Dec 2007 21:26:08 +0000 (21:26 +0000)]
Clean up some of the pts(4) vs pty(4) stuff in grantpt(3) and friends:
- Use PTY* for all pty(4) related constants.
- Use PTMX* for all pts(4) related constants.
- Consistently use _PATH_DEV PTMX rather than "/dev/ptmx".
- Revert 1.7 and properly fix it by using the correct prefix string for
pts(4) masters.
dougb [Fri, 21 Dec 2007 19:34:26 +0000 (19:34 +0000)]
In the following scenario:
1. Start mergemaster
2. Interrupt it
3. < Somehow the temproot directory disappears >
4. mergemaster -r
Many bad things can happen, especially if the -i option is in use.
Therefore, add a check to make sure it still exists before we start
comparing files.
Brought to my attention by:
PR: bin/40538
Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>
jhb [Fri, 21 Dec 2007 16:53:27 +0000 (16:53 +0000)]
More properly handle links who only have 1 valid IRQ in their bitmask. The
old code special cased them too early which caused a few differences for
these sort of links relative to other PCI links:
- They were always re-routed via the BIOS call instead of assuming that
they were already routed if the BIOS had programmed the IRQ into a
matching device during POST.
- If the BIOS did route that link to a different IRQ that was marked as
invalid, we trusted the $PIR table rather than the BIOS IRQ.
This change moves the special casing for "unique IRQ" links to only take
that into account when picking an IRQ for an unrouted link so that these
links will now not be routed if the BIOS appears to have routed it already
(some BIOSen have problems with that) and so that if the BIOS uses a
different IRQ than the $PIR, we trust the BIOS routing instead (this is
what we do for all other links as well).
Reported by: Bruce Walter walter of fortean com
MFC after: 1 week
alc [Thu, 20 Dec 2007 22:45:54 +0000 (22:45 +0000)]
Modify vm_phys_unfree_page() so that it no longer requires the given
page to be in the free lists. Instead, it now returns TRUE if it
removed the page from the free lists and FALSE if the page was not
in the free lists.
This change is required to support superpage reservations. Specifically,
once reservations are introduced, a cached page can either be in the
free lists or a reservation.
jhb [Thu, 20 Dec 2007 21:42:43 +0000 (21:42 +0000)]
MFamd64/ia64/i386: Only set the rman bus tags and handles in
bus_activate_resource() methods instead of splitting it up between
bus_alloc_resource() and bus_activate_resource().
jhb [Thu, 20 Dec 2007 21:10:06 +0000 (21:10 +0000)]
Invoke revoke(2) on the slave pty in the pts(4) case (new_openpty()) to
kick off any other users on the device line before using it since
openpty(3) is documented to do this. Note that grantpt(3) does not
call revoke(2), it only adjusts permissions and ownership.
yongari [Thu, 20 Dec 2007 07:26:20 +0000 (07:26 +0000)]
By definition promiscuous mode should see all unicast frames as well
as multicast/broadcast frames. Previously re(4) ignored multicast
frames in promiscuous mode. The RTL8169 datasheet was not clear
how it handles multicast frames in promiscuous mode.
das [Thu, 20 Dec 2007 03:16:55 +0000 (03:16 +0000)]
Grumble. DO declare logbl(), DON'T declare logl() just yet.
bde is going to commit logl() Real Soon Now.
I'm just trying to slow him down with merge conflicts.
marius [Thu, 20 Dec 2007 00:31:04 +0000 (00:31 +0000)]
In openprom_ioctl() ensure appropriate permissions and that data isn't
NULL and doesn't point to a NULL pointer before dereferencing it. This
fixes a panic triggered by Xorg 7.3.
Reported and tested by: Bill Green
MFC after: 3 days
alc [Wed, 19 Dec 2007 23:09:45 +0000 (23:09 +0000)]
Correct one half of a loop continuation condition in vm_phys_unfree_page().
At present, this error is inconsequential; the other half of the loop
continuation condition is sufficient to achieve correct execution.
marcel [Wed, 19 Dec 2007 18:00:50 +0000 (18:00 +0000)]
Redefine bus_space_tag_t on PowerPC from a 32-bit integral to
a pointer to struct bus_space. The structure contains function
pointers that do the actual bus space access.
The reason for this change is that previously all bus space
accesses were little endian (i.e. had an explicit byte-swap
for multi-byte accesses), because all busses on Macs are little
endian.
The upcoming support for Book E, and in particular the E500
core, requires support for big-endian busses because all
embedded peripherals are in the native byte-order.
With this change, there's no distinction between I/O port
space and memory mapped I/O. PowerPC doesn't have I/O port
space. Busses assign tags based on the byte-order only.
For that purpose, two global structures exist (bs_be_tag and
bs_le_tag), of which the address can be taken to get a valid
tag.
ambrisko [Wed, 19 Dec 2007 17:22:07 +0000 (17:22 +0000)]
I incorrectly assumed the log buffer started from the beginning when it
is actually a circular log. Deal with it rolling around. Fortunately,
the log area is big and I haven't seen any roll over yet. Update and
get rid of the obsolete comment.
ru [Wed, 19 Dec 2007 16:56:28 +0000 (16:56 +0000)]
Fix bugs in the TCP syncache timeout code. including:
When system ticks are positive, for entries in the cache
bucket, syncache_timer() ran on every tick (doing nothing
useful) instead of the supposed 3, 6, 12, and 24 seconds
later (when it's time to retransmit SYN,ACK).
When ticks are negative, syncache_timer() was scheduled
for the too far future (up to ~25 days on systems with
HZ=1000), no SYN,ACK retransmits were attempted at all,
and syncache entries added in that period that correspond
to non-established connections stay there forever.
das [Tue, 18 Dec 2007 23:46:32 +0000 (23:46 +0000)]
Since nan() is supposed to work the same as strtod("nan(...)", NULL),
my original implementation made both use the same code. Unfortunately,
this meant libm depended on a vendor header at compile time and previously-
unexposed vendor bits in libc at runtime.
Hence, I just wrote my own version of the relevant vendor routine. As it
turns out, mine has a factor of 8 fewer of lines of code, and is a bit more
readable anyway. The strtod() and *scanf() routines still use vendor code.
kmacy [Tue, 18 Dec 2007 22:59:07 +0000 (22:59 +0000)]
Incorporate TCP offload hooks in to core TCP code.
- Rename output routines tcp_gen_* -> tcp_output_*.
- Rename notification routines that turn in to no-ops in the absence of TOE
from tcp_gen_* -> tcp_offload_*.
- Fix some minor comment nits.
- Add a /* FALLTHROUGH */
Reviewed by: Sam Leffler, Robert Watson, and Mike Silbersack
des [Tue, 18 Dec 2007 11:03:07 +0000 (11:03 +0000)]
Add support for the NO_PROXY / no_proxy environment variable as used by
lynx, curl etc. Note that this patch differs significantly from that
in the PR, as the submitter refined it after submitting the PR.
thompsa [Tue, 18 Dec 2007 07:04:50 +0000 (07:04 +0000)]
When the bridge has an address and a packet comes in for it then drop it if the
link has been marked discarding by Spanning Tree. This would cause the bridge
to see duplicate packets to itself even if STP has correctly calculated the
topology and blocked redundant links.
Reported by: trasz
Tested by: trasz
MFC after: 3 days
jasone [Tue, 18 Dec 2007 05:27:57 +0000 (05:27 +0000)]
Use fixed point integer math instead of floating point math when
calculating run sizes. Use of the floating point unit was a potential
pessimization to context switching for applications that do not otherwise
use floating point math. [1]
Reformat cpp macro-related comments to improve consistency.
thompsa [Tue, 18 Dec 2007 02:12:03 +0000 (02:12 +0000)]
- Use the macro to check the port status has it will also test if its
administratively down (!IFF_UP)
- Use the same parameters to lagg_link_active() to get the backup port as in
the output path, this didnt actually matter in practice as sc_primary is
always the first on the port list.
sobomax [Tue, 18 Dec 2007 01:50:49 +0000 (01:50 +0000)]
Fix logical bug in the bzip2 reading code, which results in bogus EIO
returned on a perfectly valid bzip2 stream whose decompressed size
is multiple of read-ahead buffer size. Reproduce the problem is easy:
create some power-of-two sized file (truncate -s 1m file will do),
bzip2 it and try to load it as md_image from loader. See how it fails.
The bug doesn't affect gzip code (which most of bzip2-reading code was
copied from) probably due to the fact that libgzip doesn't report
Z_STREAM_END with the last block, but requires extra call to inflate()
to retrieve it and has some extra data in the input stream at that time.
However, apply similar fix to gzipfs.c just in the case the API will
change in the future to do what bzip2 code does.
Add some ifdef'ed code to enable testing bzipfs.c from witin normal
FreeBSD environment as opposed to the restricted loader one, so that
one can use gdb and whatnot.
Sponsored by: Sippy Software, Inc., http://www.sippysoft.com/
MFC in: 7 days