]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoMFV of tzdata2009a
Edwin Groothuis [Thu, 22 Jan 2009 11:24:42 +0000 (11:24 +0000)]
MFV of tzdata2009a

- Asia/Katmandu -> Asia/Kathmandu
- Fix historical references to DST in Switzerland
- Correct rules for America/Resolute (Nunavut)
- Cuba didn't have DST in 2005.

MFC after: 1 week

15 years agoVendor import of tzdata2009a:
Edwin Groothuis [Thu, 22 Jan 2009 11:21:03 +0000 (11:21 +0000)]
Vendor import of tzdata2009a:

- Asia/Katmandu -> Asia/Kathmandu
- Fix historical references to DST in Switzerland
- Correct rules for America/Resolute (Nunavut)
- Cuba didn't have DST in 2005.

15 years agoAdd externs to fix build with VIMAGE_GLOBALS after r187289.
Bjoern A. Zeeb [Thu, 22 Jan 2009 10:29:09 +0000 (10:29 +0000)]
Add externs to fix build with VIMAGE_GLOBALS after r187289.

15 years agoDocument the "-U" option. While it is not part of the
Tom Rhodes [Thu, 22 Jan 2009 08:29:39 +0000 (08:29 +0000)]
Document the "-U" option.  While it is not part of the
getopt(), it is accepted through smb_ctx_init() in
lib/smb/ctx.c.

PR: 117013
Submitted by: Tom Evans <tevans.uk@googlemail.com> (original version)

15 years agoAdd support for multibyte thousands_sep encodings, e.g., U+066C.
David Schultz [Thu, 22 Jan 2009 08:14:28 +0000 (08:14 +0000)]
Add support for multibyte thousands_sep encodings, e.g., U+066C.
The integer thousands' separator code is rewritten in order to
avoid having to preallocate a buffer for the largest possible
digit string with the most possible instances of the longest
possible multibyte thousands' separator. The new version inserts
thousands' separators for integers using the same code as floating point.

15 years ago - Update my copyright.
Jeff Roberson [Thu, 22 Jan 2009 06:21:30 +0000 (06:21 +0000)]
 - Update my copyright.
 - Print human readable time as a float with two digits of precision.  Use
   ns now as well since clock periods are well into the hundreds of
   picoseconds now.
 - Show the average duration in the stats frame.  This is often more useful
   than total duration.

15 years agoRename sc_is_pseudo to sc_nobulk member in ufoma_softc.
Takanori Watanabe [Thu, 22 Jan 2009 05:05:56 +0000 (05:05 +0000)]
Rename sc_is_pseudo to sc_nobulk member in ufoma_softc.
That was pseudo ucom because it used home brew tty interface.
Now, it is integrated to usb serial framework, so it is not pseudo
ucom any more.

15 years agoAdd locking to ppc and ppbus and mark the whole lot MPSAFE:
John Baldwin [Wed, 21 Jan 2009 23:10:06 +0000 (23:10 +0000)]
Add locking to ppc and ppbus and mark the whole lot MPSAFE:
- To avoid having a bunch of locks that end up always getting acquired as
  a group, give each ppc(4) device a mutex which it shares with all the
  child devices including ppbus(4), lpt(4), plip(4), etc.  This mutex
  is then used for all the locking.
- Rework the interrupt handling stuff yet again.  Now ppbus drivers setup
  their interrupt handler during attach and tear it down during detach
  like most other drivers.  ppbus(4) only invokes the interrupt handler
  of the device that currently owns the bus (if any) when an interrupt
  occurs, however.  Also, interrupt handlers in general now accept their
  softc pointers as their argument rather than the device_t.  Another
  feature of the ppbus interrupt handlers is that they are called with
  the parent ppc device's lock already held.  This minimizes the number
  of lock operations during an interrupt.
- Mark plip(4), lpt(4), pcfclock(4), ppi(4), vpo(4) MPSAFE.
- lpbb(4) uses the ppc lock instead of Giant.
- Other plip(4) changes:
  - Add a mutex to protect the global tables in plip(4) and free them on
    module unload.
  - Add a detach routine.
  - Split out the init/stop code from the ioctl routine into separate
    functions.
