Commit Graph

43404 Commits

Author SHA1 Message Date
Warner Losh
40f583c24a Let bus space manage softc. 2003-11-09 19:51:16 +00:00
Warner Losh
9b4fbfe900 Minor tweaks to make it behave better:
o When we're resetting the board, make sure that we error out the pending
  CCBs first.  Otherwise the aha_cmd won't accept further commands, such
  as those that are used to reset the card (AOP_INITIALIZE_MBOX).  This
  appears to cause a cascade failure where no more commands are possible
  to the card.
o Reduce from 10s down to 1s the amount of time we're willing to tolerate
  the card being awol.  This helps the above case.
o Add some error checking to two commands issued in the probe.

I have a dim memory of gibbs@ trying to tell me about this problem a
few years ago, so pointy hat to imp@ for sitting on it so long.
2003-11-09 17:16:39 +00:00
Warner Losh
716dfe3f18 Minor comment smithing 2003-11-09 17:05:55 +00:00
David Malone
5a8a13e0fc Use kern_sendit rather than sendit for the Linux send* syscalls.
This means we can avoid using the stack gap for most send* syscalls
now (it is still used in the IP_HDRINCL case).
2003-11-09 17:04:04 +00:00
Bruce Evans
b698380f33 Quick fix for scaling of statclock ticks in the SMP case. As explained
in the log message for kern_sched.c 1.83 (which should have been
repo-copied to preserve history for this file), the (4BSD) scheduler
algorithm only works right if stathz is nearly 128 Hz.  The old
commit lock said 64 Hz; the scheduler actually wants nearly 16 Hz
but there was a scale factor of 4 to give the requirement of 64 Hz,
and rev.1.83 changed the scale factor so that the requirement became
128 Hz.  The change of the scale factor was incomplete in the SMP
case.  Then scheduling ticks are provided by smp_ncpu CPUs, and the
scheduler cannot tell the difference between this and 1 CPU providing
scheduling ticks smp_ncpu times faster, so we need another scale
factor of smp_ncp or an algorithm change.

This quick fix uses the scale factor without even trying to optimize
the runtime divisions required for this as is done for the other
scale factor.

The main algorithmic problem is the clamp on the scheduling tick counts.
This was 295; it is now approximately 295 * smp_ncpu.  When the limit
is reached, threads get free timeslices and scheduling becomes very
unfair to the threads that don't hit the limit.  The limit can be
reached and maintained in the worst case if the load average is larger
than (limit / effective_stathz - 1) / 2 = 0.65 now (was just 0.08 with
2 CPUs before this change), so there are algorithmic problems even for
a load average of 1.  Fortunately, the worst case isn't common enough
for the problem to be very noticeable (it is mainly for niced CPU hogs
competing with less nice CPU hogs).
2003-11-09 13:45:54 +00:00
Søren Schmidt
35e67f571f Fix typo in breaking up requests to size limit.
Found by: Peter Edwards <pmedwards@eircom.net>
2003-11-09 10:11:15 +00:00
Seigo Tanimura
512824f8f7 - Implement selwakeuppri() which allows raising the priority of a
thread being waken up.  The thread waken up can run at a priority as
  high as after tsleep().

- Replace selwakeup()s with selwakeuppri()s and pass appropriate
  priorities.

- Add cv_broadcastpri() which raises the priority of the broadcast
  threads.  Used by selwakeuppri() if collision occurs.

Not objected in:	-arch, -current
2003-11-09 09:17:26 +00:00
Marcel Moolenaar
2e55d247a6 Implement PAL_HALT_LIGHT now that the kernel halts the processor
when idle. All we have to do is return.
2003-11-09 07:42:16 +00:00
Marcel Moolenaar
84408cc05c Do not strip skiload when installed. The stripped binary does not load
in the simulator.
2003-11-09 06:53:37 +00:00
Alan Cox
950f8459d4 - Rename vm_map_clean() to vm_map_sync(). This better reflects the fact
that msync(2) is its only caller.
 - Migrate the parts of the old vm_map_clean() that examined the internals
   of a vm object to a new function vm_object_sync() that is implemented in
   vm_object.c.  At the same, introduce the necessary vm object locking so
   that vm_map_sync() and vm_object_sync() can be called without Giant.

