David Schultz [Mon, 19 Jan 2009 06:19:51 +0000 (06:19 +0000)]
- Add support for multibyte decimal_point encodings, e.g., U+066B.
A forthcoming gdtoa import is needed to make this fully work.
- Improve the way "nan(...)" is parsed.
Pyun YongHyeon [Mon, 19 Jan 2009 02:31:27 +0000 (02:31 +0000)]
Sometimes RTL8168B seems to take long time to access GMII registers
in device attach phase. Double GMII register access timeout value
to fix the issue.
Alexander Motin [Sun, 18 Jan 2009 19:25:36 +0000 (19:25 +0000)]
Use m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
original mbuf chain headers. It can be less efficient in some cases, but it
looks better then mess of copying headers into the nonempty chain.
Stanislav Sedov [Sun, 18 Jan 2009 14:04:56 +0000 (14:04 +0000)]
- Obtain inode sizes and location of the first inode based on the contents
of superblock rather than using hardcoded values. This fixes ext2fs on
filesystems with inode sized other than 128.
Alexander Motin [Sun, 18 Jan 2009 12:03:43 +0000 (12:03 +0000)]
Remove strict limitation on minimal multilink MRRU. RFC claims that MRRU
of 1500 must be supported, but allows smaller values to be negotiated.
Enforce specified MRRU for outgoing frames.
Alan Cox [Sun, 18 Jan 2009 08:00:55 +0000 (08:00 +0000)]
Correct an error in revision 1.170 of this file. When get_pv_entry() is
forced to reclaim pv entries, the one pv entry that it returns should not
be freed.
Jeff Roberson [Sun, 18 Jan 2009 05:44:31 +0000 (05:44 +0000)]
- Add summary information to the title once the file is parsed rather than
printing it to the terminal. Now only parse errors go to the terminal.
- Speedup drawing by raising and lowering tags only once everything has
been drawn. Surprisingly, it now takes a little longer to parse than
it does to draw.
- Parameterize the layout with X_ and Y_ defines that determine the sizes
of various things.
- Remove unnecessary tags.
Jeff Roberson [Sun, 18 Jan 2009 04:49:01 +0000 (04:49 +0000)]
- Significantly speedup hiding and displaying multiple rows by writing an
optimized single pass function for each. This reduces the number of
tkinter calls required to the minimum.
- Add a right-click context menu for sources. Supported commands hide
the source, hide the whole group the source is in, and bring up a stat
window.
- Add a source stat frame that gives an event frequency table as well as
the total duration for each event type that has a duration. This can
be used to see, for example, the total time a thread spent running or
blocked by a wchan or lock.
Ed Schouten [Sat, 17 Jan 2009 23:01:40 +0000 (23:01 +0000)]
Fix for my previous commit: color mapping is not 1:1.
Cons25 doesn't seem to use a straight 1:1 mapping to the ANSI colors,
but uses the same color numbers as at least used by syscons on i386. I
suspect if you change the definitions on a different architecture,
things may break? Not sure.
Add a small array to convert syscons-style color codes to ANSI
equivalents, which are used by libteken internally. I didn't notice this
bug, because I only tested my code with black, white and green, all of
them shared the same numbers.
Ed Schouten [Sat, 17 Jan 2009 22:53:53 +0000 (22:53 +0000)]
Make vidcontrol's color setting work again.
It turns out I forgot to implement two escape sequences that allows the
user to change the default foreground and background colors. I thought
they were implemented by syscons itself, but vidcontrol just generates
some escape sequences, which get interpreted by the terminal emulator.
I have been running -current on my laptop since before FreeBSD 2.0 was
released and along the way developed this little trick to making the
task easier.
sysbuild.sh is a way to build a new FreeBSD system on a computer from
a specification, while leaving the current installation intact.
sysbuild.sh assume you have two partitions that can hold your rootfs
and can be booted, and roughly speaking, all it does is build a new
system into the one you don't use, from the one you do use.
A partition named /freebsd is assumed to be part of your layout, and
that is where the sources and ports will be found.
If you know how nanobsd works, you will find a lot of similarity.
David Schultz [Sat, 17 Jan 2009 18:57:12 +0000 (18:57 +0000)]
When f[w]printf() is called on an unbuffered file like stdout, it
sets up a fake buffered FILE and then effectively calls itself
recursively. Unfortunately, gcc doesn't know how to do tail call
elimination in this case, and actually makes things worse by
inlining __sbprintf(). This means that f[w]printf() to stderr was
allocating about 5k of stack on 64-bit platforms, much of which was
never used.
I've reorganized things to eliminate the waste. In addition to saving
some stack space, this improves performance in my tests by anywhere
from 5% to 17% (depending on the test) when -fstack-protector is
enabled. I found no statistically significant performance difference
when stack protection is turned off. (The tests redirected stderr to
/dev/null.)
Ed Schouten [Sat, 17 Jan 2009 16:37:13 +0000 (16:37 +0000)]
Allow experimental libteken features to be tested without changing code.
The teken library already supports UTF-8 handling and xterm emulation,
but we have reasons to disable this right now. Because we should make it
easy and interesting for people to experiment with these features, allow
them to be set in kernel configuration files.
Before this commit we had a flag called `TEKEN_CONS25' to enable
cons25-style emulation. I'm calling it the opposite now, `TEKEN_XTERM',
because we want to enable it in kernel configuration files explicitly.
Ed Schouten [Sat, 17 Jan 2009 15:56:38 +0000 (15:56 +0000)]
Fix handling of pts(4) device names in comsat(8). Also catch fork() errors.
Pseudo-terminals allocated with posix_openpt(2) will have more slashes
in their path names than comsat(8) allows, so allow slashes when the
character device name starts with "pts/".
This patch is loosely based on NetBSD's changes, revision 1.33. Because
it also included the changes to fork(), I imported them here as well.
Maybe we could import even more fixes from the other BSD's?
Original commit message from the NetBSD folks:
PR/30170: Markus W Kilbinger: src/libexec/comsat complains
about: '/' in "/dev/pts/1"
The FTP_TIMEOUT and HTTP_TIMEOUT environment variables were ignored because
T_secs already had a non-zero default. Unbreak by moving the default to
ftp_timeout / http_timeout.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
MFC after: 2 weeks
Jeff Roberson [Sat, 17 Jan 2009 11:19:15 +0000 (11:19 +0000)]
- Add a new source configuration menu option that allows hiding and
displaying sources.
- Add functions to the main SchedGraph to facilitate source hiding. The
source is simply moved off screen and all other sources are moved to
compensate.
Jeff Roberson [Sat, 17 Jan 2009 07:24:25 +0000 (07:24 +0000)]
- Rewrite the parser to support the new generic schedgraph interface.
This no longer requires any custom classes or parsers to support new
event types.
- Add an optional command line argument for specifying the clock frequency
in ghz. This is useful for traces that do not include KTR_SCHED.
Sponsored by: Nokia
- Add support for sorting rows by clicking and dragging them to their new
position.
- Add support for configuring the cpu background colors.
- Improve the scaling so a better center is maintained as you zoom. This
is not perfect due to precision loss with floats used in the window
views.
- Add new colors and a random assignment for unknown event types. A table
is used for known event types. This is the only event specific
information.
Jeff Roberson [Sat, 17 Jan 2009 07:17:57 +0000 (07:17 +0000)]
- Implement generic macros for producing KTR records that are compatible
with src/tools/sched/schedgraph.py. This allows developers to quickly
create a graphical view of ktr data for any resource in the system.
- Add sched_tdname() and the pcpu field 'name' for quickly and uniformly
identifying records associated with a thread or cpu.
- Reimplement the KTR_SCHED traces using the new generic facility.
Obtained from: attilio
Discussed with: jhb
Sponsored by: Nokia
John Baldwin [Fri, 16 Jan 2009 22:22:30 +0000 (22:22 +0000)]
Disable decoding of BARs by devices before we trash the value in the BAR
by writing all 1's to it to determine its length. This fixes issues with
MCFG on at least some machines where a trashed BAR claimed subsequent
attempts at PCI config transactions because the addresses in the MCFG
window fell in the decoding range of the BAR.
In general it is a bad idea to leave the BARs enabled while we are
frobbing with them in this manner.
John Baldwin [Fri, 16 Jan 2009 22:16:54 +0000 (22:16 +0000)]
Correct the sense of the "use32" terenary operator so that it uses
'lib32' for 32-bit binaries on amd64 and 'lib' for 64-bit binaries.
Remove an #ifdef __i386__ that defined use32 to the wrong value on
i386 to workaround the bug in the terenary operator.
Sam Leffler [Fri, 16 Jan 2009 20:38:42 +0000 (20:38 +0000)]
Fix 1/2 and 1/4 width channel handling for non-GSM operation:
o correct typo that caused random channel selection
o explicitly add 1/2 and 1/4 width channels because channel lookups match
flags that include IEEE80211_CHANNEL_HALF and IEEE80211_CHANNEL_QUARTER
Ed Schouten [Fri, 16 Jan 2009 15:47:35 +0000 (15:47 +0000)]
Allow jot(1) regression tests to be checked out on Windows filesystems.
The jot(1) regression tests directory contained two tests named `wx' and
`wX', which doesn't work on case insensitive filesystems. Rename `wX' to
`wX1'.
Ed Schouten [Fri, 16 Jan 2009 15:00:30 +0000 (15:00 +0000)]
Rename mail(1)'s aux.c to util.c.
The name `aux' is reserved on Windows file systems. aux.c in the mail(1)
directory contains some random utility functions. I'm renaming this file
to util.c to make it possible to check out this directory on Windows.
Ed Schouten [Fri, 16 Jan 2009 14:45:48 +0000 (14:45 +0000)]
Remove unused files from the digi(4) driver.
The digi(4) driver directory contains some files that cannot be checked
out on Windows filesystems. This isn't a big deal, but the files aren't
used anyway.
There are still some other places where checkouts on Windows don't work,
such as VFS_MOUNT.9/vfs_mount.9. This should already be a small
improvement.
Qing Li [Fri, 16 Jan 2009 09:01:45 +0000 (09:01 +0000)]
The RTF_LLINFO was revived unconditionally, but within the kernel the
check on the sysctl argument value being RTF_LLINFO is conditioned on
the COMPAT_ROUTE_FLAGS kernel option. This mismatch caused the L2
table retrieval failure, and the arp/ndp -an command displays empty L2
tables.
Pyun YongHyeon [Fri, 16 Jan 2009 08:06:55 +0000 (08:06 +0000)]
Add hardware MAC statistics support. Also added some reserved
statistics register definition. Users can get current MAC
statistics from dev.msk.%d.stats sysctl node(%d is unit number of
a device).
Nathan Whitehorn [Thu, 15 Jan 2009 23:14:59 +0000 (23:14 +0000)]
Revert revision 186833 and try a different strategy to allow this device to
work when the bus attaches its own children. Instead of hardcoding a unit
number and returning BUS_PROBE_NOWILDCARD, which will break multiple iicbus
systems, check in the probe routine whether the device address is 0. Real
I2C devices will never have this address, but devices added with
BUS_ADD_CHILD() will.
Marius Strobl [Thu, 15 Jan 2009 22:06:53 +0000 (22:06 +0000)]
Don't cross-reference gem(4) and hme(4); maybe this made some sense
back when these two were the only two NIC drivers working on sparc64
but it no longer does nowadays.
Marius Strobl [Thu, 15 Jan 2009 22:00:22 +0000 (22:00 +0000)]
Sync the description of jumbo frame support with reality as of r185812;
it's also supported with BCM5702 (matched by BGE_ASICREV_BCM5703) but
bge(4) currently doesn't with neither BCM5714 nor BCM5780.
Roman Divacky [Thu, 15 Jan 2009 18:53:52 +0000 (18:53 +0000)]
Introduce a local variable and use it instead of passed in parameter
to get rid of restrict qualifier discarding. This lets libc compile
cleanly in gnu99 mode.
Suggested by: kib, christoph.mallon at gmx.de
Approved by: kib (mentor)
- Add debug output
- Fix pmap_zero_page and related places: use uncached segments and invalidate
cache after zeroing memory.
- Do not test for modified bit if it's not neccessary
(merged from mips-juniper p4 branch)
- Some #includes reorganization
Lock the semaphore identifier lock during semaphore initialization to
guarantee atomicity of the operation for other semaphore consumers.
In particular, this should guard against access to the semaphore with
not done or partially done MAC label assignment.
Warner Losh [Thu, 15 Jan 2009 07:51:17 +0000 (07:51 +0000)]
Call platform_reset() instead of looping forever on reboot.
# We likely need to have a default one of these that jumps to the rom boot
# address that's defined in the MIPS ISA.
Weongyo Jeong [Thu, 15 Jan 2009 07:11:14 +0000 (07:11 +0000)]
fix a ehci's bug that it's occurred when the xfers are aborted under
heavy loads or working. It looks this bug exists since r158869
so needs to revert a part of the previous.
Reviewed by: imp
Tested by: sam
MFC after: 3 weeks
Craig Rodrigues [Thu, 15 Jan 2009 06:54:59 +0000 (06:54 +0000)]
Revert previous change, since revision 187103 fixed the problem.
So now, if you:
- specify "makeoptions DEBUG=-g" in your kernel config
- make buildkernel WITH_CTF=1,
then "-g" will be added to CTFFLAGS.
However, "-g" will still not be added to CTFFLAGS when building
kernel modules, if the above steps are performed. This needs to be fixed.
Lawrence Stewart [Thu, 15 Jan 2009 06:44:22 +0000 (06:44 +0000)]
Add TCP Appropriate Byte Counting (RFC 3465) support to kernel.
The new behaviour is on by default, and can be disabled by setting the
net.inet.tcp.rfc3465 sysctl to 0 to obtain previous behaviour.
The patch changes struct tcpcb in sys/netinet/tcp_var.h which breaks
the ABI. Bump __FreeBSD_version to 800061 accordingly. User space tools
that rely on the size of struct tcpcb (e.g. sockstat) need to be recompiled.
David Schultz [Thu, 15 Jan 2009 04:49:43 +0000 (04:49 +0000)]
Reduce code duplication by moving functions that are identical in both
vfprintf.c and vfwprintf.c (except for char/wchar_t differences) to a
common header file.
David Schultz [Thu, 15 Jan 2009 04:29:02 +0000 (04:29 +0000)]
Convert the insidious macros that handle printf()'s buffering into
slightly less evil inline functions, and move the buffering state into
a struct. This will make it possible for helper routines to produce
output for printf() directly, making it possible to untangle the code
somewhat.
In wprintf(), use the same buffering mechanism to reduce diffs to
printf(). This has the side-effect of causing wprintf() to catch write
errors that it previously ignored.
Warner Losh [Thu, 15 Jan 2009 04:19:03 +0000 (04:19 +0000)]
Add KERNFAST define. When defined, it skips all the config, depends
and clean steps. KERNFAST was selected to complement KERNCONF which
is typically used in these scenarios (especially with cross building).
Nathan Whitehorn [Thu, 15 Jan 2009 02:52:31 +0000 (02:52 +0000)]
Driver for Apple Keywest I2C controllers found in MacIO ASICs. Used for
power and thermal control, as well as GPIOs on Xserves and controlling
sound codecs for Apple built-in audio.
Nathan Whitehorn [Thu, 15 Jan 2009 02:46:43 +0000 (02:46 +0000)]
Import an Open Firmware I2C bus module. This attaches firmware device tree
indicated I2C devices, and provides an ofw_bus interface for driver probing.
This should be MI, but is currently provided only on PowerPC due to lack of
sparc64 hardware with an I2C controller.
Craig Rodrigues [Thu, 15 Jan 2009 02:41:26 +0000 (02:41 +0000)]
When building up the command-line for the DTrace ctfmerge and ctfconvert
utilities, add the ${DEBUG} variable from the kernel config. Otherwise,
if we build a kernel with WITH_CTF=1 set, ctfmerge will not have
the -g flag set. In this case, the cc has -g specified, so the
.o files will have debug information generated, but since ctfmerge
does not have -g set, it will strip out the ELF sections containing
the DWARF debugging info, leading to a kernel without debugging symbols.
Luigi Rizzo [Wed, 14 Jan 2009 21:31:09 +0000 (21:31 +0000)]
Another change from Christoph:
replace the table of partition with a simpler and faster array of strings.
The change in the array is done mechanically, using vi commands.
Most entries in the table are probably 15+ years old and largely outdated,
so the next step is to remove stale entries with more current values.
Submitted by: Christoph Mallon, with small changes from me
MFC after: 3 days
o Move $FreeBSD$ from comment to __FBSDID macro
o Be a bit more verbose about CPU type during boot process (print
manufacturer, chip info, MMU and cache parameters)