]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoGet in sync with current ELF definitions. In particular this means:
marcel [Sun, 18 Dec 2005 00:09:12 +0000 (00:09 +0000)]
Get in sync with current ELF definitions. In particular this means:
o  Remove the unused and non-standard SHT_NUM, PT_COUNT and DT_COUNT.
o  Add the STV_DEFAULT, STV_INTERNAL, STV_HIDDEN and STV_PROTECTED
   symbol visibility constants.
o  Add the ELF32_ST_VISIBILITY and ELF64_ST_VISIBILITY macros to
   get the symbol visibility from the st_other field.
o  Add the ELFOSABI_AIX, ELFOSABI_OPENVMS and ELFOSABI_NSK constants.
o  Add the ET_LOOS, ET_HIOS, ET_LOPROC and ET_HIPROC constants.
o  Further flesh out the list of machine types. Note that EM_ALPHA
   remains non-standard. The standard value for EM_ALPHA is given
   by EM_ALPHA_STD (which is a non-standard name :-)
o  Add the SHN_LOOS, SHN_HIOS and SHN_XINDEX constants.
o  Add the SHT_INIT_ARRAY, SHT_FINI_ARRAY, SHT_PREINIT_ARRAY, SHT_GROUP
   and SHT_SYMTAB_SHNDX constants.
o  Add the SHF_MERGE, SHF_STRINGS, SHF_INFO_LINK, SHF_LINK_ORDER,
   SHF_OS_NONCONFORMING, SHF_GROUP and SHF_MASKOS constants.
o  Add the PF_MASKOS and PF_MASKPROC constants.
o  Add the STB_LOOS andf STB_HIOS constants.
o  Add the STT_COMMON, STT_LOOS and STT_HIOS constants.

MFC after: 1 week

18 years agoFix the ELF64_R_TYPE and ELF64_R_INFO macros. The symbol type is an
marcel [Sat, 17 Dec 2005 23:48:07 +0000 (23:48 +0000)]
Fix the ELF64_R_TYPE and ELF64_R_INFO macros. The symbol type is an
32-bit entity. Also, don't cast the resulting symbol type value to
a datatype smaller than the st_info field type as a quick way to
mask off the upper bits as it may cause inconsistent behaviour when
the macro is used (without explicit casting) on varargs functions.

MFC after: 1 week

18 years agoKnow the machines FreeBSD runs on. Print the machine value for
marcel [Sat, 17 Dec 2005 23:24:34 +0000 (23:24 +0000)]
Know the machines FreeBSD runs on. Print the machine value for
unknown machines.

MFC after: 1 week

18 years agoCorrect a long-standing problem in elfN_map_insert(): In order to copy a
alc [Sat, 17 Dec 2005 19:40:47 +0000 (19:40 +0000)]
Correct a long-standing problem in elfN_map_insert(): In order to copy a
page to user space, the user space mapping must allow write access.

In collaboration with: tegge@
MFC after: 3 weeks

18 years agoUse M_ZERO for the bridge_iflist to ensure there are no unexpected suprises.
thompsa [Sat, 17 Dec 2005 10:12:20 +0000 (10:12 +0000)]
Use M_ZERO for the bridge_iflist to ensure there are no unexpected suprises.

18 years agoMinor whitespace cleanup.
thompsa [Sat, 17 Dec 2005 10:03:48 +0000 (10:03 +0000)]
Minor whitespace cleanup.

18 years agoUpdate copyright.
davidxu [Sat, 17 Dec 2005 09:42:45 +0000 (09:42 +0000)]
Update copyright.

18 years agotrim trailing ^I
obrien [Sat, 17 Dec 2005 07:09:17 +0000 (07:09 +0000)]
trim trailing ^I

18 years agoChange from a callback in if_ethersubr to using EVENTHANDLER in order to detach
thompsa [Sat, 17 Dec 2005 06:33:51 +0000 (06:33 +0000)]
Change from a callback in if_ethersubr to using EVENTHANDLER in order to detach
span ports when they disappear. The span port does not have a pointer to the
softc so revert r1.31 and bring back the softc linked-list.

MFC after: 2 weeks

18 years agoClean up unused or poorly utilized KTR values. Remove KTR_FS, KTR_KGDB,
njl [Sat, 17 Dec 2005 03:57:10 +0000 (03:57 +0000)]
Clean up unused or poorly utilized KTR values.  Remove KTR_FS, KTR_KGDB,
and KTR_IO as they were never used.  Remove KTR_CLK since it was only
used for hardclock firing and use KTR_INTR there instead.  Remove
KTR_CRITICAL since it was only used for crit enter/exit and use
KTR_CONTENTION instead.