Reviewed by:	tegge
2003-11-09 05:25:35 +00:00
Scott Long
68153f43b6 Sprinkle GIANT_REQUIRED asserts around the xpt layer to aid with locking the
SCSI drivers.
2003-11-09 02:22:33 +00:00
Warner Losh
3cce43b94e Make this driver a little more style(9) compliant 2003-11-09 00:51:52 +00:00
Sam Leffler
7138d65c3f replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF
macros that expand to include assertions when the system is built
with INVARIANTS

Supported by:	FreeBSD Foundation
2003-11-08 23:36:32 +00:00
Marcel Moolenaar
00bd917263 Remove the atkbd, psm, sc and vga devices. Most ia64 boxes out there
are zx1 based machines and they don't particularly like it when we
poke at them with PC legacy code. The atkbd and psm devices were
disabled in the hints file so that one could enable them on machines
that support legacy devices, but that's not really something you can
expect from a first-time installer. This still leaves syscons (sc)
and the vga device, which were enabled by default and wrecking havoc
anyway. We could disable them by default like the atkbd and psm
devices, but there's really no point in pretending we're in a better
shape that way.
2003-11-08 23:19:13 +00:00
Sam Leffler
252f24a2cf divert socket fixups:
o pickup Giant in divert_packet to protect sbappendaddr since it
  can be entered through MPSAFE callouts or through ip_input when
  mpsafenet is 1
o add missing locking on output
o add locking to abort and shutdown
o add a ctlinput handler to invalidate held routing table references
  on an ICMP redirect (may not be needed)

Supported by:	FreeBSD Foundation
2003-11-08 23:09:42 +00:00
Sam Leffler
8484384564 assert optional inpcb is passed in locked
Supported by:	FreeBSD Foundation
2003-11-08 23:03:29 +00:00
Sam Leffler
59daba27d9 add locking assertions
Supported by:	FreeBSD Foundation
2003-11-08 23:02:36 +00:00
Sam Leffler
3c47a187b7 assert inpcb is locked in udp_output
Supported by:	FreeBSD Foundation
2003-11-08 23:00:48 +00:00
Sam Leffler
c29afad673 o correct locking problem: the inpcb must be held across tcp_respond
o add assertions in tcp_respond to validate inpcb locking assumptions
o use local variable instead of chasing pointers in tcp_respond

Supported by:	FreeBSD Foundation
2003-11-08 22:59:22 +00:00
Sam Leffler
2a0746208b use local values instead of chasing pointers
Supported by:	FreeBSD Foundation
2003-11-08 22:57:13 +00:00
Sam Leffler
fa286d7db2 replace mtx_assert by INP_LOCK_ASSERT
Supported by:	FreeBSD Foundation
2003-11-08 22:55:52 +00:00
Sam Leffler
50d7c061a3 add some missing locking
Supported by:	FreeBSD Foundation
2003-11-08 22:53:41 +00:00
Sam Leffler
1d78192b35 the sbappendaddr call in socket_send must be protected by Giant
because it can happen from an MPSAFE callout

Supported by:	FreeBSD Foundation
2003-11-08 22:51:18 +00:00
Sam Leffler
e3f268fc89 add locking assertions that turn into noops if INET6 is configured;
this is necessary because the ipv6 code shares the in_pcb code with
ipv4 but (presently) lacks proper locking

Supported by:	FreeBSD Foundation
2003-11-08 22:48:27 +00:00
Sam Leffler
7902224c6b o add a flags parameter to netisr_register that is used to specify
whether or not the isr needs to hold Giant when running; Giant-less
  operation is also controlled by the setting of debug_mpsafenet
o mark all netisr's except NETISR_IP as needing Giant
o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant
o pickup Giant (when debug_mpsafenet is 1) inside ip_input before
  calling up with a packet
o change netisr handling so swi_net runs w/o Giant; instead we grab
  Giant before invoking handlers based on whether the handler needs Giant
o change netisr handling so that netisr's that are marked MPSAFE may
  have multiple instances active at a time
o add netisr statistics for packets dropped because the isr is inactive

Supported by:	FreeBSD Foundation
2003-11-08 22:28:40 +00:00
Hidetoshi Shimokawa
ddce43e1cf Move post dmamap_load processes into the callback function. 2003-11-08 16:26:22 +00:00
Josef Karthauser
68ded8480c I've had a couple of reports that the Sony Clie_40 doesn't need the
PALM_4 initialisation hack.  I've not confirmed it myself, but
seeing as we already don't use it for the Sony Clie_41, let's drop
it from the Clie_40 also and see what happens.

