]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoDon't create a template file if we're not going to let the user edit it.
des [Thu, 5 Feb 2004 10:57:29 +0000 (10:57 +0000)]
Don't create a template file if we're not going to let the user edit it.

20 years agoFix a typo in kan's last commit: cnavaiable() -> cnavailable()
roam [Thu, 5 Feb 2004 10:02:20 +0000 (10:02 +0000)]
Fix a typo in kan's last commit: cnavaiable() -> cnavailable()

20 years agoFix wrong check.
pjd [Thu, 5 Feb 2004 09:50:57 +0000 (09:50 +0000)]
Fix wrong check.

Approved by: jake, scottl (mentor)

20 years agomake(1) can now handle spaces surrounding parenthesis correctly.
ru [Thu, 5 Feb 2004 08:44:43 +0000 (08:44 +0000)]
make(1) can now handle spaces surrounding parenthesis correctly.

20 years agoFixed some non-critical memory leaks and one temporary file leak
pjd [Thu, 5 Feb 2004 08:39:38 +0000 (08:39 +0000)]
Fixed some non-critical memory leaks and one temporary file leak
(theoretical).

Approved by: phk, scottl (mentor)

20 years agoStyle fixes: don't indent variable names.
silby [Thu, 5 Feb 2004 08:29:27 +0000 (08:29 +0000)]
Style fixes: don't indent variable names.

Submitted by: bde

20 years agoDocument the dirty flag and other bits in the first 2 FAT entries
bde [Thu, 5 Feb 2004 06:55:12 +0000 (06:55 +0000)]
Document the dirty flag and other bits in the first 2 FAT entries
better.  There is a related I/O error flag which we don't support in
the kernel but must support here.  (Support for bits that we don't
understand here is mostly automatic by fail-safeness, but checkdirty()
has fail-unsafeness.)  There are some reserved and don't-care bits
that weren't fully documented and aren't always masked properly.  The
comment about the bits in readfat() will be removed when the masking
is fixed.

Submitted by: rnordier

20 years ago - Locking for the per-process resource limits structure has eliminated
alc [Thu, 5 Feb 2004 06:33:18 +0000 (06:33 +0000)]
 - Locking for the per-process resource limits structure has eliminated
   the need for Giant in vm_map_growstack().
 - Use the proc * that is passed to vm_map_growstack() rather than
   curthread->td_proc.

20 years agoPrepare to fix checkdirty() by moving it from check.c to fat.c. It is
bde [Thu, 5 Feb 2004 06:32:16 +0000 (06:32 +0000)]
Prepare to fix checkdirty() by moving it from check.c to fat.c.  It is
identical to a subset of readfat(), so it belongs near readfat() if not
in it.

20 years agolibkse was renamed to libpthread.
davidxu [Thu, 5 Feb 2004 02:55:20 +0000 (02:55 +0000)]
libkse was renamed to libpthread.

20 years agoEliminate global cons_unavailable flag and replace it by the status
kan [Thu, 5 Feb 2004 01:56:43 +0000 (01:56 +0000)]
Eliminate global cons_unavailable flag and replace it by the status
bit maintained on a per-device basis. Single variable is inadequate
on machines running with multiple consoles enabled.

20 years agoCompile on amd64. (pointer/int mismatches and printf int vs long )
peter [Thu, 5 Feb 2004 01:35:33 +0000 (01:35 +0000)]
Compile on amd64.  (pointer/int mismatches and printf int vs long )

20 years agoAdd crypto implemenation files (C versions (like alpha, unlike i386))
peter [Thu, 5 Feb 2004 01:09:29 +0000 (01:09 +0000)]
Add crypto implemenation files (C versions (like alpha, unlike i386))

20 years agoDon't cast a pointer to an int that isn't big enough.
peter [Thu, 5 Feb 2004 00:12:08 +0000 (00:12 +0000)]
Don't cast a pointer to an int that isn't big enough.

20 years agoFix long/int printf format problems exposed by PMAP_DIAGNOSTIC
peter [Thu, 5 Feb 2004 00:11:05 +0000 (00:11 +0000)]
Fix long/int printf format problems exposed by PMAP_DIAGNOSTIC

20 years agoGC port.mkversion.
des [Thu, 5 Feb 2004 00:07:09 +0000 (00:07 +0000)]
GC port.mkversion.

20 years agoCheckpoint a NOTES file I had as of Nov 23rd. It doesn't quite compile
peter [Wed, 4 Feb 2004 22:53:50 +0000 (22:53 +0000)]
Checkpoint a NOTES file I had as of Nov 23rd.  It doesn't quite compile
due to triggering some printf breakage in some DIAGNOSTIC printfs.

20 years agoRemove Perl lines; it's better to let use.perl handle them.
des [Wed, 4 Feb 2004 22:37:14 +0000 (22:37 +0000)]
Remove Perl lines; it's better to let use.perl handle them.

