]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoUpdate termcap entries for xterm.
ed [Thu, 10 Dec 2009 22:25:53 +0000 (22:25 +0000)]
Update termcap entries for xterm.

It turns out these entries do make Terminal.app behave a little better.
According to Thomas Dickey, Terminal.app should use TERM=nsterm anyway,
but we don't support this yet. Already having an improved termcap entry
helps, so I am going to MFC this change after all.

Suggested by: Leonidas Tsampros <ltsampros upnet gr>
MFC after: 1 month

14 years agoAdd a missing else that negated the truncation of ki_ngroups to
brooks [Thu, 10 Dec 2009 21:16:16 +0000 (21:16 +0000)]
Add a missing else that negated the truncation of ki_ngroups to
NGROUPS.

Submitted by: Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>

14 years agouse div64 when converting back the burst value for userland
luigi [Thu, 10 Dec 2009 18:37:14 +0000 (18:37 +0000)]
use div64 when converting back the burst value for userland

14 years agowhen draining a flowset free the entire chain, not just one packet.
luigi [Thu, 10 Dec 2009 18:34:07 +0000 (18:34 +0000)]
when draining a flowset free the entire chain, not just one packet.

14 years agoAdd module dependency for cam if configured as ATA_CAM.
takawata [Thu, 10 Dec 2009 16:55:16 +0000 (16:55 +0000)]
Add module dependency for cam if configured as ATA_CAM.

14 years agocentralize the code to free a packet (or a chain) while in dummynet.
luigi [Thu, 10 Dec 2009 15:17:34 +0000 (15:17 +0000)]
centralize the code to free a packet (or a chain) while in dummynet.
Remove an old macro and its stale comment.

14 years agoDon't warn about an RSDP with a corrupt checksum. The kernel does a better
jhb [Thu, 10 Dec 2009 14:54:29 +0000 (14:54 +0000)]
Don't warn about an RSDP with a corrupt checksum.  The kernel does a better
job about warning about these things later and this message can be
confusing.

Submitted by: infofarmer
MFC after: 1 week

14 years agoRecord part of history I participated in.
kib [Thu, 10 Dec 2009 14:41:47 +0000 (14:41 +0000)]
Record part of history I participated in.

No objections from: ed, pho

14 years agoNo functional changes (who dares to touch this code!) but:
luigi [Thu, 10 Dec 2009 10:34:30 +0000 (10:34 +0000)]
No functional changes (who dares to touch this code!) but:

- cast the result of LEN() to int as this is the main usage.
- use LEN() in one place where it was forgotten.
- Document the use of a static variable in rw mode.

More small changes to follow.

MFC after: 7 days

14 years agoLimit maximum I/O size, depending on command set supported by device.
mav [Thu, 10 Dec 2009 09:26:56 +0000 (09:26 +0000)]
Limit maximum I/O size, depending on command set supported by device.
It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
Same is done in ada(4).

14 years agofor PV XEN translate page table entries from machine (real) to physical (logical...
kmacy [Thu, 10 Dec 2009 07:48:47 +0000 (07:48 +0000)]
for PV XEN translate page table entries from machine (real) to physical (logical) addresses so that kgdb can
translate them to the correct coredump offsets

14 years agoMerge two cpio fixes from libarchive.googlecode.com:
kientzle [Thu, 10 Dec 2009 06:42:28 +0000 (06:42 +0000)]
Merge two cpio fixes from libarchive.googlecode.com:
 1) Avoid an infinite loop in the header resync for certain malformed
    archives.
 2) Don't try to match hardlinks if the nlinks count is < 2.   This
    reduces the likelihood of a false hardlink match due to ino truncation.

MFC after: 7 days

14 years ago- revert pmap_kenter_temporary to taking a physical address
kmacy [Thu, 10 Dec 2009 03:09:35 +0000 (03:09 +0000)]
- revert pmap_kenter_temporary to taking a physical address
- make minidump work

14 years agoSimplify arena_run_reg_dalloc(), and remove a bug that was due to incorrect
jasone [Thu, 10 Dec 2009 02:51:40 +0000 (02:51 +0000)]
Simplify arena_run_reg_dalloc(), and remove a bug that was due to incorrect
initialization of ssize_invs.

14 years agoImplement a rudimentary suspend/resume methods for PCI P2P bridge.
jkim [Thu, 10 Dec 2009 01:01:53 +0000 (01:01 +0000)]
Implement a rudimentary suspend/resume methods for PCI P2P bridge.

Reviewed by: jhb, imp

