]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agosk(4) now also works on sparc64 (as of yongari's recent commits).
Simon L. B. Nielsen [Thu, 27 Apr 2006 06:08:38 +0000 (06:08 +0000)]
sk(4) now also works on sparc64 (as of yongari's recent commits).

18 years agoUncomment sk(4) as it's now working.
Pyun YongHyeon [Thu, 27 Apr 2006 06:03:17 +0000 (06:03 +0000)]
Uncomment sk(4) as it's now working.

18 years agoBring busdmafied sk(4) to all architectures.
Pyun YongHyeon [Thu, 27 Apr 2006 05:59:09 +0000 (05:59 +0000)]
Bring busdmafied sk(4) to all architectures.
- MPSAFE. No more recursive lock required.
- bus_dma(9) conversion. I think it should work on all architectures.
- optimized Rx handler for each normal and jumbo frames. Previously
  sk(4) used jumbo frame management code to handle normal sized
  frames. As the handler needs an additional lock to protect jumbo
  frame management structure from races, it used two lock operations
  for each received packet. Now sk(4) uses single lock operation for
  normal frame.(Jumbo frame still needs two lock operations as before.)
  The hardware supports DMA scatter operations for Rx descriptors such
  that it's possible to take advantagee of m_cljget(9) for jumbo frames.
  However, due to a unknown reasons it resulted in poor performance on
  sparc64. So I dropped m_cljget(9) approach. This should be revisited
  since it would reduce one lock operation for jumbo frame handling.
- Tx TCP/Rx IP checksum offload support. According to the data sheet
  of SK-NET GENESIS the hardware supports Rx IP/TCP/UDP offload.
  But I couldn't make it work on my Yukon hardware. So Rx TCP/UDP was
  disabled at the moment. It seems that newer Yukon chips can support
  Tx UDP checksum offload too. But I need more documentation first.
- Added more wait time in reading VPD data. It seems that ASUS LOM
  takes a very long time to respond VPD read signal.
- Added an additional lock for MII register access callbacks.
- Added more strict received packet validation routine. Previously it
  passed corrupted packets to upper layers under certain conditions.
- A new function sk_yukon_tick() to handle auto-negotiation properly.
- Interrupt handler now checks shared interrupt source and protects
  the interrupt handler from NULL pointer dereference which was caused
  by odd status word value. The status word can returns 0xffffffff if
  cable is unplugged while Rx/Tx/auto-negotiation is in progress.
- suspend/resume support(not tested).
- Added Rx/Tx FIFO flush routine for Yukon
- Activate Tx descriptor poll timer in order to protect possible loss
  of SK_TXBMU_TX_START command. Previously the driver continuously issued
  SK_TXBMU_TX_START when it notices pending Tx descriptors not processed
  yet in interrupt handler. That approach would add additional PCI
  write access overhead under high Tx load situations and it might fail
  if the first SK_TXBMU_TX_START was lost and no interrupt is generated
  from the first SK_TXBMU_TX_START command.
- s/printf/if_printf/, s/printf/device_printf/, Axe sk_unit in softc.
- Setting multicast/station address is now safe on strict-alignment
  architectures.
- Fix long standing bug in VLAN header length setup.
- Added/corrected register definitions for Yukon.
  (Register information from Linux skge driver.)
- Added Rx status definition for Marvell Yukon/XaQti XMAC.
  (Rx status register information from Linux skge driver.)
- Update if_oerrors if we encounter watchdog error.
- callout(9) conversion

Special thanks to jkim who let me know RX status differences between
Yukon and XaQti XMAC.
It seems that there is still occasional watchdog timeout error but I
couldn't reproduce it and need more information to analyze it from
users.

Tested by: bz(amd64), me(i386, sparc64), current ML
Frank Behrens frank ! pinky ( sax $ de

18 years agoUse 115200 and not 9600 as the initial baudrate. This speeds up
Marcel Moolenaar [Thu, 27 Apr 2006 05:43:10 +0000 (05:43 +0000)]
Use 115200 and not 9600 as the initial baudrate. This speeds up
detection of the FIFO size. Especially for large FIFOs.

18 years agoIn the case when reset via keyboard controller doesn't work for some reason
Maxim Sobolev [Thu, 27 Apr 2006 05:18:26 +0000 (05:18 +0000)]
In the case when reset via keyboard controller doesn't work for some reason
(i.e. no keyboard controller present), try two other common methods for
resetting i386 machine - pci reset and port 0x92 fast reset. Only if neither
works warn user and resort to "unmap entire address space and hope for good"
hack. This makes my MacBook Pro rebooting just fine and should also help
other legacy-free hardware out there.

Also, disable interrupts unconditionally in cpu_reset_real(), since we don't
want any interference.

MFC after: 1 week

18 years agoFix build on i386
Xin LI [Thu, 27 Apr 2006 05:02:21 +0000 (05:02 +0000)]
Fix build on i386

18 years agoThe size of I/O ranges can be anything from 16 bytes to 2G bytes.
Marcel Moolenaar [Thu, 27 Apr 2006 04:53:18 +0000 (04:53 +0000)]
The size of I/O ranges can be anything from 16 bytes to 2G bytes.
Lower the minimum for memory mapped I/O from 32 bytes to 16 bytes.
This fixes bus enumeration on ia64 now that the Diva auxiliary
serial port is attached to.

18 years agoCorrect DRIVER_MODULE declaration.
Pyun YongHyeon [Thu, 27 Apr 2006 04:39:58 +0000 (04:39 +0000)]
Correct DRIVER_MODULE declaration.
skc does attach to pci bus instead of sk.

Submitted by: jmg

18 years agoo Add 2 HP Diva single port UARTs.
Marcel Moolenaar [Thu, 27 Apr 2006 03:17:39 +0000 (03:17 +0000)]
o  Add 2 HP Diva single port UARTs.

18 years agoChange the semantics of brk_max to dynamically deal with data segment
Jason Evans [Thu, 27 Apr 2006 01:03:00 +0000 (01:03 +0000)]
Change the semantics of brk_max to dynamically deal with data segment
bounds. [1]

Modify logic for utilizing the data segment, such that it is possible to
create huge allocations there.

Shrink the data segment when deallocating a chunk, if it is at the end of
the data segment.

Rename chunk_size to csize in huge_malloc(), in order to avoid masking a
static variable of the same name. [1]

Reported by: Paul Allen <nospam@ugcs.caltech.edu>

18 years agoThe sk(4) driver has moved to /sys/dev/sk
Pyun YongHyeon [Thu, 27 Apr 2006 00:14:02 +0000 (00:14 +0000)]
The sk(4) driver has moved to /sys/dev/sk

18 years agoMFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries
Peter Wemm [Wed, 26 Apr 2006 21:49:20 +0000 (21:49 +0000)]
MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries
per page = effectively 12.19 bytes per pv entry after overheads).
Instead of using a shared UMA zone for 24 byte pv entries (two 8-byte tailq
nodes, a 4 byte pointer, and a 4 byte address), we allocate a page at a
time per process.  This provides 336 pv entries per process (actually, per
pmap address space) and eliminates one of the 8-byte tailq entries since
we now can track per-process pv entries implicitly.  The pointer to
the pmap can be eliminated by doing address arithmetic to find the metadata
on the page headers to find a single pointer shared by all 336 entries.
There is an 11-int bitmap for the freelist of those 336 entries.

This is mostly a mechanical conversion from amd64, except:
* i386 has to allocate kvm and map the pages, amd64 has them outside of kvm
* native word size is smaller, so bitmaps etc become 32 bit instead of 64
* no dump_add_page() etc stuff because they are in kvm always.
* various pmap internals tweaks because pmap uses direct map on amd64 but
  on i386 it has to use sched_pin and temporary mappings.

Also, sysctl vm.pmap.pv_entry_max and vm.pmap.shpgperproc are now
dynamic sysctls.  Like on amd64, i386 can now tune the pv entry limits
without a recompile or reboot.

This is important because of the following scenario.   If you have a 1GB
file (262144 pages) mmap()ed into 50 processes, that requires 13 million
pv entries.  At 24 bytes per pv entry, that is 314MB of ram and kvm, while
at 12 bytes it is 157MB.  A 157MB saving is significant.

Test-run by:  scottl (Thanks!)

18 years agoMove vm.pmap.pv_entry_count out from the PV_STATS ifdefs. It is always
Peter Wemm [Wed, 26 Apr 2006 21:34:07 +0000 (21:34 +0000)]
Move vm.pmap.pv_entry_count out from the PV_STATS ifdefs.  It is always
available and is a real counter, not a statistic.

18 years agoo Add 2 NEC cards
Marcel Moolenaar [Wed, 26 Apr 2006 21:31:31 +0000 (21:31 +0000)]
o  Add 2 NEC cards
o  Add 2 Dell cards
o  Add Quatech card
o  Add support for non-standard rclk values.
o  Update descriptions to match PCI id database.

18 years agoo Use __FBSDID
Marcel Moolenaar [Wed, 26 Apr 2006 21:25:13 +0000 (21:25 +0000)]
o  Use __FBSDID
o  Whitespace fixes
o  Non-K&R functions

18 years agomove remaining sysctl into the kern.sched tree...
John-Mark Gurney [Wed, 26 Apr 2006 19:42:38 +0000 (19:42 +0000)]
move remaining sysctl into the kern.sched tree...

18 years agoOnly use the low address for stats collection.
Paul Saab [Wed, 26 Apr 2006 16:33:58 +0000 (16:33 +0000)]
Only use the low address for stats collection.

18 years agointercept public safety channels and do explicit mapping of freq->ieee
Sam Leffler [Wed, 26 Apr 2006 16:02:36 +0000 (16:02 +0000)]
intercept public safety channels and do explicit mapping of freq->ieee
channel number since we're not ready at the net80211 layer to deal with them;
note this mapping has to match what's done in ieee80211_mhz2ieee

MFC after: 3 days

18 years agoback out public safety-specific channel number mapping; we can't do
Sam Leffler [Wed, 26 Apr 2006 16:00:37 +0000 (16:00 +0000)]
back out public safety-specific channel number mapping; we can't do
it until we know it should be applied as otherwise we can map 11a
channels into the 2.4G range and choose the wrong item from the
chanenl array

18 years agoReconstitute struct mac_policy_ops by breaking out individual function
Robert Watson [Wed, 26 Apr 2006 14:18:55 +0000 (14:18 +0000)]
Reconstitute struct mac_policy_ops by breaking out individual function
pointer prototypes from it into their own typedefs.  No functional or
ABI change.  This allows policies to declare their own function
prototypes based on a common definition from mac_policy.h rather than
duplicating these definitions.

Obtained from: SEDarwin, SPARTA
MFC after: 1 month

18 years agoUse the same method for detecting actual presence of AT-style keyboard
Maxim Sobolev [Wed, 26 Apr 2006 06:05:16 +0000 (06:05 +0000)]
Use the same method for detecting actual presence of AT-style keyboard
controller as we use in boot blocks (querying status register until
bit 1 goes off). If that doesn't happed during reasonable period assume
that the hardware doesn't have AT-style keyboard controller. This makes
FreeBSD working almost OOB on MacBook Pro (still there are issues with
putting second CPU core on-line, but since installation CD comes with
UP kernel with this change one should be able to install FreeBSD without
playing tricks with hints). Other legacy-free hardware (e.g. IBM NetVista
S40) should benefit from this as well, but since I don't have any I can't
verify.

It should make no difference on the ordinary i386 hardware (since in
that case that hardware already would be having an issues with A20
routines in boot blocks). I don't know much about AT-style keyboard
controller on other platforms (and don't have dedicated access to one),
therefore, the code is restricted to i386 for now. I suspect that amd64
may need this as well, but I would rather leave this decision to someone
who knows better about the platform(s) in question.

I have tested this change on as many "ordinary i386 boxes" as I can get
my hands on, and it doesn't create any false negatives on hardware with
AT-style keyboard present.

MFC after: 1 month

18 years agoIn in_pcbdrop(), fix !INVARIANTS build.
Marcel Moolenaar [Tue, 25 Apr 2006 23:23:13 +0000 (23:23 +0000)]
In in_pcbdrop(), fix !INVARIANTS build.

18 years agohonor fixed tx antenna when sending beacon frames
Sam Leffler [Tue, 25 Apr 2006 22:52:28 +0000 (22:52 +0000)]
honor fixed tx antenna when sending beacon frames

Submitted by: Michael Stevens (from netbsd)
MFC after: 1 week

18 years agoo Add IDs for Plan9, QNX4.X, Mac OS-X, Linux exteneded partitions.
Maxim Konovalov [Tue, 25 Apr 2006 20:42:15 +0000 (20:42 +0000)]
o Add IDs for Plan9, QNX4.X, Mac OS-X, Linux exteneded partitions.

PR: bin/96326
Submitted by: Alex Kozlov
MFC after: 2 weeks

18 years ago- Overhaul the 'ps' command in ddb to be mostly readable again. :) It is
John Baldwin [Tue, 25 Apr 2006 20:34:04 +0000 (20:34 +0000)]
- Overhaul the 'ps' command in ddb to be mostly readable again. :)  It is
  now back to using fixed-size columns for output and each line of output
  should fit in 80 columns on both 32-bit and 64-bit architectures.  In
  general the output is close to that of the userland ps(1) with the
  exception that the 'wmesg' field is mostly similar to the "state" field
  in top(1) in that it will show either a wmesg, a lock name (prefixed with
  an *), "CPU xx" (for a running thread), or nothing if none of those three
  conditions are true.  It also respects td_name when listing threads in
  a multithreaded process.  There is a somewhat evilly-defined PTR64 macro
  I use to make account for the change in the size of the 'wchan' column
  in the formatted output (wchan is now the only pointer in the ps output
  and is available so it can be passed to 'show sleepq', 'show turnstile',
  or 'show lock').
- Add two new commands "show proc [process]" and "show thread [thread]"
  that show details about the specified process or thread (specified
  either by pid/tid or pointer), respectively.  If an address it not
  specified, it uses the current kdb thread.

18 years agoAdd some new commands to hopefully make it easier to diagnose lock-related
John Baldwin [Tue, 25 Apr 2006 20:28:17 +0000 (20:28 +0000)]
Add some new commands to hopefully make it easier to diagnose lock-related
problems in ddb:
- "show threadchain [thread]" will start with the specified thread (or the
  current kdb thread by default) and show it's state.  If it is blocked on
  a lock, it will find the owner of the lock and show its state, etc.
- "show allchains" will find all of the threads that are blocked on a
  lock (but do not have any threads blocked on a lock they hold) and show
  the resulting thread chain.
- "show lockchain <lock>" takes a pointer to a lock_object (such as a
  mutex or rwlock).  If there is a turnstile for that lock, then it will
  display all the threads blocked on the lock.  In addition, for each
  thread blocked on the lock, it will display any contested locks they
  hold, and recurse on those locks to show any threads blocked on those
  locks, etc.

18 years agoUse db_lookup_thread() to lookup the thread for the passed in address
John Baldwin [Tue, 25 Apr 2006 20:24:23 +0000 (20:24 +0000)]
Use db_lookup_thread() to lookup the thread for the passed in address
and change 'show locks' to only list the locks for a given thread
rather than for all the threads in the process containing a specified
thread.

18 years agoAdd two helper functions: db_lookup_thread() and db_lookup_proc(). They
John Baldwin [Tue, 25 Apr 2006 20:22:48 +0000 (20:22 +0000)]
Add two helper functions: db_lookup_thread() and db_lookup_proc().  They
take the addr value passed to a ddb command and attempt to use it to
lookup a struct thread * or struct proc *, respectively.  Each function
first reparses the passed in value as if it was an ID entered in base 10.
For threads the ID is treated as a thread ID, for proceses the ID is
treated as a PID.  If a thread or proc matching the ID is found, it is
returned.  For db_lookup_thread(), if the check_pid argument is true and
it didn't find a thread with a matching thread ID, it will treat the ID as
a PID and look for a matching process.  If it finds one it returns the
first thread in the process.  If none of the ID lookups succeeded, then
the functions assume that the passed in address is a thread or proc
pointer, respectively.  This allows one to use tids, pids, or structure
pointers interchangeably in ddb functions that want to lookup threads or
processes if desired.

18 years agoo Replace disappeared URLs to Cisco docs by new ones, style.
Maxim Konovalov [Tue, 25 Apr 2006 20:01:50 +0000 (20:01 +0000)]
o Replace disappeared URLs to Cisco docs by new ones, style.
No functional changes.

18 years agoo Set to zero engine_type, engine_id and pad (cisco calls it
Maxim Konovalov [Tue, 25 Apr 2006 19:56:53 +0000 (19:56 +0000)]
o Set to zero engine_type, engine_id and pad (cisco calls it
sampling_interval) fields in netflow v5 header.  We do not use
them but some netflow tools show garbage.

PR: kern/96296
Submitted by: David Duchscher
Approved by: glebius
MFC after: 1 week

18 years agoRemove last vestiges of sab(4).
Marius Strobl [Tue, 25 Apr 2006 19:43:53 +0000 (19:43 +0000)]
Remove last vestiges of sab(4).

18 years agoFix half of the current i386 tinderbox failure. max_bus_addr should be a
John Baldwin [Tue, 25 Apr 2006 19:18:48 +0000 (19:18 +0000)]
Fix half of the current i386 tinderbox failure.  max_bus_addr should be a
bus_addr_t rather than a bus_size_t.

18 years agoUse PTOV() to convert physical addresses to appropriate virtual addresses
John Baldwin [Tue, 25 Apr 2006 18:42:22 +0000 (18:42 +0000)]
Use PTOV() to convert physical addresses to appropriate virtual addresses
in the loader when searching for the ACPI RSDP.  (The loader runs in a flat
mode with va 0 == pa 0xa000.)

18 years agoIf one removes the option from conf/options, one should
Matt Jacob [Tue, 25 Apr 2006 17:54:42 +0000 (17:54 +0000)]
If one removes the option from conf/options, one should
remove the include of the derived file opt_bge.h as well.

18 years agoRename 'last' to 'inp' in udp_append(): the name 'last' is due to
Robert Watson [Tue, 25 Apr 2006 17:38:08 +0000 (17:38 +0000)]
Rename 'last' to 'inp' in udp_append(): the name 'last' is due to
the fact that the loop through inpcb's in udp_input() tracks the
last inpcb while looping.  We keep that name in the calling loop
but not in the delivery routine itself.

MFC after: 3 months

18 years agoAdd synchronization to vm_pageq_add_new_page() so that it can be called
Alan Cox [Tue, 25 Apr 2006 17:27:24 +0000 (17:27 +0000)]
Add synchronization to vm_pageq_add_new_page() so that it can be called
safely after kernel initialization.  Remove GIANT_REQUIRED.

MFC after: 6 weeks

18 years agodocument the new tunable.
Michael Reifenberger [Tue, 25 Apr 2006 16:52:54 +0000 (16:52 +0000)]
document the new tunable.

18 years agomake BGE_FAKE_AUTONEG a tunable.
Michael Reifenberger [Tue, 25 Apr 2006 15:56:52 +0000 (15:56 +0000)]
make BGE_FAKE_AUTONEG a tunable.
This allows one to change the behavior of the driver pre-boot.

NOTE: This patch was made for DragonFly BSD by Sepherosa Ziehau.

PR: kern/94833
Submitted by: Devon H. O'Dell
Obtained from: DragonFly
MFC after: 1 month

18 years agoFix assorted grammar and punctuation nits. These are a subset of
Bruce A. Mah [Tue, 25 Apr 2006 15:21:26 +0000 (15:21 +0000)]
Fix assorted grammar and punctuation nits.  These are a subset of
some fixes that will (very shortly) be committed to RELENG_6_1.

Approved by: re (hrs)

18 years agoMention VIA VT8251 support.
Christian Brueffer [Tue, 25 Apr 2006 15:07:10 +0000 (15:07 +0000)]
Mention VIA VT8251 support.

18 years agoMove lock assertions to top of in6_pcbladdr(): we still want them to run
Robert Watson [Tue, 25 Apr 2006 12:09:58 +0000 (12:09 +0000)]
Move lock assertions to top of in6_pcbladdr(): we still want them to run
even if we're going to return an argument-based error.

Assert pcbinfo lock in in6_pcblookup_local(), in6_pcblookup_hash(), since
they walk pcbinfo inpcb lists.

Assert inpcb and pcbinfo locks in in6_pcbsetport(), since
port reservations are changing.

MFC after: 3 months

18 years agoExtend getsock() to return the struct file flags read while holding the
Robert Watson [Tue, 25 Apr 2006 11:48:16 +0000 (11:48 +0000)]
Extend getsock() to return the struct file flags read while holding the
file lock, in the style of fgetsock().

Modify accept1() to use getsock() instead of fgetsock(), relying on the
file descriptor reference rather than an acquired socket reference to
prevent the listen socket from being destroyed during accept().  This
avoids additional reference count operations, which should improve
performance, and also avoids accept1() operating on a socket whose file
descriptor has been torn down, which may have resulted in protocol
shutdown starting.

MFC after: 3 months

18 years agoAbstract inpcb drop logic, previously just setting of INP_DROPPED in TCP,
Robert Watson [Tue, 25 Apr 2006 11:17:35 +0000 (11:17 +0000)]
Abstract inpcb drop logic, previously just setting of INP_DROPPED in TCP,
into in_pcbdrop().  Expand logic to detach the inpcb from its bound
address/port so that dropping a TCP connection releases the inpcb resource
reservation, which since the introduction of socket/pcb reference count
updates, has been persisting until the socket closed rather than being
released implicitly due to prior freeing of the inpcb on TCP drop.

MFC after: 3 months

18 years agoBump up the NFS server dupreq cache limit to 2K (from 64). With a small
Mohan Srinivasan [Tue, 25 Apr 2006 00:21:56 +0000 (00:21 +0000)]
Bump up the NFS server dupreq cache limit to 2K (from 64). With a small
duplicate request cache, under heavy load a lot of non-idempotent requests
were getting served again, resulting in errors.

Found by : Kris Kennaway.

18 years agoCheck if reported HTT cores are physical cores. This commit does not
Jung-uk Kim [Tue, 25 Apr 2006 00:06:37 +0000 (00:06 +0000)]
Check if reported HTT cores are physical cores.  This commit does not
affect AMD CPUs at all because HTT bit is disabled earlier.  Intel
multicore CPUs and ULE scheduler may be affected.

18 years agoRevert previous commit. It's not part of the ppc(4) changes.
Marcel Moolenaar [Mon, 24 Apr 2006 23:36:32 +0000 (23:36 +0000)]
Revert previous commit. It's not part of the ppc(4) changes.

18 years agoo Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
Marcel Moolenaar [Mon, 24 Apr 2006 23:31:51 +0000 (23:31 +0000)]
o  Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
   end for isa(4).
o  Add a seperate bus frontend for acpi(4) and allow ISA DMA for
   it when ISA is configured in the kernel. This allows acpi(4)
   attachments in non-ISA configurations, as is possible for ia64.
o  Add a seperate bus frontend for pci(4) and detect known single
   port parallel cards.
o  Merge PC98 specific changes under pc98/cbus into the MI driver.
   The changes are minor enough for conditional compilation and
   in this form invites better abstraction.
o  Have ppc(4) usabled on all platforms, now that ISA specifics
   are untangled enough.

18 years agoAdd another Intel CPU feature flag, xTPR (Send Task Priority Messages).
Jung-uk Kim [Mon, 24 Apr 2006 22:56:57 +0000 (22:56 +0000)]
Add another Intel CPU feature flag, xTPR (Send Task Priority Messages).

18 years agoCheck if deterministic cache parameters leaf is valid before use.
Jung-uk Kim [Mon, 24 Apr 2006 22:23:52 +0000 (22:23 +0000)]
Check if deterministic cache parameters leaf is valid before use.

18 years agoRemove the sab(4) manpage.
Marcel Moolenaar [Mon, 24 Apr 2006 21:42:28 +0000 (21:42 +0000)]
Remove the sab(4) manpage.

18 years agoRemove the sab(4) driver. It is superseded by scc(4).
Marcel Moolenaar [Mon, 24 Apr 2006 21:40:58 +0000 (21:40 +0000)]
Remove the sab(4) driver. It is superseded by scc(4).

18 years agoAdjust dangerous-shared-cache-detection logic from "all shared data
Colin Percival [Mon, 24 Apr 2006 21:17:01 +0000 (21:17 +0000)]
Adjust dangerous-shared-cache-detection logic from "all shared data
caches are dangerous" to "a shared L1 data cache is dangerous".  This
is a compromise between paranoia and performance: Unlike the L1 cache,
nobody has publicly demonstrated a cryptographic side channel which
exploits the L2 cache -- this is harder due to the larger size, lower
bandwidth, and greater associativity -- and prohibiting shared L2
caches turns Intel Core Duo processors into Intel Core Solo processors.

As before, the 'machdep.hyperthreading_allowed' sysctl will allow even
the L1 data cache to be shared.

Discussed with: jhb, scottl
Security: See FreeBSD-SA-05:09.htt for background material.

18 years agoInherit LOCAL_CREDS option from listen socket for sockets returned
Maxim Konovalov [Mon, 24 Apr 2006 19:09:33 +0000 (19:09 +0000)]
Inherit LOCAL_CREDS option from listen socket for sockets returned
by accept(2).

PR: kern/90644
Submitted by: Andrey Simonenko
OK'ed by: mdodd
Tested by: NetBSD regress/sys/kern/unfdpass/unfdpass.c
MFC after: 1 month

18 years agoAdd attribution: the quote comes from Perlis's Paradigms of AI Programming
Diomidis Spinellis [Mon, 24 Apr 2006 12:13:02 +0000 (12:13 +0000)]
Add attribution: the quote comes from Perlis's Paradigms of AI Programming
p. 348.  See http://www.norvig.com/Lisp-retro.html

18 years agoMove AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below
Xin LI [Mon, 24 Apr 2006 08:44:34 +0000 (08:44 +0000)]
Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below
their corresponding devices.

18 years agoInstead of calling tcp_usr_detach() from tcp_usr_abort(), break out
Robert Watson [Mon, 24 Apr 2006 08:20:02 +0000 (08:20 +0000)]
Instead of calling tcp_usr_detach() from tcp_usr_abort(), break out
common pcb tear-down logic into tcp_detach(), which is called from
either.  Invoke tcp_drop() from the tcp_usr_abort() path rather than
tcp_disconnect(), as we want to drop it immediately not perform a
FIN sequence.  This is one reason why some people were experiencing
panics in sodealloc(), as the netisr and aborting thread were
simultaneously trying to tear down the socket.  This bug could often
be reproduced using repeated runs of the listenclose regression test.

MFC after: 3 months
PR: 96090
Reported by: Peter Kostouros <kpeter at melbpc dot org dot au>, kris
Tested by: Peter Kostouros <kpeter at melbpc dot org dot au>, kris

18 years agoMFp4: Add the ipend() method to the serdev I/F to allow umbrella
Marcel Moolenaar [Sun, 23 Apr 2006 22:12:39 +0000 (22:12 +0000)]
MFp4: Add the ipend() method to the serdev I/F to allow umbrella
drivers to obtain pending interrupt status from subordinate
drivers.

18 years agoMFp4: Calculate the divisor before setting the DLAB bit. This
Marcel Moolenaar [Sun, 23 Apr 2006 21:15:07 +0000 (21:15 +0000)]
MFp4: Calculate the divisor before setting the DLAB bit. This
prevents that there's a control flow that leaves the DLAB
bit set.

18 years agoNote FreeBSD-SA-06:14.fpu.asc
Xin LI [Sun, 23 Apr 2006 20:19:03 +0000 (20:19 +0000)]
Note FreeBSD-SA-06:14.fpu.asc

18 years agoAssert that sockets passed into soabort() not be SQ_COMP or SQ_INCOMP,
Robert Watson [Sun, 23 Apr 2006 18:15:54 +0000 (18:15 +0000)]
Assert that sockets passed into soabort() not be SQ_COMP or SQ_INCOMP,
since that removal should have been done a layer up.

MFC after: 3 months

18 years agoAdd some new options to mac_bsdestended. We can now match on:
David Malone [Sun, 23 Apr 2006 17:06:18 +0000 (17:06 +0000)]
Add some new options to mac_bsdestended. We can now match on:

subject: ranges of uid, ranges of gid, jail id
objects: ranges of uid, ranges of gid, filesystem,
object is suid, object is sgid, object matches subject uid/gid
object type

We can also negate individual conditions. The ruleset language is
a superset of the previous language, so old rules should continue
to work.

These changes require a change to the API between libugidfw and the
mac_bsdextended module. Add a version number, so we can tell if
we're running mismatched versions.

Update man pages to reflect changes, add extra test cases to
test_ugidfw.c and add a shell script that checks that the the
module seems to do what we expect.

Suggestions from: rwatson, trhodes
Reviewed by: trhodes
MFC after: 2 months

18 years agostyle(9) treatment following fixups.
Robert Watson [Sun, 23 Apr 2006 16:33:56 +0000 (16:33 +0000)]
style(9) treatment following fixups.

MFC after: 3 months

18 years agoEliminate unnecessary use of labels in error unwinding cases; result is
Robert Watson [Sun, 23 Apr 2006 16:25:30 +0000 (16:25 +0000)]
Eliminate unnecessary use of labels in error unwinding cases; result is
the same number or fewer lines of code.

Don't cast using caddr_t.

Remember to unlock the natm lock in some error cases where it was leaked
previously.

Annotate two cases where we'd like to hold the natm subsystem lock over
ioctls into the device driver.

Hold the natm lock longer in natm_usr_connect() so we can copy the npcb
fields while holding the mutex.

MFC after: 3 months

18 years agoAcquire natm mutex after traversing so_pcb, not before, as the protocol
Robert Watson [Sun, 23 Apr 2006 16:04:07 +0000 (16:04 +0000)]
Acquire natm mutex after traversing so_pcb, not before, as the protocol
mutex is no longer required to ensure that so_pcb is valid.

Make sure to free (control) in natm_usr_send() when there M_PREPEND()
frees (m).

MFC after: 3 months

18 years agoAdd missing 'not' to SQ_COMP comment.
Robert Watson [Sun, 23 Apr 2006 15:37:23 +0000 (15:37 +0000)]
Add missing 'not' to SQ_COMP comment.

MFC after: 3 months

18 years agoMove handling of SQ_COMP exception case in sofree() to the top of the
Robert Watson [Sun, 23 Apr 2006 15:33:38 +0000 (15:33 +0000)]
Move handling of SQ_COMP exception case in sofree() to the top of the
function along with the remainder of the reference checking code.  Move
comment from body to header with remainder of comments.  Inclusion of a
socket in a completed connection queue counts as a true reference, and
should not be handled as an under-documented edge case.

MFC after: 3 months

18 years agoUpdate natm PCB debugging code:
Robert Watson [Sun, 23 Apr 2006 15:23:31 +0000 (15:23 +0000)]
Update natm PCB debugging code:

- Depend on opt_ddb.h, since npcb_dump() is ifdef'd DDB.
- Include ddb/ddb.h so we can call db_printf() and use DB_SHOW_COMMAND().
- Don't test results of malloc() under DIAGNOSTIC, let the memory allocator
  take care of its own invariants.

MFC after: 1 month

18 years agoModify in6_pcbpurgeif0() to accept a pcbinfo structure rather than a pcb
Robert Watson [Sun, 23 Apr 2006 15:06:16 +0000 (15:06 +0000)]
Modify in6_pcbpurgeif0() to accept a pcbinfo structure rather than a pcb
list head structure; this improves congruence to IPv4, and also allows
in6_pcbpurgeif0() to lock the pcbinfo.  Modify in6_pcbpurgeif0() to lock
the pcbinfo before iterating the pcb list, use queue(9)'s LIST_FOREACH()
for the iteration, and to lock individual inpcb's while manipulating
them.

MFC after: 3 months

18 years agoReplace isn_mtx direct use with ISN_*() lock macros so that locking
Robert Watson [Sun, 23 Apr 2006 12:27:42 +0000 (12:27 +0000)]
Replace isn_mtx direct use with ISN_*() lock macros so that locking
details/strategy can be changed without touching every use.

MFC after: 3 months

18 years agoRemove multiple _get_curthread() calls.
David Xu [Sun, 23 Apr 2006 11:23:37 +0000 (11:23 +0000)]
Remove multiple _get_curthread() calls.

18 years agoMFen 1.911 -> 1.914
Xin LI [Sun, 23 Apr 2006 09:40:44 +0000 (09:40 +0000)]
MFen 1.911 -> 1.914

Obtained from: The FreeBSD Simplified Chinese Project

18 years ago- Mark MFC'd items.
Hiroki Sato [Sat, 22 Apr 2006 23:02:29 +0000 (23:02 +0000)]
- Mark MFC'd items.
- Add some missing items:
snd_ich(4) and snd_es137x(4) MPSAFE,
bge(4) polling mode support,
lge(4) MPSAFE,
glabel NTFS support,
/var/audit and audit group added,
snapinfo(8) added, and
groff 1.19.2 imported.

18 years agoMFother arches :
Olivier Houchard [Sat, 22 Apr 2006 22:51:32 +0000 (22:51 +0000)]
MFother arches :
date: 2006/04/12 04:22:50;  author: alc;  state: Exp;  lines: +14 -41
Retire pmap_track_modified().  We no longer need it because we do not
create managed mappings within the clean submap.  To prevent regressions,
add assertions blocking the creation of managed mappings within the clean
submap.

Reviewed by: tegge

18 years agoIntroduce a new TCP mutex, isn_mtx, which protects the initial sequence
Robert Watson [Sat, 22 Apr 2006 19:23:24 +0000 (19:23 +0000)]
Introduce a new TCP mutex, isn_mtx, which protects the initial sequence
number state, rather than re-using pcbinfo.  This introduces some
additional mutex operations during isn query, but avoids hitting the TCP
pcbinfo lock out of yet another frequently firing TCP timer.

MFC after: 3 months

18 years agoAssert the inpcb lock when rehashing an inpcb.
Robert Watson [Sat, 22 Apr 2006 19:15:20 +0000 (19:15 +0000)]
Assert the inpcb lock when rehashing an inpcb.

Improve consistency of style around some current assertions.

MFC after: 3 months

18 years agoRemove pcbinfo locking from in_setsockaddr() and in_setpeeraddr();
Robert Watson [Sat, 22 Apr 2006 19:10:02 +0000 (19:10 +0000)]
Remove pcbinfo locking from in_setsockaddr() and in_setpeeraddr();
holding the inpcb lock is sufficient to prevent races in reading
the address and port, as both the inpcb lock and pcbinfo lock are
required to change the address/port.

Improve consistency of spelling in assertions about inp != NULL.

MFC after: 3 months

18 years agoRevert part of previous commit. In alpha_platform_alloc_ide_intr(),
Marcel Moolenaar [Sat, 22 Apr 2006 19:04:21 +0000 (19:04 +0000)]
Revert part of previous commit. In alpha_platform_alloc_ide_intr(),
there's no RID for us to work with.

18 years agoOops, correct the weak reference (s/fclose/fcloseall).
Daniel Eischen [Sat, 22 Apr 2006 16:47:59 +0000 (16:47 +0000)]
Oops, correct the weak reference (s/fclose/fcloseall).

Spotted by: Antoine Brodin (antoine _dot_ brodin _at_ laposte _dot_ net)

18 years agoBump __FreeBSD_version to reflect the addition of fcloseall() to libc.
Daniel Eischen [Sat, 22 Apr 2006 15:12:50 +0000 (15:12 +0000)]
Bump __FreeBSD_version to reflect the addition of fcloseall() to libc.

18 years agoNow that libc has fcloseall(), remove _cleanup() from the list
Daniel Eischen [Sat, 22 Apr 2006 15:11:33 +0000 (15:11 +0000)]
Now that libc has fcloseall(), remove _cleanup() from the list
of FreeBSD private symbols.

18 years agoAdd a prototype for fcloseall().
Daniel Eischen [Sat, 22 Apr 2006 15:10:11 +0000 (15:10 +0000)]
Add a prototype for fcloseall().

18 years agoAdd fcloseall() to libc. This removes the need to export _cleanup().
Daniel Eischen [Sat, 22 Apr 2006 15:09:15 +0000 (15:09 +0000)]
Add fcloseall() to libc.  This removes the need to export _cleanup().
Linux also provides an fcloseall() implementation.

Discussed on: arch

18 years agoCorrect two typos in comments.
Christian Brueffer [Sat, 22 Apr 2006 13:42:49 +0000 (13:42 +0000)]
Correct two typos in comments.

18 years agoClean up, comment out non-base utilities, fix up comments.
Tom Rhodes [Sat, 22 Apr 2006 11:02:44 +0000 (11:02 +0000)]
Clean up, comment out non-base utilities, fix up comments.

Prodded by: hrs

18 years agoAdd support for (latest) VIA VT8251 (rev. 0x07) audio controller.
Ariff Abdullah [Sat, 22 Apr 2006 09:44:00 +0000 (09:44 +0000)]
Add support for (latest) VIA VT8251 (rev. 0x07) audio controller.

A slight difference of this chip from its previous siblings is that
it need a gentle "wake up" on every (full) DMA buffer completion to
avoid stalled interrupt handler.

Thanks to George Hartzell for permission on doing remote debugging.

Prime MFC candidate for 6.1-RELEASE. Please reply to this commit if
there are any objections  (so I won't bug re@),  since the  changes
are too small and only specific to VT8251.

PR: i386/95949
Tested by: [1] George Hartzel
           myself (remotely)
MFC after: 3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-April/004003.html

18 years agoRevert previous to this file before an actual request is made.
Tom Rhodes [Sat, 22 Apr 2006 04:22:15 +0000 (04:22 +0000)]
Revert previous to this file before an actual request is made.

18 years agodocument the various bus_space_*_stream_? functions...
John-Mark Gurney [Sat, 22 Apr 2006 03:58:41 +0000 (03:58 +0000)]
document the various bus_space_*_stream_? functions...

18 years agoFix a typo.
Joseph Koshy [Sat, 22 Apr 2006 03:04:24 +0000 (03:04 +0000)]
Fix a typo.

Submitted by: Pawel Worach <pawel.worach at gmail dot com>
MFC after: 1 week

18 years agoPrint td_name instead of p_comm if td_name is non-empty for
John Baldwin [Fri, 21 Apr 2006 20:40:43 +0000 (20:40 +0000)]
Print td_name instead of p_comm if td_name is non-empty for
'show turnstile' and 'show sleepq'.

18 years agoUse LIST_FOREACH().
John Baldwin [Fri, 21 Apr 2006 20:39:51 +0000 (20:39 +0000)]
Use LIST_FOREACH().

18 years agoo Do recrack(arguments) for commands which actually take NAME as
Maxim Konovalov [Fri, 21 Apr 2006 20:33:16 +0000 (20:33 +0000)]
o Do recrack(arguments) for commands which actually take NAME as
arguments so we do not coredump at "help foo", "back bar" and such.

o Be consistent and print argc - 1 as a command arguments number in
all cases.

PR: bin/37096
Submitted by: Joshua Goodall
MFC after: 1 month

18 years agoFree allocated environment variables after use.
Jung-uk Kim [Fri, 21 Apr 2006 19:35:03 +0000 (19:35 +0000)]
Free allocated environment variables after use.

Coverity ID: 366
Found by: Coverity Prevent

18 years agoDon't try to kill embryonic processes in killpg1(). This prevents
Paul Saab [Fri, 21 Apr 2006 19:26:21 +0000 (19:26 +0000)]
Don't try to kill embryonic processes in  killpg1().  This prevents
a race condition between fork() and kill(pid,sig) with pid < 0 that
can cause a kernel panic.

Submitted by: up
MFC after: 3 weeks

18 years agoRemove unnecessary assignment.
Jung-uk Kim [Fri, 21 Apr 2006 19:06:29 +0000 (19:06 +0000)]
Remove unnecessary assignment.

Coverity ID: 553
Found by: Coverity Prevent

18 years agoRedo some code based upon issues found by Coverity.
Matt Jacob [Fri, 21 Apr 2006 18:46:35 +0000 (18:46 +0000)]
Redo some code based upon issues found by Coverity.

18 years agoChange some order of the way we do some target mode ops.
Matt Jacob [Fri, 21 Apr 2006 18:31:21 +0000 (18:31 +0000)]
Change some order of the way we do some target mode ops.

Found by Coverity.

18 years agoSome more gratuitous format and name changes.
Matt Jacob [Fri, 21 Apr 2006 18:30:01 +0000 (18:30 +0000)]
Some more gratuitous format and name changes.

Pull in some target mode changes from a private branch.
Pull in some more RELENG_4 compilation changes.

A lot of lines changed, but not much content change yet.

18 years agoMention the minidump feature.
Xin LI [Fri, 21 Apr 2006 16:22:01 +0000 (16:22 +0000)]
Mention the minidump feature.

18 years agoIn nexus_teardown_intr(), actually remove the handler.
Marcel Moolenaar [Fri, 21 Apr 2006 16:12:28 +0000 (16:12 +0000)]
In nexus_teardown_intr(), actually remove the handler.

MFC after: 1 day

18 years agoMFp4:
Warner Losh [Fri, 21 Apr 2006 13:58:51 +0000 (13:58 +0000)]
MFp4:
Make getc(0) polling (this has the happy side effect of saving
8 bytes in the generated code).