18 years agoBackout pseudo nForce2/3/4 support. These devices (as well as
ru [Fri, 16 Dec 2005 22:58:51 +0000 (22:58 +0000)]
Backout pseudo nForce2/3/4 support.  These devices (as well as
AMD-8111 SMBus 2.0 controller) are all SMBus 2.0 controllers,
and need another implementation of SMBus access methods, while
this driver supports AMD-756 SMBus 1.0 controller and clones,
including AMD-8111 SMBus 1.0 controller.

Tested by: Vladimir Timofeev (0x006410de),
mezz (0x008410de),
ru (0x00d410de)

All of us got the same(!) nonsense when running ``mbmon -S'',
repeated every four rows.

18 years ago- Use uintfptr_t rather than int for the kernel profiling index (though it
jhb [Fri, 16 Dec 2005 22:11:52 +0000 (22:11 +0000)]
- Use uintfptr_t rather than int for the kernel profiling index (though it
  really should be a fptrdiff_t if we had that) in profclock().
- Don't try to profile kernel pc's that are >= the kernel lowpc to avoid
  underflows when computing a profiling index.
- Use the PC_TO_I() macro to compute the kernel profiling index rather than
  doing it inline.

Discussed with: bde

18 years agoChange the addupc_*() functions to use the uintfptr_t type for pc rather
jhb [Fri, 16 Dec 2005 22:08:32 +0000 (22:08 +0000)]
Change the addupc_*() functions to use the uintfptr_t type for pc rather
than uintptr_t as that is technically more correct.

18 years agoGC some unused frame types.
jhb [Fri, 16 Dec 2005 22:07:41 +0000 (22:07 +0000)]
GC some unused frame types.

Approved by: grehan

18 years agoStyle: The second argument to vm_map_find() should be NULL instead of 0.
alc [Fri, 16 Dec 2005 19:14:25 +0000 (19:14 +0000)]
Style: The second argument to vm_map_find() should be NULL instead of 0.

18 years agoAdd an extensible version of our *printf(3) implementation to libc
phk [Fri, 16 Dec 2005 18:56:39 +0000 (18:56 +0000)]
Add an extensible version of our *printf(3) implementation to libc
on probationary terms:  it may go away again if it transpires it is
a bad idea.

This extensible printf version will only be used if either
    environment variable USE_XPRINTF is defined
or
    one of the extension functions are called.
or
    the global variable __use_xprintf is set greater than zero.

In all other cases our traditional printf implementation will
be used.

The extensible version is slower than the default printf, mostly
because less opportunity for combining I/O operation exists when
faced with extensions.  The default printf on the other hand
is a bad case of spaghetti code.

The extension API has a GLIBC compatible part and a FreeBSD version
of same.  The FreeBSD version exists because the GLIBC version may
run afoul of our FILE * locking in multithreaded programs and it
even further eliminate the opportunities for combining I/O operations.

Include three demo extensions which can be enabled if desired: time
(%T), hexdump (%H) and strvis (%V).

%T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT)
   in one of two human readable duration formats:
"%.3llT" -> "20349.245"
"%#.3llT" -> "5h39m9.245"

%H will hexdump a sequence of bytes and takes a pointer and a length
   argument.  The width specifies number of bytes per line.
"%4H" -> "65 72 20 65"
"%+4H" -> "0000 65 72 20 65"
"%#4H" -> "65 72 20 65  |er e|"
"%+#4H" -> "0000 65 72 20 65  |er e|"

%V will dump a string in strvis format.
"%V" -> "Hello\tWor\377ld" (C-style)
"%0V" -> "Hello\011Wor\377ld" (octal)
"%+V" -> "Hello%09Wor%FFld" (http-style)

Tests, comments, bugreports etc are most welcome.

18 years agoUse sf_buf_alloc() instead of vm_map_find() on exec_map to create the
alc [Fri, 16 Dec 2005 18:34:14 +0000 (18:34 +0000)]
Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the
ephemeral mappings that are used as the source for three copy
operations from kernel space to user space.  There are two reasons for
making this change: (1) Under heavy load exec_map can fill up causing
vm_map_find() to fail.  When it fails, the nascent process is aborted
(SIGABRT).  Whereas, this reimplementation using sf_buf_alloc()
sleeps.  (2) Although it is possible to sleep on vm_map_find()'s
failure until address space becomes available (see kmem_alloc_wait()),
using sf_buf_alloc() is faster.  Furthermore, the reimplementation
uses a CPU private mapping, avoiding a TLB shootdown on
multiprocessors.

Problem uncovered by: kris@
Reviewed by: tegge@
MFC after: 3 weeks

18 years agoIn pipe_write(): when uiomove() fails, do not spin on it forever.
delphij [Fri, 16 Dec 2005 18:32:39 +0000 (18:32 +0000)]
In pipe_write(): when uiomove() fails, do not spin on it forever.

Submitted by: Kostik Belousov <kostikbel at gmail.com> on -current@
Message-ID: <20051216151016.GE84442@deviant.zoral.local>
MFC After: 3 weeks

18 years agoMFC: sync with -current (interrupt handler API fixes, RT2500 deadlock
wpaul [Fri, 16 Dec 2005 17:27:45 +0000 (17:27 +0000)]
MFC: sync with -current (interrupt handler API fixes, RT2500 deadlock
with wpa_supplicant)

18 years agoIn ndis_rxeof_eth(), avoid acquiring the NDIS miniport block spinlock for
wpaul [Fri, 16 Dec 2005 17:21:28 +0000 (17:21 +0000)]
In ndis_rxeof_eth(), avoid acquiring the NDIS miniport block spinlock for
serialized miniports when updating the packet list.

This fixes a deadlock that can occur with the Ralink RT2500 driver
when using wpa_supplicant.

18 years agoFix PCI ID of the AMD-8111 System Management controller so it matches
ru [Fri, 16 Dec 2005 15:03:16 +0000 (15:03 +0000)]
Fix PCI ID of the AMD-8111 System Management controller so it matches
SMBus 1.0 and not SMBus 2.0.

AMD-8111 hub (datasheet is publically available) implements both SMBus
2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the System
Management Controller device with the base I/O address is accessible
through the CSR 0x58).  This driver only supports AMD-756 SMBus 1.0
compatible devices.

With the patched sysutils/xmbmon port (to also fix PCI ID and to enable
smb(4) support), I now get:

pciconf:
none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 SMBus 2.0 Controller'
    class    = serial bus
    subclass = SMBus
amdpm0@pci0:7:3:        class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'AMD-8111 ACPI System Management Controller'
    class    = bridge

dmesg:
amdpm0: <AMD 756/766/768/8111 Power Management Controller> port 0x10e0-0x10ff at device 7.3 on pci0
smbus0: <System Management Bus> on amdpm0

# mbmon -A -d
Summary of Detection:
 * SMB monitor(s)[ioctl:AMD8111]:
  ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50.
  ** Analog Dev. Chip ADM1027 found at slave address: 0x5C.
 * ISA monitor(s):
  ** Winbond Chip W83627HF/THF/THF-A found.

I think the confusion comes from the fact that nobody really tried
SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come with
SMBus support enabled, neither in FreeBSD 4, nor in later versions,
so mbmon(1) was just showing the values from the Winbond sensors
accessible through the ISA I/O method (mbmon -I), for me anyway.

On my test machine, the amdpm(4) didn't even attach due to I/O port
allocation failure (who knows what the hell it read from CSR 0x58
of the SMBus 2.0 device :-), which isn't in the CSR space).

I've also checked that lm_sensors.org uses correct PCI ID for SMBus
1.0 of AMD-8111:

i2c-amd756.c:   {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 },

This driver is analogous to our amdpm.c which supports SMBus 1.0
AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111.

i2c-amd8111.c:  { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },

This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which
supports SMBus 2.0, and which our amdpm.c does NOT support
(SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus).
At least I know for sure it doesn't work with my nForce3.  :-)

(The xmbmon port will be fixed to correct the PCI ID too and to
enable the smb(4) support.)

18 years agoAdd descriptions for sysctl -d.
emaste [Fri, 16 Dec 2005 15:01:44 +0000 (15:01 +0000)]
Add descriptions for sysctl -d.

Approved by: glebius
Silence from: rwatson (mentor)

18 years agoReplace selwakeuppri with selwakeup, let scheduler figure out
davidxu [Fri, 16 Dec 2005 15:01:16 +0000 (15:01 +0000)]
Replace selwakeuppri with selwakeup, let scheduler figure out
appropriate thread priority.

18 years agoCleanup __FreeBSD_version.
glebius [Fri, 16 Dec 2005 13:10:32 +0000 (13:10 +0000)]
Cleanup __FreeBSD_version.

18 years agoDocument the pfsync(4) specific maxupd parameter, with text mostly taken
ceri [Fri, 16 Dec 2005 11:38:18 +0000 (11:38 +0000)]
Document the pfsync(4) specific maxupd parameter, with text mostly taken
from OpenBSD's manpage.

PR: docs/89256
Submitted by: Pim van Pelt <pim at ipng dot nl>
MFC after: 3 days

18 years agoAdd jumbo frame support for architectures with strict alignment.
yongari [Fri, 16 Dec 2005 08:29:43 +0000 (08:29 +0000)]
Add jumbo frame support for architectures with strict alignment.

Reviewed by: glebius

18 years agoCleanup the strings for printing chipset names, saves quite some space.
sos [Fri, 16 Dec 2005 08:12:13 +0000 (08:12 +0000)]
Cleanup the strings for printing chipset names, saves quite some space.

Add a couble new nVidia chips now we are here.

18 years agoIt seems ciss should ignore overrun and underrun on a SCSI INQUIRY
ps [Fri, 16 Dec 2005 06:50:55 +0000 (06:50 +0000)]
It seems ciss should ignore overrun and underrun on a SCSI INQUIRY
command.  This fixes some weird booting issues on newer versions
of the firmware on the MSA20.

Reported by: Philippe Pegon <Philippe dot Pegon at crc dot u-strasbg dot fr>

18 years agoMake this compile on 64bit systems. It likely isn't correct, but that can
scottl [Fri, 16 Dec 2005 06:11:22 +0000 (06:11 +0000)]
Make this compile on 64bit systems.  It likely isn't correct, but that can
be sorted out later.

18 years agoFix compiling on platforms with 64bit time_t.
scottl [Fri, 16 Dec 2005 06:02:44 +0000 (06:02 +0000)]
Fix compiling on platforms with 64bit time_t.

18 years agoDon peril sensitive sunglasses and jack up the MAX_BPAGES limit to 8192
scottl [Fri, 16 Dec 2005 05:57:18 +0000 (05:57 +0000)]
Don peril sensitive sunglasses and jack up the MAX_BPAGES limit to 8192
on amd64.  If you're going to stuff >4GB into your box, reserving 32MB for
bonce pages amounts to a rounding error in the overall scheme of things.

18 years agoWith current pthread implementations, a mutex initialization will
davidxu [Fri, 16 Dec 2005 02:50:53 +0000 (02:50 +0000)]
With current pthread implementations, a mutex initialization will
allocate a memory block. sscanf calls __svfscanf which in turn calls
fread, fread triggers mutex initialization but the mutex is not
destroyed in sscanf, this leads to memory leak. To avoid the memory
leak and performance issue, we create a none MT-safe version of fread:
__fread, and instead let __svfscanf call __fread.

PR: threads/90392
Patch submitted by: dhartmei
MFC after: 7 days

18 years agoUse uintmax_t and %j to print bus dma segment members rather than casting
jhb [Thu, 15 Dec 2005 22:12:27 +0000 (22:12 +0000)]
Use uintmax_t and %j to print bus dma segment members rather than casting
to long long and using %ll.

18 years agoUse %t (ptrdiff_t modifier) to print a couple of pointer differences rather
jhb [Thu, 15 Dec 2005 21:57:32 +0000 (21:57 +0000)]
Use %t (ptrdiff_t modifier) to print a couple of pointer differences rather
than casting them to int.

18 years agoMake the SYNOPSIS section a bit more informative.
joel [Thu, 15 Dec 2005 21:02:16 +0000 (21:02 +0000)]
Make the SYNOPSIS section a bit more informative.

18 years agoMake the SYNOPSIS section a bit more informative.
joel [Thu, 15 Dec 2005 20:25:41 +0000 (20:25 +0000)]
Make the SYNOPSIS section a bit more informative.

18 years agoIt is not safe to use m_copypacket() here as the returned mbuf is readonly,
thompsa [Thu, 15 Dec 2005 19:34:39 +0000 (19:34 +0000)]
It is not safe to use m_copypacket() here as the returned mbuf is readonly,
change to m_dup and keep the alignment on the layer3 header.

MFC after: 1 week

18 years agoInstall nextboot in /rescue as /rescue/nextboot rather than
jhb [Thu, 15 Dec 2005 18:29:01 +0000 (18:29 +0000)]
Install nextboot in /rescue as /rescue/nextboot rather than
/rescue/nextboot.sh to match the name in /sbin (/sbin/nextboot).

Reviewed by: gtetlow
MFC after: 1 week

18 years agoVIA Tech V-RAID write support added.
brueffer [Thu, 15 Dec 2005 17:02:11 +0000 (17:02 +0000)]
VIA Tech V-RAID write support added.

18 years agoRemove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)
jhb [Thu, 15 Dec 2005 16:30:41 +0000 (16:30 +0000)]
Remove linux_mib_destroy() (which I actually added in between 5.0 and 5.1)
which existed to cleanup the linux_osname mutex.  Now that MTX_SYSINIT()
has grown a SYSUNINIT to destroy mutexes on unload, the extra destroy here
was redundant and resulted in panics in debug kernels.

