Commit graph

1657 commits

Author SHA1 Message Date
John Baldwin 19612036d9 - Remove an irrelevant comment from i386 GENERIC.
- Remove unneeded quotes.
- Remove 'config' line.
- Rename ident to SIMOS.
2002-07-15 14:33:20 +00:00
Alan Cox 8b8b8202f9 o Lock page queue accesses by vm_page_wire() that aren't
within a critical section.
 o Assert that the page queues lock is held in vm_page_wire()
   unless an Alpha.
2002-07-14 23:51:55 +00:00
Alan Cox 1f54526952 o Complete the locking of page queue accesses by vm_page_unwire().
o Assert that the page queues lock is held in vm_page_unwire().
 o Make vm_page_lock_queues() and vm_page_unlock_queues() visible
   to kernel loadable modules.
2002-07-13 20:55:21 +00:00
Alfred Perlstein f0eb293e88 Move COMPAT_FREEBSD4 to arch-neutral sys/conf/NOTES.
Add COMPAT_FREEBSD4 to GENERIC for arches that existed in FreeBSD 4's time,
not just i386. (alpha and pc98)

Requested by: bde
2002-07-13 16:43:53 +00:00
Jonathan Mini 08b38412c8 Add additional cred_free_thread() calls that I had missed the first time.
Pointed out by:	jhb
2002-07-13 04:36:50 +00:00
John Baldwin 33d7ad1abe Set the thread state of the newly chosen to run thread to TDS_RUNNING in
choosethread() in MI C code instead of doing it in in assembly in all the
various cpu_switch() functions.  This fixes problems on ia64 and sparc64.

Reviewed by:	julian, peter, benno
Tested on:	i386, alpha, sparc64
2002-07-12 18:34:22 +00:00
Mike Barcroft f889202ba4 Remove label_t and physadr, which seem to have never been used in
FreeBSD.

Submitted by:	bde
2002-07-10 15:47:59 +00:00
David E. O'Brien 8442e07371 Desupport the TurboChannel Alpha's. This means the DEC3000/300* Pelic*
and DEC3000/[4-9]00 Flamingo/Sandpiper families.
2002-07-09 19:20:18 +00:00
Mike Barcroft ba5fe51088 Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro.  It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
2002-07-08 16:43:35 +00:00
Peter Wemm a58b3a6878 Add a special page zero entry point intended to be called via the single
threaded VM pagezero kthread outside of Giant.  For some platforms, this
is really easy since it can just use the direct mapped region.  For others,
IPI sending is involved or there are other issues, so grab Giant when
needed.

We still have preemption issues to deal with, but Alan Cox has an
interesting suggestion on how to minimize the problem on x86.

Use Luigi's hack for preserving the (lack of) priority.

Turn the idle zeroing back on since it can now actually do something useful
outside of Giant in many cases.
2002-07-08 04:24:26 +00:00
Peter Wemm a136efe9b6 Collect all the (now equivalent) pmap_new_proc/pmap_dispose_proc/
pmap_swapin_proc/pmap_swapout_proc functions from the MD pmap code
and use a single equivalent MI version.  There are other cleanups
needed still.