14 years agoFix the posix_memalign() changes in r196861 to actually return a NULL pointer
jasone [Thu, 10 Dec 2009 00:16:11 +0000 (00:16 +0000)]
Fix the posix_memalign() changes in r196861 to actually return a NULL pointer
as intended.

PR: standards/138307

14 years agoAdd my birthday.
gavin [Wed, 9 Dec 2009 22:03:57 +0000 (22:03 +0000)]
Add my birthday.

Approved by: ed (mentor)

14 years agoFor some buses, devices may have active resources assigned even though they
jhb [Wed, 9 Dec 2009 21:52:53 +0000 (21:52 +0000)]
For some buses, devices may have active resources assigned even though they
are not allocated by the device driver.  These resources should still appear
allocated from the system's perspective so that their assigned ranges are
not reused by other resource requests.  The PCI bus driver has used a hack
to effect this for a while now where it uses rman_set_device() to assign
devices to the PCI bus when they are first encountered and later assigns
them to the actual device when a driver allocates a BAR.  A few downsides of
this approach is that it results in somewhat confusing devinfo -r output as
well as not being very easily portable to other bus drivers.

This commit adds generic support for "reserved" resources to the resource
list API used by many bus drivers to manage the resources of child devices.
A resource may be reserved via resource_list_reserve().  This will allocate
the resource from the bus' parent without activating it.
resource_list_alloc() recognizes an attempt to allocate a reserved resource.
When this happens it activates the resource (if requested) and then returns
the reserved resource.  Similarly, when a reserved resource is released via
resource_list_release(), it is deactivated (if it is active) and the
resource is then marked reserved again, but is left allocated from the
bus' parent.  To completely remove a reserved resource, a bus driver may
use resource_list_unreserve().  A bus driver may use resource_list_busy()
to determine if a reserved resource is allocated by a child device or if
it can be unreserved.

The PCI bus driver has been changed to use this framework instead of
abusing rman_set_device() to keep track of reserved vs allocated resources.

Submitted by: imp (an older version many moons ago)
MFC after: 1 month

14 years agoAdd myself, and show ed@ as my mentor.
gavin [Wed, 9 Dec 2009 21:39:43 +0000 (21:39 +0000)]
Add myself, and show ed@ as my mentor.

Approved by: ed (mentor)

14 years agoAdd missing relation between philip and I.
ed [Wed, 9 Dec 2009 21:18:56 +0000 (21:18 +0000)]
Add missing relation between philip and I.

It seems I forgot this when I became a committer last year.

14 years agoFix a confusing typo in the EDD packet structure used in gptboot and
jhb [Wed, 9 Dec 2009 21:09:32 +0000 (21:09 +0000)]
Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot.  I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.

MFC after: 1 week

14 years ago- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
jhb [Wed, 9 Dec 2009 20:36:56 +0000 (20:36 +0000)]
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
  safely allocate a heap region above 1MB.  This enables {gpt,}zfsboot()
  to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers.  This
  allows more reliable reading of compressed files in a raidz/raidz2 pool.

Submitted by: Matt Reimer  mattjreimer of gmail
MFC after: 1 week

14 years agoFix hardware issue with FTDI chips: avoid sending a zero length packet due to
thompsa [Wed, 9 Dec 2009 20:28:33 +0000 (20:28 +0000)]
Fix hardware issue with FTDI chips: avoid sending a zero length packet due to
hardware sending garbage on ZLPs.

Reported by: Corey Smith
Submitted by: HPS

14 years agoFix dwSignature for NCM mode and add extra debug output.
thompsa [Wed, 9 Dec 2009 20:27:06 +0000 (20:27 +0000)]
Fix dwSignature for NCM mode and add extra debug output.

Submitted by: HPS

14 years agoAdd new device ids.
thompsa [Wed, 9 Dec 2009 20:24:49 +0000 (20:24 +0000)]
Add new device ids.

PR: usb/140951, usb/140923
Submitted by: Romain Tartiere, Brett Glass

14 years agoCorrect name, 82801IJ -> 82801JI
thompsa [Wed, 9 Dec 2009 20:17:22 +0000 (20:17 +0000)]
Correct name, 82801IJ -> 82801JI

Submitted by: mitya_cabletv.dp.ua

14 years agoIf the ID byte is non zero then we allow descriptors having multiple sizes.
thompsa [Wed, 9 Dec 2009 20:15:05 +0000 (20:15 +0000)]
If the ID byte is non zero then we allow descriptors having multiple sizes.

Submitted by: HPS
Reported by: daichi

