Commit Graph

43678 Commits

Author SHA1 Message Date
bde
a0bf07a6ef 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
sos
abed081558 Fix typo in breaking up requests to size limit.
Found by: Peter Edwards <pmedwards@eircom.net>
2003-11-09 10:11:15 +00:00
tanimura
6906857f32 - 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
5bff31195e 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
300c240ca8 Do not strip skiload when installed. The stripped binary does not load
in the simulator.
2003-11-09 06:53:37 +00:00
alc
99cf24e1d5 - 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
scottl
4786d71063 Sprinkle GIANT_REQUIRED asserts around the xpt layer to aid with locking the
SCSI drivers.
2003-11-09 02:22:33 +00:00
imp
b5daca4789 Make this driver a little more style(9) compliant 2003-11-09 00:51:52 +00:00
sam
13ecd47e5c 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
9183d70c34 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
5f45582b7a 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
39f93522c4 assert optional inpcb is passed in locked
Supported by:	FreeBSD Foundation
2003-11-08 23:03:29 +00:00
sam
5810f3d973 add locking assertions
Supported by:	FreeBSD Foundation
2003-11-08 23:02:36 +00:00
sam
cc85bf43e4 assert inpcb is locked in udp_output
Supported by:	FreeBSD Foundation
2003-11-08 23:00:48 +00:00
sam
5b6b1b2d9d 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
905fb0f669 use local values instead of chasing pointers
Supported by:	FreeBSD Foundation
2003-11-08 22:57:13 +00:00
sam
69b0ab3654 replace mtx_assert by INP_LOCK_ASSERT
Supported by:	FreeBSD Foundation
2003-11-08 22:55:52 +00:00
sam
81521221f2 add some missing locking
Supported by:	FreeBSD Foundation
2003-11-08 22:53:41 +00:00
sam
0264488489 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
292e209c94 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
0a78164dde 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
simokawa
120fb5e4b2 Move post dmamap_load processes into the callback function. 2003-11-08 16:26:22 +00:00
joe
b961a80881 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
scottl
3a477ae748 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
sos
83a6a7118a Remove the NOGIANT flag again, it was premature. 2003-11-08 09:56:34 +00:00
peter
3667f881b1 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
631a5f5c62 Regen 2003-11-08 07:31:49 +00:00
peter
a6009a196d "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
252094d224 Update the graffiti. 2003-11-08 04:39:22 +00:00
peter
45c23dbbc9 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
1f77c7da0c must use RTFREE instead of rtfree for proper locking 2003-11-08 03:36:32 +00:00
peter
36f25e316c 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
cea0e74e37 The great s/npx/fpu/gi 2003-11-08 03:33:38 +00:00
imp
8a3557d7a2 -Wunused 2003-11-08 03:28:43 +00:00
peter
48b3242264 Converge with i386/GENERIC 2003-11-08 03:17:36 +00:00
davidxu
34de4a24b9 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
alc
b035c10132 - 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
d7b1035a82 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
8cdffa6799 Rename npx* to fpu*. I haven't done the flags/function names yet. 2003-11-08 02:39:46 +00:00
peter
bfefb9ced1 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
7d34adc8db unbreak compilation of FAST_IPSEC
Supported by:	FreeBSD Foundation
2003-11-08 00:34:34 +00:00
rwatson
b3e6bb7eb1 Replace a '-' with a ')'. Update copyright.
PR:	53195
2003-11-08 00:21:20 +00:00
peter
3313cd9a67 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
jhb
0250fd303f Dump the trigger and polarity of each intpin's default setting in the
bootverbose output.
2003-11-07 23:44:35 +00:00
sam
0732a65906 MFp4: reminder that random id code is not reentrant
Supported by:	FreeBSD Foundation
2003-11-07 23:31:29 +00:00
scottl
c3a3c6af55 Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in
the busdma headers.
2003-11-07 23:29:42 +00:00
sam
f5db72eebc Move uid/gid checking logic out of line and lock inpcb usage. This
has a LOR between IPFW inpcb locks but I'm committing it now as the
lesser of two evils (the other being unlocked use of in_pcblookup).

Supported by:	FreeBSD Foundation
2003-11-07 23:26:57 +00:00
imp
24b1502b30 Remove channeling interrupts to IRQ1. Some chipsets don't do the
expected thing and that causes interference with keyboards.
2003-11-07 23:12:59 +00:00
sam
aa506a9a6c Assert GIANT_REQUIRED where sockets are manipulated. This is
preparatory for MPSAFE network commits and ongoing socket
locking work.

Supported by:	FreeBSD Foundation
2003-11-07 22:57:09 +00:00
rwatson
8998ef2dbb When allocation of a socket peer label fails, scrub what was
successfully initialized in the label as a socket peer label, not a
socket label.  For current policy modules, this didn't make a
difference, but if a policy module had label data in the peer label
that was to be GC'd in a different way than the normal socket label,
it might have been a problem.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-07 22:31:27 +00:00
peter
66a47d959c Ahh, the joys of badge engineering. Tell the sk driver that the
Linksys EG1032 is yet another variation.  It looks just like the 3c940
except it only has a Marvell logo and no 3com logo.
2003-11-07 22:04:26 +00:00
jhb
3a290ca957 Regen. 2003-11-07 21:36:35 +00:00
jhb
29c9d76ad3 Sync up MP safe flags with global syscalls.master for the first time. This
includes read(), write(), close(), linux_setuid16(), linux_getuid16(),
linux_pause(), linux_nice(), linux_kill(), dup(), linux_pipe(),
linux_setgid16(), linux_getgid16(), linux_signal(), linux_geteuid16(),
linux_getegid16(), acct(), setpgid(), umask(), dup2(), getppid(),
getpgrp(), setsid(), linux_sigaction(), linux_sgetmask(), linux_ssetmask(),
linux_setreuid16(), linux_setregid16(), linux_sigsuspend(), getrusage(),
gettimeofday(), linux_getgroups16(), linux_setgroups16(), getpriority(),
setpriority(), linux_sigreturn(), linux_clone(), linux_sigprocmask(),
linux_getsid(), mlock(), munlock(), mlockall(), munlockall(),
sched_setparam(), sched_getparam(), linux_sched_setscheduler(),
linux_sched_getscheduler(), linux_sched_get_priority_max(),
linux_sched_get_priority_min(), sched_rr_get_interval(),
linux_setresuid16(), linux_getresuid16(), linux_setresgid16(),
linux_getresgid16(), linux_rt_sigaction(), linux_rt_sigprocmask(),
linux_rt_sigsuspend(), geteuid(), getegid(), setreuid(), setregid(),
linux_getgroups(), linux_setgroups(), setresuid(), getresuid(),
setresgid(), getresgid(), setuid(), and setgid().
2003-11-07 21:36:14 +00:00
peter
5d06398813 Dont write to the stackgap directly in execve(). 2003-11-07 21:27:13 +00:00
peter
88d86d29f6 Increase the size of SPARE_USRSPACE. It is way too small by default
for things like execve.
2003-11-07 21:25:54 +00:00
jhb
7aaccda151 Regen. 2003-11-07 21:13:08 +00:00
jhb
8cb5cdc306 Sync MP safe flags with global syscalls.master for the first time. This
includes read(), write(), close(), setuid(), getuid(), linux_ptrace(),
linux_kill(), setpgid(), dup(), pipe(), getgid(), osf1_sigprocmask(),
umask(), getpgrp(), linux_setgroups(), linux_getgroups(), dup2(),
setpriority(), osf1_sigreturn(), osf1_sigsuspend(), osf1_gettimeofday(),
setreuid(), setregid(), setgid(), setsid(), osf1_sigaction(), getpgid(),
linux_getsid(), osf1_sysinfo(), linux_clone(), mlock(), munlock(),
mlockall(), munlockall(), sched_setparam(), sched_getparam(),
linux_sched_setscheduler(), linux_sched_getscheduler(),
linux_sched_get_priority_max(), linux_sched_get_priority_min(),
setresuid(), getresuid(), linux_rt_sigaction(), linux_rt_sigprocmask(),
linux_rt_sigsuspend(), gettimeofday(), linux_getitimer(),
linux_setitimer(), getrusage(), setresgid(), getresgid().
2003-11-07 21:09:19 +00:00
jhb
62136d4eaa Regen. 2003-11-07 20:56:54 +00:00
jhb
b877be7c1c Sync up with global syscalls.master for MP safe syscalls for the first
time.  This includes read(), write(), close(), getpid(), osf1_setuid(),
getuid(), osf1_kill(), setpgid(), dup(), pipe(), getgid(),
osf1_sigprocmask(), getlogin(), setlogin(), osf1_sigpending(), umask(),
getpgrp(), getgroups(), setgroups(), osf1_setpgrp(), getdtablesize(),
dup2(), setpriority(), getpriority(), osf1_sigreturn(), osf1_sigsuspend(),
osf1_osigstack(), setreuid(), setregid(), osf1_setgid(), setsid(),
osf1_sigaction(), msgctl(), msgget(), msgrcv(), msgsnd(), __semctl(),
semget(), semop(), shmat(), shmctl(), shmdt(), shmget(), osf1_signal(),
getpgid(), getsid(), osf1_sigaltstack(), osf1_sysinfo().
2003-11-07 20:56:31 +00:00
ume
1112653c9e nuke obsoleted ipsec_gethist(). it just did panic to notify user
that it was obsoleted.  it is better to fail than just hiding use
of ipsec_gethist() at build.

