Commit Graph

39310 Commits

Author SHA1 Message Date
John Baldwin
f385f7156a Lock the sched_lock while setting TDF_INPANIC. 2003-04-17 22:29:23 +00:00
John Baldwin
27dad03c97 Use TD_IS_RUNNING() instead of thread_running() in the adaptive mutex
code.
2003-04-17 22:28:58 +00:00
John Baldwin
0bfc4d1445 fork1() already sets PS_INMEM, so don't set it again. This lets us push
sched_lock down slightly so that it isn't needed in the RFSTOPPED case.
2003-04-17 22:28:28 +00:00
John Baldwin
69c4ee54ff - The prison mutex cannot possibly protect pointers to the prison it
protects, so don't bother locking it while we assign it to a ucred's
  cr_prison.
- Fully construct the new credential for a process before assigning it to
  p_ucred.
2003-04-17 22:26:53 +00:00
John Baldwin
e674d80790 Add some locking in for a few proc and thread fields. 2003-04-17 22:25:35 +00:00
John Baldwin
bb0e8070fd - Push Giant down into the fork1() function a small bit.
- Set p_acflag earlier while already hold the proc lock in fork1().
- Mark the realitexpire() callout MPSAFE for new processes.  It was already
  marked safe for proc0 a long while ago.
2003-04-17 22:24:59 +00:00
John Baldwin
462f31bff0 Adjust a few comments. 2003-04-17 22:22:47 +00:00
John Baldwin
94df4b8584 Protect td_sigmask with the proc lock. 2003-04-17 22:21:57 +00:00
John Baldwin
538621734a Test the P_WEXIT flag while already hold the proc lock instead of right
after dropping it.
2003-04-17 22:21:05 +00:00
John Baldwin
7e653dbd3b Hold the proc lock across a wider range of fields that it protects. 2003-04-17 22:20:30 +00:00
John Baldwin
aff1d36ceb Add some missing proc mutex unlocks. 2003-04-17 22:19:47 +00:00
John Baldwin
e5567180fb Don't drop the proc lock just to reacquire it after a few simple assignment
statements.  Just hold the lock the entire time.
2003-04-17 22:18:07 +00:00
John Baldwin
8365f5bf7c Remove a couple of unused symbols. 2003-04-17 22:17:28 +00:00
John Baldwin
f36403612a - Use a local variable to close a minor race when determining if the wmesg
printed out needs a prefix such as when a thread is blocked on a lock.
- Use another local variable to close another race for the td_wmesg and
  td_wchan members of struct thread.
2003-04-17 22:16:58 +00:00
John Baldwin
ab0eee5563 Protect p_flag with the proc lock. The sched_lock is not needed to turn
off P_STOPPED_SIG in p_flag.
2003-04-17 22:14:30 +00:00
John Baldwin
c2247848dc - P_SHOULDSTOP just needs proc lock now, so don't acquire sched_lock unless
it is needed.
- Add a proc lock assertion.
2003-04-17 22:13:46 +00:00
John Baldwin
c110b8e65e Add a proc lock assertion and move another assertion up to the top of the
function.
2003-04-17 22:12:12 +00:00
John Baldwin
4cac73c759 The proc lock is sufficient to test p_state against PRS_ZOMBIE, so don't
needlessly lock sched_lock.
2003-04-17 22:09:08 +00:00
John Baldwin
9d8643eca6 Don't hold the proc lock while performing sigset conversions on local
variables.
2003-04-17 22:07:56 +00:00
John Baldwin
5edadff94d - Remove garbage SIGSETOR() that snuck into struct sigpending_args
definition.
- Use the proper constant for the last arg to kern_sigaction() in osigvec()
  instead of a magic value.
2003-04-17 22:06:43 +00:00
John Baldwin
8804bf6b03 Use local struct proc variables to reduce repeated td->td_proc dereferences
and improve readability.
2003-04-17 22:02:47 +00:00
John Baldwin
9520fc2bed Adjust a KTR trace to log thread state instead of proc state as that is
more relevant.
2003-04-17 22:01:01 +00:00
John Baldwin
418e9d1b9e P_SHOULDSTOP used to be p_stat == SSTOP and needed the sched_lock, now it
is protected by the proc lock and doesnt' need sched_lock, so adjust the
locking appropriately.
2003-04-17 21:58:45 +00:00
John Baldwin
00e93b4d53 Protect the per-process UAC field with the proc lock where it isn't already
protected.
2003-04-17 21:57:16 +00:00
Nate Lawson
693f4477b1 Revise attach/detach resource cleanup
- Unconditionally call *_stop() if device is in the tree. This is to
  prevent callouts from happening after the device is gone. Checks for
  bus_child_present() should be added in the future to keep from touching
  potentially non-existent hardware in *_detach().  Found by iedowse@.