20 years agoWhen creating raid5 or striped plexes, avoid falling out of bounds
le [Wed, 4 Feb 2004 22:29:52 +0000 (22:29 +0000)]
When creating raid5 or striped plexes, avoid falling out of bounds
when checking the given stripe size.

Also move the code a bit around to avoid duplication.

Approved by: joerg (mentor)

20 years agoRegen.
jhb [Wed, 4 Feb 2004 22:00:44 +0000 (22:00 +0000)]
Regen.

20 years agoFix typo, s/transmitts/transmits/
johan [Wed, 4 Feb 2004 21:59:29 +0000 (21:59 +0000)]
Fix typo, s/transmitts/transmits/

PR: 62346
Submitted by: Gavin Atkinson (gavin at ury.york.ac.uk)

20 years agoThe following compat syscalls are now mpsafe: linux_getrlimit(),
jhb [Wed, 4 Feb 2004 21:57:00 +0000 (21:57 +0000)]
The following compat syscalls are now mpsafe: linux_getrlimit(),
linux_setrlimit(), linux_old_getrlimit(), osf1_getrlimit(),
osf1_setrlimit(), svr4_sys_ulimit(), svr4_sys_setrlimit(),
svr4_sys_getrlimit(), svr4_sys_setrlimit64(), svr4_sys_getrlimit64(),
ibcs2_sysconf(), and ibcs2_ulimit().

20 years agoLocking for the per-process resource limits structure.
jhb [Wed, 4 Feb 2004 21:52:57 +0000 (21:52 +0000)]
Locking for the per-process resource limits structure.
- struct plimit includes a mutex to protect a reference count.  The plimit
  structure is treated similarly to struct ucred in that is is always copy
  on write, so having a reference to a structure is sufficient to read from
  it without needing a further lock.
- The proc lock protects the p_limit pointer and must be held while reading
  limits from a process to keep the limit structure from changing out from
  under you while reading from it.
- Various global limits that are ints are not protected by a lock since
  int writes are atomic on all the archs we support and thus a lock
  wouldn't buy us anything.
- All accesses to individual resource limits from a process are abstracted
  behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return
  either an rlimit, or the current or max individual limit of the specified
  resource from a process.
- dosetrlimit() was renamed to kern_setrlimit() to match existing style of
  other similar syscall helper functions.
