Commit Graph

3012 Commits

Author SHA1 Message Date
Jake Burkholder
b8d4451640 Use the deo hosted toolchain by default. 2002-03-13 03:23:17 +00:00
Jeff Roberson
8de00f4a87 This patch adds the "LOCKSHARED" option to namei which causes it to only acquire shared locks on leafs.
The stat() and open() calls have been changed to make use of this new functionality.  Using shared locks in
these cases is sufficient and can significantly reduce their latency if IO is pending to these vnodes.  Also,
this reduces the number of exclusive locks that are floating around in the system, which helps reduce the
number of deadlocks that occur.

A new kernel option "LOOKUP_SHARED" has been added.  It defaults to off so this patch can be turned on for
testing, and should eventually go away once it is proven to be stable.  I have personally been running this
patch for over a year now, so it is believed to be fully stable.

Reviewed by:	jake, obrien
Approved by:	jake
2002-03-12 04:00:11 +00:00
Poul-Henning Kamp
7b03a440ee Add commented out GEOM line to NOTES 2002-03-11 08:27:23 +00:00
Poul-Henning Kamp
e8645018a0 Add GEOM to conf/files. 2002-03-11 08:24:12 +00:00
Poul-Henning Kamp
036d25994c Add the GEOM option. 2002-03-11 08:06:24 +00:00
Thomas Moestl
0c530eb321 Add a driver for the mem and kmem devices, based off the i386 version. 2002-03-09 22:33:16 +00:00
Luigi Rizzo
c445626ad3 Enable DEVICE_POLLING in LINT now that it is safe to compile it there. 2002-03-09 08:04:58 +00:00
Robert Watson
7ed3fd6d72 Note that several of the recently documented clock-related kernel options
are for debugging purposes only.

Suggested by:	bde
2002-03-08 18:59:05 +00:00
Robert Watson
552c7f1b18 Apply a bit more of the patch from conf/35674: document the various
clock options in more detail.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:50:07 +00:00
Robert Watson
08d38d4560 Apply part of the patch from conf/35674 to move the PFIL_HOOKS option
to somewhere more useful, and improve documentation of it.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:47:32 +00:00
Robert Watson
daaa73b51f Synchronize NOTES with -STABLE LINT with respects to the placement
and commenting of NETSMB, NETWMBCRYPTO, and SMBFS.  In NOTES, they
had all floated to the bottom of the file with the list of seemingly
random and unclassified kernel options.  This change moves them back
up to the network protocol and file system areas, and also documents
the dependencies.
2002-03-08 15:34:23 +00:00
Seigo Tanimura
5d0451a3ed Add sys/dev/ufm.c.
Forgotten by:	alfred
Spotted by:	LINT
2002-03-05 11:19:23 +00:00
Hajimu UMEMOTO
b5a8f767a6 - Speedup 3DES by using assembly code for i386.
- Sync des/blowfish to more recent openssl.