MFC after: 1 week
Reported by: Goran Gajic ggajic at afrodita dot rcub dot bg dot ac dot yu

18 years agoAdded comments about the apparently-magic rational function used in
bde [Thu, 15 Dec 2005 16:23:22 +0000 (16:23 +0000)]
Added comments about the apparently-magic rational function used in
the second step of approximating cbrt(x).  It turns out to be neither
very magic not nor very good.  It is just the (2,2) Pade approximation
to 1/cbrt(r) at r = 1, arranged in a strange way to use fewer operations
at a cost of replacing 4 multiplications by 1 division, which is an
especially bad tradeoff on machines where some of the multiplications
can be done in parallel.  A Remez rational approximation would give
at least 2 more bits of accuracy, but the (2,2) Pade approximation
already gives 6 more bits than needed.  (Changed the comment which
essentially says that it gives 3 more bits.)

Lower order Pade approximations are not quite accurate enough for
double precision but are plenty for float precision.  A lower order
Remez rational approximation might be enough for double precision too.
However, rational approximations inherently require an extra division,
and polynomial approximations work well for 1/cbrt(r) at r = 1, so I
plan to switch to using the latter.  There are some technical
complications that tend to cost a division in another way.

18 years agoAdd support for writing VIA metadata.
sos [Thu, 15 Dec 2005 13:30:23 +0000 (13:30 +0000)]
Add support for writing VIA metadata.