- The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit()
  (it didn't used the stackgap when it should have) but uses lim_rlimit()
  and kern_setrlimit() instead.
- The svr4 compat no longer uses the stackgap for resource limits calls,
  but uses lim_rlimit() and kern_setrlimit() instead.
- The ibcs2 compat no longer uses the stackgap for resource limits.  It
  also no longer uses the stackgap for accessing sysctl's for the
  ibcs2_sysconf() syscall but uses kernel_sysctl() instead.  As a result,
  ibcs2_sysconf() no longer needs Giant.
- The p_rlimit macro no longer exists.

Submitted by: mtm (mostly, I only did a few cleanups and catchups)
Tested on: i386
Compiled on: alpha, amd64

20 years agoExpand the mask for the Avlab Technology, PCI IO 2S entry to cover the
jhb [Wed, 4 Feb 2004 18:01:02 +0000 (18:01 +0000)]
Expand the mask for the Avlab Technology, PCI IO 2S entry to cover the
2S-650 and 2S-850 variants.

PR: kern/45285
Submitted by: Andrey Zakharchenko <avz AT jscc.ru>
MFC after: 1 week

20 years agoFixed editing error in a comment in previous commit.
bde [Wed, 4 Feb 2004 17:08:46 +0000 (17:08 +0000)]
Fixed editing error in a comment in previous commit.

20 years agoRemoved TIOCMODG and TIOCMODS. They were superseded by TIOCMGET and
bde [Wed, 4 Feb 2004 17:03:49 +0000 (17:03 +0000)]
Removed TIOCMODG and TIOCMODS.  They were superseded by TIOCMGET and
TIOCMSET before FreeBSD existed and have never been implemented by any
FreeBSD serial driver (not even as aliases).

Moved the TIOCM bit definitions to be with TIOCMGET.

Added more comments gaps between ioctl numbers.  There are now a large
number of conflicts with ppp, slip, tap and tun ioctls (especially ppp
ones) from closing gaps that weren't there.  This mainly breaks decoding
of ioctl numbers in kdump, but there are some serious conflicts where
the interpretation of a tty ioctl depends on the line discipline.

20 years agoUnbreak build with OpenLDAP.
ru [Wed, 4 Feb 2004 16:42:36 +0000 (16:42 +0000)]
Unbreak build with OpenLDAP.

Forgotten by: mr

20 years agoaic7xxx.c:
gibbs [Wed, 4 Feb 2004 16:40:08 +0000 (16:40 +0000)]
aic7xxx.c:
Shorten a diagnostic printf to fit in 80 columns.

In ahc_abort_scbs() remove an incorrect diagnostic test
that printed a spurious warning.

20 years agoaic79xx.c:
gibbs [Wed, 4 Feb 2004 16:38:38 +0000 (16:38 +0000)]
aic79xx.c:
aic79xx.seq:
Convert the COMPLETE_DMA_SCB list to an "stailq".  This allows us to
safely keep the SCB that is currently being DMA'ed back the host on
the head of the list while processing completions off of the bus.  The
newly completed SCBs are appended to the tail of the queue.   In the
past, we just dequeued the SCB that was in flight from the list, but
this could result in a lost completion should the host perform certain
types of error recovery that must cancel all in-flight SCB DMA operations.

Switch from using a 16bit completion entry, holding just the tag and the
completion valid bit, to a 64bit completion entry that also contains a
"status packet valid" indicator.  This solves two problems:
  o The SCB DMA engine on at least Rev B. silicon does not properly deal
    with a PCI disconnect that occurs at a non-64bit aligned offset in the
    chips "source buffer".  When the transfer is resumed, the DMA engine
    continues at the correct offset, but may wrap to the head of the buffer
    causing duplicate completions to be reported to the host.  By using a
    completion buffer in host memory that is 64bit aligned and using 64bit
    completion entries, such disconnects should only occur at aligned addresses.
    This assumes that the host bridge will only disconnect on cache-line
    boundaries and that cache-lines are multpiles of 64bits.

  o By embedding the status information in the completion entry we can avoid
    an extra memory reference to the HSCB for commands that complete without
    error.

Use the comparison of a "host freeze count" and a "sequencer freeze count"
to allow the host to process most SCBs that complete with non-zero status
without having to clear critical sections.  Instead the host can just pause the
sequencer, performs any necessary cleanup in the waiting for selection list,
increments its freeze count on the controller, and unpauses.  This is only
possible because the sequencer defers completions of SCBs with bad status
until after all pending selections have completed.  The sequencer then avoids
referencing any data structures the host may touch during completion of the
SCB until the freeze counts match.

aic79xx.c:
Change the strategy for allocating our sentinal HSCB for the QINFIFO.  In
the past, this allocation was tacked onto the QOUTFIFO allocation.  Now that
the qoutfifo has grown to accomodate larger completion entries, the old
approach will result in a 64byte allocation that costs an extra page of
coherent memory.  We now do this extra allocation via ahd_alloc_scbs()
where the "unused space" can be used to allocate "normal" HSCBs.

In our packetized busfree handler, use the ENSELO bit to differentiate
between packetized and non-packetized unexpected busfree events that
occur just after selection, but before the sequencer has had the oportunity
to service the selection.

When cleaning out the waiting for selection list, use the SCSI mode
instead of the command channel mode.  The SCB pointer in the command
channel mode may be referenced by the SCB dma engine even while the
sequencer is paused, whereas the SCSI mode SCB pointer is only accessed
by the sequencer.

Print the "complete on qfreeze" sequencer SCB completion list in
ahd_dump_card_state().  This list holds all SCB completions that are deferred
until a pending select-out qfreeze event has taken effect.

aic79xx.h:
Add definitions and structures to handle the new SCB completion scheme.

Add a controller flag that indicates if the controller is in HostRAID
mode.

aic79xx.reg:
Remove macros used for toggling from one data fifo mode to the other.
They have not been in use for some time.

Add scratch ram fields for our new qfreeze count scheme, converting
the complete dma list into an "stailq", and providing for the "complete
on qfreeze" SCB completion list.  Some other fields were moved to retain
proper field alignment (alignment >= field size in bytes).

aic79xx.seq:
Add code to our idle loop to:
  o Process deferred completions once a qfreeze event has taken full
    effect.
  o Thaw the queue once the sequencer and host qfreeze counts match.

Generate 64bit completion entries passing the SCB_SGPTR field as the
"good status" indicator.  The first bit in this field is only set if
we have a valid status packet to send to the host.

Convert the COMPLETE_DMA_SCB list to an "stailq".

When using "setjmp" to register an idle loop handler, do not combine
the "ret" with the block move to pop the stack address in the same
instruction.  At least on the A, this results in a return to the setjmp
caller, not to the new address at the top of the stack.  Since we want
the latter (we want the newly registered handler to only be invoked from
the idle loop), we must use a separate ret instruction.

Add a few missing critical sections.

Close a race condition that can occur on Rev A. silicon.  If both FIFOs
happen to be allocated before the sequencer has a chance to service the
FIFO that was allocated first, we must take special care to service the
FIFO that is not active on the SCSI bus first.  This guarantees that a
FIFO will be freed to handle any snapshot requests for the FIFO that is
still on the bus.  Chosing the incorrect FIFO will result in deadlock.

Update comments.

aic79xx_inline.h
Correct the offset calculation for the syncing of our qoutfifo.

Update ahd_check_cmdcmpltqueues() for the larger completion entries.

aic79xx_pci.c:
Attach to HostRAID controllers by default.  In the future I may add a
sysctl to modify the behavior, but since FreeBSD does not have any
HostRAID drivers, failing to attach just results in more email and
bug reports for the author.

MFC After: 1week

20 years agoWe don't really need a lockfile, and most likely can't create one at
des [Wed, 4 Feb 2004 15:53:49 +0000 (15:53 +0000)]
We don't really need a lockfile, and most likely can't create one at
this point.

20 years agoAllow libc's version of sem_trywait() to work for non-pshared mutexes.
deischen [Wed, 4 Feb 2004 15:37:48 +0000 (15:37 +0000)]
Allow libc's version of sem_trywait() to work for non-pshared mutexes.

20 years agoFixed breakage of POSIX support in rev.1.31. -pipe was added to
bde [Wed, 4 Feb 2004 14:40:44 +0000 (14:40 +0000)]
Fixed breakage of POSIX support in rev.1.31.  -pipe was added to
CFLAGS in all cases, but POSIX requires a default of -O.  Adding
-pipe unconditionally still is still broken for non-gcc compilers
in the non-POSIX case.

20 years agoInclude <sys/queue.h> before <sys/_lock.h> instead of depending on
bde [Wed, 4 Feb 2004 14:18:21 +0000 (14:18 +0000)]
Include <sys/queue.h> before <sys/_lock.h> instead of depending on
namespace pollution in other headers.  <sys/types.h> is now the only
prerequisite for <sys/sx.h>.

Fixed some style bugs:
- removed bogus LOCORE ifdef.  Including this C header in assembler
  sources is just nonsense.
- removed unused include of <sys/_mutex.h>.  It finished rotting when
  the mutex in struct sx became indirect in rev.1.15.
- removed most comments on #else and #endif's and cleaned up the others.
  All were misindented...

20 years ago- add a description of what .gdbinit should contain.
grehan [Wed, 4 Feb 2004 13:23:05 +0000 (13:23 +0000)]
- add a description of what .gdbinit should contain.
- add an option for the output device in the hope that this can
  be made non-blocking at some stage.
- define an alias for the disk device, required by dev/ofw/ofw_disk.c
- shift iobus to 0x9000000 so as not to clash with the OpenFirmware
  entry point of 0x8000400 when address decoding.
- down-tone comments about the disk dev config :-)