- Other lpt(4) changes:
  - Use device_printf().
  - Use a dedicated callout for the lptout timer.
  - Allocate the I/O buffers at attach and detach rather than during
    open and close as this simplifies the locking at the cost of
    1024+32 bytes when the driver is attached.
- Other ppi(4) changes:
  - Use an sx lock to serialize open and close.
  - Remove unused HADBUS flag.
  - Add a detach routine.
  - Use a malloc'd buffer for each read and write to avoid races with
    concurrent read/write.
- Other pps(4) changes:
  - Use a callout rather than a callout handle with timeout().
  - Conform to the new ppbus requirements (regular mutex, non-filter
    interrupt handler).  pps(4) is probably going to have to become a
    standalone driver that doesn't use ppbus(4) to satisfy it's
    requirements for low latency as a result.
  - Use an sx lock to serialize open and close.
- Other vpo(4) changes:
  - Use the parent ppc device's lock to create the CAM sim instead of
    Giant.
- Other ppc(4) changes:
  - Fix ppc_isa's detach method to detach instead of calling attach.

Tested by:   no one :-(

15 years ago- Document targets run-depends-list and build-depends-list
Thomas Abthorpe [Wed, 21 Jan 2009 21:29:00 +0000 (21:29 +0000)]
- Document targets run-depends-list and build-depends-list

PR: docs/127575
Submitted by: Walter Venable <walt relnor.com>
Approved by: keramida
MFC after: 3 days

15 years agoAdd the dresden elektronik SensorTerminalBoard which uses an FT245.
Joerg Wunsch [Wed, 21 Jan 2009 20:57:28 +0000 (20:57 +0000)]
Add the dresden elektronik SensorTerminalBoard which uses an FT245.

15 years agoChange __FreeBSD_version to prepare for merging r184102.
Jung-uk Kim [Wed, 21 Jan 2009 20:44:42 +0000 (20:44 +0000)]
Change __FreeBSD_version to prepare for merging r184102.

15 years agoFix a few style bogons.
John Baldwin [Wed, 21 Jan 2009 20:08:17 +0000 (20:08 +0000)]
Fix a few style bogons.

Submitted by: bde

15 years agoAdd Unicode rendering to the teken demo application.
Ed Schouten [Wed, 21 Jan 2009 19:43:10 +0000 (19:43 +0000)]
Add Unicode rendering to the teken demo application.

Some time ago I tried adding Unicode rendering to the teken demo
application, but I didn't get it working. It seems I forgot to call
setlocale(). Polish this code and make sure it doesn't get lost.

Also a small fix for my previous commit: all Unicode characters in
teken_boxdrawing are below 0x10000, so store them as 16-bit values.

15 years agoDefault to normal bus timing mode on SD cards. In practice, most
Warner Losh [Wed, 21 Jan 2009 17:49:23 +0000 (17:49 +0000)]
Default to normal bus timing mode on SD cards.  In practice, most
cards people have today support high speed mode, so the timing field
would be initialized to bus_timing_hs, but there are some slow
cards...

15 years agoo The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
Warner Losh [Wed, 21 Jan 2009 17:39:11 +0000 (17:39 +0000)]
o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
o Only set 4-bit caps on those boards that have 4-bit caps (this means that
  because we don't set wire4 yet, this forces us to always use 1-bit bus).
o Don't test wire4 when setting up the bus width, since bad things will
  happen if we do.

# This likely won't fix the busted at91 sd card support, but these are
# needful changes for correctness.

15 years agoFix minor style nit for file consistency.
Warner Losh [Wed, 21 Jan 2009 17:34:14 +0000 (17:34 +0000)]
Fix minor style nit for file consistency.

15 years agoMake the command reporting be under boot verbose.
Warner Losh [Wed, 21 Jan 2009 17:28:24 +0000 (17:28 +0000)]
Make the command reporting be under boot verbose.
Also, report a few other things under boot verbose.
Small style nit to make new code look like old code in this file.

15 years agoMove the code from ufs_lookup.c used to do dotdot lookup, into
Konstantin Belousov [Wed, 21 Jan 2009 14:51:38 +0000 (14:51 +0000)]
Move the code from ufs_lookup.c used to do dotdot lookup, into
the helper function. It is supposed to be useful for any filesystem
that has to unlock dvp to walk to the ".." entry in lookup routine.

Requested by: jhb
Tested by: pho
MFC after: 1 month

15 years agoNow that vfs_markatime() no longer requires an exclusive lock due to
John Baldwin [Wed, 21 Jan 2009 14:43:35 +0000 (14:43 +0000)]
Now that vfs_markatime() no longer requires an exclusive lock due to
the VOP_MARKATIME() changes, use a shared vnode lock for mmap().

Submitted by: ups

15 years agoMove the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
John Baldwin [Wed, 21 Jan 2009 14:42:00 +0000 (14:42 +0000)]
Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME
can be performed while holding a shared vnode lock (the same functionality
is done internally by VOP_READ which can run with a shared vnode lock).
Add missing locking of the vnode interlock to the ufs implementation and
remove a special note and test from the NFS client about not supporting the
feature.

Inspired by: ups
Tested by: pho

15 years agoFix copy/paste mistake in variable name. This could lead to using incorrect
Alexander Motin [Wed, 21 Jan 2009 14:22:06 +0000 (14:22 +0000)]
Fix copy/paste mistake in variable name. This could lead to using incorrect
bus frequency.

15 years agoLatest bulletin C from Daniel GAMBIS: no leap at the end of june 2009.
Poul-Henning Kamp [Wed, 21 Jan 2009 10:51:54 +0000 (10:51 +0000)]
Latest bulletin C from Daniel GAMBIS: no leap at the end of june 2009.

15 years agoMerge-from-Googlecode r419
Tim Kientzle [Wed, 21 Jan 2009 06:55:27 +0000 (06:55 +0000)]
Merge-from-Googlecode r419

In archive_write_disk:  If archive_write_header() fails to create
the file, that's a failure and should return ARCHIVE_FAILED.
Metadata restore failures still return ARCHIVE_WARN, because
that's non-critical.  Fix test_write_disk_secure test to
verify the correct return code in one case; add test_write_disk_failures
to do another very simple test of restore failure.

This should fix cpio coredumping when it tries to restore to
a write-protected directory.

Thanks to: Giorgos Keramidas
MFC after: 30 days

15 years agoAdd functions WITNESS so it can be asserted that the lock is not released for a
Andrew Thompson [Wed, 21 Jan 2009 04:19:18 +0000 (04:19 +0000)]
Add functions WITNESS so it can be asserted that the lock is not released for a
section of code, this uses WITNESS_NORELEASE() and WITNESS_RELEASEOK() to mark
the boundaries. Both functions require the lock to be held when calling.

This is intended for scenarios like a bus asserting that the bus lock is not
dropped during a driver call. There doesn't appear to be a man page to
document this in.

Reviewed by: jhb

15 years agocorrect typo that left programmed sifs time in the slot time
Sam Leffler [Wed, 21 Jan 2009 02:53:00 +0000 (02:53 +0000)]
correct typo that left programmed sifs time in the slot time
(to be applied on subsequent resets)

Submitted by: Jiri Fojtasek <jiri.fojtasek@hlohovec.net>

15 years agoFix typo in comment
Maksim Yevmenkin [Tue, 20 Jan 2009 23:25:27 +0000 (23:25 +0000)]
Fix typo in comment

Pointed out by: Daan Vreeken / Daan at vehosting dot nl

15 years agoRename option 'C' to 'D' (damaged) in order to avoid a conflict with upcoming
Xin LI [Tue, 20 Jan 2009 22:49:49 +0000 (22:49 +0000)]
Rename option 'C' to 'D' (damaged) in order to avoid a conflict with upcoming
Juniper 'C' (clean) flag.

Requested by: obrien
MFC after: 1 week

15 years agoCheck for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
Alexander Motin [Tue, 20 Jan 2009 22:26:09 +0000 (22:26 +0000)]
Check for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
Mark packets with mbuf_tag on first interface passage and drop on second.

PR: ports/129625, ports/125303,
MFC after: 2 weeks

15 years agoUpdate (well, actually rewrite mostly) ng_ubt2 driver for USB2.
Maksim Yevmenkin [Tue, 20 Jan 2009 22:17:05 +0000 (22:17 +0000)]
Update (well, actually rewrite mostly) ng_ubt2 driver for USB2.

Reviewed by: HPS, alfred
Blessed by: HPS

15 years agoThe r187467 should remove all pages for V_NORMAL case too, because
Konstantin Belousov [Tue, 20 Jan 2009 22:00:19 +0000 (22:00 +0000)]
The r187467 should remove all pages for V_NORMAL case too, because
indirect block pages are not removed by the mentioned invocation of
the vnode_pager_setsize().

Put a common code into the helper function ffs_pages_remove().

Reported and tested by: dchagin
Reviewed by: ups
MFC after: 3 weeks

15 years agoDont assume $MACHINE is set, this breaks for regular builds.
Andrew Thompson [Tue, 20 Jan 2009 21:37:41 +0000 (21:37 +0000)]
Dont assume $MACHINE is set, this breaks for regular builds.

Reported by: pho

15 years ago- Add support for 8110SCe part. Some magic registers were taken from
Jung-uk Kim [Tue, 20 Jan 2009 20:22:28 +0000 (20:22 +0000)]
- Add support for 8110SCe part.  Some magic registers were taken from
Linux driver.
- Swap hardware revisions for 8110S and 8169S as Linux driver claims.

Reviewed by: yongari (early version)

15 years agoRetire RL_FLAG_INVMAR bit to match its comment and reality.
Jung-uk Kim [Tue, 20 Jan 2009 20:04:09 +0000 (20:04 +0000)]
Retire RL_FLAG_INVMAR bit to match its comment and reality.

15 years ago- Do not read and write RX configuration register multiple times.
Jung-uk Kim [Tue, 20 Jan 2009 19:58:01 +0000 (19:58 +0000)]
- Do not read and write RX configuration register multiple times.
- Always program RX configuration register from scratch instead of
doing read/modify/write.
- Rename re_setmulti() to re_set_rxmode() to be reflect reality.
- Simplify hash filter logic a little while I am here.

Reviewed by: yongari (early version)

15 years agoFix a number of (innocuous) warnings, and remove a useless test.
Luigi Rizzo [Tue, 20 Jan 2009 18:16:31 +0000 (18:16 +0000)]
Fix a number of (innocuous) warnings, and remove a useless test.
There are still several signed/unsigned warnings left, which
require a bit more study for a proper fix.

This file has grown beyond reasonable limits.

We really need to split it into separate components (ipv4, ipv6,
dummynet, nat, table, userland-kernel communication ...) so we can
make mainteinance easier.

MFC after: 1 weeks

15 years agoImplement MMCBR_IVAR_CAPS. It should better be implemented, or results
Alexander Motin [Tue, 20 Jan 2009 17:36:58 +0000 (17:36 +0000)]
Implement MMCBR_IVAR_CAPS. It should better be implemented, or results
can be unpredictable.

PR: arm/128987

15 years agoRemove inlining of functions that are used mostly in different object files.
Roman Divacky [Tue, 20 Jan 2009 17:15:12 +0000 (17:15 +0000)]
Remove inlining of functions that are used mostly in different object files.
This gets rid of gnu89 style inlining. Also silence gcc by assigning two
variables NULL. This lets use to remove NO_WERROR.

Approved by: kib (mentor)
Approved by: harti

15 years agoAdd a comment explaining why the "bufwait" / "dirhash" LOR reported by
John Baldwin [Tue, 20 Jan 2009 16:35:34 +0000 (16:35 +0000)]
Add a comment explaining why the "bufwait" / "dirhash" LOR reported by
WITNESS will not actually result in a deadlock.

Discussed with: kib
MFC after: 1 week

15 years agoFix a race condition in kiic(4) made possible by the way the device's STOP
Nathan Whitehorn [Tue, 20 Jan 2009 14:09:12 +0000 (14:09 +0000)]
Fix a race condition in kiic(4) made possible by the way the device's STOP
condition is sent. We used to put the bus in the STOP state, but returned
without waiting for that to actually occur.

Submitted by: Marco Trillo

15 years agoSet the wrong softc size when defining the ofw_iicbus class. Change it to
Nathan Whitehorn [Tue, 20 Jan 2009 14:06:30 +0000 (14:06 +0000)]
Set the wrong softc size when defining the ofw_iicbus class. Change it to
the correct value.

15 years ago - Permit timestamps to be as far as 2048 ticks apart before we complain
Jeff Roberson [Tue, 20 Jan 2009 12:33:04 +0000 (12:33 +0000)]
 - Permit timestamps to be as far as 2048 ticks apart before we complain
   about invalid timestamps.  Nehalem CPUs seem to be synchronized but only
   within a fraction of a microsecond.
 - Make the Counter code more flexible to poor timestamps.  In general we
   now complain a lot but render as much as we can.
 - Change the scaler behavior so it works better with very long and very
   short traces.  We now set the maximum scale such that it properly
   displays the entire file by default and doesn't permit zooming out
   beyond the file.  This improves other awkward navigation behavior.
   The interval is now set very small which can't be achieved by simply
   dragging the mouse.  Clicking to the left of or right of the scaler bar
   will produce increments of a single, very small, interval now.

Sponsored by:   Nokia

15 years agoThe context switch to the 32bit binary does not properly restore
Konstantin Belousov [Tue, 20 Jan 2009 12:07:49 +0000 (12:07 +0000)]
The context switch to the 32bit binary does not properly restore
the fsbase value. The switch loads the fs segment register, that
invalidates the value in fsbase msr, thus value in %r9 can not be
considered the current value for fsbase anymore.

Unconditionally reload fsbase when switching to 32bit binary.

PR: 130526
MFC after: 3 weeks

15 years agoProperly implement the VT100 SCS sequences in xterm-mode.
Ed Schouten [Tue, 20 Jan 2009 11:34:28 +0000 (11:34 +0000)]
Properly implement the VT100 SCS sequences in xterm-mode.

Even though VT100-like devices can display non-ASCII characters, they do
not use an 8-bit character set. Special escape sequences allow the VT100
to switch character maps. The special graphics character set stores the
box drawing characters, starting at 0x60, ending at 0x7e. This means
we now pass the character map tests in vttest, even the save/restore
cursor test, combined with character maps. dialog(1) also works a lot
better now.

This commit also includes some other minor fixes:

- Default to 24 lines in teken_demo when using xterm emulation.
- Make white foreground and background work in teken_demo.

15 years agoWhen extending inode size, we call vnode_pager_setsize(), to have a
Konstantin Belousov [Tue, 20 Jan 2009 11:30:22 +0000 (11:30 +0000)]
When extending inode size, we call vnode_pager_setsize(), to have a
address space where to put vnode pages, and then call UFS_BALLOC(),
to actually allocate new block and map it. When UFS_BALLOC() returns
error, sometimes we forget to revert the vm object size increase,
allowing for the pages that are not backed by the logical disk blocks.

Revert vnode_pager_setsize() back when UFS_BALLOC() failed, for
ffs_truncate() and ffs_write().

PR: 129956
Reviewed by: ups
MFC after: 3 weeks

15 years agoFFS puts the extended attributes blocks at the negative blocks for the
Konstantin Belousov [Tue, 20 Jan 2009 11:27:45 +0000 (11:27 +0000)]
FFS puts the extended attributes blocks at the negative blocks for the
vnode, from -1 down. When vinvalbuf(vp, V_ALT) is done for the vnode, it
incorrectly does vm_object_page_remove(0, 0), removing all pages from
the underlying vm object, not only the pages that back the extended
attributes data.

Change vinvalbuf() to not remove any pages from the object when
V_NORMAL or V_ALT are specified. Instead, the only in-tree caller
in ffs_inode.c:ffs_truncate() that specifies V_ALT explicitely
removes the corresponding page range. The V_NORMAL caller
does vnode_pager_setsize(vp, 0) immediately after the call to
vinvalbuf(V_NORMAL) already.

Reported by: csjp
Reviewed by: ups
MFC after: 3 weeks

15 years agoAdd a limit on namecache entries.
Stephen McKay [Tue, 20 Jan 2009 04:21:21 +0000 (04:21 +0000)]
Add a limit on namecache entries.

In normal operation, the number of cache entries is roughly equal to the
number of active vnodes.  However, when most of the recently accessed
vnodes have many hard links, the number of cache entries can be 32000
times as large, exhausting kernel memory and provoking a panic in
kmem_malloc().

MFC after: 2 weeks

15 years agoTone down warning about the quality of the NTFS VFS module. It appears that
Maxim Sobolev [Tue, 20 Jan 2009 02:08:21 +0000 (02:08 +0000)]
Tone down warning about the quality of the NTFS VFS module. It appears that
not all developers share luigi opinion about quality of sysutils/fusefs-ntfs
compared to our kernel NTFS module.

15 years agoChange the probe priority for PCI and I2C generic bus modules from
Nathan Whitehorn [Tue, 20 Jan 2009 00:05:43 +0000 (00:05 +0000)]
Change the probe priority for PCI and I2C generic bus modules from
numerical constants to BUS_PROBE_GENERIC.

Suggested by: jhb

15 years agoProvide a device description for macio-attached ATA cells.
Nathan Whitehorn [Mon, 19 Jan 2009 23:25:18 +0000 (23:25 +0000)]
Provide a device description for macio-attached ATA cells.

15 years agoProperly return error code to the caller. This should fix the following
Maksim Yevmenkin [Mon, 19 Jan 2009 22:06:35 +0000 (22:06 +0000)]
Properly return error code to the caller. This should fix the following
panic in ng_l2cap(4).

panic: ng_l2cap_l2ca_con_req: ubt0l2cap - could not find connection!

While i'm here get rid of few goto's.

MFC after: 1 week

15 years agoSet the pipe pointer before calling usbd_transfer() as its possible for the
Andrew Thompson [Mon, 19 Jan 2009 21:22:10 +0000 (21:22 +0000)]
Set the pipe pointer before calling usbd_transfer() as its possible for the
xfer callback to be invoked on error.

MFC after: 2 weeks

15 years agoAdd two more nVidia HDMI codec IDs.
Alexander Motin [Mon, 19 Jan 2009 19:16:50 +0000 (19:16 +0000)]
Add two more nVidia HDMI codec IDs.

15 years agore-enable wi: was accidentally disabled in r1.502
Sam Leffler [Mon, 19 Jan 2009 17:20:09 +0000 (17:20 +0000)]
re-enable wi: was accidentally disabled in r1.502

15 years agoMention removal of NTFS from GENERIC/amd64.
Maxim Sobolev [Mon, 19 Jan 2009 17:00:42 +0000 (17:00 +0000)]
Mention removal of NTFS from GENERIC/amd64.

15 years agoMention the fact that the NTFS kernel support isn't
Maxim Sobolev [Mon, 19 Jan 2009 16:19:53 +0000 (16:19 +0000)]
Mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.

Suggested by: luigi
MFC after: 2 weeks

15 years agoIn the CAVEATS section mention the fact that the NTFS kernel support isn't
Maxim Sobolev [Mon, 19 Jan 2009 15:59:05 +0000 (15:59 +0000)]
In the CAVEATS section mention the fact that the NTFS kernel support isn't
very well maintained and point user to sysutils/fusefs-ntfs, which
at the time of this writing seems to be a better alternative.

Suggested by: luigi

MFC after: 2 weeks

15 years agoTake NTFS option out to match i386 GENERIC.
Maxim Sobolev [Mon, 19 Jan 2009 15:33:06 +0000 (15:33 +0000)]
Take NTFS option out to match i386 GENERIC.

Suggested by: phk, luigi

15 years agoasr(4) is not amd64-clean, not amr(4).
Maxim Sobolev [Mon, 19 Jan 2009 08:51:20 +0000 (08:51 +0000)]
asr(4) is not amd64-clean, not amr(4).

Pointy hat to: myself
Submitted by: scottl

15 years agoComment amr(4) out - according to scottl it's not 64-bit clean.
Maxim Sobolev [Mon, 19 Jan 2009 08:25:41 +0000 (08:25 +0000)]
Comment amr(4) out - according to scottl it's not 64-bit clean.

15 years agoWhitespace-only: reduce diff to the i386 GENERIC.
Maxim Sobolev [Mon, 19 Jan 2009 07:18:32 +0000 (07:18 +0000)]
Whitespace-only: reduce diff to the i386 GENERIC.

15 years agoAdd asr(4) and stge(4) from i386 GENERIC. Both drivers compile on amd64 and
Maxim Sobolev [Mon, 19 Jan 2009 07:10:11 +0000 (07:10 +0000)]
Add asr(4) and stge(4) from i386 GENERIC. Both drivers compile on amd64 and
there is no particular reason for them to be i386-only.

MFC after: 2 weeks

15 years ago- Add support for multibyte decimal_point encodings, e.g., U+066B.
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.

15 years agoAdd support for multibyte decimal_point encodings, e.g., U+066B.
David Schultz [Mon, 19 Jan 2009 06:19:38 +0000 (06:19 +0000)]
Add support for multibyte decimal_point encodings, e.g., U+066B.

15 years agoSometimes RTL8168B seems to take long time to access GMII registers
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.

Reported by: wkoszek
Tested by: wkoszek

15 years agoAlso strip the machine arch from SRCDIR in case it is a cross build so
Andrew Thompson [Sun, 18 Jan 2009 23:21:04 +0000 (23:21 +0000)]
Also strip the machine arch from SRCDIR in case it is a cross build so
svnversion works.

15 years agoIf source mbuf chain consists of only one mbuf, use it directly as source
Alexander Motin [Sun, 18 Jan 2009 21:09:34 +0000 (21:09 +0000)]
If source mbuf chain consists of only one mbuf, use it directly as source
buffer to avoid extra copying.

15 years agoTeach m_copyback() to use trailing space of the last mbuf in chain.
Alexander Motin [Sun, 18 Jan 2009 20:19:55 +0000 (20:19 +0000)]
Teach m_copyback() to use trailing space of the last mbuf in chain.

15 years agoUse m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
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.

15 years ago- Eliminate warnings in debug print macros by explicitly converting all
Stanislav Sedov [Sun, 18 Jan 2009 15:10:46 +0000 (15:10 +0000)]
- Eliminate warnings in debug print macros by explicitly converting all
  field to unsigned long.

15 years ago- Whitespace fixes.
Stanislav Sedov [Sun, 18 Jan 2009 14:54:46 +0000 (14:54 +0000)]
- Whitespace fixes.
- s_bmask field doesn't exist.
- Use correct flags in debug printf.

15 years ago- Obtain inode sizes and location of the first inode based on the contents
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.

Submitted by: Alex Lyashkov <Alexey.Lyashkov@Sun.COM> (based on)
MFC after: 2 weeks

15 years agoAdjust the padding of struct pcpu to r187357.
Marius Strobl [Sun, 18 Jan 2009 13:04:38 +0000 (13:04 +0000)]
Adjust the padding of struct pcpu to r187357.

15 years agoRemove strict limitation on minimal multilink MRRU. RFC claims that MRRU
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.

MFC after: 2 weeks

15 years agoFix regression introduced in rev. 173124:
Alexander Motin [Sun, 18 Jan 2009 11:38:35 +0000 (11:38 +0000)]
Fix regression introduced in rev. 173124:
0.0.0.0/1 is not the same as 0.0.0.0/0.

MFC after: 1 month

15 years agoDon't forget to mark the color translation array as const.
Ed Schouten [Sun, 18 Jan 2009 09:44:33 +0000 (09:44 +0000)]
Don't forget to mark the color translation array as const.

Spotted by: Christoph Mallon <christoph mallon gmx de>

15 years agoCorrect an error in revision 1.170 of this file. When get_pv_entry() is
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.

15 years agoremove too noisy DIAGNOSTIC code
Sam Leffler [Sun, 18 Jan 2009 07:20:02 +0000 (07:20 +0000)]
remove too noisy DIAGNOSTIC code

Reviewed by: qingli

15 years ago - Add summary information to the title once the file is parsed rather than
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.

15 years agoJust put the ifnet pointer first in the softc like it needs to be rather than
Andrew Thompson [Sun, 18 Jan 2009 05:35:58 +0000 (05:35 +0000)]
Just put the ifnet pointer first in the softc like it needs to be rather than
adding another deliciously evil pointer.

15 years ago - Significantly speedup hiding and displaying multiple rows by writing an
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.

15 years agoAdd support for CMedia CMI120.
Giorgos Keramidas [Sun, 18 Jan 2009 04:29:42 +0000 (04:29 +0000)]
Add support for CMedia CMI120.

PR: kern/123640
Approved by: ariff
MFC after: 2 weeks

15 years agoFix for my previous commit: color mapping is not 1:1.
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.

15 years agoMake vidcontrol's color setting work again.
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.

Reported by: mgp (forums)

15 years agoFix typo
Poul-Henning Kamp [Sat, 17 Jan 2009 21:31:47 +0000 (21:31 +0000)]
Fix typo

Spotted by: juli

15 years agoRelease the evil twin of nanobsd.sh: sysbuild.sh
Poul-Henning Kamp [Sat, 17 Jan 2009 20:30:06 +0000 (20:30 +0000)]
Release the evil twin of nanobsd.sh: sysbuild.sh

quoth the README:

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.

15 years agoWhen f[w]printf() is called on an unbuffered file like stdout, it
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.)

15 years agoConvert battery capacity/rate from mA to mW only when summary is requested.
Alexander Motin [Sat, 17 Jan 2009 17:40:44 +0000 (17:40 +0000)]
Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf.

MFC after: 2 weeks

15 years agoAllow experimental libteken features to be tested without changing code.
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.

Requested by: kib

15 years agoFix handling of pts(4) device names in comsat(8). Also catch fork() errors.
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"

Reported by: Robert Huff <roberthuff rcn com>

15 years agos,unmount 8,umount 8, it is unmount(2) which I did not mean.
Bjoern A. Zeeb [Sat, 17 Jan 2009 14:52:26 +0000 (14:52 +0000)]
s,unmount 8,umount 8, it is unmount(2) which I did not mean.

Submitted by: pluknet@gmail.com
MFC after: 1 week

15 years agoThe FTP_TIMEOUT and HTTP_TIMEOUT environment variables were ignored because
Dag-Erling Smørgrav [Sat, 17 Jan 2009 13:34:56 +0000 (13:34 +0000)]
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

15 years agoBail on ENXIO, you won't get any further any way.
Poul-Henning Kamp [Sat, 17 Jan 2009 11:57:32 +0000 (11:57 +0000)]
Bail on ENXIO, you won't get any further any way.

Submitted by: tobez

15 years ago - Add a new source configuration menu option that allows hiding and
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.

15 years ago - Rewrite the parser to support the new generic schedgraph interface.
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.

15 years ago - Implement generic macros for producing KTR records that are compatible
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

15 years agoSimplify printf's inlined output buffering routines. On amd64, this
David Schultz [Sat, 17 Jan 2009 05:38:14 +0000 (05:38 +0000)]
Simplify printf's inlined output buffering routines. On amd64, this
reduces the code size by about 10% and improves performance slightly.

15 years agoDisable decoding of BARs by devices before we trash the value in the BAR
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.

Sleuthing by:  tegge
MFC after:     1 week

15 years agoCorrect the sense of the "use32" terenary operator so that it uses
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.

MFC after: 1 month

15 years agoexport PSB frequencies
Sam Leffler [Fri, 16 Jan 2009 20:44:45 +0000 (20:44 +0000)]
export PSB frequencies

15 years agorevert r187343
Sam Leffler [Fri, 16 Jan 2009 20:42:43 +0000 (20:42 +0000)]
revert r187343