Sugessted by:	"Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
2003-11-07 20:38:45 +00:00
jhb
6cebc8781f Regen. 2003-11-07 20:30:30 +00:00
jhb
2642001a06 Sync with global syscalls.master by marking ptrace(), dup(), pipe(),
ktrace(), freebsd32_sigaltstack(), sysarch(), issetugid(), utrace(), and
freebsd32_sigaction() as MP safe.
2003-11-07 20:29:53 +00:00
jhb
c03c1dd271 Sync with global syscalls.master. ptrace(), dup(), pipe(), ktrace(),
ia32_sigaltstack(), sysarch(), issetugid(), utrace(), and ia32_sigaction()
are MP safe.
2003-11-07 20:27:16 +00:00
ume
1beb387cfa use ipsec_getnhist() instead of obsoleted ipsec_gethist().
Submitted by:	"Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Reviewed by:	Ari Suutari <ari@suutari.iki.fi> (ipfw@)
2003-11-07 20:25:47 +00:00
jhb
7c0b849746 Mark ptrace(), ktrace(), utrace(), sysarch(), and issetugid() as MP safe.
The parts of these calls that are not yet MP safe acquire Giant explicitly.
2003-11-07 20:23:23 +00:00
bde
0405edee6f Fixed insertion sort errors in the opt_cpu.h section.
Removed banal comments about ELAN*.  Complain about ELAN* being misnamed
instead (so that these options are not obviously related to a CPU and
don't sort with CPU_ELAN).

Complain about CPU_DISABLE_CMPXCHG being in the wrong namespace.
2003-11-07 15:14:53 +00:00
simokawa
0e272354da Allow shared open of /dev/fwmem* for read-only. 2003-11-07 12:39:39 +00:00
simokawa
69bbca8dc8 Respect a return code of fwmem_open(). 2003-11-07 12:30:57 +00:00
scottl
dfd57b9829 Add the Makefile glue for the udf_iconv module.
Submitted by: imura@ryu16.org
2003-11-07 09:38:05 +00:00
harti
121265612b Allow the ng_uni node (NgATM signalling layer) to be built into the
kernel via options NGATM_UNI.
2003-11-07 09:18:53 +00:00
harti
cc525b910e The layer 3 (signalling) of NgATM netgraph node: ng_uni. This node
handles user and network side signaling and partly PNNI.
2003-11-07 09:15:14 +00:00
simokawa
e1600e87de Increase FWMAXQUEUE up to 128. 2003-11-07 09:01:41 +00:00
simokawa
0b9b2ff851 Add compatibility for 4-stable.
Submitted by: imura
2003-11-07 08:59:35 +00:00
harti
241669afbb This commit was generated by cvs2svn to compensate for changes in r122208,
which included commits to RCS files with non-trunk default branches.
2003-11-07 08:54:27 +00:00
harti
03fc926fe6 Re-import of the original NgATM file version 0.91 2003-11-07 08:54:27 +00:00
harti
4825af135d These two files are generated with the ../genfiles script and are
not part of the imported distribution.
2003-11-07 08:48:43 +00:00
harti
a92d6f1ef6 Virgin import of signaling layer of NgATM shared kernel/user part 0.91 2003-11-07 08:46:22 +00:00
harti
1eed198706 This commit was generated by cvs2svn to compensate for changes in r122205,
which included commits to RCS files with non-trunk default branches.
2003-11-07 08:46:22 +00:00
sos
4f83ec3c1d Better attempt at fooling GEOM into working with burnable media. 2003-11-07 08:31:09 +00:00
rwatson
f29d44a219 Trim trailing whitespace. 2003-11-07 04:48:24 +00:00
rwatson
226e30be68 Slight whitespace consistency improvement:
Trim trailing whitespace.
  Remove unmatched " " before ")".
2003-11-07 04:47:14 +00:00
ps
07154e05ba Add PCID for 6i controller
Submitted by:	John Cagle <john.cagle@hp.com>
2003-11-07 03:01:48 +00:00
sam
a1d4f9e0aa Fix locking of the ip forwarding cache. We were holding a reference
to a routing table entry w/o bumping the reference count or locking
against the entry being free'd.  This caused major havoc (for some
reason it appeared most frequently for folks running natd).  Fix
is to bump the reference count whenever we copy the route cache
contents into a private copy so the entry cannot be reclaimed out
from under us.  This is a short term fix as the forthcoming routing
table changes will eliminate this cache entirely.

Supported by:	FreeBSD Foundation
2003-11-07 01:47:52 +00:00
jhb
8c9828262b Fix an incorrect quote character in an M4 test conditon. Basically, one
of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly
enabled.
2003-11-06 21:33:17 +00:00
ume
f218124ff4 correct behavior when ipv6mr_interface is 0. Matthias Drochner
Notified by:	itojun
Obtained from:	NetBSD
2003-11-06 16:42:59 +00:00
jhb
762968c8c8 Only disable the old pin when doing a remap if it's current vector is still
the old vector.