- Always check for and free miibus children, even if the device is not in
  the tree since some failure cases could have gotten here.
- Call ether_ifdetach() in the irq setup failure case
- ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so
  that ifmedia_removeall() can be unconditionally called on detach. There
  is no way to detect whether ifmedia has been initialized without using
  a separate variable (as tl(4) does).
- Add comments to indicate assumptions of code path
2003-04-17 20:32:06 +00:00
John Hay
e37f27be24 Get wlread() closer to working. Use m->m_len as the initial value for
bytes_in_mbuf rather than MCLBYTES. Add the ethertnet header to the
front of the mbuf. Adjust bytes_in_mbuf inside the loop that reads
the packet out of the card.
2003-04-17 17:51:24 +00:00
John Hay
a368c85b62 Add locking to wlinit(). 2003-04-17 17:45:58 +00:00
Tom Rhodes
9faaf3b3c8 Add some tunable descriptions.
Submitted by:	hmp
Discussed with:	bde
2003-04-17 15:44:22 +00:00
John Hay
cc8e8a9865 Put the spl calls back until we are sure that everything that they cover
are locked.
2003-04-17 15:42:30 +00:00
Tom Rhodes
2a3eeaa240 Pre-content whitespace commit.
Discussed with:	bde
2003-04-17 15:39:12 +00:00
Hartmut Brandt
6e17a0d754 Unbreak vinum, iostat and systat on sparc64 by changing the devstat
generation number back to a long (sizeof(u_int) != sizeof(long) on
sparc64). The alternative would have been to heavily change the libdevstat API.