Null out the metadata on disks when array is deleted.

18 years agoo Rewrite bge_encap() to use bus_dmamap_load_mbuf_sg(9), inlining the
glebius [Thu, 15 Dec 2005 09:45:53 +0000 (09:45 +0000)]
o Rewrite bge_encap() to use bus_dmamap_load_mbuf_sg(9), inlining the
  callback function bge_dma_map_tx_desc() into the bge_encap() itself.
o If busdma returns EFBIG, try to m_defrag() the packet.

Reviewed by: yongari

18 years agoAdd bge(4) support for big-endian architectures(part 1/2).
yongari [Thu, 15 Dec 2005 05:48:49 +0000 (05:48 +0000)]
Add bge(4) support for big-endian architectures(part 1/2).
 - Give up endianess support and switch to native-endian format for
   accessing hardware structures. In fact embedded processor for
   BCM57xx is big-endian architure(MIPS) and it requires native-endian
   format for NIC structures.The NIC performs necessary byte/word
   swapping depending on programmed endian type.
 - With above changes all htole16/htole32 calls were gone.
 - Remove bge_vhandle member in softc and changed to use explicit
   register access. This may add additional performance penalty
   that than that of previous memory access. But most of the access
   is performed on initialization phase(e.g. RCB setup), it would be
   negligible.