Obtained from:	KAME/NetBSD
MFC after:	2 weeks
2002-03-05 09:19:02 +00:00
Mitsuru IWASAKI
899ccf541a Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00
Alfred Perlstein
63c6b757ab Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00
Yoshihiro Takahashi
900ae1c4ab MFi386: revision 1.394. 2002-03-02 13:21:12 +00:00
David E. O'Brien
b7bbb709c2 Use vnode_if.awk rather than vnode_if.pl 2002-03-01 01:21:29 +00:00
Peter Wemm
9d69d7b867 Tag istallion.c with nowerror (third party) 2002-02-28 03:14:37 +00:00
Peter Wemm
654694bf54 Tag if_ie.c, isp.c and isp_pci.c as nowerror (qualifier problems, and third
party code)
2002-02-27 23:55:42 +00:00
Peter Wemm
c538dbe04d Mark a few more broken pci drivers as nowerror. 2002-02-27 23:30:33 +00:00
Peter Wemm
da0d93cfc3 Mark stallion.c as nowerror (known broken, this is a #warning) 2002-02-27 23:23:54 +00:00
Thomas Moestl
2081ddd6d9 Add gem and hme. 2002-02-27 17:46:04 +00:00
Thomas Moestl
90ce56c287 Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
2002-02-27 17:16:18 +00:00
Peter Wemm
d1693e1701 Back out all the pmap related stuff I've touched over the last few days.
There is some unresolved badness that has been eluding me, particularly
affecting uniprocessor kernels.  Turning off PG_G helped (which is a bad
sign) but didn't solve it entirely.  Userland programs still crashed.
2002-02-27 09:51:33 +00:00
Peter Wemm
6bd95d70db Work-in-progress commit syncing up pmap cleanups that I have been working
on for a while:
- fine grained TLB shootdown for SMP on i386
- ranged TLB shootdowns.. eg: specify a range of pages to shoot down with
  a single IPI, since the IPI is very expensive.  Adjust some callers
  that used to trigger this inside tight loops to do a ranged shootdown
  at the end instead.
- PG_G support for SMP on i386 (options ENABLE_PG_G)
- defer PG_G activation till after we decide what we are going to do with
  PSE and the 4MB pages at the start of the kernel.  This should solve
  some rumored strangeness about stale PG_G entries getting stuck
  underneath the 4MB pages.
- add some instrumentation for the fine TLB shootdown
- convert some asm instruction wrappers from functions to inlines.  gcc
  seems to do a fair bit better with this.
- [temporarily!] pessimize the tlb shootdown IPI handlers.  I will fix
  this again shortly.

This has been working fairly well for me for a while, but I have tweaked
it again prior to commit since my last major testing round.  The only
outstanding problem that I know of is PG_G related, which is why there
is an option for it (not on by default for SMP).  I have seen a world
speedups by a few percent (as much as 4 or 5% in one case) but I have
*not* accurately measured this - I am a bit sceptical of these numbers.
2002-02-25 23:49:51 +00:00
Peter Wemm
2faccca61a Turn on -Werror by default. This is is easily turned off, by either:
- fix the warnings, they are there for a reason!
- add -DNO_ERROR to your make(1) command.
- add 'makeoptions NO_WERROR=true' to your kernel config.
- add 'nowerror' to conf/files* that have warnings that should be fixed
  due to tracking 3rd party vendor code.
- add 'nowerror' to conf/files* where the warning is false due to a
  compiler bug and fixing it with brute force would be too expensive.

There are some very sloppy warnings in our kernel build, come on folks!

'make release' uses -DNO_WERROR intentionally.
2002-02-25 22:04:33 +00:00
Peter Wemm
46bbc8f2bb Add 'nowerror' to the vendor acpica code that spews out warnings. 2002-02-25 21:54:06 +00:00
Jake Burkholder
b450bd2a37 Add PMAP_STATS option so pmap.c compiles. 2002-02-23 22:35:57 +00:00
Jake Burkholder
4fbd95d6b5 Don't echo a comment during make depend. 2002-02-23 01:49:13 +00:00
Luigi Rizzo
caa38512f5 Use make -V VARIABLE | xargs ... to pass argument lists to program
so that this is safe even if VARIABLE is longer than kern.argmax.

There is another instance of CFILES which might need the same treatment,
and might be noticed when doing a "make links".

The same has to be done in RELENG_4 (on some different file).

Noticed-by: picobsd cross-compiling LINT
Suggested-by: Alfred (bright@mu.org), des@freebsd.org
MFC-after: 3 days
2002-02-22 04:44:28 +00:00
Peter Wemm
7a2eb19dbf Commit some infrastructure for turning on -Werror for kernel compiles.
It doesn't actually do it yet though.  This adds a flag to config so
that we can exclude certain vendor files from this even when the rest
of the kernel has it on.  make -DNO_WERROR would also bypass all of it.
2002-02-20 23:35:56 +00:00
Takeshi Shibagaki
c0f91d512b NEWCARD support for xe.
Reviewed by: imp
2002-02-20 14:33:42 +00:00
Chris D. Faulhaber
093d72966f Correct path to pucdata.c
Reviewed by:	jhay
2002-02-18 15:46:10 +00:00
Robert Watson
5578933d56 Add a 'strvalid()' call to libkern. Given a character pointer, and
buffer length, determine if the pointer is to a valid string.  Currently,
the only check is whether a '\0' appears in the buffer.  This is useful
when pulling in a structure from userland that may contain one or more
strings, and validity testing must be performed on elements of the
structure.  When copying normal string arguments, copyinstr() is
expected to be used.
2002-02-18 00:37:03 +00:00
Poul-Henning Kamp
5a7ed3fb13 Always build all modules for LINT 2002-02-17 21:00:20 +00:00
Yoshihiro Takahashi
a6e1e07f4d MFi386: revision 1.167 2002-02-17 08:56:12 +00:00
Yoshihiro Takahashi
6bcb5293f0 MFi386: revision 1.392 2002-02-17 08:55:42 +00:00
John Hay
9c564b6c92 Add the puc (PCI "Universal" Communications) driver. The idea and some of
the structure definitions come from NetBSD to make it easier to share card
definitions. The driver only acts as a shim between the pci bus and the
sio driver. Later pci parallel ports could also be supported through this
driver. Support for most single and multiport pci serial cards should be
as simple as adding its definition to pucdata.c

Tested with the following pci cards:
Moxa Industio CP-114, 4 port RS-232,RS-422/485
Syba Tech Ltd. PCI-4S2P-550-ECP, 4 port RS-232 + 2 parallel ports
Netmos NM9835 PCI-2S-550, 2 port RS-232
2002-02-16 15:12:14 +00:00
Bruce Evans
1e92845e1b Garbage-collect options ACPI_NO_ENABLE_ON_BOOT, AML_DEBUG, BLEED,
DEVICE_SYSCTLS, KEY, LOUTB, NFS_MUIDHASHSIZ, NFS_UIDHASHSIZ, PCI_QUIET
and SIMPLELOCK_DEBUG.
2002-02-15 13:16:11 +00:00
Bruce Evans
039b360dac Garbage collect options AVM_A1_PCI, AVM_A1_PCMCIA, DEBUG_LINUX, DEV_APM,
GUS_DMA, GUS_DMA2, GUS_IRQ, OLTR_NO_BULLSEYE_MAC, OLTR_NO_HAWKEYE_MAC,
OLTR_NO_TMS_MAC and PCIC_RESUME_RESET.
2002-02-15 10:19:39 +00:00
Bruce Evans
1e9ea774c0 Added undocumented options AAC_DEBUG, ACD_DEBUG, ACPI_MAX_THREADS,
ACPI_NO_SEMAPHORES, ASR_MEASURE_PERFORMANCE, AST_DEBUG, ATAPI_DEBUG,
ATA_DEBUG, BKTR_ALLOC_PAGES, BROOKTREE_ALLOC_PAGES, CAPABILITIES,
COMPAT_SUNOS, CV_DEBUG, MAXFILES, METEOR_TEST_VIDEO, NDEVFSINO,
NDEVFSOVERFLOW, NETGRAPH_BRIDGE, NETSMB, NETSMBCRYPTO, PFIL_HOOKS,
SIMOS, SMBFS, VESA_DEBUG, VGA_DEBUG.

Start using #! to comment out negative options and ## to comment out
broken options.

atapi-all.c:
Fixed rotted bits that were hiding under ATAPI_DEBUG.

atapi-cd.c:
#include "opt_ata.h" so that ACD_DEBUG is actually visible.

ata/atapi-tape.c
#include "opt_ata.h" so that AST_DEBUG is actually visible.
2002-02-15 07:08:44 +00:00
Prafulla Deuskar
a59716d2d8 - Added support for receive in multiple
descriptors. This simplifies code for jumbo frames.
- Cleaned up coding conventions to make code more unix-like.
- Cleaned up code in if_em_fxhw.c and if_em_phy.c.
  Added relevant comments.

MFC after:	1 week
2002-02-13 18:19:27 +00:00
Thomas Moestl
71ff61ee93 Add counter.c and sbus.c. Unify style. 2002-02-13 16:29:51 +00:00
David Malone
6df7ca7b17 Add an option CPU_ATHLON_SSE_HACK which attempts to enable the SSE
feature bit on newer Athlon CPUs if the BIOS has forgotten to enable
it.

This patch was constructed using some info made available by John
Clemens at http://www.deater.net/john/PavilionN5430.html

Reviewed by:	-audit
MFC after:	3 weeks
2002-02-12 21:13:02 +00:00
Yoshihiro Takahashi
482195cab8 MFi386: revision 1.164 2002-02-12 13:21:32 +00:00
Yoshihiro Takahashi
aa3180fc02 MFi386: revision 1.391 2002-02-12 13:21:13 +00:00
Andrew Gallatin
0483b1a8f2 Enable polling to be configured into kernels on non i386 platforms. Note that
poll_in_trap is only implemented on i386.  I've tested this on alpha.

Approved by: luigi
2002-02-12 00:26:06 +00:00
Bruce Evans
c920faa62e Removed the one use of the mandatory keyword (for npx).
npx is no more mandatory than sc.  Its mandatoryness went away in
rev.1.226 of i386/machdep.c 9 months before it was made mandatory in
rev.1.24 of config/mkmakefile.c.

This change is mainly to test building of minimal kernel configurations.
npx should really be even more standard than clk.  It was optional mainly
so that the usual device driver configuration info could be specified in
the usual way in config files, but this hasn't been necessary for a few
years.
2002-01-30 14:35:58 +00:00
Warner Losh
75e5462e30 pccbb needs exca now. 2002-01-29 06:51:09 +00:00
Søren Schmidt
2405c1cef4 Enable pccard support. 2002-01-28 13:13:14 +00:00
John Polstra
586d7c2ef0 Add support for the Netgear GA302T 10/100/1000 adapter. Given that
it's a 32-bit card, it's quite nice for $75.

MFC after:	3 days
2002-01-27 01:00:16 +00:00
Mike Smith
d57a4b130a Correct the majors entry for 'iir'. 163 is vacated now. 2002-01-20 09:01:07 +00:00
Mike Smith
a245737c51 Add the 'iir' driver, for the Intel Integrated RAID controllers and
prior ICP Vortex models.  This driver was developed by Achim Leubner
of Intel (previously with ICP Vortex) and Boji Kannanthanam of Intel.

Submitted by:	"Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com>
MFC after:	2 weeks
2002-01-20 08:51:08 +00:00
Mike Smith
e103ec2fc4 ICP have been acquired by Intel, and their driver is now the Intel
Integrated RAID driver, supported by <boji.t.kannanthanam@intel.com> and
<achim.leubner@intel.com>.

Submitted by:	"Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com>
2002-01-20 06:21:33 +00:00
Yoshihiro Takahashi
7c1f8116ec MFi386: revision 1.388 2002-01-18 03:26:38 +00:00
Warner Losh
7a852c22ce Make PCI_ALLOW_UNSUPPORTED_IO_RANGE an option until the ISA address
problem is fixed at the bridge level.  This is needed for some newer
laptops that have the cardbus bridge not on pci0.
2002-01-15 06:46:59 +00:00
Yoshihiro Takahashi
17181b7b68 Added 'MACHINE=i386' to MKMODULESENV variable.
This enables to make modules for PC/AT on PC-98 boxes.

MFC after:	3 weeks
2002-01-14 12:48:18 +00:00
Ruslan Ermilov
17d6c63672 Drop <bsd.man.mk> support from <bsd.kmod.mk>.
Not objected to by:	-current
2002-01-11 15:49:02 +00:00
Peter Wemm
d9ec674175 genassym builds need the -fno-common stripped out. 2002-01-11 07:52:02 +00:00
Mike Smith
93f0354850 Reverse the sense of EXPORT_SYMS. If EXPORT_SYMS is not
defined, no symbols are exported from the module.  This is
the typical configuration for most device drivers and
standalone modules; only infrastructure modules or those with
special requirements typically need to export symbols.

Don't print the objcopy commands as they are run when converting
symbols; they're bulky and annoying in many cases.
2002-01-11 01:11:44 +00:00
Mike Smith
0b3178a45c Eliminate the use of commons in the kernel and modules,
simplifying the module linking process and eliminating the risks
associated with doubly-defined variables.

Cases where commons were legitimately used (detection of
compiled-in subsystems) have been converted to use sysinits, and
any new code should use this or an equivalent practice as a
matter of course.

Modules can override this behaviour by substituting -fno-common
out of ${CFLAGS} in cases where commons are necessary
(eg. third-party object modules).  Commons will be resolved and
allocated space when the kld is linked as part of the module
build process, so they will not pose a risk to the kernel or
other modules.

Provide a mechanism for controlling the export of symbols from
the module namespace.  The EXPORT_SYMS variable may be set in the
Makefile to NO (export no symbols), a list of symbols to export,
or the name of a file containing a newline-seperated list of
symbols to be exported.  Non-exported symbols are converted to
local symbols.  If EXPORT_SYMS is not set, all global symbols are
currently exported.  This behaviour is expected to change (to
exporting no symbols) once modules have been converted.

Reviewed by:	peter (in principle)
Obtained from:	green (kmod_syms.awk)
2002-01-10 03:52:01 +00:00
Max Khon
eda6ecb22a - generic Arcnet framework
- device driver for SMC COM90cx6 Arcnet network adapters

Obtained from:	NetBSD
2002-01-08 20:03:13 +00:00
Jake Burkholder
0f6f526c97 Connect smp support to the kernel build. 2002-01-08 05:55:46 +00:00
Warner Losh
714b6aa6ff s/oferride/override/
submitted by: dima
2002-01-06 20:33:55 +00:00
Yoshihiro Takahashi
3af626e4c6 MFi386: revisions 1.382 and 1.386. 2002-01-06 09:47:36 +00:00
Yoshihiro Takahashi
b30a31e99d Sorted the lists. 2002-01-06 09:46:30 +00:00
Warner Losh
99fd86af3f Move initialization of the MKMODULESENV envorinoment to kern.pre.mk
from kern.post.mk so port makefiles can augment it.

Submitted by: nyan
2002-01-05 06:21:06 +00:00
Seigo Tanimura
995231304d - Provide toggles to show debug messages. Set new sysctl variables
hw.midi.debug and hw.midi.seq.debug to 1 to enable debug log.

- Make debug messages human-frendly.

- Implement /dev/music.

- Add a timer engine required by /dev/music.

- Fix nonblocking I/O.

- Fix the numbering of midi and synth devices.
2002-01-04 01:13:49 +00:00
Gary Jennejohn
26a4599362 i4bisppp also needs net/if_spppsubr.c.
MFC after:	1 month
2002-01-02 09:15:18 +00:00
Julian Elischer
6d823e816b Add the nullmodem device 2002-01-01 05:16:03 +00:00
Joerg Wunsch
734b6a9ee0 Remove references to i4b/driver/i4b_ispppsubr.c, now that
net/if_spppsubr.c has all its features.

Hooray, it's gone!

MFC after:	1 month
2001-12-30 18:48:24 +00:00
Alfred Perlstein
21d56e9c33 Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO
will use at_exit(9).

Add functions at_exec(9), rm_at_exec(9) which function nearly the
same as at_exec(9) and rm_at_exec(9), these functions are called
on behalf of modules at the time of execve(2) after the image
activator has run.

Use a modified version of tegge's suggestion via at_exec(9) to close
an exploitable race in AIO.

Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral,
the problem was that one had to pass it a paramater indicating the
number of arguments which were actually the number of "int".  Fix
it by using an inline version of the AS macro against the syscall
arguments.  (AS should be available globally but we'll get to that
later.)

Add a primative system for dynamically adding kqueue ops, it's really
not as sophisticated as it should be, but I'll discuss with jlemon when
he's around.
2001-12-29 07:13:47 +00:00
Thomas Moestl
ded9ba2253 Add -mcmodel=medlow to COPTS. This is needed to build working kernels. 2001-12-24 13:35:43 +00:00
Mitsuru IWASAKI
c573e654b7 Add OS layer ACPI mutex and threading support.
- Temporary fix a bug of Intel ACPI CA core code.
 - Add OS layer ACPI mutex support.  This can be disabled by
   specifying option ACPI_NO_SEMAPHORES.
 - Add ACPI threading support.  Now that we have a dedicate taskqueue for
   ACPI tasks and more ACPI task threads can be created by specifying option
   ACPI_MAX_THREADS.
 - Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given
   caller's buffer unless AE_BUFFER_OVERFLOW occurs.  Also CM battery's
   evaluations were changed to use acpi_EvaluateIntoBuffer().
 - Add new utility function acpi_ConvertBufferToInteger().
 - Add simple locking for CM battery and temperature updating.
 - Fix a minor problem on EC locking.
 - Make the thermal zone polling rate to be changeable.
 - Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case,
   entering Debugger is easier to investigate the problem rather than panic.
2001-12-22 16:05:41 +00:00
Gary Jennejohn
1823355cab Add the ifpi2 driver.
MFC after:	4 weeks
2001-12-22 09:29:03 +00:00
Yoshihiro Takahashi
9ed5d2934f Merged from files.i386 revision 1.384.
Removed acpica entries.
2001-12-22 01:25:54 +00:00
Yoshihiro Takahashi
29f004b8aa MFi386: revision 1.159 2001-12-22 00:48:39 +00:00
Yoshihiro Takahashi
5338594a2c MFi386: revision 1.163 2001-12-22 00:42:10 +00:00
Thomas Moestl
c93d0240c3 Move the PCI_ENABLE_IO_MODES option from conf/options.i386 to
conf/options.
2001-12-21 21:46:55 +00:00
Jim Pirzyk
417c87d137 Add support for the Intel 82443MX chipset
PR:		kern/33032
MFC after:	1 month
2001-12-21 01:28:59 +00:00
Poul-Henning Kamp
96efd94a01 Comment out DEVICE_POLLING so that LINT compiles again. 2001-12-19 20:53:54 +00:00
Yoshihiro Takahashi
b4db911dc6 MFi386: options.i386 revision 1.162 2001-12-16 09:04:08 +00:00
Yoshihiro Takahashi
d8b0c29b30 MFi386: files.i386 revision 1.385 2001-12-16 09:03:41 +00:00
Luigi Rizzo
c7c781634f Add description of DEVICE_POLLING option. 2001-12-14 23:35:33 +00:00
Luigi Rizzo
c578eeb389 Clarify the comments related to DUMMYNET and HZ
MFC after: 3 days
2001-12-14 23:25:58 +00:00
Luigi Rizzo
e4fc250c15 Device Polling code for -current.
Non-SMP, i386-only, no polling in the idle loop at the moment.

To use this code you must compile a kernel with

        options DEVICE_POLLING

and at runtime enable polling with

        sysctl kern.polling.enable=1

The percentage of CPU reserved to userland can be set with

        sysctl kern.polling.user_frac=NN (default is 50)

while the remainder is used by polling device drivers and netisr's.
These are the only two variables that you should need to touch. There
are a few more parameters in kern.polling but the default values
are adequate for all purposes. See the code in kern_poll.c for
more details on them.

Polling in the idle loop will be implemented shortly by introducing
a kernel thread which does the job. Until then, the amount of CPU
dedicated to polling will never exceed (100-user_frac).
The equivalent (actually, better) code for -stable is at

	http://info.iet.unipi.it/~luigi/polling/

and also supports polling in the idle loop.

NOTE to Alpha developers:
There is really nothing in this code that is i386-specific.
If you move the 2 lines supporting the new option from
sys/conf/{files,options}.i386 to sys/conf/{files,options} I am
pretty sure that this should work on the Alpha as well, just that
I do not have a suitable test box to try it. If someone feels like
trying it, I would appreciate it.

NOTE to other developers:
sure some things could be done better, and as always I am open to
constructive criticism, which a few of you have already given and
I greatly appreciated.
However, before proposing radical architectural changes, please
take some time to possibly try out this code, or at the very least
read the comments in kern_poll.c, especially re. the reason why I
am using a soft netisr and cannot (I believe) replace it with a
simple timeout.

Quick description of files touched by this commit:

sys/conf/files.i386
        new file kern/kern_poll.c
sys/conf/options.i386
        new option
sys/i386/i386/trap.c
        poll in trap (disabled by default)
sys/kern/kern_clock.c
        initialization and hardclock hooks.
sys/kern/kern_intr.c
        minor swi_net changes
sys/kern/kern_poll.c
        the bulk of the code.
sys/net/if.h
        new flag
sys/net/if_var.h
        declaration for functions used in device drivers.
sys/net/netisr.h
        NETISR_POLL
sys/dev/fxp/if_fxp.c
sys/dev/fxp/if_fxpvar.h
sys/pci/if_dc.c
sys/pci/if_dcreg.h
sys/pci/if_sis.c
sys/pci/if_sisreg.h
        device driver modifications
2001-12-14 17:56:12 +00:00
Robert Watson
0cbe2ad685 o Clarify the comments on AIO to note that yes, AIO really is unsuitable
for use on machines with untrusted local users, for security as well
  as stability reasons.
o Lack of clarity pointed out by: David Rufino <dr@soniq.net> via bugtraq.
2001-12-14 11:21:16 +00:00
Peter Wemm
f6916f666c Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Matthew Dillon
c8b4c292c0 Add maxusers auto-sizing description to NOTES file for -current 2001-12-14 01:01:20 +00:00
Warner Losh
bfd29a02d9 Back out my "joy" change. It was really the for some uncommitted ata
code I have.
2001-12-07 01:52:40 +00:00
Peter Wemm
f65f2ffdd7 Part 2 of previous commit. Add joy_isa.c and joy_pccard.c.
Submitted by:	jhb
2001-12-06 23:10:24 +00:00
Peter Wemm
a116e755dc Somebody moved joy.c from isa/ to dev/joy/ without updating conf/files.
Pointy-hat to: imp
2001-12-06 18:00:42 +00:00
David E. O'Brien
26a42e7c88 Compile all kernels with "-ffreestanding":
Assert that compilation takes place in a freestanding environment. This
	implies `-fno-builtin'. A freestanding environment is one in which the
	standard library may not exist, and program startup may not necessarily be
	at main. The most obvious example is an OS kernel. This is equivalent to
	`-fno-hosted'.
2001-12-06 17:53:32 +00:00
Warner Losh
4e152a90ee The pccard/cardbus power interface should depend on having pccard or
cardbus in the kernel, not on all the bridges that implement it.
Note: this is NEWCARD only, so we don't want it for the 'card' case,
unlike card_if.m, which is both NEWCARD and OLDCARD.
2001-12-06 06:40:18 +00:00
Warner Losh
c067c1d163 Move joy from isa to dev/joy. 2001-12-05 09:10:20 +00:00
Dag-Erling Smørgrav
4d2647f96a PROCFS requires PSEUDOFS now. 2001-12-04 01:35:59 +00:00
Dag-Erling Smørgrav
3a669c52a8 Pseudofsize procfs(5). 2001-12-04 01:35:06 +00:00
Prafulla Deuskar
e6770f4c46 This is the first commit of the Intel gigabit driver for
PRO/1000 cards.

Submitted by:Prafulla Deuskar
Reviewed by: Paul Saab
MFC after:1 week
2001-12-02 07:37:17 +00:00
David E. O'Brien
00def12b2b Change to using my custom sparc64 binutils. 2001-11-28 02:35:02 +00:00
Mike Smith
3a31b7eb32 Add the 'ciss' driver, which supports the Compaq SmartRAID 5* family of
RAID controllers (5300, 532, 5i, etc.)

Thanks to Compaq and Yahoo! for support during the development of this
driver.

MFC after:	1 week
2001-11-27 23:08:37 +00:00
Yoshihiro Takahashi
de48920662 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
Warner Losh
f703f3eaee First part of patches to make sio grok 16-bit serial cards under
NEWCARD.  Other patches may be reqiured to sio to prevent a hang on
eject.  Also add commented out entries for sio_pccard.c in files.pc98
to match other architectures.

Submitted by: yamamoto shigeru-san
2001-11-26 00:39:33 +00:00
Jonathan Lemon
be2ac88c59 Introduce a syncache, which enables FreeBSD to withstand a SYN flood
DoS in an improved fashion over the existing code.

Reviewed by: silby  (in a previous iteration)
Sponsored by: DARPA, NAI Labs
2001-11-22 04:50:44 +00:00
Max Khon
ea38b939e8 Add driver for Granch SBNI12-xx ISA and PCI network adapters.
MFC after:	1 week
2001-11-21 22:29:35 +00:00
Yoshihiro Takahashi
e581e0b879 MFi386: revision 1.160 2001-11-17 13:44:33 +00:00
Jeroen Ruigrok van der Werven
a9032e75b2 Document the atkbd flags of 0x03 and be explicit to mention this might
fit some dockingstation keyboard probing.

PR:		23681
Submitted by:	yokota [PR issued by:
				Claude Lefrancois <lmcclef@lmc.ericsson.se>]
2001-11-15 19:42:07 +00:00
John Baldwin
2ffc1262b0 Axe NFS_NOSERVER since it doesn't do anything anymore. Remove NFSSERVER
from your config file instead.
2001-11-15 16:03:24 +00:00
Warner Losh
945668b079 newcard support for an, from pr 24854 2001-11-15 06:18:58 +00:00
Matthew Dillon
f286003909 Create a mutex pool API for short term leaf mutexes.
Replace the manual mutex pool in kern_lock.c (lockmgr locks) with the new API.
Replace the mutexes embedded in sxlocks with the new API.
2001-11-13 21:55:13 +00:00
Benno Rice
2c6c884048 -msoft-float must always be turned on when compiling the PowerPC kernel. 2001-11-12 10:12:00 +00:00
Warner Losh
3dfff24a19 Move kern.post.mk to last line, now that it appears safe 2001-11-11 20:33:02 +00:00
Warner Losh
269b3a8211 s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing 2001-11-11 20:17:10 +00:00
Warner Losh
4e8764288f Move all: target to kern.pre.mk so it matters less where you include
kern.post.mk.

# this should allow us to move kern.post.mk to the last line of the makefiles,
# but I'll do that slowly as I verify that one can do that w/o breaking things.

Submitted by: naddy
2001-11-11 06:16:53 +00:00
Marcel Moolenaar
7b9cc19934 Append to SYSTEM_OBJS and CLEAN before including kern.post.mk.
Any modifications to SYSTEM_OBJS after including kern.post.mk
will not make it to SYSTEM_DEP and consequently any dependency
rules. This caused __{div|rem}* to not be built...
2001-11-11 05:26:14 +00:00
Thomas Moestl
79327ed19c Add entries for the recently committed code. 2001-11-09 20:44:44 +00:00
Thomas Moestl
7bd6ef7d4d Add emul.c and in_cksum.c, make the OpenFirmware console driver optional,
reorder a bit.
2001-11-06 20:25:44 +00:00
Mitsuru IWASAKI
1611ea8727 Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation.  This will works well if MIB
   hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
   is enabled correctly).
 - Add DSDT overriding support which is submitted by takawata originally.
   If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
   acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
   ACPI CA core loads DSDT from given file rather than BIOS memory block.
   DSDT file can be generated by iasl in ports/devel/acpicatools/.
 - Add new files so that we can add our proposed additional code to Intel
   ACPI CA into these files temporary.  They will be removed when
   similar code is added into ACPI CA officially.