Discussed with: phk, ken
2003-04-17 15:06:28 +00:00
Orion Hodson
5a289baba9 Perform warm or cold reset AC97 per the spec depending on state of the
codec during initialization.  This code mirrors the reset code used on
the VIA82c686 and fixes a codec initialization failure (SoundMAX
AD1885) reported by Matthias Schuendehuette.
2003-04-17 15:04:11 +00:00
Jacques Vidrine
ecbe520722 Bump __FreeBSD_version for new NSS implementation; addition of
getpw*_r, getgr*_r interfaces.
2003-04-17 14:18:53 +00:00
Poul-Henning Kamp
c72e7314c2 These two files fell off during my previous commit: put the encoding
decoding functions for struct disklabel in a separate .c file.
2003-04-17 08:41:08 +00:00
Ian Dowse
2ea36df806 Revert part of revision 1.97 by calling dc_stop() unconditionally
in dc_detach() instead of only calling it if the hardware is preset.
This is a workaround for page faults in softclock() after a `dc'
device was detached, caused by not disabling a timer before freeing
its memory. The bus_child_present() checks should probably be
re-added later, but only to avoid the hardware accesses and not the
other resource cleanups in dc_stop().

Approved by:	njl
2003-04-17 08:36:52 +00:00
Poul-Henning Kamp
daabb372ca Separate the encoding/decoding functions for struct disklabel into a
separate source file which can be used from both kernel and userland code.
2003-04-17 07:39:03 +00:00
Hidetoshi Shimokawa
4ed471c143 Add dev/firewire/fwdma.c. 2003-04-17 03:39:27 +00:00
Hidetoshi Shimokawa
77ee030b5f MFp4(simokawa_firewire):
Many internal structure changes for the FireWire driver.

- Compute CRC in CROM parsing.
- Add support for configuration ROM build.
- Simplify dummy buffer handling.
- busdma conversion
- Use swi_taskqueue_giant for -current.  Mark the interrupt routine as MPSAFE.
- AR buffer handling.
	Don't reallocate AR buffer but just recycle it.
	Don't malloc and copy per packet in fwohci_arcv().
	Pass packet to fw_rcv() using iovec.
	Application must prepare receiving buffer in advance.
- Change fw_bind API so that application should pre-allocate xfer structure.
- Add fw_xfer_unload() for recycling struct fw_xfer.
- Add post_busreset hook
- Remove unused 'sub' and 'act_type' in struct fw_xfer.
- Remove npacket from struct fw_bulkxfer.
- Don't call back handlers in fwochi_arcv() if the packet has
	not drained in AT queue
- Make firewire works on big endian platform.
- Use native endian for packet header and remove unnecessary ntohX/htonX.
- Remove FWXFERQ_PACKET mode.  We don't use it anymore.
- Remove unnecessary restriction of FWSTMAXCHUNK.
- Don't set root node for phy config packet if the root node is
	not cycle master capable but set myself for root node.
	We should be the root node after next bus reset.

	Spotted by: Yoshihiro Tabira <tabira@scd.mei.co.jp>
- Improve self id handling

Tested on: i386, sparc64 and i386 with forced bounce buffer
2003-04-17 03:38:03 +00:00
Poul-Henning Kamp
f770d2d3dd Cut&Paste considered far too easy:
Don't include <sys/disklabel.h>
2003-04-16 21:09:41 +00:00
Poul-Henning Kamp
a300701213 Don't include <sys/disklabel.h> 2003-04-16 20:57:35 +00:00
Poul-Henning Kamp
8f18989721 Include <sys/ioccom.h> instead of <sys/disklabel.h> 2003-04-16 20:46:30 +00:00
John Baldwin
20b04da89c Explicitly cast a l_ulong to an unsigned long to make all arch's happy
with the printf format.
2003-04-16 20:43:10 +00:00
John Baldwin
760eb2e033 Fix printf format in a debug printf. 2003-04-16 20:07:48 +00:00
John Baldwin
e68c51ed5d Fix printf args in debug printfs. 2003-04-16 20:05:42 +00:00
John Baldwin
46ae26f7e0 Assume a struct thread *td instead of a struct proc *p in the debug
printf macros.
2003-04-16 20:04:47 +00:00
John Baldwin
4bedc36141 Fix multiple printf warnings on Alpha:
- Prefer long long to quad_t to match printf args.
- Use uintmax_t and %j to print segsz_t and vm_size_t values.
- Fix others in Alpha-specific code.
2003-04-16 19:46:26 +00:00
John Baldwin
f36a83deff Fix some debug macros. Either missing close parens or close parens in the
wrong place.
2003-04-16 19:28:13 +00:00
John Hay
96b695d7cc Add locking and remove all the spl() calls. 2003-04-16 17:42:38 +00:00
John Hay
6bf16104bf Get rid of COMPAT_OLDISA and move in the direction of newbus. 2003-04-16 17:29:00 +00:00
John Hay
81b9d04c1d Remove the register keyword. 2003-04-16 15:52:20 +00:00
John Baldwin
918f6e721b Remove another unused variable. 2003-04-16 15:24:17 +00:00
John Baldwin
c3bc903d9a Remove an unused variable so this compiles again. 2003-04-16 15:19:55 +00:00
Matthew N. Dodd
046d2c31c8 Remove some code that managed to escape from my local repository. 2003-04-16 13:18:27 +00:00
Maxim Sobolev
2bce79a21d Update comment to match reality. 2003-04-16 09:16:55 +00:00
Søren Schmidt
29273dcd58 Cosmetics. 2003-04-16 08:30:40 +00:00
Søren Schmidt
db16c8c28b Fix a panic with Cenatek controllers. 2003-04-16 08:30:10 +00:00
Matthew N. Dodd
67a452057c - Remove a block of code I missed in the previous commit.
- Call tl_ifmedia_upd() in tl_init() for cards with bitrate devices.
2003-04-16 06:51:26 +00:00
Matthew N. Dodd
2836b6d03e - Set if_unit, if_init, and ifq_maxlen.
- Remove unnecessary initializations; ether_ifattach() takes care of them.
- Change function argument types to avoid nasty casts.
2003-04-16 06:27:39 +00:00
Hidetoshi Shimokawa
30eaffaf6c Fix bogus maxsegsz parameter for bus_dma_tag_create().
MFC: 1 week
2003-04-16 05:03:35 +00:00
Matthew N. Dodd
533294b956 - Don't call pci_enable_io() in drivers (unless needed for resume).
- Don't test memory/port status and emit an error message; the PCI
  bus code will do this now.
2003-04-16 03:16:57 +00:00
Matthew N. Dodd
c047e5b1a9 Return status for PCI methods '{enable,disable}_{io,busmaster}'.
Reviewed by:	imp
2003-04-16 03:15:08 +00:00
Marcel Moolenaar
146324b0d2 Add the EHCI host controller. 2003-04-16 01:29:08 +00:00
Poul-Henning Kamp
18b492fc8c Bump the config version to force people to upgrade their config(8)
so the fix for emitting multiple instances of .o files will prevent
link errors on LINT.
2003-04-15 21:29:11 +00:00
Robert Watson
0712b25402 Modify mac_test policy to invoke WITNESS_WARN() when a potentially
blocking allocation could occur as a result of a label
initialization.  This will simulate the behavior of allocated
label policies such as MLS and Biba when running mac_test from
the perspective of WITNESS lock and sleep warnings.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 21:20:34 +00:00
John Baldwin
8667535d13 NO_COMPAT_FREEBSD4 is no longer used. 2003-04-15 20:59:43 +00:00
Robert Watson
9a1b0237a7 Enable the MAC_ALWAYS_LABEL_MBUF flag for the Biba, LOMAC, MLS, and Test
policies.  Missed in earlier merge.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 20:51:18 +00:00
Robert Watson
3757e11997 Re-add MUTEX_DEBUG and MUTEX_PROFILING, which got hosed by rejected
chunks from bde's patch.

Spotted by:	jhb
2003-04-15 20:49:48 +00:00
John Baldwin
5716b68f9d Remove empty simulator options section and add an ABI emulation section.
Add COMPAT_OSF1, COMPAT_LINUX, and LINPROCFS options to the ABI emulation
section.
2003-04-15 20:21:56 +00:00
Robert Watson
d971c22b4a Improve consistency, ordering, style of options:
- Remove extra blank lines
- Sort options
- Remove comments that belong in NOTES

Submitted by:	bde (older revision)
2003-04-15 19:43:52 +00:00
Warner Losh
7f2af527b0 When the driver allocates memory or I/O ports, enable that bit in the
command config register.  At the present, this represents a nop
because these bits should have been set earlier in the process.  In
the future, we'll only set these bits when the driver requests the
resource, not when the bus code detects the resource.

Reviewed by: mdodd
2003-04-15 19:38:18 +00:00
Robert Watson
6d1a6a9a9a mac_init_mbuf_tag() accepts malloc flags, not mbuf allocator flags, so
don't try and convert the argument flags to malloc flags, or we risk
implicitly requesting blocking and generating witness warnings.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-15 19:33:23 +00:00
Max Khon
0d9d548cbe cosmetic style fixes 2003-04-15 17:26:28 +00:00
John Baldwin
f265002902 Sync up with changes to ptrace() and use P_SHOULDSTOP instead of
a duplicate P_TRACED check.

Submitted by:	marcel
2003-04-15 16:29:39 +00:00
Matthew N. Dodd
f246e4a17f - Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
  such abuse isn't really needed.  (And if we do need type information
  associated with a module then we should make it explicit and not
  use hacks.)
2003-04-15 06:37:30 +00:00
Matthew N. Dodd
f7130d0977 Add a module version number. 2003-04-15 04:19:49 +00:00
Matthew N. Dodd
5423375573 Express bus dependency a little more clearly. 2003-04-15 04:08:01 +00:00
Mike Silbersack
75d8feb42a Rework the rl_encap failure case. Previously, we would stuff the
unencapsulated packet back into the IFQ.  Unfortunately, the only reason
rl_encap would fail was due to m_defrag failing, which should only happen
when we're low on mbufs.  Hence, it was possible for us to end up with
an IFQ full of packets which could never clear the queue because they could
never be defragmented because they were themselves taking up all the mbufs.

To solve this, take if_xl's approach to the problem of encapsulation failure:
drop the packet.

MFC after:	3 days
2003-04-15 04:06:01 +00:00
Maxime Henrion
0cb112309a style(9) 2003-04-15 03:11:03 +00:00
Mike Silbersack
352d050e79 Add another MBUF_STRESS_TEST feature, m_defragrandomfailures.
When enabled, this causes m_defrag to randomly return NULL (following
its normal failure case so that extra memory leaks are not introduced.)

Code similar to this was used to find / fix a few bugs last week.
2003-04-15 02:14:43 +00:00
Alan Cox
acbff226fc Update locking on the kmem_object to use the new macros. 2003-04-15 01:16:05 +00:00
Robert Watson
e965edfda2 Add MAC_ALWAYS_LABEL_MBUF to options; this permits the administrator
to force the allocation of MAC labels for all mbufs regardless of
whether a configured policy requires labeling when the mbuf is
allocated.  This can be useful it you anticipate loading a fully
labeled policy after boot and don't want mbufs to exist without
label storage, for performance measurement purposes, etc.  It also
slightly lowers the overhead of m_tag labeling due to removing the
decision logic.

While here, improve commenting of other MAC options.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 21:45:12 +00:00
Robert Watson
225bff6f8b Move MAC label storage for mbufs into m_tags from the m_pkthdr structure,
returning some additional room in the first mbuf in a chain, and
avoiding feature-specific contents in the mbuf header.  To do this:

- Modify mbuf_to_label() to extract the tag, returning NULL if not
  found.

- Introduce mac_init_mbuf_tag() which does most of the work
  mac_init_mbuf() used to do, except on an m_tag rather than an
  mbuf.

- Scale back mac_init_mbuf() to perform m_tag allocation and invoke
  mac_init_mbuf_tag().

- Replace mac_destroy_mbuf() with mac_destroy_mbuf_tag(), since
  m_tag's are now GC'd deep in the m_tag/mbuf code rather than
  at a higher level when mbufs are directly free()'d.

- Add mac_copy_mbuf_tag() to support m_copy_pkthdr() and related
  notions.

- Generally change all references to mbuf labels so that they use
  mbuf_to_label() rather than &mbuf->m_pkthdr.label.  This
  required no changes in the MAC policies (yay!).

- Tweak mbuf release routines to not call mac_destroy_mbuf(),
  tag destruction takes care of it for us now.

- Remove MAC magic from m_copy_pkthdr() and m_move_pkthdr() --
  the existing m_tag support does all this for us.  Note that
  we can no longer just zero the m_tag list on the target mbuf,
  rather, we have to delete the chain because m_tag's will
  already be hung off freshly allocated mbuf's.

- Tweak m_tag copying routines so that if we're copying a MAC
  m_tag, we don't do a binary copy, rather, we initialize the
  new storage and do a deep copy of the label.

- Remove use of MAC_FLAG_INITIALIZED in a few bizarre places
  having to do with mbuf header copies previously.

- When an mbuf is copied in ip_input(), we no longer need to
  explicitly copy the label because it will get handled by the
  m_tag code now.

- No longer any weird handling of MAC labels in if_loop.c during
  header copies.

- Add MPC_LOADTIME_FLAG_LABELMBUFS flag to Biba, MLS, mac_test.
  In mac_test, handle the label==NULL case, since it can be
  dynamically loaded.

In order to improve performance with this change, introduce the notion
of "lazy MAC label allocation" -- only allocate m_tag storage for MAC
labels if we're running with a policy that uses MAC labels on mbufs.
Policies declare this intent by setting the MPC_LOADTIME_FLAG_LABELMBUFS
flag in their load-time flags field during declaration.  Note: this
opens up the possibility of post-boot policy modules getting back NULL
slot entries even though they have policy invariants of non-NULL slot
entries, as the policy might have been loaded after the mbuf was
allocated, leaving the mbuf without label storage.  Policies that cannot
handle this case must be declared as NOTLATE, or must be modified.

- mac_labelmbufs holds the current cumulative status as to whether
  any policies require mbuf labeling or not.  This is updated whenever
  the active policy set changes by the function mac_policy_updateflags().
  The function iterates the list and checks whether any have the
  flag set.  Write access to this variable is protected by the policy
  list; read access is currently not protected for performance reasons.
  This might change if it causes problems.

- Add MAC_POLICY_LIST_ASSERT_EXCLUSIVE() to permit the flags update
  function to assert appropriate locks.

- This makes allocation in mac_init_mbuf() conditional on the flag.

Reviewed by:	sam
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 20:39:06 +00:00
Robert Watson
10eeb10c63 Abstract access to the mbuf header label behind a new function,
mbuf_to_label().  This permits the vast majority of entry point code
to be unaware that labels are stored in m->m_pkthdr.label, such that
we can experiment storage of labels elsewhere (such as in m_tags).

Reviewed by:	sam
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 18:11:18 +00:00
Robert Watson
aa65d9f538 Use MBTOM() to convert mbuf allocator flags to malloc() flags, rather
than using the same compare/substitute in many places.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-14 16:04:10 +00:00
Maxim Sobolev
cf0d8a1e48 Use pci_enable_{busmaster|io}() instead of directly writing into
PCI configuration register.

Submitted by:	mdodd
2003-04-14 15:50:04 +00:00
Olivier Houchard
695d74f337 Use while (*controlp != NULL) instead of do ... while (*control != NULL)
There are valid cases where *controlp will be NULL at this point.

Discussed with:	dwmalone
2003-04-14 14:44:36 +00:00
Bernd Walter
65193b3e5d Use a sim for each device on it's own instead of one for all umass
devices.
This reduces complexity and fixes a number of small problems.

Approved by:	gallatin (mentor)
Reviewed by:	njl
2003-04-14 14:28:17 +00:00
Hidetoshi Shimokawa
050871cc4f Panic if bus_dmamap_load() doesn't respect maxsegsz. 2003-04-14 14:17:49 +00:00
Bernd Walter
ca3acad1d7 add EHCI (USB 2.0) controller support.
Approved by:	joe
		gallatin (mentor)
Obtained from:  NetBSD
2003-04-14 14:04:08 +00:00
Hidetoshi Shimokawa
c8990f0d8e Restore delayed load support for the resource shortage case.
It was missed in the previous change.
Now, _bus_dmamap_load_buffer() accepts BUS_DMA_WAITOK/BUS_DMA_NOWAIT flags.

Original idea from: jake
2003-04-14 13:21:40 +00:00
Maxim Sobolev
bb342a3713 Before attaching device set PCIM_CMD_PORTEN in addition to
PCIM_CMD_MEMEN and PCIM_CMD_BUSMASTEREN, becaise some braindead
BIOSes (such as one found in my vprmatrix notebook) forget
to initialize it properly resulting in attachment failure.
2003-04-14 09:45:25 +00:00
Poul-Henning Kamp
7715475960 More correct patch: Only call biofinish if we have not already sent
any children down the mesh.
2003-04-14 08:49:54 +00:00
Poul-Henning Kamp
2f912fc976 Call biofinish() also when we get a malloc() failure. 2003-04-14 08:08:17 +00:00
Hidetoshi Shimokawa
f5270431be * Use _bus_dmamap_load_buffer() and respect maxsegsz in bus_dmamap_load().
Ignoring maxsegsz may lead to fatal data corruption for some devices.
ex. SBP-2/FireWire
We should apply this change to other platforms except for sparc64.

MFC after: 1 week
2003-04-14 04:19:42 +00:00
Alan Cox
de5ef10142 Update locking on the kernel_object to use the new macros. 2003-04-14 00:36:53 +00:00
Alan Cox
d1dc776d9d Lock some manipulations of the vm object's flags. 2003-04-13 23:43:34 +00:00
Jake Burkholder
50e24eb628 - Move the routine for flushing all user mappings from the tlb from pmap to
the cpu dependent files.  It will need to be done differently for USIII.
- Simplify the logic for detecting context rollovers.  Instead of dealing
  with it when the next context switch would cause the context numbers to
  rollover, deal with it when they actually do rollover.
- Move some things around in cpu_switch so that we only do 1 membar #Sync
  when switching address space, instead of 2.
- Detect kernel threads by comparing the new vm space to vmspace0, instead
  if checking if the tlb context is 0.
- Removed some debug code.
2003-04-13 21:54:58 +00:00
Poul-Henning Kamp
073834e69b Add definitions for location of the magic sequence and the length
of a partition entry.
2003-04-13 21:52:22 +00:00
Jake Burkholder
2373499592 Made vmspace0 non-static. Its useful to be able to identify a vmspace as
the kernel vmspace.
2003-04-13 21:29:11 +00:00
Alan Cox
e2479b4fc3 Lock some manipulations of the vm object's flags. 2003-04-13 20:22:02 +00:00