14 years agoPort lastlogin(1) to libulog.
ed [Wed, 9 Dec 2009 20:05:37 +0000 (20:05 +0000)]
Port lastlogin(1) to libulog.

Just use ulog_getutxuser() to obtain lastlog records or ulog_getutxent()
to browse through all of them.

14 years agoDon't let sysinstall depend on <utmp.h>.
ed [Wed, 9 Dec 2009 19:46:56 +0000 (19:46 +0000)]
Don't let sysinstall depend on <utmp.h>.

Looking at the other entries, I suspect we must also reserve one
terminating byte, so I'm using UNAME_FIELD_LEN - 1, not UNAME_FIELD_LEN.

14 years agowhen calling ldd, use the cross libraries and not the host version
luigi [Wed, 9 Dec 2009 17:48:05 +0000 (17:48 +0000)]
when calling ldd, use the cross libraries and not the host version

MFC after: 3 days

14 years agouse default HZ
luigi [Wed, 9 Dec 2009 17:42:14 +0000 (17:42 +0000)]
use default HZ

14 years agoadd -lulog, the program "less" and a comment
luigi [Wed, 9 Dec 2009 17:41:47 +0000 (17:41 +0000)]
add -lulog, the program "less" and a comment

14 years agoClear result before requesting XPT_PATH_INQ.
mav [Wed, 9 Dec 2009 14:21:21 +0000 (14:21 +0000)]
Clear result before requesting XPT_PATH_INQ.
Many SIMs doesn't fill maxio field yet.

14 years agoIncrease Max Read Request Size for PCIe chips from 512 to 1024 bytes.
mav [Wed, 9 Dec 2009 13:10:10 +0000 (13:10 +0000)]
Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes.
It gives those beasts additional 10% of write bandwidth.

14 years agoThe default balance algorithm has changed from "split" to
ru [Wed, 9 Dec 2009 11:00:00 +0000 (11:00 +0000)]
The default balance algorithm has changed from "split" to
(the improved version of) "load".

14 years agomake PV core dump actually dump memory - still need to fix program header initialization
kmacy [Wed, 9 Dec 2009 08:09:25 +0000 (08:09 +0000)]
make PV core dump actually dump memory - still need to fix program header initialization

14 years agoAllow using IPv6 in nfsrvd_sentcache() callback.
delphij [Tue, 8 Dec 2009 23:43:50 +0000 (23:43 +0000)]
Allow using IPv6 in nfsrvd_sentcache() callback.

PR: kern/141289
Submitted by: Petr Lampa <lampa fit vutbr cz>
Approved by: rmacklem
MFC after: 1 week

14 years agoChange gmirror default balance algorithm from "split" to "load".
mav [Tue, 8 Dec 2009 22:43:29 +0000 (22:43 +0000)]
Change gmirror default balance algorithm from "split" to "load".
"split" is very ineffective for devices with rotating media as HDDs.
To be effective, it needs that transfer time reduction due to block
splitting was bigger then access time increase due to non-sequential
access. For modern HDDs I was able to reproduce it only with read sizes
of 2MB and above, which is almost not applicable in real life.
"load" algorithm same time is more universal and effective now.

Reviewed by: pjd

14 years agoSimplify a macro not to generate unncessary symbols.
jkim [Tue, 8 Dec 2009 22:38:42 +0000 (22:38 +0000)]
Simplify a macro not to generate unncessary symbols.

14 years agoFix the build.
mav [Tue, 8 Dec 2009 21:42:04 +0000 (21:42 +0000)]
Fix the build.

14 years agosem_init(3): document process shared semaphores and their restrictions
jilles [Tue, 8 Dec 2009 20:48:06 +0000 (20:48 +0000)]
sem_init(3): document process shared semaphores and their restrictions

14 years agoDon't add VAPPEND if the file is not being opened for writing. Note that this
trasz [Tue, 8 Dec 2009 20:47:10 +0000 (20:47 +0000)]
Don't add VAPPEND if the file is not being opened for writing.  Note that this
only affects cases where open(2) is being used improperly - i.e. when the user
specifies O_APPEND without O_WRONLY or O_RDWR.

Reviewed by: rwatson

14 years agoAdd additional checks of the kernel stack addresses in order to
marius [Tue, 8 Dec 2009 20:18:54 +0000 (20:18 +0000)]
Add additional checks of the kernel stack addresses in order to
ensure we don't overrun the end of the call chain.

MFC after: 1 week

14 years agoWhat we have in base system is actually OpenBSD 4.5's netcat,
delphij [Tue, 8 Dec 2009 19:12:38 +0000 (19:12 +0000)]
What we have in base system is actually OpenBSD 4.5's netcat,
update this file to reflect the fact.