While here, use the UMA zone hooks to keep a cache of preinitialized
proc structures handy, just like the thread system does.  This eliminates
one dependency on 'struct proc' being persistent even after being freed.
There are some comments about things that can be factored out into
ctor/dtor functions if it is worth it.  For now they are mostly just
doing statistics to get a feel of how it is working.
2002-07-07 23:05:27 +00:00
Peter Wemm 19594b9110 Retrofit changes from i386/pmap.c rev 1.328-1.331.
XXX should really replace the pmap_{new,swapin,swapout,dispose}_{proc,thread}
functions with the much cleaner sparc64 versions.
2002-07-04 01:53:09 +00:00
Mike Barcroft a19d429398 Since printf(3) now supports the `j' conversion specifier, use that
when printing intmax_t and uintmax_t.

Forgotten by:	mike
Noticed by:	bde
2002-06-30 05:48:03 +00:00
Julian Elischer 8540497c50 Fix reverse ordering of locks. add a comment about locks on some platforms.
Submitted by:	jhb@freebsd.org
2002-06-29 23:58:50 +00:00
Julian Elischer e602ba25fd Part 1 of KSE-III
The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)

Reviewed by:	Almost everyone who counts
	(at various times, peter, jhb, matt, alfred, mini, bernd,
	and a cast of thousands)

	NOTE: this is still Beta code, and contains lots of debugging stuff.
	expect slight instability in signals..
2002-06-29 17:26:22 +00:00
Julian Elischer 44990b8cb8 Add files that are new for KSE. 2002-06-29 07:04:59 +00:00
Jeff Roberson 09122f6371 Set the UMA_ZONE_VM flag on the pvzone to avoid kmem_map recursion. 2002-06-27 04:08:45 +00:00
Jake Burkholder 8ba3d077ff Add an MD callout like cpu_exit, but which is called after sched_lock is
obtained, when all other scheduling activity is suspended.  This is needed
on sparc64 to deactivate the vmspace of the exiting process on all cpus.
Otherwise if another unrelated process gets the exact same vmspace structure
allocated to it (same address), its address space will not be activated
properly.  This seems to fix some spontaneous signal 11 problems with smp
on sparc64.
2002-06-24 15:48:02 +00:00
Jonathan Mini 01ad8a53db Remove unused diagnostic function cread_free_thread().
Approved by:	alfred
2002-06-24 06:22:00 +00:00
Peter Wemm 7022a21abd Update an 'XXX what is this?' type comment about suswintr and fuswintr.
These are 16 bit short values used only by the profiling code.
2002-06-20 07:40:53 +00:00
Peter Wemm b23619e02a Deorbit suibyte(). It was only used for split address space systems
for supporting UIO_USERISPACE (ie: it wasn't used).
2002-06-20 07:13:35 +00:00
Peter Wemm 2f9267ec23 Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish.
This changes
  #define RQB_FFS(mask) (ffs64(mask))
  foo = RQB_FFS(mask) - 1;
to
  #define RQB_FFS(mask) (ffs64(mask) - 1)
  foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().

Reviewed by:	jake (in principle)
2002-06-20 06:21:20 +00:00
Alfred Perlstein 1419eacb86 Squish the "could sleep with process lock" messages caused by calling
uifind() with a proc lock held.

change_ruid() and change_euid() have been modified to take a uidinfo
structure which will be pre-allocated by callers, they will then
call uihold() on the uidinfo structure so that the caller's logic
is simplified.

This allows one to call uifind() before locking the proc struct and
thereby avoid a potential blocking allocation with the proc lock
held.

This may need revisiting, perhaps keeping a spare uidinfo allocated
per process to handle this situation or re-examining if the proc
lock needs to be held over the entire operation of changing real
or effective user id.

Submitted by: Don Lewis <dl-freebsd@catspoiler.org>
2002-06-19 06:39:25 +00:00
Matt Jacob 46a23ac4ad Botcho. I included in the last commit the
device		mpt		# LSI-Logic MPT-Fusion

line. This driver isn't ready yet.

Submitted by:	Scott Long
2002-06-16 06:48:42 +00:00
Matt Jacob 3e104c7a84 Note that sio is required.
PR:		39305
Submitted by:	Michael Hogsett <hogsett@csl.sri.com>
MFC after:	1 week
2002-06-14 20:20:13 +00:00
John Baldwin 99cca534f3 - Fixup / remove obsolete comments.
- ktrace no longer requires Giant so do ktrace syscall events before and
  after acquiring and releasing Giant, respectively.
- For i386, ia32 syscalls on ia64, powerpc, and sparc64, get rid of the
  goto bad hack and instead use the model on ia64 and alpha were we
  skip the actual syscall invocation if error != 0.  This fixes a bug
  where if we the copyin() of the arguments failed for a syscall that
  was not marked MP safe, we would try to release Giant when we had
  not acquired it.
2002-06-07 05:47:35 +00:00
Jens Schweikhardt 21dc7d4f57 Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
Doug Rabson 99bd783419 Move the definition of ElfN_Hashelt to common headers. The only platform
which has a different definition for this is alpha.
2002-05-30 08:32:18 +00:00
Doug Rabson 396a429cfd Add declarations of suword32 and suword64. Add implementations of one or
the other (or both) to all the platforms. Similar for fuword32 and
fuword64.
2002-05-26 16:03:13 +00:00
Dag-Erling Smørgrav 7b856994fd Make sure there's a statement after the out: label in clockattach(). 2002-05-26 11:23:00 +00:00
Jake Burkholder d2ac231616 Make the run queue parameters machine dependent. Optimize 64 bit
architectures by using a 64 bit word for the bit array which keeps
track of non-empty queues.

Reviewed by:	peter
2002-05-25 01:12:23 +00:00
John Baldwin ae3f633bae - Apparently, the Alpha ABI mandates that arguments be passed sign-extended
regardless of if they are signed or unsigned since it is easier to work
  with sign-extended values.  Thus, remove the disabled zapnot to
  zero-extend the sign-extended value we read from *p in atomic_cmpset_32()
  since the cmpval we are comparing against should already be
  sign-extended.
- To ensure that the compiler knows to sign-extend the upper 32 bits of
  cmpval rather than leaving garbage in there, cast the appropriately in
  the constraints section.

Help from:	Richard Henderson <rth@redhat.com>
2002-05-17 05:45:39 +00:00
Tom Rhodes d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Andrew Gallatin 16b9af9990 Fixup unaligned bwx instructions (ldwu, stw). This may fix some mysterious
natd sigbus errors being reported on the freebsd-alpha@ mailing list.

Obtained from: NetBSD
2002-05-16 00:03:32 +00:00
Poul-Henning Kamp 6380601f64 Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
Poul-Henning Kamp 4c51ae2155 Remove the unused definitions of ctod() and dotc(). 2002-05-14 20:01:34 +00:00
Jake Burkholder 26a9c7b7e1 These were repo-copied to dump_machdep.c. 2002-05-13 02:52:35 +00:00
Andrew Gallatin 338a21a47a Restore the ability to take crashdumps on alpha. This was cut and pasted
nearly in its entirety from i386, so it retains the phk/nati copyright.

Savecore likes the results, but I have no way to test it as gdb is
still broken.
2002-05-11 21:53:46 +00:00
John Baldwin 8f0dda1601 Temporarily disable Jeff's fix for atomic_cmpset_32() to zero-extend the
value we load from memory.  gcc3.1 passes in the u_int32_t old value to
compare against as a _sign_-extended 64-bit value for some reason (bug?).
This is a temporary workaround so kernels work again on alpha.
2002-05-11 04:27:39 +00:00
Andrew Gallatin 8bef1df9eb Remove ## concatination in the CFGREAD and CFGWRITE macros, as gcc3 complains
about them & they are not needed.  Same fix as to tsunami_pci.c.
(not surprising, as this code was cut and pasted from there when I wrote it).
2002-05-10 16:56:14 +00:00
David E. O'Brien 4c04f5d447 Opps, remove added bogon. 2002-05-10 02:21:05 +00:00
David E. O'Brien fc336fdfbb Gcc 3.1 varargs support. 2002-05-10 02:02:54 +00:00
Matt Jacob cc8371bc71 Only saying you're launching other CPUs if there are more than one to launch. 2002-05-08 23:12:00 +00:00
Jeff Roberson c4b689f10a zapnot the signed bits in atomic_cmpset_32. Previously this did not work with
negative values because the original value was sign extended but the compared
value was not.
2002-05-08 05:19:56 +00:00
Juli Mallett ea0b7a7699 Typo fix: detects -> detect.
Reviewed by:	phk
2002-05-03 17:59:25 +00:00
Peter Wemm 33438f3bac Remove two unused headers (<machine/frame.h> and <machine/psl.h>).
psl.h is 100% bogus to be referenced here, especially from alpha MD code.
2002-05-01 06:24:51 +00:00
Poul-Henning Kamp 2266fe776e Don't export timecounter structures under debug. with sysctl, they
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
Peter Wemm db17c6fc07 Tidy up some loose ends.
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
  (this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
Alan Cox 644d87b30a MFi386 1.222: Remove vm_map_growstack() and acquisition and release of Giant
around vm_fault().
2002-04-27 09:34:15 +00:00
Marcel Moolenaar d297ad160e Don't use the symbol name to lookup the symbol value when we can use
the symbol index defined by the relocation. The elf_lookup() support
function is to be used by elf_reloc() when symbol lookups need to be
done. The elf_lookup() function operates on the symbol index and
will do a symbol name based lookup when such is required, otherwise
it uses the symbol index directly. This solves the problem seen on
ia64 where the symbol hash table does not contain local symbols and
a symbol name based lookup would fail for those symbols.

Don't pass the symbol name to elf_reloc(), as it isn't used any more.
2002-04-25 01:22:16 +00:00