20 years agoRemove pmap_pvo_allocf zone alloc function. It was a way of
grehan [Wed, 4 Feb 2004 13:16:21 +0000 (13:16 +0000)]
Remove pmap_pvo_allocf zone alloc function. It was a way of
using the direct-mapping of physmem to force PTE data structures
to be physically addressable so the interrupt-time real-mode
DSI trap handler could perform PTE spills. However, the memory
may have been > 256Mb, which would have caused a BAT spill and
double-interrupt.

The new trap code no longer handles PTE spills, so the requirement
that these pages be direct-mapped no longer applies. The irony is
UMA_MD_SMALL_ALLOC will return direct mappings for these structs :-)

20 years agoMajor overhaul of common trap code
grehan [Wed, 4 Feb 2004 13:10:25 +0000 (13:10 +0000)]
Major overhaul of common trap code
 - remove unused 601 and tlb exception code
 - remove interrupt-time PTE spill code. The pmap code
   will now take care of pinning kernel PTEs, and there
   are no longer issues about physical mapping of PTE
   data structures
 - All segment registers are switched on kernel entry/exit,
   allowing the kernel to have more virtual space and for
   user virtual space to extend to 4G.
 - The temporary register save area has been shifted from
   unused exception vector space to the per-cpu data area.
   This allows interrupts to be delivered to multiple CPUs
 - ISI traps no longer spill to BAT tables. It is assumed
   that all of kernel instruction memory is pinned.
 - shift from 'ldmw/stmw' instructions to individual register
   loads/stores when saving context. All PPC manuals indicate
   this should be much faster.
 - use '%r' for register names throughout.

TODO: need to test if DSI traps were the result of kernel stack
guard-page hits.

Reworked from:  NetBSD

20 years ago- remove unused trap definitions
grehan [Wed, 4 Feb 2004 13:00:56 +0000 (13:00 +0000)]
- remove unused trap definitions
- ISI traps are now handled by the generic trap routine
- direct diagnostic traps to DDB if defined
- remove unused asngen pcpu init

20 years ago- Lots more symbols required by the new trap_subr code
grehan [Wed, 4 Feb 2004 12:58:49 +0000 (12:58 +0000)]
- Lots more symbols required by the new trap_subr code

20 years ago- Add definition for GET_CPUINFO, required by new trap_subr code
grehan [Wed, 4 Feb 2004 12:57:41 +0000 (12:57 +0000)]
- Add definition for GET_CPUINFO, required by new trap_subr code
- garbage-collect unused defs

