]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoAdd __amd64__ ifdefs to enable the bootblock handling code, slices, etc.
peter [Sat, 24 May 2003 21:12:14 +0000 (21:12 +0000)]
Add __amd64__ ifdefs to enable the bootblock handling code, slices, etc.

Approved by: re (murray)
Obtained from: obrien

21 years agoAdd a temporary indirect patch for gcc when targeting amd64. This is to
peter [Sat, 24 May 2003 20:58:47 +0000 (20:58 +0000)]
Add a temporary indirect patch for gcc when targeting amd64.  This is to
give the cvs tree a surviving a 'make world'.  One of the two diff chunks
is already in gcc-3.3, the other has been committed to gcc's HEAD and
is in the pipeline for gcc-3.3.1 (but has not been committed yet).

The first chunk simplifies an excessively complex assembler statement
when generating switch jump tables.  The use of '.' causes as(1) to choke
on big files.  Use a simpler form instead.  This is only an issue for
TARGET_64BIT mode.

The second chunk fixes an internal compiler error when compiling
libc/stdio/vfprinf.c.  While this is supposedly only an issue for
64 bit mode, it does touch the 32 bit i386 code paths, so this patch
is only applied for TARGET_ARCH == amd64 to keep the risks down.
Breaking gcc at the 11th hour would suck.

This will be removed when it is time to import gcc-3.3.

Discussed with: kan
Approved by: re (jhb)

21 years agoUnconditionally restore ar.k7 (memory stack) and ar.k6 (register stack)
marcel [Sat, 24 May 2003 20:51:55 +0000 (20:51 +0000)]
Unconditionally restore ar.k7 (memory stack) and ar.k6 (register stack)
when returning from an interrupt. Both registers are used on interrupt
to switch to the right kernel stack, but other than that they are not
used. This means we only have to make sure they contain proper values
while in user mode. As such, we conditionally restored these registers
based on whether we returned to userland or not. A nice property of
conditionally restoring ar.k6 and ar.k7 is that it introduces two
invariants: ar.k6 always points to the bottom of the kernel stack and
ar.k7 always points to the top of the kernel stack (immediately below
the PCB we have there).

However, the EPC syscall path introduces an irregularity: there's no
"thin red line" between user and kernel. There's a grey area that's a
couple of instructions wide. Any interruption in that grey area is
bound to see an inconsistent state. One such state is that we're in
kernel space for all practical purposes, but we still need to have
ar.k6 and ar.k7 restored as if we're in userland.

Thus: restore ar.k6 and ar.k7 unconditionally at the cost of losing
a valuable invariant. Both registers now hold the extend of the
usable portion of the kernel stack at any interrupt nesting, which
when in userland mean the bottom and the top of the kstack.

21 years agomdoc(7) fixes.
ru [Sat, 24 May 2003 19:53:08 +0000 (19:53 +0000)]
mdoc(7) fixes.

Approved by: re (blanket)

21 years agolibstdc++.so breaks on amd64 due to bogons in our build, so prevent the
peter [Sat, 24 May 2003 19:38:18 +0000 (19:38 +0000)]
libstdc++.so breaks on amd64 due to bogons in our build, so prevent the
shared library being built for amd64.  The problem is that libstdc++.so
is produced with 'cc -shared'.  This has an internal -lgcc, which is
not PIC.  libstdc++.so uses exceptions and the dwarf2 unwinder, which
are in libgcc.a.  As a result, non-PIC code gets pulled into libstdc++.so.
This is fatal on amd64 when certain relocation types cannot be used in
PIC mode.  The official FSF solution to this is to have libgcc.so with
internal ELF symbol versioning to solve the ABI problem, but I dont want
to fight that battle yet.  I tried making libgcc_pic.a (which worked
fine), but thats not something for the 11th hour before a release.

Approved by:  re (amd64 "safe" stuff)

21 years agono libc_r on amd64 yet -> no pppctl.
peter [Sat, 24 May 2003 19:23:05 +0000 (19:23 +0000)]
no libc_r on amd64 yet -> no pppctl.

Approved by: re (safe amd64 changes)

21 years agoMerge some entries from maho's USB device compatibility list.
hrs [Sat, 24 May 2003 18:50:20 +0000 (18:50 +0000)]
Merge some entries from maho's USB device compatibility list.

Approved by: re (bmah)
Obtained from: http://people.FreeBSD.org/~maho/USB/

21 years agoGet usb(4) manual page closer to reality:
hmp [Sat, 24 May 2003 18:28:18 +0000 (18:28 +0000)]
Get usb(4) manual page closer to reality:

- update ``struct usb_device_info''
- add information about new fields in about struct
- document USB_EVENT_IS_ATTACH() and USB_EVENT_IS_DETACH()
- update URL of the USB.ORG developer documentation

PR:      docs/41580 (original patch)
Reviewed by: n_hibma
Approved by: des (mentor), re (bmah)