Reported by:	sam
2003-11-06 14:47:53 +00:00
bde
d47f15b0de Fixed some more missing punctuation in comments (most instances in this
file except for about 30 lines that have more errors and/or need rewording
to fit the punctuation).
2003-11-06 09:31:01 +00:00
rsm
cfad4dd869 Disable the (currently unused) xe_reg_dump() function, until I know for
sure that it's not needed any more.

Reviewed by:	imp (mentor)
2003-11-06 08:54:43 +00:00
imp
d49c52cca3 List the three modules that I have that aren't connected to the build. 2003-11-06 08:46:52 +00:00
ps
7ce38cbd4d Correct the structure packing.
Reported by:	Vinod Kashyap <vkashyap@3WARE.com>
2003-11-06 08:09:29 +00:00
bde
7817c9e2f9 Fixed some style bugs (missing punctuation in comments). There are many
more of these in proc.h alone.
2003-11-06 07:59:53 +00:00
jeff
d2b806a68c - Somehow I botched my last commit. Add an extra ( to fix things up. I'm
still not sure how this happened.

Reported by:	ps
2003-11-06 07:56:01 +00:00
alc
83d47b7534 - Delay the allocation of memory for the pipe mutex until we need it.
This avoids the need to free said memory in various error cases along
   the way.
2003-11-06 05:58:26 +00:00
alc
8548a85d7c - Simplify pipespace() by eliminating the explicit creation of vm objects.
Instead, let the vm objects be lazily instantiated at fault time.  This
   results in the allocation of fewer vm objects and vm map entries due to
   aggregation in the vm system.
2003-11-06 05:08:12 +00:00
marcel
4ace5724cf Add support for unaligned ld2, st2, st4 and st8. While here, make
sure we handle stacked registers properly by taking into account
that:
1. bspstore points after the frame (due to cover),
2. we need to adjust for intermediate NaT collections.
2003-11-06 04:26:40 +00:00
simokawa
c0541f794a Use if_printf() for FWEDEBUG. 2003-11-06 04:19:15 +00:00
imp
4d76b5495a s/driver/device/ for config file line 2003-11-06 03:59:03 +00:00
rwatson
167ed7ee03 Remove the flags argument from mac_externalize_*_label(), as it's not
passed into policies or used internally to the MAC Framework.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-06 03:42:43 +00:00
jeff
d292b17be9 - Remove the local definition of sched_pin and unpin. They are provided in
sched.h now.
 - Respect the td pin count.
2003-11-06 03:09:51 +00:00
jeff
7ec9ecc583 - Add a pinned count to the thread so that cpu pinning may nest. This is
not in scheduler specific data because eventually it will be required by
   all schedulers.
 - Implement sched_pin and unpin as an inline for now.  If a scheduler needs
   to do something more complicated than adjusting the pinned count we can
   move this into a function later in an api compatible way.
2003-11-06 03:09:05 +00:00
peter
71c0dd464c OK, this might be a bit silly, but add another popcnt() candidate. 2003-11-06 01:24:25 +00:00
anholt
7d282daaf8 Spelling and grammar fixes.
PR:		kern/54658
Submitted by:	Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
2003-11-05 23:56:02 +00:00
anholt
26c43d5ee3 Prevent leaking of fsid to non-root users in linux_statfs and linux_fstatfs.
Matches native syscalls now.

PR:		kern/58793
Submitted by:	David P. Reese Jr. <daver@gomerbud.com>
MFC after:	1 week
2003-11-05 23:52:54 +00:00
sam
d05a2063b1 o make debug_mpsafenet globally visible
o move it from subr_bus.c to netisr.c where it more properly belongs
o add NET_PICKUP_GIANT and NET_DROP_GIANT macros that will be used to
  grab Giant as needed when MPSAFE operation is enabled

Supported by:	FreeBSD Foundation
2003-11-05 23:42:51 +00:00
jhb
a99bd7d80a Instead of marking all 159 interrupts as available in the IRQ resource
manager, only add interrupts that have an associated source in the
interrupt table to the resource manager.
2003-11-05 23:19:44 +00:00
jhb
e5ecb1ffbc When remapping an ISA interrupt from one intpin to another, disable the
pin that is used by the default identity mapping if it still maps to the
old vector.  The ACPI case might need some tweaking for the SCI interrupt
case since ACPI likes to address the intpin using both the IRQ remapped to
it as well as the previous existing PCI IRQ mapped to it.

Reported by:	kan
2003-11-05 23:15:52 +00:00
jhb
7196c60146 Two style nits. 2003-11-05 23:07:39 +00:00
njl
bf38a8c95f This commit was generated by cvs2svn to compensate for changes in r122137,
which included commits to RCS files with non-trunk default branches.
2003-11-05 20:51:25 +00:00
njl
4ef601c3e5 Fix a bug in iasl(8) that caused it to core dump while parsing a DSDT
on ia64.  The bug is present in i386 as well but didn't show up due to
more relaxed page protections.  This fix has been submitted to the vendor.

Submitted by:	marcel
2003-11-05 20:51:25 +00:00
imp
8d0ae8fbc1 Change config file syntax to be less FreeBSD 3.x 2003-11-05 20:48:36 +00:00
ume
9c62309a6f byebye in6_ifawithscope(). it was a function for old source
address selection.

Obtained from:	KAME
2003-11-05 17:19:31 +00:00
nyan
bc568ba69c Include machine/asmacros.h instead of machine/asm.h.
Submitted by:	bde
2003-11-05 17:01:51 +00:00
jhb
26199840a0 - Adjust some of the bitfields in the ioapic_intsrc struct to be unsigned
rather than signed.  This fixes some cosmetics such as verbose printf's
  for IRQs greater than 127.
- The calculation for next_ioapic_base was also adjusted so that it will
  only complain once for each hole in the IRQs provided by ACPI for IO
  APICs.

Reported by:	Michal Mertl <mime@traveller.cz>
2003-11-05 16:18:06 +00:00
jhb
782fe025ce Add a workaround for MP Tables that list the same PCI IRQ twice with
the same APIC / pin destination in both cases.

Reported by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-11-05 16:14:10 +00:00
ume
b9dee67553 make sure to treat destrination address as KAME internal form
of embedscope.
2003-11-05 16:09:21 +00:00
sos
49244037b4 Pull ataraid out from under giant.
Use the right bio_* fields for internal stuff.
2003-11-05 15:41:20 +00:00
bde
02f6599e03 Removed the garbage options DPT_ALLOW_MEMIO, HIFN_NO_RNG,
IPFIREWALL_FORWARD, NTIMECOUNTER, OHCI_DEBUG, UGEN_DEBUG, UHCI_DEBUG,
UHID_DEBUG, UHUB_DEBUG, UKBD_DEBUG, ULPT_DEBUG, UMASS_DEBUG, UMS_DEBUG,
URIO_DEBUG and VINUM_AUTOSTART.
2003-11-05 14:37:48 +00:00
bde
e71cd1fc78 Removed reference to the garbage (and soon to be deleted) option
DPT_ALLOW_MEMIO.
2003-11-05 14:34:36 +00:00
bde
00cf0d75d0 Removed references to the garbage (and soon to be deleted) options
DPT_ALLOW_MEMIO, IPFIREWALL_FORWARD and NTIMECOUNTER
2003-11-05 14:32:27 +00:00
bde
98fd0b0123 Fixed misformatting of the options lines for CD9660_ICONV,
DA_OLD_QUIRKS, DCONS_BUF_SIZE, DCONS_FORCE_CONSOLE, DCONS_FORCE_GDB,
DCONS_POLL_HZ, DIRECTIO, HIFN_DEBUG, HIFN_RNDTEST, KSTACK_MAX_PAGES,
LIBMBPOOL, MBUF_STRESS_TEST, MSDOSFS_ICONV, NETGRAPH_ATM_ATMPIF,
NSWBUF_MIN, NTFS_ICONV, P1003_1B_SEMAPHORES, RAID_AUTOCONFIG,
SCHED_4BSD, SOCKBUF_DEBUG, UBSEC_DEBUG, UBSEC_RNDTEST, UDF_ICONV,
UVSCOM_DEFAULT_OPKTSIZE and WATCHDOG.
2003-11-05 12:52:35 +00:00
bde
0aa585dbdf Moved $FreeBSD$ to the beginning of the file.
Don't put the name of the file in a comment.  $FreeBSD$ gives more than
enough about the file's pathname.

Fixed misdescription of the file.  It isn't the whole unified Makefile...

Moved the settings of WERROR and of the standard extra CFLAGS
-finline-limit and -fno-strict-aliasing to a less wrong place.  They
were in the section for profiling.
2003-11-05 12:20:16 +00:00
bde
0af943063f Fixed a reference to a nonexistent variable in previous commit. Renaming
of ffs_reload()'s mountp parameter to mp in rev.1.28 of ffs_vnops.c
had not been merged here.

ext2fs_reload() is still missing locking from not merging other changes
to ffs_reload(), but none of these is related to recent locking changes.
2003-11-05 11:56:58 +00:00
harti
e511b2562b Make the driver conditionally MPSAFE. MPSAFEty defaults to not-mpsafe
but can be enabled by setting hw.atm.hatmN.mpsafe in the kernel
environment to a non-zero value before loading the driver. When
the problems with network MPSAFEty have been sorted out this will
be removed and the driver will default to MPSAFE.
2003-11-05 11:47:31 +00:00
harti
825adb79dc When compiled with debugging trace the number of transmit mbufs that
we own. Warn if something strange happens (number drops below zero or
there appears to be a leak).
2003-11-05 11:43:06 +00:00
harti
501aa1623c Initialize the USED flag in new external receive buffers to 0, not to 1.
We put them directly onto the free list instead of calling the
external mbuf free routine (that routine would have cleaned the flag).

This fixes a bug which manifests itself in falsely reporting a lot of used
buffers when configuring the interface down.
2003-11-05 11:15:47 +00:00
harti
9008e4e06b Replace the lock-less algorithm for the free item list with a more
conservative lock. The problem with the lock-less algorithm is that
it suffers from the ABA problem. Running an application with funnels
a couple of 100kpkts/s through the netgraph system on a dual CPU system
with MPSAFE drivers will panic almost immediatly with the old algorithm.

It may be possible to eliminate the contention between threads that insert
free items into the list and those that get free items by using the
Michael/Scott queue algorithm that has two locks.
2003-11-05 10:32:21 +00:00
imp
876da85a49 Make xe_reg_dump non-static to avoid warnings (and tinerbox mail)
for now.
2003-11-05 08:27:13 +00:00
scottl
637a8d5990 Add hooks for translating directories entries using the iconv methods.
Submitted by: imura@ryu16.org
2003-11-05 06:56:08 +00:00
scottl
f1a0e98e88 Add udf_UncompressUnicodeByte() for processing cs0 strings in a way that the
iconv mehtods can handle

Submitted by: imura@ryu16.org
2003-11-05 06:55:23 +00:00
scottl
3e69fdd879 Hook the udf_iconv module up to the kernel build.
Submitted by: imura@ryu16.org
2003-11-05 06:38:14 +00:00
scottl
33a30936f6 Update the udf module makefile for the udf_iconv module
Submitted by: imura@ryu16.org
2003-11-05 06:30:59 +00:00
scottl
7ad1732671 Include module.h
Submitted by: imura@ryu16.org
2003-11-05 06:27:40 +00:00
imp
29ed832c38 Minor style(9) nit 2003-11-05 06:14:48 +00:00
alc
db577c50bc - Move the implementation of OBJ_ONEMAPPING from vm_map_delete() to
vm_map_entry_delete() so that all of the vm object manipulation is
   performed in one place.
2003-11-05 05:48:22 +00:00
jeff
d412042cfb - It's ok if sched_runnable() has races in it, we don't need the sched_lock
here unless we have something on the assigned queue.
2003-11-05 05:30:12 +00:00
kan
5e7e9e71ca Remove mntvnode_mtx and replace it with per-mountpoint mutex.
Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to
operate on this mutex transparently.

Eventually new mutex will be protecting more fields in
struct mount, not only vnode list.

Discussed with: jeff
2003-11-05 04:30:08 +00:00
green
457b070542 Fix a reversed suser(9) in SIOCG80211:IEEE80211_IOC_WEPKEY which prevents
root from reading the wireless card's WEP keys, but allows non-root.
2003-11-05 04:16:48 +00:00
fjoe
d34969b0d1 Back out the following revisions:
1.36      +73 -60    src/sys/compat/linux/linux_ipc.c
1.83      +102 -48   src/sys/kern/sysv_shm.c
1.8       +4 -0      src/sys/sys/syscallsubr.h

That change was intended to support vmware3, but
wantrem parameter is useless because vmware3 uses SYSV shared memory
to talk with X server and X server is native application.
The patch worked because check for wantrem was not valid
(wantrem and SHMSEG_REMOVED was never checked for SHMSEG_ALLOCATED segments).

Add kern.ipc.shm_allow_removed (integer, rw) sysctl (default 0) which when set
to 1 allows to return removed segments in
shm_find_segment_by_shmid() and shm_find_segment_by_shmidx().

MFC after:	1 week
2003-11-05 01:53:10 +00:00
green
d16282f95b Truly fix the lockup mentioned in 1.153. The PRISM hardware is not
capable of functioning in HostAP mode with a zero-length SSID, so
use " " if one is not set.
2003-11-04 23:47:19 +00:00
peter
06a516e1a8 Move the inline limit default variable to a per-arch place. For example,
the amd64 implementation of the pcpu macros is even more verbose than on
i386 and that causes gcc to way overestimate the complexity of this
2-instruction macro.  The other platforms can probably lower their
default values.
2003-11-04 23:29:17 +00:00
green
96c2448d3e Despite making the card not lock up, thae workaround from 1.153 didn't
actually make hostap mode work again.  Back it out while I try to find
a solution.
2003-11-04 22:36:48 +00:00
rsm
994db9de13 Convert XE_DEBUG define to hw.xe.debug sysctl, to set debug logging level
from the xe driver.  Should probably be removed when current probe/attach
problems with the driver are fixed, but is useful now when requesting
diagnostic information from users.

Reviewed by:	imp (mentor)
2003-11-04 21:09:37 +00:00
ume
784a236d6b source address selection part of RFC3484.
TODO: since there is scope issue to be solved, multicast and
link-local address are treated as special for workaround for
now.

Obtained from:	KAME
2003-11-04 20:22:33 +00:00
jhb
3aad82f2d7 Tweak the version string output for ioapic devices. 2003-11-04 19:22:20 +00:00
jhb
743fdcba0f Use a wrapper around the driver interrupt handler. The wrapper accepts the
isa_device pointer as its argument and uses that to call the driver's
interrupt handler passing the unit number as its argument.  This should
fix COMPAT_OLDISA devices with a unit number of 0.

Reviewed by:	peter
Reported by:	bde
2003-11-04 19:04:54 +00:00
ume
3bff6e7e3f - cleanup SP refcnt issue.
- share policy-on-socket for listening socket.
- don't copy policy-on-socket at all.  secpolicy no longer contain
  spidx, which saves a lot of memory.
- deep-copy pcb policy if it is an ipsec policy.  assign ID field to
  all SPD entries.  make it possible for racoon to grab SPD entry on
  pcb.
- fixed the order of searching SA table for packets.
- fixed to get a security association header.  a mode is always needed
  to compare them.
- fixed that the incorrect time was set to
  sadb_comb_{hard|soft}_usetime.
- disallow port spec for tunnel mode policy (as we don't reassemble).
- an user can define a policy-id.
- clear enc/auth key before freeing.
- fixed that the kernel crashed when key_spdacquire() was called
  because key_spdacquire() had been implemented imcopletely.
- preparation for 64bit sequence number.
- maintain ordered list of SA, based on SA id.
- cleanup secasvar management; refcnt is key.c responsibility;
  alloc/free is keydb.c responsibility.
- cleanup, avoid double-loop.
- use hash for spi-based lookup.
- mark persistent SP "persistent".
  XXX in theory refcnt should do the right thing, however, we have
  "spdflush" which would touch all SPs.  another solution would be to
  de-register persistent SPs from sptree.
- u_short -> u_int16_t
- reduce kernel stack usage by auto variable secasindex.
- clarify function name confusion.  ipsec_*_policy ->
  ipsec_*_pcbpolicy.
- avoid variable name confusion.
  (struct inpcbpolicy *)pcb_sp, spp (struct secpolicy **), sp (struct
  secpolicy *)
- count number of ipsec encapsulations on ipsec4_output, so that we
  can tell ip_output() how to handle the packet further.
- When the value of the ul_proto is ICMP or ICMPV6, the port field in
  "src" of the spidx specifies ICMP type, and the port field in "dst"
  of the spidx specifies ICMP code.
- avoid from applying IPsec transport mode to the packets when the
  kernel forwards the packets.

Tested by:	nork
Obtained from:	KAME
2003-11-04 16:02:05 +00:00
ume
652f67cad1 use nd6log().
Obtained from:	KAME
2003-11-04 14:09:37 +00:00
ume
0456c6b93e - update comments to refrect recent BSDs.
- nuke unused macro PSUEDO_SET().
- I believe our if_xname stuff is nothing strange against other BSDs.

Obtained from:	KAME
2003-11-04 14:08:31 +00:00
nyan
7ad8130aa1 Fix LINT 2003-11-04 14:02:13 +00:00
nyan
66958184e3 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:52:09 +00:00
nyan
3b507e0811 'options APIC_IO' is replaced by 'device apic'. 2003-11-04 13:31:44 +00:00
nyan
abc2d660ef MFi386: revision 1.206 2003-11-04 13:15:12 +00:00
nyan
2e1dbc4f02 MFi386: revision 1.580 2003-11-04 13:14:14 +00:00
nyan
b9212f2f54 Fix to support pc98. 2003-11-04 13:13:04 +00:00
nyan
2866f53bdf MFi386: revision 1.456 2003-11-04 13:11:58 +00:00
nyan
b9cd1904c7 Split pc98 support into pc98/pc98/nmi.c. 2003-11-04 13:01:41 +00:00
nyan
7007675ff8 MFi386: revision 1.200 2003-11-04 12:19:54 +00:00
mckusick
7a29336ed9 Get rid of DIAGNOSTIC that gives false positives on slow CPUs. 2003-11-04 08:03:11 +00:00
jeff
b02317efca - Add initial support for pinning and binding. 2003-11-04 07:45:41 +00:00
jeff
b49d49308c - Clean up comments to reflect the KSE pushout.
- Add the following functions to the api: sched_bind(), sched_unbind(),
   sched_pin(), and sched_unpin().  Bind/unbind are used for traditional
   cpu binding.  Pin and unpin are meant to allow the kernel to hold a thread
   on a particular cpu so that it may cache per-cpu data without fear of
   being migrated.
2003-11-04 07:18:18 +00:00
marcel
40b4578074 Update avail_ssize for rstacks after growing them. 2003-11-04 06:48:58 +00:00
green
702cf84221 Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be.  Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory.  This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.

Approved by:	grog
2003-11-04 06:38:37 +00:00
imp
6e3870ba99 Use %#jx for both args.
Non-use of %# mocked by: bde
2003-11-04 06:30:59 +00:00
mckusick
e724f0397a Allow the bufdaemon and update daemon processes to skip the
waitrunningbufspace() calls so that they are always able to
proceed and clean up buffer space.

Submitted by:	Brian Fundakowski Feldman <green@freebsd.org>
2003-11-04 06:30:00 +00:00
imp
1863735ae3 o Add sysctl to allow ignoring checksum of eeprom.
o Fix minor type problems
o Fix minor problem with a couple debug printfs.
o Default to a sane media type when none is reported.
o Minor style changes

The PR complains this will fix the IBM 300GL cards.

Submitted by: Max Gotlib
PR: 11462
2003-11-04 02:59:57 +00:00
imp
857e5d73f3 ppbus_if.c is necessary if you are loading submodules. 2003-11-04 02:55:03 +00:00
sam
31a5cf4b02 disable MPSAFE network drivers; we aren't ready yet` 2003-11-04 02:01:42 +00:00
cognet
c71cdd9d82 I believe kbyanc@ really meant this in rev 1.58.
Use zpfind() to see if the process became a zombie if pfind() doesn't find it
and if the caller wants to know about process death, so that the caller knows
the process died even if it happened before the kevent was actually registered.

MFC after:	1 week
2003-11-04 01:41:47 +00:00
imp
52f5454e29 Module for cs driver 2003-11-04 01:36:35 +00:00
cognet
94afb226fd Do not attempt to report proc event if NOTE_EXIT has already been received.
This fixes a race condition (specifically with signal events) that could
lead to the kn being re-inserted into the list after it has been destroyed,
which is not something we want to happen.

PR:		kern/58258
2003-11-04 01:14:58 +00:00
peter
5b8a965e2c Make this compile with PAE. 2003-11-04 01:07:04 +00:00
green
5ff4bdc4e8 Fix wi(4)'s WI_RID_SCAN_RES ioctl (wicontrol -L). The wrong length
is computed, so the user thinks that for non-PRISM cards there are
more APs represented than exist.
2003-11-04 00:31:58 +00:00
green
e6489fa5a9 On my ZoomAir-branded Intersil PRISM2 cards, if you try to set the
operating mode to HostAP, the card will lock up indefinitely (but
the wi(4) driver can recover if you eject the card).  The problem is
that the card needs to be "reset" in a way before you even change the
media to hostap.  In practice this isn't as noticeable because you
probably do some operation beforehand which prevents the lock-up
before you enable hostap mode.

e.g.:
"ifconfig wi0 up media autoselect mediaopt hostap" will lock up
(if you just inserted the card).
"ifconfig wi0 up ssid foo media autoselect mediaopt hostap" won't lock up.
2003-11-04 00:24:13 +00:00
jhb
a2c2cbd826 Remove old APIC header. 2003-11-03 23:10:34 +00:00
jhb
acb3e9bfdd Remove remaining bits of old interrupt and APIC code. 2003-11-03 22:51:25 +00:00
jhb
a7ffd106b0 Remove the SMP kernel config as SMP is now enabled in GENERIC. 2003-11-03 22:49:51 +00:00
jhb
ec4ca85067 Remove references to SMP and APIC_IO since GENERIC (which this file
includes) already has those enabled by default.
2003-11-03 22:49:19 +00:00
jhb
24e624f4d4 - Enable SMP and 'device apic' by default.
- Compile 'device acpi' into GENERIC by default as well.  Note that
  the beastie loader menu item to disable ACPI still works if ACPI is
  compiled into the kernel.
2003-11-03 22:48:25 +00:00
jhb
14ae90e2a3 Replace APIC_IO with 'device apic'. 2003-11-03 22:47:19 +00:00
jhb
eb7711f9f6 - Remove references to old interrupt and SMP code.
- Add entries for new interrupt and SMP code.
2003-11-03 22:46:43 +00:00
jhb
4fdcd82151 - Remove APIC_IO option.
- Add NO_MIXED_MODE, DEV_ACPI, and DEV_APIC options.
2003-11-03 22:45:54 +00:00
jhb
aad3a4affa Temporarily disable the acpi(4) module on i386 until issues revolving
SMP probing and the MADT table can be sorted out.  For now, if you want
ACPI, you must compile it into your kernel statically using 'device acpi'.
2003-11-03 22:44:09 +00:00
jhb
689f5b05cf Don't require INTR_FAST handlers to be exclusive in the MI layer. Instead,
let the MD code choose whether or not to implement such a policy.  The new
i386 interrupt code allows multiple FAST handlers for a given source for
example.  However, the code does not allow FAST and non-FAST handlers to be
mixed.
2003-11-03 22:42:58 +00:00
jhb
9c6544378d Update spin lock order list for new i386 interrupt and SMP code. 2003-11-03 22:38:30 +00:00
jhb
bb2012550e Update includes for new interrupt code. 2003-11-03 22:38:00 +00:00
jhb
8dd68d8d8e Catch up to interrupt code changes. 2003-11-03 22:37:28 +00:00
jhb
ad7efe2a36 - Always allocate the maximum size for the IRQ resource manager. Ideally
we would manage this better by having the interrupt code add each
  interrupt vector to the resource map when each source is registered.
- Use the new interrupt code API for registering and tearing down interrupt
  handlers.
2003-11-03 22:36:43 +00:00
jhb
fe029a290a Catch up to i386 interrupt and SMP code changes. 2003-11-03 22:34:53 +00:00
jhb
574f680dcb New i386 SMP code:
- The MP code no longer knows anything specific about an MP Table.
  Instead, the local APIC code adds CPUs via the cpu_add() function when
  a local APIC is enumerated by an APIC enumerator.
- Don't divide the argument to mp_bootaddress() by 1024 just so that we
  can turn around and mulitply it by 1024 again.
- We no longer panic if SMP is enabled but we are booted on a UP machine.
- init_secondary(), the asm code between init_secondary() and ap_init()
  in mpboot.s and ap_init() have all been merged together in C into
  init_secondary().
- We now use the cpuid feature bits to determine if we should enable
  PSE, PGE, or VME on each AP.
- Due to the change in the implementation of critical sections, acquire
  the SMP TLB mutex around a slightly larger chunk of code for TLB
  shootdowns.
- Remove some of the debug code from the original SMP implementation
  that is no longer used or no longer applies to the new APIC code.
- Use a temporary hack to disable the ACPI module until the SMP code has
  been further reorganized to allow ACPI to work as a module again.
- Add a DDB command to dump the interesting contents of the IDT.
2003-11-03 22:32:04 +00:00
jhb
f673a3b0be Don't probe PnP BIOS devices for PICs for now to avoid problems with those
devices claiming resources that they don't actually use.  The PIC drivers
only register valid interrupt sources, so we don't need to rely on these
drivers to claim invalid IRQs to prevent their use by other drivers.
2003-11-03 22:22:04 +00:00
jhb
ab260c506b - Remove explicit enabling of the BSP's APIC in the APIC_IO case and the
slave pin on the master PIC in the !APIC_IO case.  The PIC drivers now
  manage these details internally.
- Remove an spl0() that hasn't done anything since SMPng was first
  committed.
- Update some comments that have rotted since SMPng.
2003-11-03 22:20:50 +00:00
jhb
b87a91dea4 - Update includes.
- Use intr_suspend/resume() callouts to the interrupt code layer which
  suspends and resumes all the known interrupt sources instead of calling
  icu_reinit() directly.
2003-11-03 22:18:57 +00:00
jhb
36951a69ef Add the ACPI MADT table APIC enumerator. This code uses the ACPI Multiple
APIC Descriptor Table to enumerate both I/O APICs and local APICs.  ACPI
does not embed PCI interrupt routing information in the MADT like the MP
Table does.  Instead, ACPI stores the PCI interrupt routing information
in the _PRT object under each PCI bus device.  The MADT table simply
provides hints about which interrupt vectors map to which I/O APICs.  Thus
when using ACPI, the existing ACPI PCI bridge drivers are sufficient to
route PCI interrupts.
2003-11-03 22:17:44 +00:00
jhb
5062ed4f9e Add the MP Table APIC enumerator. This code uses the BIOS MP Table to
enumerate I/O APICs as well as local APICs.  It also provides Host-PCI
and PCI-PCI bridge drivers to use the MP Table to route PCI interrupts.
2003-11-03 22:12:37 +00:00
jhb
a6dc1291b9 - Export doreti as a global symbol.
- Don't include isa/vector.s.  Each PIC driver's entry points now live in
  their own standalone files.
2003-11-03 22:08:52 +00:00
jhb
de17962ecf Update names of entry points for interrupt frames. 2003-11-03 22:07:21 +00:00
jhb
bb0bd8acdb Enable PCI interrupt routing for i386 SMP kernels. 2003-11-03 22:06:35 +00:00
imp
b084e79d29 Fix two small style nits pointed out by bde: Remove spaces after cast and
indent continued line 4 spaces instead of 2.
2003-11-03 21:54:24 +00:00
jhb
fce11285f1 New APIC support code:
- The apic interrupt entry points have been rewritten so that each entry
  point can serve 32 different vectors.  When the entry is executed, it
  uses one of the 32-bit ISR registers to determine which vector in its
  assigned range was triggered.  Thus, the apic code can support 159
  different interrupt vectors with only 5 entry points.
- We now always to disable the local APIC to work around an errata in
  certain PPros and then re-enable it again if we decide to use the APICs
  to route interrupts.
- We no longer map IO APICs or local APICs using special page table
  entries.  Instead, we just use pmap_mapdev().  We also no longer
  export the virtual address of the local APIC as a global symbol to
  the rest of the system, but only in local_apic.c.  To aid this, the
  APIC ID of each CPU is exported as a per-CPU variable.
- Interrupt sources are provided for each intpin on each IO APIC.
  Currently, each source is given a unique interrupt vector meaning that
  PCI interrupts are not shared on most machines with an I/O APIC.
  That mapping for interrupt sources to interrupt vectors is up to the
  APIC enumerator driver however.
- We no longer probe to see if we need to use mixed mode to route IRQ 0,
  instead we always use mixed mode to route IRQ 0 for now.  This can be
  disabled via the 'NO_MIXED_MODE' kernel option.
- The npx(4) driver now always probes to see if a built-in FPU is present
  since this test can now be performed with the new APIC code.  However,
  an SMP kernel will panic if there is more than one CPU and a built-in
  FPU is not found.
- PCI interrupts are now properly routed when using APICs to route
  interrupts, so remove the hack to psuedo-route interrupts when the
  intpin register was read.
- The apic.h header was moved to apicreg.h and a new apicvar.h header
  that declares the APIs used by the new APIC code was added.
2003-11-03 21:53:38 +00:00
jhb
1b13a0db8e Add the new atpic(4) driver for the 8259A master and slave PICs. By
default we provide 16 interrupt sources for IRQs 0 through 15.  However,
if the I/O APIC driver has already registered sources for any of those IRQs
then we will silently fail to register our own source for that IRQ.

Note that i386/isa/icu.h is now specific to the 8259A and no longer
contains any info relevant to APICs.  Also note that fast interrupts no
longer use a separate entry point.  Instead, both fast and threaded
interrupts share the same entry point which merely looks up the appropriate
source and passes control to intr_execute_handlers().
2003-11-03 21:34:45 +00:00
jhb
61ac6c1b88 Add a per-thread variable for saving the state of eflags to support the
critical section code.
2003-11-03 21:30:00 +00:00
jhb
f7feb9d6d4 Allocate space for the intrcnt array. This array is managed in the
interrupt code layer as interrupt sources are added and handlers added
to those sources.
2003-11-03 21:28:54 +00:00
jhb
49eead15eb New device interrupt code. This defines an interrupt source abstraction
that provides methods via a PIC driver to do things like mask a source,
unmask a source, enable it when the first interrupt handler is added, etc.
The interrupt code provides a table of interrupt sources indexed by IRQ
numbers, or vectors.  These vectors are what new-bus uses for its IRQ
resources and for bus_setup_intr()/bus_teardown_intr().  The interrupt
code then maps that vector a given interrupt source object.  When an
interrupt comes in, the low-level interrupt code looks up the interrupt
source for the source that triggered the interrupt and hands it off to
this code to execute the appropriate handlers.

By having an interrupt source abstraction, this allows us to have different
types of interrupt source providers within the shared IRQ address space.
For example, IRQ 0 may map to pin 0 of the master 8259A PIC, IRQs 1
through 60 may map to pins on various I/O APICs, and IRQs 120 through
128 may map to MSI interrupts for various PCI devices.
2003-11-03 21:25:52 +00:00
jhb
8d73c82eec - Always use 256 IDT entries since it is now a runtime decison as to how
many entries we use.
- Add a constant IDT_IO_INTS for the first IDT entry used for device
  interrupts.
2003-11-03 21:12:04 +00:00
jhb
647e15b6fc Move the NMI handling code out to its own file. 2003-11-03 21:10:17 +00:00
jhb
17d95445bf Define IDTVEC() and TRAP() assembly macros so that they can be shared
with several files.
2003-11-03 21:09:17 +00:00
jhb
2a63278c74 Revert the critical section implementation to disable interrupts via
cli/sti now that we support many more than 32 interrupt sources.
2003-11-03 21:06:54 +00:00
jhb
99222a8641 Remove soon to be obsolete file to break kernel build while the new
interrupt code comes in.
2003-11-03 21:00:34 +00:00
anholt
75450c73ee Change the DRM_ERROR about authenticator not found back to DRM_DEBUG. It's
noisier than I expected, and I don't have the time to actually get it fixed.
2003-11-03 20:44:00 +00:00
iedowse
1326cf929a Override the root server address if an IP address is specified in
the root path. This is reported to make non-PXE netbooting, such as
is used on sparc64 systems, work correctly when the TFTP server is
not the same as the root server.

PR:		kern/57328
Submitted by:	Per Kristian Hove <Per.Hove@math.ntnu.no>
2003-11-03 19:45:05 +00:00
rwatson
5f0fdeebbe Note that when ip_output() is called from ip_forward(), it will already
have its options inserted, so the opt argument to ip_output()  must be
NULL.
2003-11-03 18:03:05 +00:00
rwatson
ab54d22338 Remove comment about desire for eventual explicit labeling of ICMP
header copy made on input path: this is now handled differently.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-03 18:01:38 +00:00
rwatson
560a470dbb Unlock pipe mutex when failing MAC pipe ioctl access control check.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-11-03 17:58:23 +00:00
des
df69756f8b Whitespace cleanup. 2003-11-03 16:14:45 +00:00
imp
e1b10372b0 Sync to 1.79 2003-11-03 16:12:27 +00:00
imp
9ff62b8965 Add intel EtherExpress PRO PCMCIA card ID. Well, I don't know if it
is really EtherExpress or EEPro or what, but it does appear in a
couple of ethernet cards that have appeared recently on ebay.  Silicom
appears to make these cards, and they have the 82595TX chipset in
them, and sometimes uarts.  The ex driver needs some work to support
these cards, but I thought I'd get the device into pccarddevs.
2003-11-03 16:09:17 +00:00
imp
62f0d803cb Sync to 1.78 2003-11-03 16:05:46 +00:00
imp
85a079b236 o Use %j and uintmax_t rather than uint64_t for casting.
o use more proper bus_size_t for iosize rather than bus_addr_t.

Noticed by: bde
2003-11-03 16:04:31 +00:00
phk
0b92e4f63d Fix prototypo 2003-11-03 15:58:58 +00:00
phk
3a2f156d28 Get word spacing right in morse mode.
Fix a prototype.
2003-11-03 15:45:42 +00:00
obrien
be29469e84 Add AMD Features NX and LM. 2003-11-03 14:59:05 +00:00
simokawa
27cdf48bcb - Change driver name to fix if_xname breakage in the previous revision.
- Don't call device_get_unit() twice.

Tested by: nork
2003-11-03 13:01:23 +00:00
harti
cd56cff8b8 Put address handling, traffic descriptor handling and message encoding
and decoding into the atmbase module when compiled directly into the kernel.
2003-11-03 12:05:58 +00:00
phk
34f3ed17f4 Change /dev/soekris-errled to be /dev/led/error and make it conditional
on CPU_SOEKRIS.

Note the subtle change in semantfics for 'f%d' flash instruction and the
new morse facility (see details in dev/led/led.c)
2003-11-03 11:03:40 +00:00
phk
61c9328dda Introduce new CPU_SOEKRIS option to tell soekris hardware from other
hardware based on similar chipsets.
2003-11-03 10:34:40 +00:00
phk
c53435467f Free major#100 2003-11-03 10:19:33 +00:00
phk
513ec3584a Add a generic LED driver for flashing lamps.
The hardware driver decides the name under /dev/led and provides
the function to turn the lamp on/off.

All leds are serviced by a single timeout which runs at a basic rate
of hz/10.

The LED is controlled by ascii strings as follows.

0	Turn off.
1	Turn on.
f	Flash: _-
f2	Flash: __--
f3	Flash: ___---
f4...f9 etc.
d%d	Digits.  "d12": -__________-_-______________________________
s%s	String, roll your own:
	'a-j' gives on for (1...10)/10 sec.
	'A-J' gives on for (1...10)/10 sec.
	'sAaAbBa': _-_--__-
m%s	Morse
	'.' dot
	'-' dash
	' ' letter space
	'\n' word space

My mdoc skills do not reach to express that.
2003-11-03 09:47:30 +00:00
des
54e26dbeeb Move sysctl declarations next to the corresponding tunable declarations.
Add a sysctl declaration for hw.ata.atapi_dma, which had gone MIA (though
setting it in loader.conf still worked, it was not visible at runtime)

Approved by:	sos
2003-11-03 09:25:02 +00:00
dfr
ae13306183 Remove explicit cardbus attachments from drivers where this is identical
to the pci attachment. Cardbus is a derived class of pci so all pci
drivers are automatically available for matching against cardbus devices.

Reviewed by: imp
2003-11-03 09:22:18 +00:00
harti
77e03e16c9 Put the address handling, traffic descripto handling and the
message encoding and decoding stuff into the base module. All of this
is accessed by several of the NgATM modules and putting this into
atmbase reduceds the memory footprint.
2003-11-03 09:18:52 +00:00
harti
ad8d82e8a8 Explain how to handle the generated files. Explain that the import
must actually be done into the netnatm sub-directory.
2003-11-03 09:15:31 +00:00
harti
7466c99cd2 These files are generated by the genfiles script. See FREEBSD-upgrade
for instructions how to upgrade these.
2003-11-03 09:11:53 +00:00
harti
d2e4a0c644 Virgin import of NgATM shared kernel/user part 0.91 2003-11-03 09:05:49 +00:00
harti
29e1e6a496 This commit was generated by cvs2svn to compensate for changes in r121934,
which included commits to RCS files with non-trunk default branches.
2003-11-03 09:05:49 +00:00
marcel
b903305222 Handle unaligned 4-byte loads. While in the neighborhood, remove the
cr.isr sanity check. We actually encounter insanities, which very
likely means that the insanity check itself is insane. Remove an empty
comment while I'm at it.
2003-11-03 08:04:04 +00:00
marcel
2ac4ab718a Remove alpha-bitops.h now that it's unused. It's in the attic if
we want it again.
2003-11-03 07:10:53 +00:00
sam
e3dfff4c41 Remove bogus RTFREE that was added in rev 1.47. The rmx code operates
directly on the radix tree and does not hold any routing table refernces.
This fixes the reference counting problems that manifested itself as a
panic during unmount of filesystems that were mounted by NFS over an
interface that had been removed.

Supported by:	FreeBSD Foundation
2003-11-03 06:11:44 +00:00
marcel
81e0b13142 Add a bogus definition of __va_list for use by lint. Make it visible
only when lint is defined to protect builds with non-GNU compilers.
2003-11-03 05:04:09 +00:00
kan
ff2e59e0f9 Use VOP_UNLOCK/vrele instead of vput. td was erecived as a parameter
and one cannot be sure it is equal to curthread.
2003-11-03 04:46:19 +00:00
jeff
ec019244c7 - Remove kseq_find(), we no longer scan other cpu's run queues when we go
idle.  They figure out that we're idle fast enough that the cache pollution
   introduces by scanning their run queue is more expensive than waiting
   a little longer.
 - Add kseq_setidle() to mark us as being idle.  Use this in place of
   kseq_find().
 - Remove kseq_load_highest(), kseq_find() was the only consumer of this
   interface.  kseq_balance() has it's own customized version that finds the
   lowest and highest loads simultaneously.

Continuously told that this would be faster by:	terry
2003-11-03 03:27:22 +00:00
sam
d9874d9e63 Correct rev 1.56 which (incorrectly) reversed the test used to
decide if in_pcbpurgeif0 should be invoked.

Supported by:	FreeBSD Foundation
2003-11-03 03:22:39 +00:00
imp
4cc2855846 ia64 tenderbox hates what I did wrt a printf, so cast the snot out of
it and hope for the best.
2003-11-03 01:30:03 +00:00
alc
d8a239222c - Increase the scope of the source object lock in vm_map_copy_entry(). 2003-11-03 00:59:54 +00:00
rsm
4800581ed6 Constify a few more strings that were hidden behind XE_DEBUG define.
Remove XE_VENDOR_ID_* defines in favour of PCMCIA_VENDOR_*.

Reviewed by:	imp (mentor)
2003-11-02 23:29:33 +00:00
alc
7f9352d8dd - Increase the scope of two vm object locks in vm_object_split(). 2003-11-02 22:52:42 +00:00
sos
50a7c03715 Fix burning of CD's that got broken by the GEOM'ification.
GEOM was not designed to handle media that does not have
a size. Blank CD's are of that type, so cheat and set the
media size to -1. This allows burning to work, but makes
GEOM issue outofrange reads that makes the ATAPI subsystem
spew out a few warnings. GEOM should be tought about this.

GEOM was not designed to handle changing the sectorsize
between opens. Writing multitack CD's with both audio and
data tracks needs to change sector size on the fly. We
cheat here and stuff the current sectorsize into GEOM
private internals. GEOM should grow some clean way for this.
2003-11-02 22:24:47 +00:00
sos
6d16f6ff42 On ATA control commands return the registers in the request. 2003-11-02 22:04:53 +00:00
ru
6f39986688 Correct the spelling of m_devget() in the sysctl variable description. 2003-11-02 21:43:29 +00:00
alc
135d6ec078 - Introduce and use vm_object_reference_locked(). Unlike
vm_object_reference(), this function must not be used to reanimate dead
   vm objects.  This restriction simplifies locking.

Reviewed by:	tegge
2003-11-02 21:30:10 +00:00
imp
9ec7d7e593 MFp4:
o Fix MFC cards.  We were bogusly setting CCR_IOBASE[01] and CCR_IOLIMIT.
  now when we activate the resource, we adjust these for MFC cards, per the
  spec.
o Change type of pf_mfc_* to be bus_addr_t, which is more correct than
  long.

This makes my 3C362D/3C363D and 3CXEM556 cards work!  Woo Hoo!
2003-11-02 20:18:19 +00:00