20 years agoMove temporary register save area from exception-vector memory to
grehan [Wed, 4 Feb 2004 12:56:15 +0000 (12:56 +0000)]
Move temporary register save area from exception-vector memory to
per-CPU memory. This allows for interrupt handling on multiple CPUs.

Obtained from: NetBSD

20 years agoKNF
ume [Wed, 4 Feb 2004 12:55:45 +0000 (12:55 +0000)]
KNF

Obtained from: KAME

20 years ago- add an identify method, since the disk device used to be picked
grehan [Wed, 4 Feb 2004 12:52:57 +0000 (12:52 +0000)]
- add an identify method, since the disk device used to be picked
up in the recursive OpenFirmware node walk. Rely on the psim config
file to have a "ofwdisk" device alias
- minor white space nits

20 years agoAllow child devices to set the OpenFirmware device node ivar
grehan [Wed, 4 Feb 2004 12:50:47 +0000 (12:50 +0000)]
Allow child devices to set the OpenFirmware device node ivar

20 years agoRemoved unnecessary dependencies on librpcsvc.
ru [Wed, 4 Feb 2004 11:59:08 +0000 (11:59 +0000)]
Removed unnecessary dependencies on librpcsvc.

Prodded by: des

20 years agoPut libraries in the link order.
ru [Wed, 4 Feb 2004 10:23:09 +0000 (10:23 +0000)]
Put libraries in the link order.

Reported by: lorder(1) (modified to work with libraries)

20 years agoPut libdevstat before libkvm, because the former depends on the latter.
ru [Wed, 4 Feb 2004 10:20:43 +0000 (10:20 +0000)]
Put libdevstat before libkvm, because the former depends on the latter.

20 years agoDrop unused dependencies.
ru [Wed, 4 Feb 2004 10:18:05 +0000 (10:18 +0000)]
Drop unused dependencies.

20 years agoFixed static build.
ru [Wed, 4 Feb 2004 10:15:26 +0000 (10:15 +0000)]
Fixed static build.

20 years ago- Added the NOPAM knob, for consistency with ${.CURDIR}/../ftpd.
ru [Wed, 4 Feb 2004 10:05:21 +0000 (10:05 +0000)]
- Added the NOPAM knob, for consistency with ${.CURDIR}/../ftpd.
- Unbreak -DNOPAM -DNOSHARED build by putting -lmd after -lopie.

(Static build with PAM remains broken.)

20 years agoNothing in libypclnt depends on librpcsvc.
ru [Wed, 4 Feb 2004 09:53:29 +0000 (09:53 +0000)]
Nothing in libypclnt depends on librpcsvc.

Reported by: lorder(1) (modified to work with libraries)

20 years agoThis module doesn't use libgssapi (and it looks never did).
ru [Wed, 4 Feb 2004 09:41:47 +0000 (09:41 +0000)]
This module doesn't use libgssapi (and it looks never did).

20 years agoDon't forget to install stable.rc.
des [Wed, 4 Feb 2004 09:06:32 +0000 (09:06 +0000)]
Don't forget to install stable.rc.

20 years agoDo not aggressively unroll the AES implementation, in non-benchmarking use
phk [Wed, 4 Feb 2004 08:44:10 +0000 (08:44 +0000)]
Do not aggressively unroll the AES implementation, in non-benchmarking use
it is same speed on small cache cpus and slower on largecache cpus.

Approved by: sam@

20 years agoRename iov_to_uio to uiofromiov to be more consistent with other
silby [Wed, 4 Feb 2004 08:43:21 +0000 (08:43 +0000)]
Rename iov_to_uio to uiofromiov to be more consistent with other
uio* functions.

Suggested by: bde

20 years agoDocument new 'what' value for sx_assert(9).
pjd [Wed, 4 Feb 2004 08:24:05 +0000 (08:24 +0000)]
Document new 'what' value for sx_assert(9).

PS. There is a inconsistency in this manual page, because in
    non-WITNESS case sx_assert(9) does not panics, it only prints
    the warning. I haven't fixed this, because jhb@ is planing to
    replace those printf()s with panic()s.

Reviewed by: jhb
Approved by: jhb, scottl (mentor)

20 years agoAllow assert that the current thread does not hold the sx(9) lock.
pjd [Wed, 4 Feb 2004 08:14:58 +0000 (08:14 +0000)]
Allow assert that the current thread does not hold the sx(9) lock.

Reviewed by: jhb
In cooperation with: juli, jhb
Approved by: jhb, scottl (mentor)

20 years agoStyle fixes
silby [Wed, 4 Feb 2004 08:14:47 +0000 (08:14 +0000)]
Style fixes

Submitted by: bde

20 years agoAdd SX_UNLOCKED define. It will be used with sx_assert(9) to be
pjd [Wed, 4 Feb 2004 07:53:35 +0000 (07:53 +0000)]
Add SX_UNLOCKED define. It will be used with sx_assert(9) to be
sure that current thread does not hold given sx(9) lock.

Reviewed by: jhb
Approved by: jhb, scottl (mentor)