14 years agoRemove phantom line of code that somehow slipped
jfv [Tue, 8 Dec 2009 18:54:37 +0000 (18:54 +0000)]
Remove phantom line of code that somehow slipped
into the checkin.

14 years agoCreate sysctl node(dev.bge.%d.focred_collapse) instead of
yongari [Tue, 8 Dec 2009 17:54:23 +0000 (17:54 +0000)]
Create sysctl node(dev.bge.%d.focred_collapse) instead of
hw.bge.forced_collapse. hw.bge.forced_collapse affects all bge(4)
controllers on system which may not desirable behavior of the
sysctl node. Also allow the sysctl node could be modified at any
time.

Reviewed by: bde (initial version)

14 years agoAdd ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter.
mav [Tue, 8 Dec 2009 14:55:07 +0000 (14:55 +0000)]
Add ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter.

14 years agoMFi386: revision 200219
nyan [Tue, 8 Dec 2009 13:06:35 +0000 (13:06 +0000)]
MFi386: revision 200219

  Improve the algorithm the loader uses to choose a memory range for its
  heap when using a range above 1MB.

MFC after: 1 week

14 years agoMFi386: Use real mode instead of v86 mode.
nyan [Tue, 8 Dec 2009 13:04:26 +0000 (13:04 +0000)]
MFi386: Use real mode instead of v86 mode.

MFC after: 1 week

14 years agoMFi386: revision 200216
nyan [Tue, 8 Dec 2009 12:10:06 +0000 (12:10 +0000)]
MFi386: revision 200216

  Various small whitespace and style fixes.

14 years ago- Try pre-allocating all FIBs upfront. Previously we tried pre-allocating
jkim [Tue, 8 Dec 2009 05:35:51 +0000 (05:35 +0000)]
- Try pre-allocating all FIBs upfront.  Previously we tried pre-allocating
128 FIBs first and allocated more later if necessary.  Remove now unused
definitions from the header file[1].
- Force sequential bus scanning.  It seems parallel scanning is in fact
slower and causes more harm than good[1].  Adjust a comment to reflect that.

PR: kern/141269
Submitted by: Alexander Sack (asack at niksun dot com)[1]
Reviewed by: scottl

14 years agoPartially revert r200228. For mini RCB case, bge(4) still have to
yongari [Tue, 8 Dec 2009 03:24:29 +0000 (03:24 +0000)]
Partially revert r200228. For mini RCB case, bge(4) still have to
disable mini ring withtout regard to mini ring support.

Reported by: marcel
Tested by: marcel

14 years agoResync with Intel versions of both the em and igb
jfv [Tue, 8 Dec 2009 01:07:44 +0000 (01:07 +0000)]
Resync with Intel versions of both the em and igb
drivers. These add new hardware support, most importantly
the pch (i5 chipset) in the em driver. Also, both drivers
now have the simplified (and I hope improved) watchdog
code. The igb driver uses the new RX cleanup that I
first implemented in ixgbe.

em  - version 6.9.24
igb - version 1.8.4

14 years agoFix typo in comment
rpaulo [Tue, 8 Dec 2009 00:54:08 +0000 (00:54 +0000)]
Fix typo in comment

Submitted by: Paul B Mahol <onemda at gmail.com>

14 years agoImprove response to multi-touch taps.
rpaulo [Tue, 8 Dec 2009 00:52:59 +0000 (00:52 +0000)]
Improve response to multi-touch taps.

Submitted by: Rohit Grover <rgrover1 at gmail.com>

14 years agoIn exception_save, write-back ar.rnat after switching the backing-
marcel [Tue, 8 Dec 2009 00:44:23 +0000 (00:44 +0000)]
In exception_save, write-back ar.rnat after switching the backing-
store. Writing to ar.bspstore is defined to leave ar.rnat undefined.

PR: ia64/120315
MFC after: 3 days

14 years agoUpdate driver to Intel version 2.0.7:
jfv [Mon, 7 Dec 2009 21:30:54 +0000 (21:30 +0000)]
Update driver to Intel version 2.0.7:

This adds new feature support for the 82599, a hardware
assist to LRO, doing this required a large revamp to the
RX cleanup code because the descriptor ring may not be
processed out of order, this necessitated the elimination
of global pointers.

Additionally, the RX routine now does not refresh mbufs
on every descriptor, rather it will do a range, and then
update the hardware pointer at that time. These are
performance oriented changes.

