Commit Graph

95748 Commits

Author SHA1 Message Date
marcel
ba29587a94 When switching the RSE to use the kernel stack as backing store, keep
the RNAT bit index constant. The net effect of this is that there's
no discontinuity WRT NaT collections which greatly simplifies certain
operations. The cost of this is that there can be up to 504 bytes of
unused stack between the true base of the kernel stack and the start
of the RSE backing store. The cost of adjusting the backing store
pointer to keep the RNAT bit index constant, for each kernel entry,
is negligible.

The primary reasons for this change are:
1. Asynchronuous contexts in KSE processes have the disadvantage of
   having to copy the dirty registers from the kernel stack onto the
   user stack. The implementation we had so far copied the registers
   one at a time without calculating NaT collection values. A process
   that used speculation would not work. Now that the RNAT bit index
   is constant, we can block-copy the registers from the kernel stack
   to the user stack without having to worry about NaT collections.
   They will be in the right place on the user stack.
2. The ndirty field in the trapframe is now also usable in userland.
   This was previously not the case because ndirty also includes the
   space occupied by NaT collections. The value could be off by 8,
   depending on the discontinuity. Now that the RNAT bit index is
   contants, we have exactly the same number of NaT collection points
   on the kernel stack as we would have had on the user stack if we
   didn't switch backing stores.
3. Debuggers and other applications that use ptrace(2) can now copy
   the dirty registers from the kernel stack (using ptrace(2)) and
   copy them whereever they want them (onto the user stack of the
   inferior as might be the case for gdb) without having to worry
   about NaT collections in the same way the kernel doesn't have to
   worry about them.

There's a second order effect caused by the randomization of the
base of the backing store, for it depends on the number of dirty
registers the processor happened to have at the time of entry into
the kernel. The second order effect is that the RSE will have a
better cache utilization as compared to having the backing store
always aligned at page boundaries. This has not been measured and
may be in practice only minimally beneficial, if at all measurable.
2003-10-28 19:38:26 +00:00
sos
b0cc5e450b This should allow us to boot with DMA enabled on unknown PCI ATA
chipsets, well at least newer ones...
2003-10-28 19:01:48 +00:00
scottl
208696733a Directly call the 'reboot' word instead of indirectly evaluating it. 2003-10-28 17:18:42 +00:00
ume
8ff2243783 make sure to accept only IPv6 packet.
Obtained from:	KAME
2003-10-28 16:45:29 +00:00
ume
67fa4b4d82 cleanup use of m_tag.
Obtained from:	KAME
2003-10-28 16:29:26 +00:00
ume
7a7c6e3d3e mib name was changed by fixing a spelling.
net.key.prefered_oldsa -> net.key.preferred_oldsa

Obtained from:	KAME
2003-10-28 16:16:04 +00:00
sam
39ba2e1c90 speedup stream socket recv handling by tracking the tail of
the mbuf chain instead of walking the list for each append

Submitted by:	ps/jayanth
Obtained from:	netbsd (jason thorpe)
2003-10-28 05:47:40 +00:00
tjr
a68a195ad4 Catch up with removal of /usr/bin/svr4. 2003-10-28 05:22:19 +00:00
jmg
2a6886b365 take mux's fix to the next level, scan the names and make the field larger
as necessary... on sparcs where:
atapci0 vec1996
is a bit too long
2003-10-28 05:02:03 +00:00
jeff
7742522f99 - Only change the run queue in sched_prio() if the kse is non null. threads
can be in the TD_ON_RUNQ state and not have an associated kse.
 - Remove the PRI_IDLE special case from sched_clock(), it was not actually
   necessary.
2003-10-28 03:28:48 +00:00
simokawa
0327df13d0 I wrongly committed an older version.
Update references etc.
2003-10-28 01:31:50 +00:00
peter
6af25febc6 Oops. Remove some rather noisy debug printfs that slipped in there
somehow.
2003-10-28 01:06:37 +00:00
marcel
23e5537e11 The previous commit removed both clause 3 and clause 4 from the UCB
license. Only clause 3 has been revoked. Restore the fourth clause
as clause 3.

Pointed out by: das@