Due to incorrect use of bus_dma(9) in bge(4) it still panics sparc64
system in device detach path. The issue would be fixed in next patch.

Reviewed by: jkim (initial version)
Silence from: ps
Tested by: glebius
Obtained from: NetBSD via OpenBSD

18 years agoRemove one more reference to usbd.conf.
iedowse [Thu, 15 Dec 2005 01:14:35 +0000 (01:14 +0000)]
Remove one more reference to usbd.conf.

18 years agoRemove usbd(8) and all references to it. It is no longer necessary
iedowse [Thu, 15 Dec 2005 01:04:51 +0000 (01:04 +0000)]
Remove usbd(8) and all references to it. It is no longer necessary
since devd(8) now provides the same functionality.

Submitted by: Anish Mistry

18 years agoWhen using m_dup(9) to copy more than MHLEN bytes of data, don't create an
emaste [Wed, 14 Dec 2005 23:34:26 +0000 (23:34 +0000)]
When using m_dup(9) to copy more than MHLEN bytes of data, don't create an
mbuf chain that starts with a cluster containing just MHLEN bytes.  This
happened because m_dup called m_get or m_getcl depending on the amount of
data to copy, but then always set the size available in the first mbuf to
MHLEN.

Submitted by: Matt Koivisto <mkoivisto at sandvine dot com>
Approved by: jmg
Silence from: rwatson (mentor)

18 years agoFix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to
mux [Wed, 14 Dec 2005 22:27:48 +0000 (22:27 +0000)]
Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to
match the type of the variable they are exporting.

Spotted by: Thomas Hurst <tom@hur.st>
MFC after: 3 days

18 years agoFix stale comment.
jhb [Wed, 14 Dec 2005 21:47:02 +0000 (21:47 +0000)]
Fix stale comment.

18 years agoWhitespace.
jhb [Wed, 14 Dec 2005 21:42:12 +0000 (21:42 +0000)]
Whitespace.

18 years agoAdd Via VT8251 support.
brueffer [Wed, 14 Dec 2005 21:10:59 +0000 (21:10 +0000)]
Add Via VT8251 support.

18 years agoSpelling fixes and minor nit.
wilko [Wed, 14 Dec 2005 19:50:55 +0000 (19:50 +0000)]
Spelling fixes and minor nit.

PR: doc/9035
Submitted by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>

18 years agoadd control for packet bursting
sam [Wed, 14 Dec 2005 19:44:39 +0000 (19:44 +0000)]
add control for packet bursting

18 years agomake packet bursting configurable (default to on if device is capable)
sam [Wed, 14 Dec 2005 19:32:53 +0000 (19:32 +0000)]
make packet bursting configurable (default to on if device is capable)

18 years agoAdd support for the nForce2/3/4 SMBus controllers which all contain two
jhb [Wed, 14 Dec 2005 17:49:45 +0000 (17:49 +0000)]
Add support for the nForce2/3/4 SMBus controllers which all contain two
SMBus busses.  Because of limitations in smbus_if.m, the second smbus is
attached to an amdpm1 device that is a child of amdpm0.

Submitted by: Artemiev Igor ai (at) bmc dot brk dot ru

18 years agoFix the name of the country I was born.
maxim [Wed, 14 Dec 2005 17:33:12 +0000 (17:33 +0000)]
Fix the name of the country I was born.

18 years agoo Now when SIG_IGN signal action for SIGCHLD reap zombies
maxim [Wed, 14 Dec 2005 17:26:29 +0000 (17:26 +0000)]
o Now when SIG_IGN signal action for SIGCHLD reap zombies
automatically it is possible wait4(2) returns -1 and sets
errno = ECHILD if there were forked children.  A user can
set such signal handler e.g. via ``trap "" 20'', see a PR
for the test case.  Deal with this case and mark a job as
JOBDONE.

PR: bin/90334
Submitted by: bde
MFC after: 4 weeks

18 years agoAdd RAID0+1 and RAID5 support to VIA RAID code.
sos [Wed, 14 Dec 2005 13:07:49 +0000 (13:07 +0000)]
Add RAID0+1 and RAID5 support to VIA RAID code.
Fix support for multiple arrays.

18 years agoAdd support for VIA VT8251 southbridge.
sos [Wed, 14 Dec 2005 12:13:00 +0000 (12:13 +0000)]
Add support for VIA VT8251 southbridge.
SATA support for now in compat mode, but all 4 channels usable.

18 years agoCorrect calculation of RAID0 sizes on VIA RAID arrays.
sos [Wed, 14 Dec 2005 12:11:51 +0000 (12:11 +0000)]
Correct calculation of RAID0 sizes on VIA RAID arrays.

18 years agoo Correct usage(): delete command takes as argument array not channel.
maxim [Wed, 14 Dec 2005 06:33:18 +0000 (06:33 +0000)]
o Correct usage(): delete command takes as argument array not channel.