The TX side now has a cleaner simpler watchdog algorithm
as well, in TX cleanup a read of ticks is stored, that
can then be compared in local_timer to determine if
there is a hang.

Various other cleanups along the way, thanks to all who
have provided input and testing.

14 years agoRevert r200231. It was already taken cared by jhb long ago.
jkim [Mon, 7 Dec 2009 21:24:07 +0000 (21:24 +0000)]
Revert r200231.  It was already taken cared by jhb long ago.

Pointed out by: jhb
Pointy hat: jkim

14 years agoMake mfi(4) little bit less chatty.
jkim [Mon, 7 Dec 2009 20:17:33 +0000 (20:17 +0000)]
Make mfi(4) little bit less chatty.

14 years agoAdd support for the NetMos NM9865 family of Serial/Parallel ports.
marcel [Mon, 7 Dec 2009 20:05:02 +0000 (20:05 +0000)]
Add support for the NetMos NM9865 family of Serial/Parallel ports.

Obtained from: NetMos MCS9865 v1.0.0.1 driver
MFC after: 3 days

14 years agoDon't access jumbo frame related registers if controller lacks the
yongari [Mon, 7 Dec 2009 19:26:54 +0000 (19:26 +0000)]
Don't access jumbo frame related registers if controller lacks the
feature. These registers are reserved on controllers that have no
support for jumbo frame.
Only BCM5700 has mini ring so do not poke mini ring related
registers if controller is not BCM5700.

Reviewed by: marius

14 years agoRemove PHY isolate/power down code in bge_stop(). The isolation
yongari [Mon, 7 Dec 2009 19:18:23 +0000 (19:18 +0000)]
Remove PHY isolate/power down code in bge_stop(). The isolation
handler in brgphy(4) does not exist and brgphy(4) just resets the
PHY and returns EINVAL as it has no isolation handler. I also agree
on Marius's opinion that stop handler of every NIC driver seems to
be the wrong place for implementing PHY isolate/power down.
If we need PHY isolate/power down it should be implemented in
brgphy(4) and users should administratively down the PHY.

Reviewed by: marius

14 years agoExplicitly acknowledge MSI completion, as required by SiI3124 datasheet.
mav [Mon, 7 Dec 2009 18:37:50 +0000 (18:37 +0000)]
Explicitly acknowledge MSI completion, as required by SiI3124 datasheet.
It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531)
still randomly crashing system in few seconds of high MSI rates, generating
something inaporopriate, like NMI or "Fatal trap 30".

14 years agoImprove the algorithm the loader uses to choose a memory range for its
jhb [Mon, 7 Dec 2009 16:29:43 +0000 (16:29 +0000)]
Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.

Previously the loader would always use the last 3MB in the first memory
range above 1MB for the heap.  However, this memory range is also where the
kernel and any modules are loaded.  If this memory range is "small", then
using the high 3MB for the heap may not leave enough room for the kernel
and modules.

Now the loader will use any range below 4GB for the heap, and the logic to
choose the "high" heap region has moved into biosmem.c.  It sets two
variables that the loader can use for a high heap if it desires.  When a
high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following
memory ranges are preferred for the heap in order from best to worst:
- The largest memory region in the SMAP with a start address greater than
  1MB.  The memory region must be at least 3MB in length.  This leaves the
  region starting at 1MB purely for use by the kernel and modules.
- The last 3MB of the memory region starting at 1MB if it is at least 3MB
  in size.  This matches the current behavior except that the current loader
  would break horribly if the first region was not at least 3MB in size.
- The memory range from the end of the loader up to the 640k window.  This
  is the range the loader uses when none of the high-heap-requesting options
  are enabled.

Tested by: hrs
MFC after: 1 week

14 years agoMFp4;
mav [Mon, 7 Dec 2009 16:23:25 +0000 (16:23 +0000)]
MFp4;
- Cleanup kernel messages, mostly PMP.
- Took references on devices, while PMP reinitializes them, to not let them
go and distort freeze reference counting.

14 years agoSiI3124 has no SNotification register. Handle Asynchronous Notifications
mav [Mon, 7 Dec 2009 16:10:48 +0000 (16:10 +0000)]
SiI3124 has no SNotification register. Handle Asynchronous Notifications
there without it as good as possible.

14 years agoVarious small whitespace and style fixes.
jhb [Mon, 7 Dec 2009 16:00:59 +0000 (16:00 +0000)]
Various small whitespace and style fixes.

14 years agoAdd <machine/pcb.h> missed in r199135.
marius [Mon, 7 Dec 2009 15:29:07 +0000 (15:29 +0000)]
Add <machine/pcb.h> missed in r199135.