Remove my name as a copyright holder since I don't use a BSD license
compatible or comparable to the UCB license. I choose not to add a
complete second license for my work for aesthetic reasons, nor to
replace the UCB license on grounds of rewriting more than 90% of the
source files. The rewrite can also be seen as an enhancement and since
the files were practically empty, it's rather trivial to have changed
90% of the files.
2003-10-27 22:54:34 +00:00
jhb
0e8406cd42 Fix pmap_unmapdev() to call pmap_kremove() instead of implementing it
directly so that it more closely mirrors pmap_mapdev() which calls
pmap_kenter().
2003-10-27 22:15:02 +00:00
jesper
41ec55c865 Add status checking of ATA raid to the daily periodic scripts. 2003-10-27 20:14:53 +00:00
scottl
bf1f504459 Directly call the 'boot' word instead of indirectly evaluating it.
Submitted by: dcs
2003-10-27 16:39:49 +00:00
harti
9a473fa2fc When we cannot allocate an external buffer (bacause we've hit
the maximum number of pages for buffers) return -1 instead of 0.
This fixes a panic under conditions when many mbufs are needed.

Update the head pointer of the receive buffer pool queue even when
we could not supply a buffer to the chip. Otherwise the chip will
not re-interrupt us for another try. A better strategy would probably
be to remember this condition and to supply buffers without an interrupt
as soon as buffers get available.
2003-10-27 16:21:59 +00:00
emax
6ff074e438 Create missing /usr/share/examples/netgraph/bluetooth directory 2003-10-27 16:10:05 +00:00
harti
8d6a31fb68 Add a definition for libngatm.
Reviewed by:	ru
2003-10-27 13:51:28 +00:00
harti
f0a9e298a2 Man pages for the NgATM SAAL protocol nodes. 2003-10-27 11:43:20 +00:00
harti
e6e4f72758 Allow building the NgATM SAAL layer directly into the kernel. 2003-10-27 11:19:08 +00:00
jkoshy
9395dbc69e Correct a typo.
Submitted by:	"T.M. Sommers" <tms2@mail.ptd.net>
2003-10-27 09:19:07 +00:00
jeff
d74e8d0250 - Don't set td_priority directly here, use sched_prio(). 2003-10-27 07:15:47 +00:00
ume
d382f2f692 M_DONTWAIT was passed into malloc().
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2003-10-27 07:15:22 +00:00
marcel
d270e076a6 Fix truss so that it doesn't abort/exit when a syscall has been given
a NULL-pointer for a sockaddr argument.
2003-10-27 06:50:57 +00:00
jeff
729434c982 - Use a better algorithm in sched_pctcpu_update()
Contributed by:	Thomaswuerfl@gmx.de

 - In sched_prio(), adjust the run queue for threads which may need to move
   to the current queue due to priority propagation .
 - In sched_switch(), fix style bug introduced when the KSE support went in.
   Columns are 80 chars wide, not 90.
 - In sched_switch(), Fix the comparison in the idle case and explicitly
   re-initialize the runq in the not propagated case.
 - Remove dead code in sched_clock().
 - In sched_clock(), If we're an IDLE class td set NEEDRESCHED so that threads
   that have become runnable will get a chance to.
 - In sched_runnable(), if we're not the IDLETD, we should not consider
   curthread when examining the load.  This mimics the 4BSD behavior of
   returning 0 when the only runnable thread is running.
 - In sched_userret(), remove the code for setting NEEDRESCHED entirely.
   This is not necessary and is not implemented in 4BSD.
 - Use the correct comparison in sched_add() when checking to see if an idle
   prio task has had it's priority temporarily elevated.
2003-10-27 06:47:05 +00:00
imp
28b8c0b6ea const char ** needs to be passed, not char **. 2003-10-27 06:41:40 +00:00
njl
dbcf41401d Call the VESA reset BIOS vector on the resume path. This may help displays
after resume.  I have not found it to break anything.
2003-10-27 06:26:51 +00:00
ken
0e546cc32c In camperiphdone(), make sure we check for fatal errors and bail out
instead of retrying them blindly.

This should fix some of the problems people have been having with cdrom
drives taking a long time to probe.  This should also eliminate the need
for the initial TUR in cdsize().

cam_periph.c:	Don't keep retrying if the error we get back is a fatal
		error.  This should help us detect the transition from
		"Logical unit not ready, cause not reportable" to "Medium
		not present" in the "TUR many" handler.  (The TUR many
		handler gets triggered for Logical unit not ready, cause
		not reportable errors.)