PR: bin/90353
Submitted by: Gavin Atkinson
MFC after: 1 week

18 years agoMega update to the LSI MegaRAID driver:
scottl [Wed, 14 Dec 2005 03:26:49 +0000 (03:26 +0000)]
Mega update to the LSI MegaRAID driver:

1.  Implement a large set of ioctl shims so that the Linux management apps
from LSI will work.  This includes infrastructure to support adding, deleting
and rescanning arrays at runtime.  This is based on work from Doug Ambrosko,
heavily augmented by LSI and Yahoo.

2.  Implement full 64-bit DMA support.  Systems with more than 4GB of RAM
can now operate without the cost of bounce buffers.  Cards that cannot do
64-bit DMA will automatically revert to using bounce buffers.  This option
can be forced off by setting the 'hw.amr.force_sg32" tunable in the loader.
It should only be turned off for debugging purposes.  This work was sponsored
by Yahoo.

3.  Streamline the command delivery and interrupt handler paths after
much discussion with Dell and LSI.  The logic now closely matches the
intended design, making it both more robust and much faster.  Certain
i/o failures under heavy load should be fixed with this.

4.  Optimize the locking.  In the interrupt handler, the card can be checked
for completed commands without any locks held, due to the handler being
implicitely serialized and there being no need to look at any shared data.
Only grab the lock to return the command structure to the free pool.  A
small optimization can still be made to collect all of the completions
together and then free them together under a single lock.

Items 3 and 4 significantly increase the performance of the driver.  On an
LSI 320-2X card, transactions per second went from 13,000 to 31,000 in my
testing with these changes.  However, these changes are still fairly
experimental and shouldn't be merged to 6.x until there is more testing.

Thanks to Doug Ambrosko, LSI, Dell, and Yahoo for contributing towards
this.

18 years agoAdd support for creating span ports so that one can snoop bridged traffic
thompsa [Wed, 14 Dec 2005 02:52:13 +0000 (02:52 +0000)]
Add support for creating span ports so that one can snoop bridged traffic
from another interface/machine/network.

Obtained from: OpenBSD
MFC after: 2 weeks

18 years agoStyle fixs, add missing word 'signal'.
davidxu [Wed, 14 Dec 2005 01:59:11 +0000 (01:59 +0000)]
Style fixs, add missing word 'signal'.

Reviewed by: deischen

18 years agodisplay a bssid that's zero with the -v option
sam [Wed, 14 Dec 2005 01:22:26 +0000 (01:22 +0000)]
display a bssid that's zero with the -v option

18 years agoWhen creating neighbor entries for an ahdemo bss apply the local
sam [Wed, 14 Dec 2005 01:18:36 +0000 (01:18 +0000)]
When creating neighbor entries for an ahdemo bss apply the local
settings.  In particular this allows us to use QoS frames in a
bss and in turn enables disabling ack's.

18 years agowhen creating an ahdemo bss use any requested bssid; otherwise use zero
sam [Wed, 14 Dec 2005 01:16:22 +0000 (01:16 +0000)]
when creating an ahdemo bss use any requested bssid; otherwise use zero

Obtained from: madwifi

18 years agoallow setting the bssid in any mode
sam [Wed, 14 Dec 2005 01:14:22 +0000 (01:14 +0000)]
allow setting the bssid in any mode

Obtained from: netbsd

18 years agoEradicate caddr_t from the VFS API.
des [Wed, 14 Dec 2005 00:49:52 +0000 (00:49 +0000)]
Eradicate caddr_t from the VFS API.

18 years agoNuke vnodeop_desc.vdesc_transports, which has been unused since the dawn
des [Wed, 14 Dec 2005 00:15:11 +0000 (00:15 +0000)]
Nuke vnodeop_desc.vdesc_transports, which has been unused since the dawn
of time (or the inception of ncvs, whichever came last)

18 years agoFix the Tigon I/II driver to support 64-bit DMA. In the process, convert it
scottl [Wed, 14 Dec 2005 00:03:41 +0000 (00:03 +0000)]
Fix the Tigon I/II driver to support 64-bit DMA.  In the process, convert it
to use busdma.  Unlike most of the other drivers, but similar to the
if_em driver, pre-allocate the dmamaps at init time instead of allocating
them on the fly when descriptors need to be filled.  This isn't ideal right
now because a map is allocated for every descriptor slot in the tx, rx, mini,
and jumbo rings (which is a lot!) in order to simplify the bookkeeping, even
though the driver might support filling only a subset of those slots.
Luckily, maps are typically NULL on i386 and amd64, so the cost isn't
very high.  It could be an issue with sparc64, but the driver isn't endian
clean either, and that is a much bigger problem to solve first.

Note that jumbo frame support is under-tested, and I'm not even sure if
it till really works correctly given the evil VM magic that is does.
The changes here attempt to preserve the existing semanitcs.

Thanks to Martin Nillson for contributing the Netgear card for this work.

MFC-After: 3 weeks