20 years agoAdd missing file.
davidxu [Wed, 4 Feb 2004 06:32:45 +0000 (06:32 +0000)]
Add missing file.

20 years agoA variety of further cleanups to ttyinfo():
rwatson [Wed, 4 Feb 2004 05:46:05 +0000 (05:46 +0000)]
A variety of further cleanups to ttyinfo():

- Rename temporary variable names ("tmp", "tmp2") to more informative
  names ("load", "pctcpu", "rss", ...)

- Unclutter indentation and return paths: rather than lots of nested
  ifs, simply return earlier if it's not going to work out.  Simplify
  general structure and avoid "deep" code.

- Comment on the thread/process selection and locking.

- Correct handling of "running"/"runnable" states, avoid "unknown"
  that people were seeing for running processes.  This was due to
  a misunderstanding of the more complex state machine / inhibitors
  behavior of KSE.

- Do perform ttyinfo() printing on KSE (P_SA) processes, it seems
  generally to work.

While I initially attempted to formulate this as two commits (one
layout, the other content), I concluded that the layout changes were
really structural changes.

Many elements submitted by:  bde

20 years agoImport initial work of libpthread debugging. This is a debugger independent
davidxu [Wed, 4 Feb 2004 05:01:15 +0000 (05:01 +0000)]
Import initial work of libpthread debugging. This is a debugger independent
friend library for libpthread, the library will be used by debugger to
read/write libpthread's internal data structures.

20 years ago- removed debug printf that was a false positive on non-OpenPIC systems
grehan [Wed, 4 Feb 2004 04:53:09 +0000 (04:53 +0000)]
- removed debug printf that was a false positive on non-OpenPIC systems
- white space nits

20 years agoCorrect/improve the implementation of NdisMAllocateSharedMemoryAsync().
wpaul [Wed, 4 Feb 2004 04:44:16 +0000 (04:44 +0000)]
Correct/improve the implementation of NdisMAllocateSharedMemoryAsync().
Since we have a worker thread now, we can actually do the allocation
asynchronously in that thread's context. Also, we need to return a
status value: if we're unable to queue up the async allocation, we
return NDIS_STATUS_FAILURE, otherwise we return NDIS_STATUS_PENDING
to indicate the allocation has been queued and will occur later.

This replaces the kludge where we just invoked the callback routine
right away in the current context.

20 years agoAdd ifconfig support for network interface renaming. In the process,
brooks [Wed, 4 Feb 2004 02:55:46 +0000 (02:55 +0000)]
Add ifconfig support for network interface renaming.  In the process,
reorganize the printing of the interface name when using wildcard
cloning so it is not printed if it we either immediately rename or
destroy the interface.

Reviewed by: ru

20 years agoAdd the kernel side of network interface renaming support.
brooks [Wed, 4 Feb 2004 02:54:25 +0000 (02:54 +0000)]
Add the kernel side of network interface renaming support.

The basic process is to send a routing socket announcement that the
interface has departed, change if_xname, update the sockaddr_dl
associated with the interface, and announce the arrival of the interface
on the routing socket.

As part of this change, ifunit() is greatly simplified by testing
if_xname directly.  if_clone_destroy() now uses if_dname to look up the
cloner for the interface and if_dunit to identify the unit number.

Reviewed by: ru, sam (concept)
Vincent Jardin <vjardin AT free.fr>
Max Laier <max AT love2party.net>

20 years agoPowerPC ttys file.
grehan [Wed, 4 Feb 2004 01:44:34 +0000 (01:44 +0000)]
PowerPC ttys file.

20 years agoAdd myself.
josef [Tue, 3 Feb 2004 23:26:36 +0000 (23:26 +0000)]
Add myself.

Approved by: simon(mentor)