14 years agoFix ntfs such that it understand media with a non-512-bytes sector size:
guido [Mon, 7 Dec 2009 15:15:08 +0000 (15:15 +0000)]
Fix ntfs such that it understand media with a non-512-bytes sector size:
1. Fixups are always done on 512 byte chunks (in stead of sectors). This
is kind of stupid.
2. Conevrt between NTFS blocknumbers (the blocksize equals the media
sector size) and the bread() and getblk() blocknr (which are 512-byte
sized)

NB: this change should not affect ntfs for 512-byte sector sizes.

14 years agoDefine struct pcpu_md as the only MD field of struct pcpu (pc_acpi_id
marcel [Mon, 7 Dec 2009 06:41:27 +0000 (06:41 +0000)]
Define struct pcpu_md as the only MD field of struct pcpu (pc_acpi_id
excluded, as it's used by MI code) and mode the sysctl variables from
pcpu_stats to pcpu_md.
Adjust all references accordingly.

While nearby, change the PCPU sysctl tree so that they match the CPU
device sysctl tree -- they are now children of a static node called
"machdep.cpu" and are named only with their cpu ID.

14 years agoInstall libulog in /lib.
ed [Mon, 7 Dec 2009 05:57:28 +0000 (05:57 +0000)]
Install libulog in /lib.

Because several applications in /bin use libulog (or may use it in the
nearby future), it must not live inside /usr. It seems like we don't
need to add the copy from /usr/lib to ObsoleteFiles.inc, because it's
cleaned up during installation of libulog automatically.

Reported by: ume

14 years agoFix Read-After-Write (RAW) dependency violation for ar.ccv in
marcel [Mon, 7 Dec 2009 02:17:58 +0000 (02:17 +0000)]
Fix Read-After-Write (RAW) dependency violation for ar.ccv in
isc_atomic_xadd() and isc_atomic_cmpxchg().

Approved by: dougb@
MFC after: 1 week

14 years agoAllocate the VHPT for each CPU in cpu_mp_start(), rather than
marcel [Mon, 7 Dec 2009 00:54:02 +0000 (00:54 +0000)]
Allocate the VHPT for each CPU in cpu_mp_start(), rather than
allocating MAXCPU VHPTs up-front. This allows us to max-out MAXCPU
without memory waste -- MAXCPU is now 32 for SMP kernels.

This change also eliminates the VHPT scaling based in the total
memory in the system. It's the workload that determines the best size
of the VHPT. The workload can be affected by the amount of memory,
but not necessarily. For example, there's no performance difference
between VHPT sizes of 256KB, 512KB and 1MB when building the LINT
kernel. This was observed with a system that has 8GB of memory.
By default the kernel will allocate a 1MB VHPT. The user can tune the
system with the "machdep.vhpt.log2size" tunable.

14 years agoRevert behavior change to setenv(), unsetenv() and putenv() until a more
scf [Mon, 7 Dec 2009 00:22:10 +0000 (00:22 +0000)]
Revert behavior change to setenv(), unsetenv() and putenv() until a more
thorough security review has been completed.

14 years agoAdd Asynchronous Notification support for controllers without SNTF
mav [Sun, 6 Dec 2009 23:56:54 +0000 (23:56 +0000)]
Add Asynchronous Notification support for controllers without SNTF
capability by snooping SDB FIS receive area. It should be even faster
then regular way, but less reliable.

14 years agoUpdate the getenv(3) man page to reflect the recent change to the behavior
scf [Sun, 6 Dec 2009 23:51:27 +0000 (23:51 +0000)]
Update the getenv(3) man page to reflect the recent change to the behavior
of setenv(), putenv() and unsetenv() when dealing with corrupt entries in
environ.  They now output a warning and complete their task without error.

MFC after: 1 week

14 years agoRegister a request that all changes to *env(3) be reviewed by secteam
cperciva [Sun, 6 Dec 2009 23:48:38 +0000 (23:48 +0000)]
Register a request that all changes to *env(3) be reviewed by secteam
prior to commit due to the problematic history of this code.

14 years agosh: Test ;<newline> as well as ; in the 'for' parser test.
jilles [Sun, 6 Dec 2009 23:31:23 +0000 (23:31 +0000)]
sh: Test ;<newline> as well as ; in the 'for' parser test.

14 years agoChange the behavior of setenv(), putenv() and unsetenv() to continue parsing
scf [Sun, 6 Dec 2009 23:27:24 +0000 (23:27 +0000)]
Change the behavior of setenv(), putenv() and unsetenv() to continue parsing
instead of returning an error if a corrupt (not a "name=value" string) entry
in the environ array is detected when (re)-building the internal
environment.  This should prevent applications or libraries from
experiencing issues arising from the expectation that these calls will
complete even with corrupt entries.  The behavior is now as it was prior to
7.0.

Reviewed by: jilles
MFC after: 1 week

14 years agoImprove the comment within getenv() explaining the search order it takes to
scf [Sun, 6 Dec 2009 23:05:17 +0000 (23:05 +0000)]
Improve the comment within getenv() explaining the search order it takes to
find a variable.  Include a note that it must not cause the internal
environment to be generated since malloc() depends upon getenv().  To call
malloc() would create a circular dependency.

Recommended by: green
Approved by: jilles
MFC after: 1 week

14 years agoAdd a libutempter compatibility interface to libulog.
ed [Sun, 6 Dec 2009 20:30:21 +0000 (20:30 +0000)]
Add a libutempter compatibility interface to libulog.

The ulog_login_pseudo(3) and ulog_logout_pseudo(3) interfaces provide a
functionality identical to what libutempter has to offer. Just transform
libutempter's calls into the before mentioned functions.

libutempter doesn't work with utmpx, so instead of fixing I thought the
easiest way would be to integrate this functionality. libutempter is
used by applications like xterm and the KDE libraries, so if I ever
change the underlying file format, these applications will keep working
automatically.

Also increase __FreeBSD_version to indicate the addition (as well as the
import of libulog).

14 years agorestore setting of sin_len (was removed in 1.146 last february) as
luigi [Sun, 6 Dec 2009 18:04:26 +0000 (18:04 +0000)]
restore setting of sin_len (was removed in 1.146 last february) as
it seems that now it is necessary for 'forward' to work outside lo0.
The bug (and fix) was reported on 8.0. This patch probably applies
to RELENG_7 as well.
It seems that 'pf' has a similar bug.

Submitted by: Lytochkin Boris
MFC after: 3 days

14 years agoUnbreak build.
nwhitehorn [Sun, 6 Dec 2009 17:26:43 +0000 (17:26 +0000)]
Unbreak build.

Pointy hat to: me

14 years agoDon't forget to link the fixits against -lulog.
ed [Sun, 6 Dec 2009 14:22:14 +0000 (14:22 +0000)]
Don't forget to link the fixits against -lulog.

reboot(8) now depends on it.

Reported by: nyan

14 years agoMFp4:
mav [Sun, 6 Dec 2009 11:48:53 +0000 (11:48 +0000)]
MFp4:
If we panicked with SIM lock held, do not try to flush caches.
Extra lock recursing will not make debugging easier.

14 years agoMake `make cleanilinks' work in /sys/modules.
ed [Sun, 6 Dec 2009 08:59:19 +0000 (08:59 +0000)]
Make `make cleanilinks' work in /sys/modules.

cleanilinks wasn't listed in <bsd.subdir.mk>. Instead of adding it to
/sys/modules/Makefile, we'd better just add it to <bsd.subdir.mk>
directly, so we don't need to change files like /sys/modules/sound/Makefile
as well. This means you can finally clean up all those dangling symlinks
created by individual module compilation at once.

14 years agoDon't depend on <utmp.h>.
ed [Sun, 6 Dec 2009 01:29:49 +0000 (01:29 +0000)]
Don't depend on <utmp.h>.

MAXLOGNAME seems more applicable in this case, because UT_NAMESIZE
refers to the username field in utmp files, which is clearly unrelated
to repquota(8).

14 years agoMake pw(8) build without <utmp.h>.
ed [Sun, 6 Dec 2009 01:27:28 +0000 (01:27 +0000)]
Make pw(8) build without <utmp.h>.

The size of the username record in utmp files should not influence the
maximum username length. Right now ut_user/ut_name is big enough, so in
this case it's dead code anyway.

14 years agoLet w(1) use utmpx.
ed [Sun, 6 Dec 2009 01:10:30 +0000 (01:10 +0000)]
Let w(1) use utmpx.

We don't have UT_*SIZE anymore. One of the reasons for that is because
all strings are null terminated, there is no need for apps to copy
strings out of the utmpx structure. This means we can define W_DISP*SIZE
lengths for all columns.

While there, adjust the sizes a little. Steal some bytes from the
username column, while extending the hostname column quite a bit.

14 years agoMFp4:
mav [Sun, 6 Dec 2009 00:10:13 +0000 (00:10 +0000)]
MFp4:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this options deprecates all ata(4)
peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers
(ada, cd, ...) and interfaces to be natively used instead.

As side effect of this, ata(4) mode setting code was completely rewritten
to make controller API more strict and permit above change. While doing
this, SATA revision was separated from PATA mode. It allows DMA-incapable
SATA devices to operate and makes hw.ata.atapi_dma tunable work again.

Also allow ata(4) controller drivers (except some specific or broken ones)
to handle larger data transfers. Previous constraint of 64K was artificial
and is not really required by PCI ATA BM specification or hardware.

Submitted by: nwitehorn (powerpc part)

14 years agoFix burst processing for WF2Q pipes - do not increase available burst size
oleg [Sat, 5 Dec 2009 23:27:21 +0000 (23:27 +0000)]
Fix burst processing for WF2Q pipes - do not increase available burst size
unless pipe is idle. This should fix follwing issues:
- 'dummynet: OUCH! pipe should have been idle!' log messages.
- exceeding configured pipe bandwidth.

MFC after: 1 week

14 years agoUnbreak rescue(8). We should also link against libulog now.
ed [Sat, 5 Dec 2009 23:23:46 +0000 (23:23 +0000)]
Unbreak rescue(8). We should also link against libulog now.

14 years agoLet systat's vmstat use utmpx.
ed [Sat, 5 Dec 2009 20:52:11 +0000 (20:52 +0000)]
Let systat's vmstat use utmpx.

14 years agoPort who(1) to utmpx.
ed [Sat, 5 Dec 2009 20:44:19 +0000 (20:44 +0000)]
Port who(1) to utmpx.

(Un)fortunately there is no standardized interface to switch between
utmp database files, so we must call ulog_setutxfile() here.

I'm also changing the column widths to magic numbers here. Display
layout should in this case not be derived from structure fields sizes.
Because I don't want struct utmpx ever to become too small, the fields
are too big to reserve all the space.

14 years agoChange VOP_FSYNC for zfs vnode from VOP_PANIC to zfs_freebsd_fsync(),
kib [Sat, 5 Dec 2009 20:36:42 +0000 (20:36 +0000)]
Change VOP_FSYNC for zfs vnode from VOP_PANIC to zfs_freebsd_fsync(),
both to not panic when fsync(2) is called for fifo on zfs
filedescriptor, and to actually fsync fifo inode to permanent storage.

PR: kern/141177
Reviewed by: pjd
MFC after: 1 week

14 years agoLet init(8) and reboot(8) use utmpx to log wtmp entries.
ed [Sat, 5 Dec 2009 20:26:55 +0000 (20:26 +0000)]
Let init(8) and reboot(8) use utmpx to log wtmp entries.

logwtmp() gets called with the raw strings that are written to disk. For
regular user entries, this isn't too bad, but when booting/shutting
down, the contents get rather cryptic.

Just call the standardized pututxline().

14 years agoLet wall(1) use utmpx.
ed [Sat, 5 Dec 2009 20:22:26 +0000 (20:22 +0000)]
Let wall(1) use utmpx.

Because our implementation guarantees the strings inside struct utmpx to
be null terminated, we don't need to copy everything out, which makes
the code nicer to read.

Also set WARNS to 6 and add $FreeBSD$ to keep SVN happy.

14 years agoWe have to eventually look for provider without checking guid as this is need
pjd [Sat, 5 Dec 2009 20:16:28 +0000 (20:16 +0000)]
We have to eventually look for provider without checking guid as this is need
for attaching when there is no metadata yet.

Before r200125 the order of looking for providers was wrong. It was:
1. Find provider by name.
2. Find provider by guid.
3. Find provider by name and guid.

Where it should have been:
1. Find provider by name and guid.
2. Find provider by guid.
3. Find provider by name.

MFC after: 1 week

14 years agoLet date(1) use utmpx instead of logwtmp().
ed [Sat, 5 Dec 2009 20:09:50 +0000 (20:09 +0000)]
Let date(1) use utmpx instead of logwtmp().

utmpx also has OLD_TIME/NEW_TIME messages, which seem to be intended for
the same purpose as how we call logwtmp() here.

14 years agoLet wall(1) use utmpx.
ed [Sat, 5 Dec 2009 20:05:25 +0000 (20:05 +0000)]
Let wall(1) use utmpx.

Because our implementation guarantees the strings inside struct utmpx to
be null terminated, we don't need to copy everything out, which makes
the code nicer to read.

Also set WARNS to 6 and add $FreeBSD$ to keep SVN silent.