These header files only provide functionality that can be used in
combination with libcompat. In order to prevent people from including
them without any actual use (which happens a lot with <sys/timeb.h>),
put a warning here to make people more aware.
This means we have to lower WARNS for libcompat, which is no big deal.
weongyo [Tue, 9 Mar 2010 19:58:00 +0000 (19:58 +0000)]
o uses bus accessor macros to read values from ivar so no more values
are referenced directly from ivar pointer. It's to do like what other
buses do. [1]
o changes exported prototypes. It doesn't use struct siba_* structures
anymore that instead of it it uses only device_t.
o removes duplicate code and debug messages.
o style(9)
jkim [Tue, 9 Mar 2010 19:02:02 +0000 (19:02 +0000)]
- Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode. Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.
alc [Tue, 9 Mar 2010 03:30:31 +0000 (03:30 +0000)]
Implement AMD's recommended workaround for Erratum 383 on Family 10h
processors. With this workaround, superpage promotion can be re-enabled
under virtualization. Moreover, machine check exceptions can safely be
enabled when FreeBSD is running natively on Family 10h processors.
Most of the credit should go to Andriy Gapon for diagnosing the error and
working with Borislav Petkov at AMD to document it. Andriy also reviewed
and tested my patches.
nwhitehorn [Tue, 9 Mar 2010 02:00:53 +0000 (02:00 +0000)]
Place interrupt handling in a critical section and remove double
counting in incrementing the interrupt nesting level. This fixes a number
of bugs in which the interrupt thread could be preempted by an IPI,
indefinitely delaying acknowledgement of the interrupt to the PIC, causing
interrupt starvation and hangs.
qingli [Tue, 9 Mar 2010 01:11:45 +0000 (01:11 +0000)]
One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to
allow for connection load balancing across interfaces. Currently
the address alias handling method is colliding with the ECMP code.
For example, when two interfaces are configured on the same prefix,
only one prefix route is installed. So connection load balancing
among the available interfaces is not possible.
The other advantage of ECMP is for failover. The issue with the
current code, is that the interface link-state is not reflected
in the route entry. For example, if there are two interfaces on
the same prefix, the cable on one interface is unplugged, new and
existing connections should switch over to the other interface.
This is not done today and packets go into a black hole.
Also, there is a small bug in the kernel where deleting ECMP routes
in the userland will always return an error even though the command
is successfully executed.
delphij [Tue, 9 Mar 2010 00:52:16 +0000 (00:52 +0000)]
Remove the check for IFF_DRV_OACTIVE right before adding a port into lagg
interface. The check itself seems to be coming from OpenBSD but does not
seem to be useful for our code.
ache [Mon, 8 Mar 2010 22:27:46 +0000 (22:27 +0000)]
Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary comparison" instead.
POSIX says: "The input files shall be text files", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.
edwin [Mon, 8 Mar 2010 21:17:10 +0000 (21:17 +0000)]
MFV of tzdata2010e:
- Adjust beginning / end of DST in Bangladesh (minimal impact)
- Fiji ends DST one month earlier to last Sunday of March
- Samoa changes
- Chile extends DST until 3 April this year.
lulf [Mon, 8 Mar 2010 21:16:28 +0000 (21:16 +0000)]
- Set missing flag when initiating a plex rebuild with the rebuildparity
command.
- Check if plex is already syncing or rebuilding before initiating a parity
rebuild or check.
fabient [Mon, 8 Mar 2010 19:58:00 +0000 (19:58 +0000)]
Change the way shutdown is handled for log file.
pmc_flush_logfile is now non-blocking and just ask the kernel
to shutdown the file. From that point, no more data is
accepted by the log thread and when the last buffer is flushed
the file is closed.
This will remove a deadlock between pmcstat asking for
flush while it cannot flush the pipe itself.
nwhitehorn [Mon, 8 Mar 2010 15:01:08 +0000 (15:01 +0000)]
Enable tmpfs unconditionally on all platforms. No one I spoke to could
remember why it was x86 only, and it works just as well on at least powerpc
as on x86.
jilles [Sun, 7 Mar 2010 18:43:29 +0000 (18:43 +0000)]
sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}.
These expansions, which were already in the Bourne shell, work correctly for
the most part. The testcases are only about the parts that already work
correctly.
As statfs.f_flags are uint64_t the local variables should be as well.
We'll start noticing this with the next flag introduced as the lower
32bit are all used.
As this is old code we might need to do a full tree sweep one day, unless
changing our strategy to use a different `API' for getting/setting flags
along with the rest of the statfs data.
Destroy TCP UMA zones (empty or not) upon network stack teardown
to not leak them, otherwise making UMA/vmstat unhappy with every stoped vnet.
We will still leak pages (especially for zones marked NOFREE).
Reshuffle cleanup order in tcp_destroy() to get rid of what we can
easily free first.
Sponsored by: ISPsystem
Reviewed by: rwatson
MFC after: 5 days
jilles [Sun, 7 Mar 2010 15:08:42 +0000 (15:08 +0000)]
sh: Add various testcases for here documents.
They are mainly about expansions in here documents but because all the
testcases are in $() command substitution, we also test that $() command
substitution is recursively parsed (or very close to it).
rwatson [Sun, 7 Mar 2010 10:47:47 +0000 (10:47 +0000)]
Make udp_set_kernel_tunneling() less forgiving when its invariants are
violated: so_pcb can never be NULL for a valid UDP socket, and it is
always SOCK_DGRAM. Use sotoinpcb() as the rest of the UDP code does.
On Linux, /proc/<pid>/fd is comparable to fdescfs, where it allows you
to inspect the file descriptors used by each process. Glibc's ttyname()
works by performing a readlink() on these nodes, since all nodes in this
directory are symlinks.
It is a bit hard to implement this in linprocfs right now, so I am not
going to bother. Add a way to make ttyname(3) work, by adding a
/proc/<pid>/fd symlink, which points to /dev/fd only if the calling
process matches. When fdescfs is mounted, this will cause the
readlink() in ttyname() to fail, causing it to fall back on manually
finding a matching node in /dev.
obrien [Sun, 7 Mar 2010 10:08:00 +0000 (10:08 +0000)]
Look for "compile" to decide if this is run as part of the kernel build.
The assumption of "${ARCH}/compile/FOO" is much harder to change in our
build (so assume one hasn't), then assuming every kernel is rooted at "sys/".
- Remove dosansi, pc and pc3. I suspect nobody ever needs these.
- Add vt100, screen and xterm-color.
This file is now probably more than sufficient in most cases, even for
common use outside single user mode, where people just use the console
driver, a graphical terminal emulator and a terminal multiplexer.
Right now we have a termcap.small in the tree, but we don't install it.
If we do install this file by default, it is more likely for
applications to work in single user mode.
I am not entirely happy with the contents of this file. In my opinion we
should remove the `dosansi', `pc' and `pc3' entries and replace them
with `vt100' in case someone uses a serial console.
The file does already have entries for `cons25' and `xterm', which is
used most often.
rwatson [Sat, 6 Mar 2010 22:04:45 +0000 (22:04 +0000)]
Remove unnecessary locking of divcbinfo lock from div_output(): this has not
been required since FreeBSD 7.0 when the so_pcb pointer leading to inp was
guaranteed to be stable when a valid socket reference is held (as it is in
the output path).
rwatson [Sat, 6 Mar 2010 21:38:31 +0000 (21:38 +0000)]
Add a comment to tcp_usr_accept() to indicate why it is we acquire the
tcbinfo lock there: r175612, which re-added it, masked a race between
sonewconn(2) and accept(2) that could allow an incompletely initialized
address on a newly-created socket on a listen queue to be exposed. Full
details can be found in that commit message.
Introduce a function rn_detachhead() that will free the
radix table root nodes. This is only needed (and available)
in the virtualization case to free the resources when tearing
down a virtual network stack.
Destroy UDP UMA zones (empty or not) upon network stack teardown
to not leak them making the VM subsystem unhappy with every stoped vnet(*).
We will still leak pages (especially as zones are marked NOFREE).
Rework reference counting in case we queue into the netisr,
or overflow the netisr queue and fall back to the interface
queue so that we can garuantee that the ifnet pointer stays
valid. Formerly we ended up with reference counts <= 0 in
case the netisr had returned ENOBUFS. The idea is to track
any packet in the netisr queue and only change the refount
on edge operations for the fallback interface queue. This
also avoids problems in case the if_snd.ifq_len lies to us.
Also rework refount assertions to make sure they trigger if
we go below 1. Formerly a negative refence count did not
trigger the assert as the refcount variable is u_int.
ache [Sat, 6 Mar 2010 19:21:57 +0000 (19:21 +0000)]
1) Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary equal" check instead.
POSIX says: "The input file shall be a text file", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.
2) Speedup input processing a bit in complex cases like skipping fields,
chars or ignore case.
3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file"
and POSIX uniq(1) description).
jilles [Sat, 6 Mar 2010 16:57:53 +0000 (16:57 +0000)]
sh: Improve the command builtin:
* avoid unnecessary fork
* allow executing builtins via command
* executing a special builtin via command removes its special properties
jmallett [Sat, 6 Mar 2010 05:49:15 +0000 (05:49 +0000)]
Check for device faults and for failures to set DRQ when expected, rather
than spinning forever. This fixes booting with CF ejected.
NB: I've made the driver pretty chatty about errors in case there's hardware
that operates differently to mine, so we can easily track down any issues.
jmallett [Sat, 6 Mar 2010 05:45:49 +0000 (05:45 +0000)]
o) Consistently use MIPS_KSEGn_TO_PHYS instead of MIPS_{,UN}CACHED_TO_PHYS etc.
Get rid of the macros that spell KSEG0 CACHED and KSEG1 UNCACHED.
o) Get rid of some nearby duplicated and unused macros.
jmallett [Fri, 5 Mar 2010 22:48:34 +0000 (22:48 +0000)]
o) Simplify the implementation of bus read/write functions, and eliminate some
redundant implementations.
o) Use ABI, not ISA, to determine address length.
o) Disable and restore interrupts around any operation that uses all 64 bits of
a register. In kernels using the O32 ABI, the upper 32 bits of those
registers is likely to be corrupted by an interrupt.
jmallett [Fri, 5 Mar 2010 22:44:49 +0000 (22:44 +0000)]
Do not mask off the low byte of the chipid, it makes some of the case
statements unreachable and seems to be wrong. Fixes detection of the number
of ports available on some models.
imp [Fri, 5 Mar 2010 16:56:08 +0000 (16:56 +0000)]
Add support for o32 (when it isn't the default), n32, n64, and o64 to
the linker spec. Provide the ability to have a default ABI that's
different than o32 (again, for all 4).
Submitted by: C. Jayachandran (JC) with tweaks for o64/o32 by me
- Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
once, the command didn't necessarily fit to the final command buffer. Fix
this using a dynamic sbuf buffer. Add a few regression tests for the case.
netchild [Fri, 5 Mar 2010 14:34:33 +0000 (14:34 +0000)]
Redirect stdin from /dev/null when starting a jail:
At least in RELENG_7 this fixes some start problems for some programs
from the ports. It is also more correct, as a jail shall not expect
input (interactivity) from the jail-host.
Revert the current behavior of starting jails in the background and
make it optional only for the start of jails (jail_parallell_start=YES
in rc.conf):
- The stop can not be done in the background, the system needs to wait
until everything is stopped correctly before it can reboot or power
down.
- The start should not be done in parallel by default, this not only
breaks POLA for people comming from RELENG_x, it may also break a
dependency chain with other scripts in the jail-host, which need to
do some stuff after the jails are up and running (e.g. hardlinking
a mysql socket from one jail into another one).
nyan [Fri, 5 Mar 2010 11:11:42 +0000 (11:11 +0000)]
MFx86: the part of r204641
In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64,
now accepts as arguments the desired sources to handle, and returns the
actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no
meaning in calling such function).
This allows to bring out into commont x86 code the handling part for
machdep.lapic_allclocks tunable, which is retained.
sobomax [Fri, 5 Mar 2010 03:37:42 +0000 (03:37 +0000)]
Don't spam dmesg with "registered firmware ..." when module is compiled
into kernel, unless there is a verbose boot flag set. There is no real
need to have this information printed.
joel [Thu, 4 Mar 2010 22:06:57 +0000 (22:06 +0000)]
Use our preferred license text (no more "voices in his head"). While here,
also move to a 2-clause license. From n_hibma@:
"The 3rd clause was originally there for a reason, but I guess that it is
safe to assume that no one can assume endorsement by me or anyone else
without prior consent on anything really, so we might as well remove that
clause."
imp [Thu, 4 Mar 2010 22:01:11 +0000 (22:01 +0000)]
Remove stale references to libkrb5.
Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend
on something else, and then SUBDIR+= the rest.
A separate commit will fix the SUBDIR style to be the same as the rest
of the tree.