21 years agoStop profiled libc from exploding, matching gcc's generated code.
peter [Sat, 24 May 2003 18:24:03 +0000 (18:24 +0000)]
Stop profiled libc from exploding, matching gcc's generated code.

Approved by: re (amd64/* blanket)

21 years agoBring vnode(9) man page to its senses:
hmp [Sat, 24 May 2003 18:19:11 +0000 (18:19 +0000)]
Bring vnode(9) man page to its senses:

- remove '-*- nroff -*-'
- bump the date

- nuke outdated ``struct vnode''
  (it is just better to lookup the struct in the header)

- nuke ``enum vtype'' and related junk
- add a one line about ``struct vnode''
- use .Va instead of .Dv for vnode struct fields

Approved by: des (mentor), re (bmah)
Reviewed by: arch@, mentor

21 years agoDo not exclude amd64 from rtld-elf builds.
peter [Sat, 24 May 2003 17:38:45 +0000 (17:38 +0000)]
Do not exclude amd64 from rtld-elf builds.

Approved by:  re  (safe amd64 support commits)

21 years agoInitial pass at supporting shared libraries on amd64. There are still
peter [Sat, 24 May 2003 17:37:51 +0000 (17:37 +0000)]
Initial pass at supporting shared libraries on amd64.  There are still
a few missing relocation types in amd64/reloc.c, but I have not found
any of them in use yet. :-)

Approved by:  re (amd64/* blanket)

21 years agoRepair PIC mode. It seems I was a bit too excited about the
peter [Sat, 24 May 2003 17:35:23 +0000 (17:35 +0000)]
Repair PIC mode.  It seems I was a bit too excited about the
implications of native PC relative addressing.

21 years agoChange low-level locking a bit so that we can tell if
deischen [Sat, 24 May 2003 02:29:25 +0000 (02:29 +0000)]
Change low-level locking a bit so that we can tell if
a lock is being waitied on.

Fix a races in join and cancellation.

When trying to wait on a CV and the library is not yet
threaded, make it threaded so that waiting actually works.

When trying to nanosleep() and we're not threaded, just
call the system call nanosleep instead of adding the thread
to the wait queue.

Clean up adding/removing new threads to the "all threads queue",
assigning them unique ids, and tracking how many active threads
there are.  Do it all when the thread is added to the scheduling
queue instead of making pthread_create() know how to do it.

Fix a race where a thread could be marked for signal delivery
but it could be exited before we actually add the signal to it.

Other minor cleanups and bug fixes.

Submitted by: davidxu
Approved by: re@ (blanket for libpthread)

21 years agoLock the cond queue (condition variables):
mtm [Sat, 24 May 2003 01:02:16 +0000 (01:02 +0000)]
Lock the cond queue (condition variables):
Access to the thread's flags and state is protected by
_thread_critical_enter/exit(). When a thread is signaled with a condition
its state must be protected by locking it and disabling
signals before it is taken of the waiters' queue.

Move the implementation of pthread_cond_signal() and pthread_cond_broadcast()
into one function, cond_signal(). Its behaviour is determined by the
last argument, int broadcast. If this is set to 1 it will remove all
waiters, otherwise it will wake up only the first waiter thread.

Remove an extraneous call to pthread_testcancel().

Approved by: re/blanket libthr

21 years agoFix an alpha inheritance bug:
marcel [Sat, 24 May 2003 00:17:34 +0000 (00:17 +0000)]
Fix an alpha inheritance bug:

On alpha, PAL is involved in context management and after wiring
the CPU (in alpha_init()) a context switch was performed to tell
PAL about the context. This was bogusly brought over to ia64
where it introduced bugs, because we restored the context from
a mostly uninitialized PCB.

The cleanup constitutes:
o  Remove the unused arguments from ia64_init().
o  Don't return from ia64_init(), but instead call mi_startup()
   directly. This reduces the amount of muckery in assembly and
   also allows for the next bullet:
o  Save our currect context prior to calling mi_startup(). The
   reason for this is that many threads are created from thread0
   by cloning the PCB. By saving our context in the PCB, we have
   something sane to clone. It also ensures that a cloned thread
   that does not alter the context in any way will return to
   the saved context, where we're ready for the eventuality with
   a nice, user unfriendly panic().

The cleanup fixes at least the following bugs:
o  Entering mi_startup() with the RSE in enforced lazy mode.
o  Re-execution of ia64_init() in certain "lab" conditions.

While here, add proper unwind directives to __start() so that
the unwind knows it has reached the bottom of the (call) stack.

Approved by: re@ (blanket)

21 years agoFix a (new) source of instability:
marcel [Fri, 23 May 2003 23:55:31 +0000 (23:55 +0000)]
Fix a (new) source of instability:

When interrupting a kernel context, we don't need to switch stacks
(memory nor register). As such, we were also not restoring the
register stack pointer (ar.bspstore). This, however, fails to be
valid in 1 situation: when we interrupt a register stack switch as
is being done in restorectx(). The problem is that restorectx()
needs to have ar.bsp == ar.bspstore before it can assign the new
value to ar.bspstore. This is achieved by doing a loadrs prior to
assigning to ar.bspstore. If we take an interrupt in between the
loadrs and the assignment and we don't make sure we restore the
ar.bspstore prior to returning from the interrupt, we switch
stacks with possibly non-zero dirty registers, which means that
the new frame pointer (ar.bsp) will be invalid.

So, instead of jumping over the restoration of the register frame
pointer and related registers, we conditionalize it based on whether
we return to kernel context or user context. A future performance
tweak is possible by only restoring ar.bspstore when returning to
kernel mode *and* when the RSE is in enforced lazy mode. One cannot
assume ar.bsp == ar.bspstore if the RSE is not in enforced lazy mode
anyway.

While here (well, not quite) don't unconditionally assign to
ar.bspstore in exception_save. Only do that when we actually switch
stacks. It can only harm us to do it unconditionally.

Approved by: re@ (blanket)

21 years agoAdd two functions: _spinlock_pthread() and _spinunlock_pthread()
mtm [Fri, 23 May 2003 23:39:31 +0000 (23:39 +0000)]
Add two functions: _spinlock_pthread() and _spinunlock_pthread()
that take the address of a struct pthread as their first argument.
_spin[un]lock() just become wrappers arround these two functions.
These new functions are for use in situations where curthread can't be
used. One example is _thread_retire(), where we invalidate the array index
curthread uses to get its pointer..

Approved by: re/blanket libthr

21 years agoIn swapctx(), put the RSE in enforced lazy mode before we flush the
marcel [Fri, 23 May 2003 23:16:43 +0000 (23:16 +0000)]
In swapctx(), put the RSE in enforced lazy mode before we flush the
register stack. There's nothing really wrong with flushing before
putting the RSE in enforced lazy mode, provided you don't depend on
ar.bspstore being equal to ar.bsp when the RSE has been put in
enforced lazy more. The small window between the flush and setting
the RSE may be sufficient to have the RSE eagerly increase the dirty
region (and hence cause ar.bspstore != ar.bsp) or have an interrupt
that may even get the laziest RSE to do something.

Anyway: we don't depend on ar.bspstore being equal to ar.bsp, so
nothing was and is broken. But the code was non-intuitive and
easily confuses. This is a source of future bugs.

Note: the advantage of not depending on ar.bspstore is that there's
some recilience against an interrupted flushrs. Clobbering is limited
to stacked register contents only, not to RSE address clobbering.

Approved: re@ (blanket)

21 years agoFix a typo in rev 1.10
njl [Fri, 23 May 2003 21:40:07 +0000 (21:40 +0000)]
Fix a typo in rev 1.10

21 years agoFlesh out the libkse note a bit. Source material kindly provided by
bmah [Fri, 23 May 2003 20:10:46 +0000 (20:10 +0000)]
Flesh out the libkse note a bit.  Source material kindly provided by
deischen, any inaccuracies are mine.

Approved by: re (implicitly)

21 years agoMake the maximum number of vnodes a function of both the physical memory
alc [Fri, 23 May 2003 19:54:02 +0000 (19:54 +0000)]
Make the maximum number of vnodes a function of both the physical memory
size and the kernel's heap size, specifically, vm_kmem_size.  This
function allows a maximum of 40% of the vm_kmem_size to be used for
vnodes and vm objects.  This is a conservative bound based upon recent
problem reports.  (In other words, a slight increase in this percentage
may be safe.)

Finally, machines with less than ~3GB of RAM should be unaffected
by this change, i.e., the maximum number of vnodes should remain
the same.  If necessary, machines with 3GB or more of RAM can increase
the maximum number of vnodes by increasing vm_kmem_size.

Desired by: scottl
Tested by: jake
Approved by: re (rwatson,scottl)

21 years agoI'm lost in a maze of twisty little tunables, all different.
bmah [Fri, 23 May 2003 17:27:32 +0000 (17:27 +0000)]
I'm lost in a maze of twisty little tunables, all different.
The ACPI-disabling hint goes into device.hints, not loader.conf.

Pointed out by: njl

21 years agoAdd some hopefully helpful notes about ACPI.
bmah [Fri, 23 May 2003 16:37:23 +0000 (16:37 +0000)]
Add some hopefully helpful notes about ACPI.

Approved by: re (implicitly)
Reviewed by: imp

21 years agoMove ($create-refentry-xref-link$) to the language-neutral place
hrs [Fri, 23 May 2003 10:30:27 +0000 (10:30 +0000)]
Move ($create-refentry-xref-link$) to the language-neutral place
and add entities &release.manpath.*; for man.cgi's manpath=XXX.

Approved by: re (bmah)

21 years agoEDOOFUS
mtm [Fri, 23 May 2003 10:28:13 +0000 (10:28 +0000)]
EDOOFUS
Prevent one thread from messing up another thread's saved signal
mask by saving it in struct pthread instead of leaving it as a
global variable. D'oh!

Approved by: re/blanket libthr

21 years agoMake WARNS2 clean. The fixes mostly included:
mtm [Fri, 23 May 2003 09:48:20 +0000 (09:48 +0000)]
Make WARNS2 clean. The fixes mostly included:
o removed unused variables
o explicit inclusion of header files
o prototypes for externally defined functions

Approved by:    re/blanket libthr

21 years agonote to self: do not confuse void* with int.
mtm [Fri, 23 May 2003 08:13:24 +0000 (08:13 +0000)]
note to self: do not confuse void* with int.

Approved by: re/blanket libthr

21 years agoTypo fix. oops.
peter [Fri, 23 May 2003 06:36:46 +0000 (06:36 +0000)]
Typo fix.  oops.

Submitted by:  jmallett
Approved by:   re (blanket amd64/*)

21 years agoUpdate comments. Note that the kernel is at -1GB, not -2GB as erroniously
peter [Fri, 23 May 2003 06:35:45 +0000 (06:35 +0000)]
Update comments.  Note that the kernel is at -1GB, not -2GB as erroniously
implied by the previous commit.  KVM is still only 1GB until
pmap_growkernel() learns about the extra page table level.

Approved by:  re (blanket)

21 years agoAs suggested by the gdb folks, pad the 'struct fpreg' to a full 512 bytes
peter [Fri, 23 May 2003 06:31:56 +0000 (06:31 +0000)]
As suggested by the gdb folks, pad the 'struct fpreg' to a full 512 bytes
to match the native fxsave/fxrstor object size since thats apparently what
the Linux/NetBSD folks do.

21 years agoAdd amd64 to the MACHINE_ARCH list of systems that link bsdlabel to
peter [Fri, 23 May 2003 06:08:28 +0000 (06:08 +0000)]
Add amd64 to the MACHINE_ARCH list of systems that link bsdlabel to
disklabel.  I just got burnt again by having an old disklabel binary
kicking around.

Discussed with: phk
Approved by:    re (safe amd64 stuff)

21 years agoLow risk amd64 fix. Use a vm_offset_t for the virtual location of the
peter [Fri, 23 May 2003 05:10:49 +0000 (05:10 +0000)]
Low risk amd64 fix.  Use a vm_offset_t for the virtual location of the
buffer space instead of a u_int32_t.  Otherwise the upper 32 bits of
the address space get truncated and syscons blows up.

Approved by: re (safe, low risk amd64 fixes)

21 years agoDeal with the user VM space expanding. 32 bit applications do not like
peter [Fri, 23 May 2003 05:07:33 +0000 (05:07 +0000)]
Deal with the user VM space expanding.  32 bit applications do not like
having their stack at the 512GB mark.  Give 4GB of user VM space for 32
bit apps.  Note that this is significantly more than on i386 which gives
only about 2.9GB of user VM to a process (1GB for kernel, plus page
table pages which eat user VM space).

Approved by: re (blanket)

21 years agoMajor pmap rework to take advantage of the larger address space on amd64
peter [Fri, 23 May 2003 05:04:54 +0000 (05:04 +0000)]
Major pmap rework to take advantage of the larger address space on amd64
systems.  Of note:
- Implement a direct mapped region using 2MB pages.  This eliminates the
  need for temporary mappings when getting ptes.  This supports up to
  512GB of physical memory for now.  This should be enough for a while.
- Implement a 4-tier page table system.  Most of the infrastructure is
  there for 128TB of userland virtual address space, but only 512GB is
  presently enabled due to a mystery bug somewhere.  The design of this
  was heavily inspired by the alpha pmap.c.
- The kernel is moved into the negative address space(!).
- The kernel has 2GB of KVM available.
- Provide a uma memory allocator to use the direct map region to take
  advantage of the 2MB TLBs.
- Fixed some assumptions in the bus_space macros about the ability
  to fit virtual addresses in an 'int'.

Notable missing things:
- pmap_growkernel() should be able to grow to 512GB of KVM by expanding
  downwards below kernbase.  The kernel must be at the top 2GB of the
  negative address space because of gcc code generation strategies.
- need to fix the >512GB user vm code.

Approved by: re (blanket)

21 years agoChange the way the plex lock mutexes work. Previously they were part
grog [Fri, 23 May 2003 01:15:55 +0000 (01:15 +0000)]
Change the way the plex lock mutexes work.  Previously they were part
of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

expand_table: Add parameters file and line if we're debugging.

Approved by: re (jhb)

21 years agoChange the way the plex lock mutexes work. Previously they were part
grog [Fri, 23 May 2003 01:15:30 +0000 (01:15 +0000)]
Change the way the plex lock mutexes work.  Previously they were part
of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

Add and clarify comments.

Approved by: re (jhb)

21 years agoexpand_table: Add parameters file and line if we're debugging.
grog [Fri, 23 May 2003 01:15:01 +0000 (01:15 +0000)]
expand_table: Add parameters file and line if we're debugging.

MMalloc, vinum_meminfo: Use strlcpy to copy file name.

Approved by: re (jhb)

21 years agoChange the way the plex lock mutexes work. Previously they were part
grog [Fri, 23 May 2003 01:14:35 +0000 (01:14 +0000)]
Change the way the plex lock mutexes work.  Previously they were part
of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

Approved by: re (jhb)

21 years agodetachobject: Update volume config after detaching a plex.
grog [Fri, 23 May 2003 01:14:13 +0000 (01:14 +0000)]
detachobject: Update volume config after detaching a plex.

update_volume_config: Remove redundant diskconfig parameter.

Approved by: re (jhb)

21 years agoChange the way the plex lock mutexes work. Previously they were part
grog [Fri, 23 May 2003 01:13:43 +0000 (01:13 +0000)]
Change the way the plex lock mutexes work.  Previously they were part
of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

update_volume_config: Remove redundant diskconfig parameter.

expand_table: Add parameters file and line if we're debugging.

Approved by: re (jhb)

21 years agoChange many strcpys to strlcpys, etc.
grog [Fri, 23 May 2003 01:13:10 +0000 (01:13 +0000)]
Change many strcpys to strlcpys, etc.

Submitted by:    Ted Unangst <tedu@stanford.edu>

Correct some inaccurate and badly formatted comments.

config_subdisk: If our drive is down, ensure that the subdisk is
crashed.  Previously it was possible for the subdisk
to be up when the drive was down.

Change the way the plex lock mutexes work.  Previously they were part
of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

update_volume_config: Remove redundant diskconfig parameter.

Approved by: re (jhb)

21 years agoModified release note: Note code generation problems with the base
bmah [Fri, 23 May 2003 00:02:10 +0000 (00:02 +0000)]
Modified release note:  Note code generation problems with the base
system GCC using -march=pentium4, and the local workaround in our
Makefile infrastructure.

Approved by: re (implicitly)

21 years agoo Document the tunables that acpi allows. (mdoc gurus please comment
imp [Thu, 22 May 2003 23:58:50 +0000 (23:58 +0000)]
o Document the tunables that acpi allows. (mdoc gurus please comment
  on and fix if neceeary).
o Note that acpi is available on i386-ia32, ia64 and amd64, not just 'intel'
  platforms.  Intel has had nothing to do with amd64.

Approved by: re (scottl@)

21 years agoCorrectly tag some on-board Ethernet devices with the right
bmah [Thu, 22 May 2003 23:22:59 +0000 (23:22 +0000)]
Correctly tag some on-board Ethernet devices with the right
architecture.

Approved by: re (implicitly)

21 years agoNote a puc(4) device that works on ia64.
bmah [Thu, 22 May 2003 23:19:01 +0000 (23:19 +0000)]
Note a puc(4) device that works on ia64.

Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net>
Approved by: re (implicitly)

21 years agoAdd more ia64 device information, in a section similar to that for
bmah [Thu, 22 May 2003 23:14:52 +0000 (23:14 +0000)]
Add more ia64 device information, in a section similar to that for
FreeBSD/alpha.  Heavily hacked version of a diff that was...

Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net>
Approved by: re (implicitly)

21 years agoEnable some devices on ia64. Based on patch that was...
bmah [Thu, 22 May 2003 22:40:22 +0000 (22:40 +0000)]
Enable some devices on ia64.  Based on patch that was...

Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net>
Approved by: re (implicitly)

21 years agoMerge from i386/trap.c rev 1.252. Use td_critnest instead of the
peter [Thu, 22 May 2003 20:09:50 +0000 (20:09 +0000)]
Merge from i386/trap.c rev 1.252.  Use td_critnest instead of the
spinlocks count for explicitly enabling interrupts.

Approved by: re (blanket)

21 years agoThe "krb5" distribution was merged with "crypto", record the death.
ru [Thu, 22 May 2003 18:41:16 +0000 (18:41 +0000)]
The "krb5" distribution was merged with "crypto", record the death.

Reviewed by: jhb
Approved by: re (jhb)

21 years agoWhen newfs'ing a partition with UFS2 that had previously been newfs'ed
dougb [Thu, 22 May 2003 18:38:54 +0000 (18:38 +0000)]
When newfs'ing a partition with UFS2 that had previously been newfs'ed
with UFS1, the UFS1 superblocks were not deleted. This allowed any
RELENG_4 (or other non-UFS2-aware) fsck to think it knew how to "fix"
the file system, resulting in severe data scrambling.

This patch is a more advanced version than the one originally submitted.
Lukas improved it based on feedback from Kirk, and testing by me. It
blanks all UFS1 superblocks (if any) during a UFS2 newfs, thereby causing
fsck's that are not UFS2 aware to generate the "SEARCH FOR ALTERNATE
SUPER-BLOCK FAILED" message, and exit without damaging the fs.

PR: bin/51619
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by: kirk
Approved by: re (scottl)

21 years agoCalculate routed interrupts using the slot number from the device and
ticso [Thu, 22 May 2003 17:45:26 +0000 (17:45 +0000)]
Calculate routed interrupts using the slot number from the device and
not that of the bridge.

Approved by: re (jhb)

21 years agoMark a couple of instances of onboard NICs as i386-only.
bmah [Thu, 22 May 2003 17:25:24 +0000 (17:25 +0000)]
Mark a couple of instances of onboard NICs as i386-only.

Approved by: re (implicitly)

21 years agoFix two misuses of __BSD_VISIBLE.
mike [Thu, 22 May 2003 17:07:57 +0000 (17:07 +0000)]
Fix two misuses of __BSD_VISIBLE.

Submitted by: bde
Approved by: re

21 years agoChange -march=pentium4 to -march=pentium3 when CPUTYPE==p4, because gcc 3.2 is
anholt [Thu, 22 May 2003 16:56:46 +0000 (16:56 +0000)]
Change -march=pentium4 to -march=pentium3 when CPUTYPE==p4, because gcc 3.2 is
known to produce broken code with -march=pentium4.  Add a note explaining this.
This should be removed when we update to gcc 3.3 or the bug is otherwise fixed.

Approved by: re

21 years agoAdd a link to the FreeBSD/ia64 project. Maybe should do this for
bmah [Thu, 22 May 2003 15:51:45 +0000 (15:51 +0000)]
Add a link to the FreeBSD/ia64 project.  Maybe should do this for
other platforms that have their own project pages too?

Based on a patch that was:

Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net>
Approved by: re (implicitly)

21 years agoUpdate the abstract to be somewhat more helpful. Based on a patch
bmah [Thu, 22 May 2003 15:42:50 +0000 (15:42 +0000)]
Update the abstract to be somewhat more helpful.  Based on a patch
that was...

Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net>
Approved by: re (implicitly)

21 years agoErase whitspace at EOL.
ru [Thu, 22 May 2003 13:10:32 +0000 (13:10 +0000)]
Erase whitspace at EOL.

Approved by: re (blanket)

21 years agoAssorted mdoc(7) fixes.
ru [Thu, 22 May 2003 13:02:28 +0000 (13:02 +0000)]
Assorted mdoc(7) fixes.

Approved by: re (blanket)

21 years agoErase whitespace at EOL.
ru [Thu, 22 May 2003 11:56:41 +0000 (11:56 +0000)]
Erase whitespace at EOL.

Approved by: re (blanket)

21 years agoMoved $FreeBSD$ tag to where it belongs.
ru [Thu, 22 May 2003 11:55:26 +0000 (11:55 +0000)]
Moved $FreeBSD$ tag to where it belongs.

Approved by: re (blanket)

21 years agoNitpicking.
ru [Thu, 22 May 2003 11:54:53 +0000 (11:54 +0000)]
Nitpicking.

Approved by: re (blanket)

21 years agoAssorted mdoc(7) fixes.
ru [Thu, 22 May 2003 11:52:23 +0000 (11:52 +0000)]
Assorted mdoc(7) fixes.

Approved by: re (blanket)

21 years agoUnbreak world build if NO_OPENSSL is defined but NO_KERBEROS is not.
ru [Wed, 21 May 2003 21:47:20 +0000 (21:47 +0000)]
Unbreak world build if NO_OPENSSL is defined but NO_KERBEROS is not.

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Approved by: re (jhb)

21 years agoRemove alpha-specific floppy build target for now.
obrien [Wed, 21 May 2003 21:19:54 +0000 (21:19 +0000)]
Remove alpha-specific floppy build target for now.

Approved by: re(jhb)

21 years agoMarkup bits.
ru [Wed, 21 May 2003 21:07:28 +0000 (21:07 +0000)]
Markup bits.

Approved by: re (blanket)

21 years agoRevert last delta.
ru [Wed, 21 May 2003 20:52:57 +0000 (20:52 +0000)]
Revert last delta.

The -l option is deprecated (hence undocumented in usage() and
SYNOPSIS), as was threatened in the commitlog accompanying rev.
1.10 of main.c.

Approved by: re (blanket)

21 years agoWhen we are spilling threads out of the run queue during panic, make sure we
julian [Wed, 21 May 2003 18:53:25 +0000 (18:53 +0000)]
When we are spilling threads out of the run queue during panic, make sure we
keep the thread state variable consistent with its real state.
i.e. Don't say it's on the run queue when it isn't.

Also clarify the associated comment.

Turns a double panic back to a single panic :-/

Approved by: re@ (jhb)

21 years agoReturn ENXIO if the softc pointer is NULL, in all likelyhood the
phk [Wed, 21 May 2003 18:52:29 +0000 (18:52 +0000)]
Return ENXIO if the softc pointer is NULL, in all likelyhood the
disk is in the process of disappearing.

Approved by: re/rwats*

21 years agoLink {be,le}{16,32,64}{enc,dec}.9 to byteorder.9.
ru [Wed, 21 May 2003 17:37:22 +0000 (17:37 +0000)]
Link {be,le}{16,32,64}{enc,dec}.9 to byteorder.9.

Approved by: re (blanket)

21 years agoFixed the whatis(1) entry for this manpage by using only
ru [Wed, 21 May 2003 17:32:55 +0000 (17:32 +0000)]
Fixed the whatis(1) entry for this manpage by using only
one short description (.Nd).

Submitted by: sheldonh

Added bswap*() functions to the NAME section.

Approved by: re (blanket)

21 years agoKill whitespace at EOL.
ru [Wed, 21 May 2003 15:55:40 +0000 (15:55 +0000)]
Kill whitespace at EOL.

Approved by: re (blanket)

21 years agomdoc(7) fixes.
ru [Wed, 21 May 2003 15:52:43 +0000 (15:52 +0000)]
mdoc(7) fixes.

This manpage should really have only one short description (.Nd);
if anyone could come up with a wording suitable for both conversion
and decoding/encoding functions, that would unbreak the whatis(1)
output for this manpage.

Approved by: re (blanket)

21 years agoAssorted mdoc(7), grammar, spelling, and punctuation fixes.
ru [Wed, 21 May 2003 15:49:01 +0000 (15:49 +0000)]
Assorted mdoc(7), grammar, spelling, and punctuation fixes.

Approved by: re (blanket)

21 years agoClarify the describtion of the -A switch
brueffer [Wed, 21 May 2003 15:00:47 +0000 (15:00 +0000)]
Clarify the describtion of the -A switch

PR: 51187
Submitted by: Jeff Ito <jeffi@rcn.com>
Approved by: re (jhb)
MFC after: 3 days

21 years agoFixed catman(1) so that if the source files are compressed,
ru [Wed, 21 May 2003 13:26:37 +0000 (13:26 +0000)]
Fixed catman(1) so that if the source files are compressed,
the preformatted files are compressed with the same program
as the source, and if the source files are uncompressed, the
preformatted files are also uncompressed.

PR: bin/52213
Submitted by: Krister Joas <krister@gazonk.net>, ru
Approved by: re (jhb)

21 years agoFixed typo in a comment.
ru [Wed, 21 May 2003 12:58:28 +0000 (12:58 +0000)]
Fixed typo in a comment.

PR: misc/52486
Submitted by: "Simon L. Nielsen" <simon@nitro.dk>
Approved by: re (jhb)

21 years agoo Make the defenition of _set_curthread() match its declaration
mtm [Wed, 21 May 2003 08:21:24 +0000 (08:21 +0000)]
o Make the defenition of _set_curthread() match its declaration
  in thr_private.h

o Lock down the ldt_entries array and ldt_free, which points to
  the next free slot. As noted in the comments, it's necessary
  to special case the initial_thread because %gs is not setup
  for it yet. This is ok because that early in the program there
  won't be any reentrancy issues anyways.

Approved by: re/blanket libthr

21 years agoMake ciss usable under PAE
ps [Wed, 21 May 2003 07:17:06 +0000 (07:17 +0000)]
Make ciss usable under PAE

Approved by: re (scottl)

21 years agoAdd a reference to release(7)
brueffer [Wed, 21 May 2003 07:16:32 +0000 (07:16 +0000)]
Add a reference to release(7)

Requested by: murray
Approved by: re (murray)

21 years ago- Make this work with PAE.
ps [Wed, 21 May 2003 07:00:49 +0000 (07:00 +0000)]
- Make this work with PAE.
- atomically load and clear the status block so we dont miss an
  update.
  Submitted by: jdp

Approved by: re (scottl)

21 years agoInsert a debugging aid:
mtm [Wed, 21 May 2003 03:41:07 +0000 (03:41 +0000)]
Insert a debugging aid:
 When in either the mutex or cond queue we notice that the thread
 is already on one of the queues, don't just simply abort(). Print
 out the thread's identifiers and what queue it was on.

Approved by: markm/mentor, re/blanket libthr

21 years agoRe-enable the garbage collector thread in anticipation of further
mtm [Wed, 21 May 2003 03:34:54 +0000 (03:34 +0000)]
Re-enable the garbage collector thread in anticipation of further
locking work. I can't see anything obviously wrong with it (other than
the need to update the locking).

Approved by: markm/mentor, re/blanket libthr

21 years agoWhen a thread exits it does not return from the kernel unless it
mtm [Wed, 21 May 2003 03:29:18 +0000 (03:29 +0000)]
When a thread exits it does not return from the kernel unless it
is the *only* remaining thread in the application, in which case we
should not core dump, and instead exit gracefully.

Approved by: markm/mentor, re/blanket libthr

21 years agoThe thread id was being set *before* zeroing out the thread. Reverse
mtm [Wed, 21 May 2003 03:22:36 +0000 (03:22 +0000)]
The thread id was being set *before* zeroing out the thread. Reverse
the order.

Approved by: markm/mentor, re/blanket libthr

21 years agoQuirk for Hitachi DVD USB drive. It returns "invalid field in cdb" for
njl [Wed, 21 May 2003 00:22:07 +0000 (00:22 +0000)]
Quirk for Hitachi DVD USB drive.  It returns "invalid field in cdb" for
normal INQUIRY requests so enable the NO_INQUIRY quirk.

Submitted by: Lars Eggert <larse@ISI.EDU>
Approved by: re (scottl)

21 years agoSort references by section
brueffer [Tue, 20 May 2003 23:25:44 +0000 (23:25 +0000)]
Sort references by section

PR: 52501
Submitted by: Simon L.Nielsen <simon@nitro.dk>
Approved by: re (scottl)
MFC after: 3 days

21 years agoUse -item lists instead of -tag lists. Grammar.
ru [Tue, 20 May 2003 22:09:18 +0000 (22:09 +0000)]
Use -item lists instead of -tag lists.  Grammar.

21 years agoFor multi-line blocks of literal text, please use -literal displays.
ru [Tue, 20 May 2003 22:08:51 +0000 (22:08 +0000)]
For multi-line blocks of literal text, please use -literal displays.

21 years agoNit.
ru [Tue, 20 May 2003 22:08:28 +0000 (22:08 +0000)]
Nit.

21 years agoAdd missing markup bits.
ru [Tue, 20 May 2003 22:07:55 +0000 (22:07 +0000)]
Add missing markup bits.

21 years agoCompact the list.
ru [Tue, 20 May 2003 22:07:30 +0000 (22:07 +0000)]
Compact the list.

21 years agoRemoved hard sentence break.
ru [Tue, 20 May 2003 22:07:03 +0000 (22:07 +0000)]
Removed hard sentence break.

21 years agoUse the -tag list to document agp(4) ioctls.
ru [Tue, 20 May 2003 22:06:43 +0000 (22:06 +0000)]
Use the -tag list to document agp(4) ioctls.

21 years agoReapply mdoc(7) fixes that got accidentally lost in the last
ru [Tue, 20 May 2003 21:01:21 +0000 (21:01 +0000)]
Reapply mdoc(7) fixes that got accidentally lost in the last
Bluetooth update, and fix a few more issues.

Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com>, ru
Approved by: re (blanket)

21 years agoThe per-CPU spinlocks list is only maintained when WITNESS is enabled.
jhb [Tue, 20 May 2003 20:50:33 +0000 (20:50 +0000)]
The per-CPU spinlocks list is only maintained when WITNESS is enabled.
Thus, treat all page faults while in a critical section as fatal rather
than just those that occur with a non-empty spinlocks list.  All such page
faults are fatal anyways.  Calling trap_fatal() earlier increases the
chances of getting more useful panic messages and a possible DDB prompt.

Approved by: re (scottl)

21 years agoMove a misplaced comment.
mtm [Tue, 20 May 2003 18:48:41 +0000 (18:48 +0000)]
Move a misplaced comment.

Approved by: markm/mentor (implicit), re/blanket libthr

21 years agoRemove a redundant quirk. Instead, we wildcard all Asahi Optical chips.
njl [Tue, 20 May 2003 18:04:42 +0000 (18:04 +0000)]
Remove a redundant quirk.  Instead, we wildcard all Asahi Optical chips.

Approved by: re

21 years agoPrevious revision broke release building, unbreak it.
ru [Tue, 20 May 2003 07:07:48 +0000 (07:07 +0000)]
Previous revision broke release building, unbreak it.

Prodded by: scottl

21 years agoo Fix a definite bogon: the dirty bity fault, instruction access
marcel [Tue, 20 May 2003 06:57:20 +0000 (06:57 +0000)]
o  Fix a definite bogon: the dirty bity fault, instruction access
   failt and data access fault install the PTE in question into
   the VHPT table. However, a post-increment was missing and we
   wrote the raw PTE data into the pagesize/access key field.
   This leaves a corrupt VHPT entry.
o  While here, remove the explicit cache purge. Insertion into
   the translation implicitly purges any overlapping entries.
o  Make sure there's a cycle break between the itc and the rfi.
o  Whitespace fixes.