scsi_cd.c:	Remove the initial test unit ready in cdsize().  Hopefully
		it isn't necessary after the above change.

Submitted by:	gibbs (mostly)
Tested by:	peter
MFC After:	2 weeks
2003-10-27 06:15:55 +00:00
alc
f42a987e4e - Complete the synchronization of accesses to the swblock hash table. 2003-10-27 05:58:15 +00:00
marcel
367436bcad Add support for userland to access I/O port space. This is primarily
added for XFree86. There are 2 reasons for doing this with sysarch():
1. The memory mapped I/O space is not at a fixed physical address. An
   application has to use some interface to get the base address. It
   gets worse if the machine has multiple memory mapped I/O spaces.
2. Access to the memory mapped I/O space needs to happen through a
   translation that is flagged as uncachable. There's no interface
   that allows a process to do uncached memory I/O, other than though
   /dev/mem (possibly).

So, until we either disallow direct access to I/O or bus space from
userland or have a better way of doing this, sysarch() has the least
negative impact on existing interfaces.
2003-10-27 05:45:35 +00:00
imp
3543793158 sync to 1.77 2003-10-27 05:37:34 +00:00
imp
3d6f5f0b43 Correct CEM33 2003-10-27 05:37:01 +00:00
kan
d4fed514b5 Delay if_lo module intialization until domain list has been
completely populated. This prevents a system crash on boot.
2003-10-27 04:16:32 +00:00
njl
d2d716f3ee Fix style problems with new options.
Requested by:	bde
2003-10-27 02:42:08 +00:00
das
477842ce6b Fix a problem where libm compiled under 5.X would depend on features
that are only in libc.so.5.  This broke some 4.X applications linked
to libm and run under 5.X.

Background:
In C99, isinf() and isnan() cannot be implemented as regular
functions.  We use macros that call libc functions in 5.X, but for
libm-internal use, we need to use the old versions until the next
time libm's major version number is bumped.

Submitted by:	bde
Reported by:	imp, kris
2003-10-27 01:28:07 +00:00
imp
91f5d2caf5 Make sn MPSAFE. This has survived a couple of make buildworlds with
my Megahertz XJ10BT.
2003-10-26 22:35:44 +00:00
imp
33cc34743e Pass sc to GO_WINDOW macro.
Use SET_IRQ for pccard case, rather than exapnding it inline.

Requested by: mdodd
2003-10-26 22:28:20 +00:00
imp
926420ae44 Sync to pccarddevs 1.76 2003-10-26 22:24:01 +00:00
imp
9fccc74128 Add Olicom GoCard 28.8k version 2003-10-26 22:22:34 +00:00
imp
5cdfd9a372 Sync to 1.75 of pccarddevs 2003-10-26 20:09:57 +00:00
imp
2ebce6f2f6 Minor tweak to Olicom 2220. Also add the OC-2232 while I'm here.
Looks like 'special magic' is needed to access the ethernet part of
that combo card, so I've not added it to ex.
2003-10-26 20:09:18 +00:00
alc
9d9dedf30b - Introduce and use a mutex synchronizing access to the swblock hash table. 2003-10-26 19:55:35 +00:00
des
0d07bc9dba Fix Xr markup. 2003-10-26 19:42:55 +00:00
emax
7ea3304435 Connect /etc/bluetooth and /usr/share/examples/netgraph/bluetooth to the build.
Reviewed by: imp, simon
Approved by: imp (mentor)
2003-10-26 19:09:12 +00:00
ume
ecb479d77a re-add wrongly disappered IPV6_CHECKSUM stuff by introducing
ip6_raw_ctloutput().

Obtained from:	KAME
2003-10-26 18:17:01 +00:00
peter
5d6245ce54 Argh. Forward declare some structs rather than increase include file
dependencies.
2003-10-26 16:35:11 +00:00
ume
4337476eb4 drop unused defines. 2003-10-26 15:15:36 +00:00
ume
dfe92b1d1c drop unused fields. 2003-10-26 15:06:06 +00:00
ume
3481896a41 use official # for IFT_STF
(are there any backward compat issue?  i don't think so)

Obtained from:	KAME
2003-10-26 14:29:04 +00:00