20 years agoRemove the band-aid (#include <time.h>).
deischen [Tue, 3 Feb 2004 22:30:01 +0000 (22:30 +0000)]
Remove the band-aid (#include <time.h>).

20 years agoThe sem_timedwait() and ksem_timedwait() functions both
deischen [Tue, 3 Feb 2004 22:27:03 +0000 (22:27 +0000)]
The sem_timedwait() and ksem_timedwait() functions both
need struct timespec, so define it here.

Discussed in: standards (wollman)

20 years ago- Use a stock loader with forth support on the boot floppies.
jhb [Tue, 3 Feb 2004 22:05:55 +0000 (22:05 +0000)]
- Use a stock loader with forth support on the boot floppies.
- Use the regular forth scripts including the stock device.hints file on
  the boot floppies.
- gzip all the various text files on the boot floppy that are larger than
  one sector to save on space.
- Generate a loader.conf to load the kernel, acpi.ko, and mfsroot making
  use of the 'module_before' variables to prompt for a floppy to be entered
  when required and use a stock loader.rc.  This enables the beastie menu
  on i386.
- PC98 has been changed to split the mfsroot for now so that the floppies
  fit.  When the PC98 bootstrap is updated to work with ELF files (which
  needs to happen anyway), then SPLIT_MFSROOT can be turned off for PC98.

20 years agoRevert the skipping of segment register reloads as it appears to actually
jhb [Tue, 3 Feb 2004 22:00:42 +0000 (22:00 +0000)]
Revert the skipping of segment register reloads as it appears to actually
be a pessimization on non Pentium4 CPUs.  More importantly, it is buggy as
it can cause GPF's when using APM or vm86.

20 years agoRemove RELENG_4, leaving only security branches.
des [Tue, 3 Feb 2004 19:23:12 +0000 (19:23 +0000)]
Remove RELENG_4, leaving only security branches.

20 years agoAdd a "stable" config for 4-STABLE.
des [Tue, 3 Feb 2004 19:22:48 +0000 (19:22 +0000)]
Add a "stable" config for 4-STABLE.

20 years agoAllow multiple configs to be specified to a single tbmaster instance.
des [Tue, 3 Feb 2004 19:19:29 +0000 (19:19 +0000)]
Allow multiple configs to be specified to a single tbmaster instance.

20 years agoFix "warning: value computed is not used".
fjoe [Tue, 3 Feb 2004 18:53:40 +0000 (18:53 +0000)]
Fix "warning: value computed is not used".

Found by: gcc 2.95.4 [FreeBSD]

20 years agopass pcb rather than so. it is expected that per socket policy
ume [Tue, 3 Feb 2004 18:20:55 +0000 (18:20 +0000)]
pass pcb rather than so. it is expected that per socket policy
works again.

20 years agoAdd <time.h> -- bandaid to unbreak world in <semaphore.h>.
deischen [Tue, 3 Feb 2004 15:55:30 +0000 (15:55 +0000)]
Add <time.h> -- bandaid to unbreak world in <semaphore.h>.

20 years agoRemove a bogus assertion.
jhb [Tue, 3 Feb 2004 15:14:27 +0000 (15:14 +0000)]
Remove a bogus assertion.

Noticed by: bde
Pointy hat to: jhb

20 years agoDocument NO_VINUM, which is already listed in the man page.
des [Tue, 3 Feb 2004 13:57:56 +0000 (13:57 +0000)]
Document NO_VINUM, which is already listed in the man page.

20 years agoo Unbreak the individual jail starting patch that I broke when
mtm [Tue, 3 Feb 2004 12:59:30 +0000 (12:59 +0000)]
o Unbreak the individual jail starting patch that I broke when
  I committed it. Apologies to Juergen Unger <j.unger@addict.de>.
o When stopping jails output the hostname of the jails that
  were stopped.
o Refactor
o Remove extraneous empty line
o Correct spelling error

20 years agoAdd my birthday.
le [Tue, 3 Feb 2004 12:08:18 +0000 (12:08 +0000)]
Add my birthday.

Approved by: joerg (mentor)

20 years agoWhitespace nit.
des [Tue, 3 Feb 2004 11:27:34 +0000 (11:27 +0000)]
Whitespace nit.

20 years agoAdd support for initializing swap devices with random one-shot keys. Note
des [Tue, 3 Feb 2004 11:26:08 +0000 (11:26 +0000)]
Add support for initializing swap devices with random one-shot keys.  Note
that the keys are currently generated by computing the MD5 checksum of 512
bytes read from /dev/random, and are passed to gbde on the command line.

Sponsored by: Teleplan AS

20 years agoMechanical whitespace cleanup. Also, note that previous commit was
des [Tue, 3 Feb 2004 11:12:29 +0000 (11:12 +0000)]
Mechanical whitespace cleanup.  Also, note that previous commit was

Sponsored by: Teleplan AS

20 years agoRemove newline characters from error strings.
des [Tue, 3 Feb 2004 11:10:34 +0000 (11:10 +0000)]
Remove newline characters from error strings.

20 years agoMissed one in previous commit.
des [Tue, 3 Feb 2004 10:22:55 +0000 (10:22 +0000)]
Missed one in previous commit.

20 years agoStyle fixes.
des [Tue, 3 Feb 2004 10:21:35 +0000 (10:21 +0000)]
Style fixes.

20 years agoAdd prototype for sem_timedwait().
deischen [Tue, 3 Feb 2004 10:15:16 +0000 (10:15 +0000)]
Add prototype for sem_timedwait().

Reviewed by: standards (Stefan Farfeleder)

20 years agoA shorter version of keeping all -std= options out of CXXFLAGS.
ru [Tue, 3 Feb 2004 09:40:11 +0000 (09:40 +0000)]
A shorter version of keeping all -std= options out of CXXFLAGS.

20 years agoFixed MINUSLPAM:
ru [Tue, 3 Feb 2004 09:37:12 +0000 (09:37 +0000)]
Fixed MINUSLPAM:

- Added missing NOCRYPT and NO_OPENSSL checks for Kerberos.

- Don't depend on -lcrypto and -lcrypt in pam_ssh to resolve
  dependencies in pam_krb5 and pam_ksu -- the former may not
  be compiled at all if NO_OPENSSH knob is enabled.

- Added missing -lcrypt to pam_ssh dependencies.

- Moved librpcsvc after libypclnt.

(The last two aren't strictly speaking necessary to resolve
the dependencies of static versions of pam_ssh and pam_unix,
respectively, but they correspond to dynamic dependencies
of libssh and libypclnt, and are put here for consistency.)

In collaboration with: bde
Reviewed by: des

20 years agoTake signal.c out of sources.
ru [Tue, 3 Feb 2004 09:32:11 +0000 (09:32 +0000)]
Take signal.c out of sources.

Reviewed by: nectar

20 years agoPut generated headers into SRCS so that we pick them up even if
ru [Tue, 3 Feb 2004 09:21:37 +0000 (09:21 +0000)]
Put generated headers into SRCS so that we pick them up even if
"make depend" was not run.

20 years agoUse device alias "mpic" to locate the macio OpenPIC. This works
grehan [Tue, 3 Feb 2004 08:00:37 +0000 (08:00 +0000)]
Use device alias "mpic" to locate the macio OpenPIC. This works
on the new 12/15/17" PowerBooks that don't have the "interrupt-controller"
property underneath "/chosen", which was the previous way of
searching.

20 years agoImplement support for single packet sends. The Intel Centrino driver
wpaul [Tue, 3 Feb 2004 07:39:23 +0000 (07:39 +0000)]
Implement support for single packet sends. The Intel Centrino driver
that Asus provides on its CDs has both a MiniportSend() routine
and a MiniportSendPackets() function. The Microsoft NDIS docs say
that if a driver has both, only the MiniportSendPackets() routine
will be used. Although I think I implemented the support correctly,
calling the MiniportSend() routine seems to result in no packets going
out on the air, even though no error status is returned. The
MiniportSendPackets() function does work though, so at least in
this case it doesn't matter.

In if_ndis.c:ndis_getstate_80211(), if ndis_get_assoc() returns
an error, don't bother trying to obtain any other state since the
calls may fail, or worse cause the underlying driver to crash.

(The above two changes make the Asus-supplied Centrino work.)

Also, when calling the OID_802_11_CONFIGURATION OID, remember
to initialize the structure lengths correctly.

In subr_ndis.c:ndis_open_file(), set the current working directory
to rootvnode if we're in a thread that doesn't have a current
working directory set.

20 years agoConfigure a jail sysctl value only if it is different than
mtm [Tue, 3 Feb 2004 07:15:32 +0000 (07:15 +0000)]
Configure a jail sysctl value only if it is different than
what the rc.conf(5) knob specifies. Also, correct a minor
capitalization error.

20 years agoRemoved bogus checks that (PCPU_GET(curpcb) != NULL). Rev.1.586 of
bde [Tue, 3 Feb 2004 06:35:29 +0000 (06:35 +0000)]
Removed bogus checks that (PCPU_GET(curpcb) != NULL).  Rev.1.586 of
machdep.c fixed the missing early initialization of curpcb, so curpcb
is now always set together with curthread and it cannot be NULL except
before the IDT has been set up (so trap() is unreachable) or after a
memory error.  In any case, it was often used without checking.

curcpb shouldn't exist anyway.  It doesn't exist for most non-i386 arches.
It just caches curthread->td_pcb in a global.  This was a better idea
before it was per-cpu.  trap() and some other places can get at it more
efficiently using td->td_pcb instead of PCPU_GET(curpcb).  The main
exception is support.s which mostly wants only curpcb->pcb_onfault.

20 years agoProvide a userland version of non-pshared semaphores and add cancellation
deischen [Tue, 3 Feb 2004 05:50:07 +0000 (05:50 +0000)]
Provide a userland version of non-pshared semaphores and add cancellation
points to sem_wait() and sem_timedwait().  Also make sem_post signal-safe.

20 years agoModify the implementation of libc semaphores so that they can be
deischen [Tue, 3 Feb 2004 05:47:19 +0000 (05:47 +0000)]
Modify the implementation of libc semaphores so that they can be
overridden by the threads library to provide a userland version
of non-pshared semaphores and cancellation points.  Also add
a sem_timedwait().

The libc version of semaphores always uses kernel semaphores
regardless of whether pshared is set or not.  When threads are
not present, it is difficult to get sem_wait() or sem_timedwait()
to do the right thing (since pthread_cond_timedwait() and
pthread_cond_wait() are stubs in libc and just return immediately).

20 years agoRegen.
deischen [Tue, 3 Feb 2004 05:20:28 +0000 (05:20 +0000)]
Regen.

20 years agoSync with kern/syscalls.master.
deischen [Tue, 3 Feb 2004 05:18:48 +0000 (05:18 +0000)]
Sync with kern/syscalls.master.