(Question: What about the Clie_S360 and Clie_NX60 devices?  Do we
 need to drop Palm4 from those as well?  Possibly, but I've not had
 any reports about those so I don't know.)

PR:		kern/56575
MFC after:	3 days
2003-11-08 11:23:07 +00:00
Scott Long
8226fdbdce Don't be so chatty when performing manual sense. This should make ATAPICAM
devices a lot more quiet.
2003-11-08 10:56:57 +00:00
Søren Schmidt
aeb1d7b554 Remove the NOGIANT flag again, it was premature. 2003-11-08 09:56:34 +00:00
Peter Wemm
4cd2d525e3 Move a MD 32 bit binary support routine into the MD areas. exec_setregs
is highly MD in an emulation environment since it operates on the host
environment.  Although the setregs functions are really for exec support
rather than signals, they deal with the same sorts of context and include
files.  So I put it there rather than create yet another file.
2003-11-08 07:43:44 +00:00
Peter Wemm
b0211d5445 Regen 2003-11-08 07:31:49 +00:00
Peter Wemm
bc0e45efa3 "implement" vfork(). Add comments next to the other syscalls that need
to be implemented.  This is enough to run i386 /bin/tcsh.  /bin/sh is still
not happy because of some strange job control problem.
2003-11-08 07:31:30 +00:00
Peter Wemm
fcfe57d640 Update the graffiti. 2003-11-08 04:39:22 +00:00
Peter Wemm
398dbb11d8 Switch from having a fpu "device" to something that is more like the
integrated part of the cpu core that it is.
2003-11-08 04:37:54 +00:00
Sam Leffler
6536168e0a must use RTFREE instead of rtfree for proper locking 2003-11-08 03:36:32 +00:00
Peter Wemm
e04f2bba96 Remove some duplicated comments that refer to npx. XXX The setregs
function is actually MD (not MI) though..
2003-11-08 03:35:06 +00:00
Peter Wemm
bf2f09ee97 The great s/npx/fpu/gi 2003-11-08 03:33:38 +00:00
Warner Losh
d0ff2e64ac -Wunused 2003-11-08 03:28:43 +00:00
Peter Wemm
a4d60a7fb3 Converge with i386/GENERIC 2003-11-08 03:17:36 +00:00
David Xu
685a6c448a Return a reasonable number for top or ps to display for M:N thread,
since there is no direct association between M:N thread and kse,
sometimes, a thread does not have a kse, in that case, return a pctcpu
from its last kse, it is not perfect, but gives a good number to be
displayed.
2003-11-08 03:03:17 +00:00
Alan Cox
5e4a2fc9aa - Similar to post-PAE RELENG_4 split pmap_pte_quick() into two cases,
pmap_pte() and pmap_pte_quick().  The distinction being based upon the
   locks that are held by the caller.  When the given pmap is not the
   current pmap, pmap_pte() should be used when Giant is held and
   pmap_pte_quick() should be used when the vm page queues lock is held.
 - When assigning to PMAP1 or PMAP2, include PG_A anf PG_M.
 - Reenable the inlining of pmap_is_current().

In collaboration with:	tegge
2003-11-08 03:01:26 +00:00
Peter Wemm
0432a0f961 Rename npx.c to fpu.c (it isn't an extension, its part of the core
architecture now).
2003-11-08 02:40:40 +00:00
Peter Wemm
8b2454d833 Rename npx* to fpu*. I haven't done the flags/function names yet. 2003-11-08 02:39:46 +00:00
Peter Wemm
42ad9517cc Point the description of the fpu data in the context structures to
i386/include/npx.h instead of the host's machine/npx.h (which might not
exist)
2003-11-08 02:36:05 +00:00
Sam Leffler
27a940c9a2 unbreak compilation of FAST_IPSEC
Supported by:	FreeBSD Foundation
2003-11-08 00:34:34 +00:00
Robert Watson
8a4b86b9a4 Replace a '-' with a ')'. Update copyright.
PR:	53195
2003-11-08 00:21:20 +00:00
Peter Wemm
7538a488f5 There isn't much point printing 'npx0: INT 16 interface' because that is
the only way it works here.
2003-11-08 00:13:43 +00:00
John Baldwin
88861af1fb Dump the trigger and polarity of each intpin's default setting in the
bootverbose output.
2003-11-07 23:44:35 +00:00
Sam Leffler
aab621f060 MFp4: reminder that random id code is not reentrant
Supported by:	FreeBSD Foundation
2003-11-07 23:31:29 +00:00
Scott Long
eb3b7bf69f Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in
the busdma headers.
2003-11-07 23:29:42 +00:00