2001-11-06 15:00:30 +00:00
Poul-Henning Kamp
e1a7c5c881 GC userconfig after Peter axed it 15 months ago. 2001-11-05 21:46:35 +00:00
Poul-Henning Kamp
d3c64689d8 3.5 years ago Wollman wrote:
"[...] and removes the hostcache code from standard kernels---the
   code that depends on it is not going to happen any time soon,
   I'm afraid."
Time to clean up.
2001-11-05 21:25:02 +00:00
Poul-Henning Kamp
0d60c3f5cf Remove the old RocketPort driver which was left behind in favour
of the new driver.  The new driver works, the old one is 1+ year behind.
2001-11-05 20:49:30 +00:00
Warner Losh
1fddc467ee Move machine link creation from genassym to kernel-depend, per nyan@ 2001-11-04 23:10:39 +00:00
Warner Losh
a2866b2ef9 Move the include before the extra rules so make all the default.
Reported by: peter
2001-11-04 20:49:24 +00:00
Warner Losh
7ff5025996 Arrgh. A clean pc98 build failed due to bogons on my part :-(.
Fix it by putting back the link of machine to sys/i386/include rather
than ../../include (aka sys/pc98/include).  I had a stale machine link
on my first test.

Not sure what the "right" fix is, but this unbreaks things.
2001-11-02 21:50:15 +00:00
Warner Losh
41c8eb3039 Factor the common parts of the Makefile.foo files. This introduces two
new files: kern.pre.mk, which contains most of the definitions, and
kern.post.mk, which contains most of the rules.

I've tested this on i386 and pc98.  I have had feedback on the sparc64
port, but no reports from anybody on alpha, ia64 or powerpc.  I
appologize in advance if I've broken you.

Reviewed by: jake, jhb, arch@
2001-11-02 21:34:20 +00:00
Warner Losh
06a9ff8e81 The sound drivers live in sound/driver, not sound/drivers
submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
2001-11-02 16:40:06 +00:00
Mitsuru IWASAKI
f9390180fe Some fix for the recent apm module changes.
- Now that apm loadable module can inform its existence to other kernel
   components  (e.g. i386/isa/clock.c:startrtclock()'s TCS hack).
 - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose.
 - Add simple arbitration mechanism for APM vs. ACPI.  This prevents
   the kernel enables both of them.
 - Remove obsolete `#ifdef DEV_APM' related code.
 - Add abstracted interface for Powermanagement operations.  Public apm(4)
   functions, such as apm_suspend(), should be replaced new interfaces.
   Currently only power_pm_suspend (successor of apm_suspend) is implemented.

Reviewed by:	peter, arch@ and audit@
2001-11-01 16:34:07 +00:00
Brian Somers
143281f43c Only overwrite ${DESTDIR}${KODIR}.old/${KERNEL_KO} if we haven't
booted from it when doing an installkernel.

Only change kern.bootfile from ${DESTDIR}${KODIR}/${KERNEL_KO}
to ${DESTDIR}${KODIR}.old/${KERNEL_KO}, and only when we're renaming
a booted ${DESTDIR}${KODIR}/${KERNEL_KO} kernel.
2001-11-01 02:17:49 +00:00
Mike Smith
fad334b0b9 Update to reflect files added/removed with the 20011018 ACPI CA update. 2001-10-31 02:35:43 +00:00
Warner Losh
cf17adf0a9 OLDCARD isn't supported on alpha or ia64, so don't pretend that it is by
including it.
2001-10-30 14:53:36 +00:00
Warner Losh
e282bb41f0 Don't try to use sio with NEWCARD 16 bit yet. It eats all pccards :-)
Reported by: Marcell Moolenaar
2001-10-30 14:49:29 +00:00
Doug Rabson
74ada43be9 Use -ffreestanding instead of -fno-builtin. That's the officially blessed
way of saying that its not linking with libc.

Submitted by: peter
2001-10-30 09:37:00 +00:00
Doug Rabson
dab3d5bca0 Adjust for building with gcc 3.0.1. 2001-10-30 09:09:13 +00:00
Doug Rabson
7a71eab18d Add unwind.c. 2001-10-29 12:04:51 +00:00
Doug Rabson
a4addc62ce Put symbols at the start and end of the unwind section so that we can
find it at runtime.
2001-10-29 11:40:14 +00:00
Dag-Erling Smørgrav
a4c0058691 Support the "install.debug" and "reinstall.debug" targets for kernel modules.
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.

Approved by:	a week of silence on -arch
MFC after:	2 weeks
2001-10-27 00:52:50 +00:00
Mike Smith
0b9272be42 Add 'ciss'. 2001-10-26 21:17:26 +00:00
Mitsuru IWASAKI
f86214b6b8 Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and
provides APM services for the applications.  The goal is to support
most of APM applications without any changes.
Implemented ioctls in this commit are:
 - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl)
 - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl)
 - APMIO_GETINFO and APMIO_GETINFO_OLD
 - APMIO_GETPWSTATUS

With above, many APM applications which get batteries, ac-line
info. and transition the system into suspend/standby mode (such as
wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-)

Reviewed by:	arch@, audit@ and some guys
2001-10-26 17:43:05 +00:00
Ruslan Ermilov
0df659af99 Finish the asbestos suited move of $mach/conf/*.$mach to conf/*.$mach.
Fix some more typos.
2001-10-26 10:33:45 +00:00
Bruce Evans
42108a7706 Fixed misformatting of options line for COMPAQ_M610 and EICON_DIVA in
rev.1.974.

Fixed previous misformatting of options line for ACCEPT_FILTER_DATA,
ACCEPT_FILTER_HTTP, ACPI_DEBUG, COMPAT_SVR4, DEBUG_SVR4, ED_NO_MIIBUS,
IFS, PCFCLOCK_MAX_RETRIES, PCFCLOCK_VERBOSE, PECOFF_DEBUG, PECOFF_SUPPORT,
PPC_PROBE_CHIPSET, RANDOM_IP_ID, REGRESSION, SC_CUT_SEPCHARS,
SC_CUT_SPACES2TABS, SES_ENABLE_PASSTHROUGH, UFS_DIRHASH, UFS_EXTATTR
and UFS_EXTATTR_AUTOSTART.
2001-10-25 12:05:45 +00:00
Bruce Evans
c797ab47ab Fixed bugs in rev.1.973. Actually enable PCI_ENABLE_IO_MODES. It
defeats the point of LINT to comment out positive options.

Fixed style bugs in rev.1.973:
- disordering of PCI options list.
- missing space after "options".
- line longer than 80 characters.
- bogus quoting of "BIOS".
2001-10-25 11:46:54 +00:00
Hellmuth Michaelis
0103e55f3f add options line for Compaq Microcom 610 ISDN card. 2001-10-25 11:14:46 +00:00
Jonathan Lemon
ae4da68827 Add PCI_ENABLE_IO_MODES option, for BIOSen that neglect this.
Submitted by: Andrew R. Reiter arr@watson.org
2001-10-25 04:44:50 +00:00
Yoshihiro Takahashi
6cac891491 Added the pmc driver which supports power management controller of
old NEC PC-98NOTE.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	1 week
2001-10-24 14:46:40 +00:00
Warner Losh
2ce87d3448 Break out the bus front ends into their own files. Rewrite
sio_pccard_detach to use new siodetach.  Add an extra arg to sioprobe
to tell driver to probe/not probe the device for IRQs.

This incorporates most of Bruce's review material.  I'm at a good
checkpoint, but there will be more to come based on bde's further
reviews.

Reviewed by: bde
2001-10-23 15:17:33 +00:00
Warner Losh
9e90edd49a wx is an ex-parrot. wx doesn't exist any more, so remove it. 2001-10-22 16:02:51 +00:00
Warner Losh
d75c1b4a90 First commit after a repo copy of isa/sio* -> dev/sio:
Move sio from isa/sio.c to dev/sio/sio.c.  The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98
2001-10-22 02:48:38 +00:00
Dag-Erling Smørgrav
7c62990641 Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to
proc_* in the process; procfs_machdep.c is no longer needed.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 23:57:24 +00:00
Hellmuth Michaelis
12428dfd1b Add a driver for the Compaq Microcom 610 ISDN (Compaq series PSB2222I) ISA PnP
card.

Submitted by:	Steve Looman
Reviewed by:	hm
MFC after:	1 month
2001-10-21 09:17:25 +00:00
Bruce Evans
7dd43330b3 Use the i386 version of npx.c. It has been merged with the pc98 version.
Approved by:	nyan
Not tested by:	bde
2001-10-21 06:14:12 +00:00
Matt Jacob
8c7c272c5a Remove wx. 2001-10-20 18:50:31 +00:00