Commit Graph

23087 Commits

Author SHA1 Message Date
KATO Takenori
69c963801b Merged from sys/i386/i386/machdep.c revision 1.422. 2000-11-26 06:29:33 +00:00
Poul-Henning Kamp
ea250e5b03 Add the "LOG_CONSOLE" facility and tell syslogd to not log it on
console devices.
2000-11-25 21:00:58 +00:00
Mark Murray
5d4e386e64 D'uh. The explicit reseed was happening at the wrong security/privelige
levels.
2000-11-25 20:08:07 +00:00
Alan Cox
badfcb1bef Undo rev 1.8: This commit actually added a second declaration
of aio_error() to the same file.
2000-11-25 19:35:49 +00:00
Mark Murray
5063615923 Greatly improve the boot-up unblocking time of the entropy device. 2000-11-25 19:13:29 +00:00
Mark Murray
caccf5c400 More comment changing. Keep documentation in one place. 2000-11-25 18:00:54 +00:00
Mark Murray
24242537f8 Correct a comment. This represents a very minor policy change of my
intentions with this code.
2000-11-25 17:58:11 +00:00
Mark Murray
e73a42f8fb Stop explicitly using nanotime(9) and use the new get_cyclecounter(9)
call instead.

This makes a pretty dramatic difference to the amount of work that
the harvester needs to do - it is much friendlier on the system.
(80386 and 80486 class machines will notice little, as the new
get_cyclecounter() call is a wrapper round nanotime(9) for them).
2000-11-25 17:09:01 +00:00
Mark Murray
89c2809e65 Add a constant for the (to be committed at a later time) irq-entropy
harvester.
2000-11-25 16:51:16 +00:00
Peter Wemm
bc7425f5f2 GC some defunct prototypes 2000-11-25 08:13:33 +00:00
Jonathan Lemon
b50c63121d Change the driver to allocate its own callout structure, and modify
the interface to use callout_* instead of timeout().  Also add an
IS_MPSAFE #define (currently off) which will mark the driver as mpsafe
to the upper layers.
2000-11-25 08:00:10 +00:00
Jonathan Lemon
4851f97cf1 Remove unused variable, spl() manipulation isn't done for the ifq now. 2000-11-25 07:50:27 +00:00
Jonathan Lemon
df5e198723 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
Peter Wemm
f4e13f88b6 Make sn_pccard_products[] static 2000-11-25 07:25:45 +00:00
Peter Wemm
5e12cd9b80 Argh, I have fixed this cut/paste error twice before. I must have
committed the wrong patch. :-(  sn_pccard_products[] should have
been static anyway.
2000-11-25 07:25:08 +00:00
Jonathan Lemon
747fa57549 Update to reflect the disappearance of getsock().
Found by:  LINT
2000-11-25 07:16:06 +00:00
Jonathan Lemon
14db7f978b Correct a misnamed argument hidden behind a #ifdef DEBUG
Found by:  LINT
2000-11-25 07:04:43 +00:00
Jonathan Lemon
e82ac18e52 Revert the last commit to the callout interface, and add a flag to
callout_init() indicating whether the callout is safe or not.  Update
the callers of callout_init() to reflect the new interface.

Okayed by: Jake
2000-11-25 06:22:16 +00:00
Jonathan Lemon
6e47e42f8d Don't attach the interface twice. While I'm here, add a driver
mutex.
2000-11-25 06:04:18 +00:00
Peter Wemm
c20d96e7c4 Regenerate. Note that pccarddevs_data.h is not used. 2000-11-25 03:43:37 +00:00
Peter Wemm
1d75be41ac Add Kingston and the KNE-PC2 card 2000-11-25 03:42:06 +00:00
Peter Wemm
b3d39a56ae Update the ed driver to probe and attach under a NEWCARD kernel (I was
using a cardbus based system with pccbb providing the pcic interface).
Something isn't quite right.. when the driver allocates and activates
its resources, the IO space that was requested reads as all zeros (versus
the original 0xff's as it normally is when there is no device responding).

Also, deactivate the resources before releasing them.  OLDCARD doesn't
seem to care but NEWCARD/CARDBUS get rather unhappy if you release
a resource that hasn't been deactivated yet.

Make pcic_p.c only compile with oldcard kernels.
2000-11-25 03:36:09 +00:00
Jake Burkholder
249849e0b9 - Rename callout_reset to _callout_reset and add a flags argument.
- Add macros callout_reset, which does the obvious, and
  mp_callout_reset, which passes the CALLOUT_MPSAFE flag.
2000-11-25 03:34:49 +00:00
Peter Wemm
3f964411b5 Make the xxxFILES= list generation generic. This makes it easier to add
things like MFILES= or CONFFILES= without having to modify config code.
2000-11-25 03:25:34 +00:00
Alfred Perlstein
ed0fe1449c add threadsafe version of inet_ntoa (inet_ntoa_r takes a buffer to fill)
this is used by some debugging functions
2000-11-25 03:14:31 +00:00
Alfred Perlstein
d28632c097 These files are mpsafe. 2000-11-25 03:01:05 +00:00
Roger Hardiman
0eaa901ba7 Print a warning when we detect a Realtek 8139B chip
(identified by the IO map being 256 bytes long instead of 128)

This chip works very unreliably on my Lanner embedded PC with the rl driver.
Lots of watchdog timeouts or poor performance.

Forcing the media type to 10 Meg (ifconfig rl0 media 10baseT/UTP) is a good
workaround.

This looks very similar to the problem reported in PR kern/18790

It is interesting to note that the linux driver has lots of special
case code for this chip.
2000-11-24 17:36:07 +00:00
Mark Murray
9dd471dfa5 Add a module makefile for if_ep.
This is not enabled by default, as the module is missing a bunch of
useful stuff (like the ability to unload).

Not objected to by:	mdodd
2000-11-24 17:04:51 +00:00
Bosko Milekic
a352dd9a71 Fixup (hopefully) bridging + ipfw + dummynet together...
* Some dummynet code incorrectly handled a malloc()-allocated pseudo-mbuf
  header structure, called "pkt," and could consequently pollute the mbuf
  free list if it was ever passed to m_freem(). The fix involved passing not
  pkt, but essentially pkt->m_next (which is a real mbuf) to the mbuf
  utility routines.

* Also, for dummynet, in bdg_forward(), made the code copy the ethernet header
  back into the mbuf (prepended) because the dummynet code that follows expects
  it to be there but it is, unfortunately for dummynet, passed to bdg_forward
  as a seperate argument.

PRs: kern/19551 ; misc/21534 ; kern/23010
Submitted by: Thomas Moestl <tmoestl@gmx.net>
Reviewed by: bmilekic
Approved by: luigi
2000-11-23 22:25:03 +00:00
Matthew Dillon
e0be78f6dc Forgot to patch this file in file descriptor race fix commit
Submitted-by: "Danny J. Zerkel" <dzerkel@columbus.rr.com>
2000-11-23 11:05:14 +00:00
Marcel Moolenaar
cc6ca9b35c o Change the argument of linux_sigreturn to be a pointer to a
struct sigframe. We need more than only the signal context.

o  Properly convert the signal mask when setting up the signal
   frame in linux_sendsig and properly convert it back in
   linux_sigreturn.

Do some cleanups and improve style while here.
2000-11-23 08:55:30 +00:00
Marcel Moolenaar
e26cc4467b Change the argument of linux_sigreturn to be a pointer to a
struct sigframe.
2000-11-23 08:53:19 +00:00
Bill Paul
0b32bab160 Add a forgotten mutex_exit()/KUE_UNLOCK() to kue_init(). 2000-11-23 05:58:48 +00:00
Marcel Moolenaar
466b14d758 Don't unregister the ioctl handlers before we verified we
can unload. Doing so leaves the linuxulator in a crippled
state (no ioctl support) when Linux binaries are run at
unload time.

While here, consistently spell ELF in capitals and perform
some minor style improvements.

ELF spelling submitted by: asmodai
2000-11-23 03:21:58 +00:00
John Baldwin
f377b2b19e Fix the KTR tracepoints for mtx_enter/exit/try_enter to properly order the
parameters for the KTR_EXTEND case.
2000-11-23 00:38:45 +00:00
Bill Paul
bade6e5e6b Update the probe some more to deal with 16/32 bit issues. If the chip
is already in 32-bit mode, we need to be able to detect this and still
read the chip ID code. Detecting 32-bit mode is actually a little
tricky, since we want to avoid turning it on accidentally. The easiest
way to do it is to just try and read the PCI subsystem ID from the
bus control registers using 16-bit accesses and compare that with the
value read from PCI config space. If they match, then we know we're in
16-bit mode, otherwise we assume 32-bit mode.
2000-11-23 00:28:43 +00:00
Archie Cobbs
7cc2023054 Add one2many subdirectory (previously forgotten). 2000-11-22 19:04:42 +00:00
Jeroen Ruigrok van der Werven
e255a226a2 Reduce number of #ifdef nestings.
Submitted by:	bde
2000-11-22 14:38:30 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
1b7b85c4d6 mdoc(7) police: use the new feature of the An macro. 2000-11-22 08:47:35 +00:00
Jake Burkholder
553629ebc9 Protect the following with a lockmgr lock:
allproc
	zombproc
	pidhashtbl
	proc.p_list
	proc.p_hash
	nextpid

Reviewed by:	jhb
Obtained from:	BSD/OS and netbsd
2000-11-22 07:42:04 +00:00
Doug Rabson
8707b6f032 Protect the bounce page list with a mutex instead of using splhigh(). 2000-11-22 07:16:51 +00:00
John Baldwin
0959cc6680 Ahem, fix the disclaimer portion of the copyright so it disclaim's the
voices in my head.  You can sue the voices in Bill Paul's head all you
want.

Noticed by:	jhb
2000-11-21 21:10:15 +00:00
Julian Elischer
93cded6e45 Devices that are running at splimp MUST use ng_queue_data()
instead of ng_send_data().
The latter could lead to running the IP stack at splimp
instead of splnet, (among other problems) (that MAY be safe
but I wouldn't count on it).

Noticed while preparing a new set of netgraph stuff.
2000-11-21 20:48:54 +00:00
Jonathan Lemon
4a476efa51 Protect p_wchan with sched_lock in selwakeup(). 2000-11-21 20:22:34 +00:00
Mark Murray
39413503a4 Assembler fixes.
Fix opcodes that were typed as ".byte 0xNN, 0xMM" when an older
assembler could not recognise the newer Pentium instructions.
Reviewed by:	jhb
2000-11-21 20:16:49 +00:00
Mark Murray
5855006767 Add a consistent API to a feature that most modern CPUs have; a fast
counter register in-CPU.

This is to be used as a fast "timer", where linearity is more important
than time, and multiple lines in the linearity caused by multiple CPUs
in an SMP machine is not a problem.

This adds no code whatsoever to the FreeBSD kernel until it is actually
used, and then as a single-instruction inline routine (except for the
80386 and 80486 where it is some more inline code around nanotime(9).

Reviewed by:	bde, kris, jhb
2000-11-21 19:55:21 +00:00
Alan Cox
c6fa9f78d2 Provide a new interface for the user of aio_read() and aio_write() to request
a kevent upon completion of the I/O.  Specifically, introduce a new type
of sigevent notification, SIGEV_EVENT.  If sigev_notify is SIGEV_EVENT,
then sigev_notify_kqueue names the kqueue that should receive the event
and sigev_value contains the "void *" is copied into the kevent's udata
field.

In contrast to the existing interface, this one: 1) works on
the Alpha 2) avoids the extra copyin() call for the kevent because all
of the information needed is in the sigevent and 3) could be
applied to request a single kevent upon completion of an entire lio_listio().

Reviewed by:	jlemon
2000-11-21 19:36:36 +00:00
John Baldwin
0fb3a41200 Stop handcoding a couple of instructions since gas 2.10 can properly
assemble 16-bit code.

Noticed by:	markm
2000-11-21 18:36:10 +00:00
Julian Elischer
07076ce1f7 Bump the buffersize from 0x1000 to 0x4000.
0x1000 gets underflows on my dell 7500 whenever I moved the mouse.
(reported as "hwptr went backwards...", with jumpy sound)
Sounds great now....
2000-11-21 12:22:11 +00:00