18 years agoAdd a new 'show lock' command to ddb. If the argument has a valid lock
jhb [Tue, 13 Dec 2005 23:14:35 +0000 (23:14 +0000)]
Add a new 'show lock' command to ddb.  If the argument has a valid lock
class, then it displays various information about the lock and calls a
new function pointer in lock_class (lc_ddb_show) to dump class-specific
information about the lock as well (such as the owner of a mutex or
xlock'ed sx lock).  This is easier than staring at hex dumps of locks to
figure out who owns the lock, etc.  Note that extending lock_class doesn't
affect the ABI for any kernel modules as the only code that deals with
lock_class structures directly is kern_mutex.c, kern_sx.c, and witness.

MFC after: 1 week

18 years agoHide DDB-specific functions inside check for #ifdef DDB.
rodrigc [Tue, 13 Dec 2005 22:42:02 +0000 (22:42 +0000)]
Hide DDB-specific functions inside check for #ifdef DDB.

Noticed by: des

18 years agoAdd a -c option to control caddr_t replacement (which was commented out in
des [Tue, 13 Dec 2005 22:21:46 +0000 (22:21 +0000)]
Add a -c option to control caddr_t replacement (which was commented out in
the previous revision)

18 years agofix include path
sam [Tue, 13 Dec 2005 22:15:09 +0000 (22:15 +0000)]
fix include path

18 years agoupdate
sam [Tue, 13 Dec 2005 22:13:41 +0000 (22:13 +0000)]
update

18 years agofix include pathnames
sam [Tue, 13 Dec 2005 22:12:16 +0000 (22:12 +0000)]
fix include pathnames

18 years agoAdd a script that converts K&R-style function definitions to ANSI style.
des [Tue, 13 Dec 2005 22:09:50 +0000 (22:09 +0000)]
Add a script that converts K&R-style function definitions to ANSI style.

18 years agoOptimize by not doing excessive conversions for handling the sign bit.
bde [Tue, 13 Dec 2005 20:17:23 +0000 (20:17 +0000)]
Optimize by not doing excessive conversions for handling the sign bit.
This gives an optimization of between 9 and 22% on Athlons (largest
for cbrt() on amd64 -- from 205 to 159 cycles).

We extracted the sign bit and worked with |x|, and restored the sign
bit as the last step.  We avoided branches to a fault by using accesses
to FP values as bits to clear and restore the sign bit.  Avoiding
branches is usually good, but the bit access macros are not so good
(especially for setting FP values), and here they always caused pipeline
stalls on Athlons.  Even using branches would be faster except on args
that give perfect branch misprediction, since only mispredicted branches
cause stalls, but it possible to avoid touching the sign bit in FP
values at all (except to preserve it in conversions from bits to FP
not related to the sign bit).  Do this.  The results are identical
except in 2 of the 3 unsupported rounding modes, since all the
approximations use odd rational functions so they work right on strictly
negative values, and the special case of -0 doesn't use an approximation.

18 years agoAssert that the page that is given to vm_page_free_toq() does not have any
alc [Tue, 13 Dec 2005 19:59:09 +0000 (19:59 +0000)]
Assert that the page that is given to vm_page_free_toq() does not have any
managed mappings.

18 years agoMFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked broken
peter [Tue, 13 Dec 2005 19:08:55 +0000 (19:08 +0000)]
MFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked broken
and it has been calibrated.

18 years agoRevert previous commit. The BIOS braindamage is even worse than I
jhb [Tue, 13 Dec 2005 18:29:10 +0000 (18:29 +0000)]
Revert previous commit.  The BIOS braindamage is even worse than I
originally thought.  The BIOS that cleared CPUID_APIC actually managed
to disable the local APIC entirely and even Windows 64 doesn't boot on
it.

Reported by: bz

18 years agoFixed some especially horrible style bugs (indentation that is neither
bde [Tue, 13 Dec 2005 18:22:00 +0000 (18:22 +0000)]
Fixed some especially horrible style bugs (indentation that is neither
KNF nor fdlibmNF combined with multiple statements per line).

18 years agoPrint user, system and real time upon exit.
des [Tue, 13 Dec 2005 17:51:56 +0000 (17:51 +0000)]
Print user, system and real time upon exit.

18 years ago[mdoc] add missing space before a punctuation type argument.
ru [Tue, 13 Dec 2005 17:07:52 +0000 (17:07 +0000)]
[mdoc] add missing space before a punctuation type argument.

18 years agoIn Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
delphij [Tue, 13 Dec 2005 15:32:52 +0000 (15:32 +0000)]
In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference.  Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.

Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>

18 years agoDon't check the CPUID_APIC bit in the cpu_features flags field to determine
jhb [Tue, 13 Dec 2005 15:09:40 +0000 (15:09 +0000)]
Don't check the CPUID_APIC bit in the cpu_features flags field to determine
if the boot CPU has a local APIC because some BIOS vendors are not
competent enough to set this bit.  Instead, just assume that we always have
a local APIC on amd64.  For i386 the check is a bit more subtle.  FreeBSD
requires either an MP Table or an ACPI MADT table to enumerate APICs.  The
only systems that have one of those tables that don't have local APICs are
some presumably rare (and old) SMP 486 systems using external APICs.  Thus,
instead of checking the CPUID_APIC flag, check the CPU class and abort if
we are running on a 486.

MFC after: 1 week
Reported by: bz

18 years agoSort .Xr by section number.
davidxu [Tue, 13 Dec 2005 13:43:35 +0000 (13:43 +0000)]
Sort .Xr by section number.

Submitted by: ru

18 years ago/* You're not supposed to hit this problem */
phk [Tue, 13 Dec 2005 13:23:27 +0000 (13:23 +0000)]
/* You're not supposed to hit this problem */

For some denormalized long double values, a bug in __hldtoa() (called
from *printf()'s %A format) results in a base 16 digit being rounded
up from 0xf to 0x10.

When this digit is subsequently converted to string format, an index
of 10 reaches past the end of the uppper-case hex/char array, picking
up whatever the code segment happen to contain at that address.

This mostly seem to be some character from the upper half of the
byte range.

When using the %a format instead of %A, the first character past
the end of the lowercase hex/char table happens to be index 0 in
the uppercase hex/char table hextable and therefore the string
representation features a '0', which is supposedly correct.

This leads me to belive that the proper fix _may_ be as simple as
masking all but the lower four bits off after incrementing a hex-digit
in libc/gdtoa/_hdtoa.c:roundup().  I worry however that the upper
bit in 0x10 indicates a carry not carried.

Until das@ or bde@ finds time to visit this issue, extend the
hexdigit arrays with a 17th index containing '?' so that we get a
invalid but consistent and printable output in both %a and %A formats
whenever this bug strikes.

This unmasks the bug in the %a format therefore solving the real
issue may both become easier and more urgent.

Possibly related to: PR 85080
With help by: bde@

18 years agoAdd a new feature for optimizining ipfw rulesets - substitution of the
glebius [Tue, 13 Dec 2005 12:16:03 +0000 (12:16 +0000)]
Add a new feature for optimizining ipfw rulesets - substitution of the
action argument with the value obtained from table lookup. The feature
is now applicable only to "pipe", "queue", "divert", "tee", "netgraph"
and "ngtee" rules.

An example usage:

  ipfw pipe 1000 config bw 1000Kbyte/s
  ipfw pipe 4000 config bw 4000Kbyte/s
  ipfw table 1 add x.x.x.x 1000
  ipfw table 1 add x.x.x.y 4000
  ipfw pipe tablearg ip from table(1) to any

In the example above the rule will throw different packets to different pipes.

TODO:
  - Support "skipto" action, but without searching all rules.
  - Improve parser, so that it warns about bad rules. These are:
    - "tablearg" argument to action, but no "table" in the rule. All
      traffic will be blocked.
    - "tablearg" argument to action, but "table" searches for entry with
      a specific value. All traffic will be blocked.
    - "tablearg" argument to action, and two "table" looks - for src and
      for dst. The last lookup will match.

18 years agoIn bge_link_upd(), rewrite the logic so that status is assigned
marcel [Tue, 13 Dec 2005 06:14:14 +0000 (06:14 +0000)]
In bge_link_upd(), rewrite the logic so that status is assigned
on the code path it is used in a way that GCC understands. This
avoids breakage due to higher optimization levels.

18 years agoAdd cross references to siginfo.3.
davidxu [Tue, 13 Dec 2005 03:05:58 +0000 (03:05 +0000)]
Add cross references to siginfo.3.

18 years agoInherit system-wide BLKDEV_IOSIZE definition.
rodrigc [Tue, 13 Dec 2005 02:32:30 +0000 (02:32 +0000)]
Inherit system-wide BLKDEV_IOSIZE definition.

Submitted by: kan

18 years agoAdd siginfo.
davidxu [Tue, 13 Dec 2005 00:28:09 +0000 (00:28 +0000)]
Add siginfo.

18 years agoImprove upon rev 1.133 where NFS/TCP would not reconnect.
ps [Mon, 12 Dec 2005 23:18:05 +0000 (23:18 +0000)]
Improve upon rev 1.133 where NFS/TCP would not reconnect.

Submitted by: Mohan Srinivasan

18 years agoFor the amd64 platform, we can depend on the TSC being present. This patch
peter [Mon, 12 Dec 2005 22:27:07 +0000 (22:27 +0000)]
For the amd64 platform, we can depend on the TSC being present.  This patch
changes DELAY to use the TSC once it has been calibrated.  This does NOT
use the TSC for long-term timekeeping.   It only uses it to bound the
DELAY() spinloop.  This should not be affected by the Athlon64 X2 TSC
quirks because the cpu is not halted while we use DELAY().

18 years agoMake uart_getenv() not be ns8250 dependent. This will allow, in the future,
imp [Mon, 12 Dec 2005 21:00:58 +0000 (21:00 +0000)]
Make uart_getenv() not be ns8250 dependent.  This will allow, in the future,
compilation of kernels without ns8250 support but using the uart framework.
These kernels will be for machines where size matters more, so including code
that can never be executed is undesriable...

18 years agoFor reiserfs, pass mount parameters directly to nmount() instead
rodrigc [Mon, 12 Dec 2005 19:51:37 +0000 (19:51 +0000)]
For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by: dumbbell

18 years ago- Polling can be used on SMP.
glebius [Mon, 12 Dec 2005 19:29:30 +0000 (19:29 +0000)]
- Polling can be used on SMP.
- A kernel module can support polling.

18 years agoadd mcastrate support
sam [Mon, 12 Dec 2005 19:23:55 +0000 (19:23 +0000)]
add mcastrate support

MFC after: 1 week