Commit Graph

30518 Commits

Author SHA1 Message Date
alfred
61ebae6aeb Give a little more information as to why pnp configuration of a device
may have failed.

Submitted by: Terry Lambert <tlambert2@mindspring.com>
2002-02-24 22:27:54 +00:00
phk
a3dad41f08 Add a generation number to timecounters and spin if it changes under
our feet when we look inside timecounter structures.

Make the "sync_other" code more robust by never overwriting the
tc_next field.

Add counters for the bin[up]time functions.

Call tc_windup() in tc_init() and switch_timecounter() to make sure
we all the fields set right.
2002-02-24 20:04:07 +00:00
phk
559718f505 Fix a typo (?) in previous commit told ttyprintf() to print the integer
part of the user-time as a 64bit quantity.  This resulted in weird
output from SIGINFO.
2002-02-24 19:56:41 +00:00
obrien
ac195ce76f Sync with the Alpha's GENERIC configuration.
Most of the contents are commented out as they are as-yet untested.
However, I wanted the contents to match our other arches, so that when
people make changes to {i386,alpha,ia64}, they will also make the same
changes here.
2002-02-24 18:49:38 +00:00
sos
9c1ffb6f35 Finish phk's previous removal of BIO_ORDERED, all code that
depended on ATA_FLUSHCACHE_ON is now useless.
2002-02-24 12:28:24 +00:00
msmith
9c690e174d Move some debugger-only symbols around; this patch didn't make it into
the commit resolution for some reason.  Fixes ACPI_DEBUG.
2002-02-24 07:51:46 +00:00
des
01635cd066 Add a sysctl, sysctl hw.snd.report_soft_formats, that controls whether the
AIOGCAP ioctl reports software-emulated formats.  It defaults to on.  People
who use performance-sensitive audio software and do not want it to pick a
software-emulated audio format instead of one supported by their hardware
should turn it off.

This unbreaks isdnphone(1) on systems with PCM-only sound cards.

Approved by:	cg
2002-02-24 00:49:43 +00:00
tmm
721047bc17 Fix LINT breakage by adding a missing include. 2002-02-23 22:55:47 +00:00
jake
895164868e Add PMAP_STATS option so pmap.c compiles. 2002-02-23 22:35:57 +00:00
jake
0238fc54e2 Make use of the ranged tlb demap operations where ever possible. Use
pmap_qenter and pmap_qremove in preference to pmap_kenter/pmap_kremove.
The former maps in multiple pages at a time, and so can do a ranged
flush.  Don't assume that pmap_kenter and pmap_kremove will flush the tlb,
even though they still do.  It will not once the MI code is updated to use
pmap_qenter and pmap_qremove.
2002-02-23 22:18:15 +00:00
jake
8c583de46f Add needed include of ucontext.h. 2002-02-23 22:03:25 +00:00
des
c1ec96c2c1 Fix namespace pollution introduced in previous commit. 2002-02-23 21:14:43 +00:00
jake
63d6dd6dde Add inlines for demapping a range of pages from the itlb and dtlb. This
will be used to reduce the number of tlb shootdown ipis in an smp system
by sending one ipi for a whole range of pages, instead of one per page.
Munge the context demap operations slightly to support demapping a non-primary
context.
2002-02-23 21:10:06 +00:00
jake
b0c5fb0be3 Use intr_disable/intr_restore instead of TLB_ATOMIC_START/END.
Submitted by:	tmm
2002-02-23 20:59:35 +00:00
jake
85b439b694 Use PCB_REG instead of loading the pcb from curthread. This fixes a bug
where %g6 could be inconsistent for 1 instruction.
2002-02-23 20:54:01 +00:00
jake
ed147b733c Adapt the tsb_foreach interface to take a source and a destination pmap so
that it can be used for pmap_copy.  Other consumers ignore the second pmap.
Add statistics gathering for tsb_foreach.
Implement pmap_copy.
2002-02-23 20:25:20 +00:00
jake
f7ad72d5e2 Add statistic gathering for various tsb operations.
Submitted by:	tmm
2002-02-23 20:11:11 +00:00
jake
dd884ba3a2 Remove debug code. 2002-02-23 20:08:06 +00:00
jake
2b394c872f Add statistic gathering for various pmap operations.
Submitted by:	tmm
2002-02-23 20:06:19 +00:00
jake
db96a614fe Remove CADDR1 and CADDR2 which are no longer used. On other architectures
these are used for copy and zeroing physical pages; we use physical addresses
directly.
2002-02-23 20:00:33 +00:00
jake
d715e97c9b Add macros to extract the UPA module id from the UPA config register.
This is the hardware cpuid.
2002-02-23 19:54:34 +00:00
jake
3ed9f58376 1. Setup the user stack pointer before returning to a user trap handler.
If we don't do this here there's a 1 instruction race where an interrupt
   could come in and crash the user process due to having no stack.
2. Pass %fsr to the user trap handler in %l4.  Since %fsr can only be loaded
   from or stored to memory, we need to do some contortions and temporarily
   save it to the alternate global stack.
3. Reload the pcb and pcpu registers for traps in kernel mode, for sanity.

Submitted by:	tmm (1, 2)
2002-02-23 18:55:21 +00:00
jake
fc548e14d2 Include intr_machdep.h only for !LOCORE. 2002-02-23 18:41:34 +00:00
jake
81dc2952a8 Add needed include of ucontext.h. Fix braino setting curpcb. 2002-02-23 18:39:09 +00:00
jake
3ad7e30eb5 Add metadata types for dtlb and itlb data, and number of slots used. 2002-02-23 17:43:44 +00:00
tanimura
a09da29859 Lock struct pgrp, session and sigio.
New locks are:

- pgrpsess_lock which locks the whole pgrps and sessions,
- pg_mtx which protects the pgrp members, and
- s_mtx which protects the session members.

Please refer to sys/proc.h for the coverage of these locks.

Changes on the pgrp/session interface:

- pgfind() needs the pgrpsess_lock held.

- The caller of enterpgrp() is responsible to allocate a new pgrp and
  session.

- Call enterthispgrp() in order to enter an existing pgrp.

- pgsignal() requires a pgrp lock held.

Reviewed by:	jhb, alfred
Tested on:	cvsup.jp.FreeBSD.org
		(which is a quad-CPU machine running -current)
2002-02-23 11:12:57 +00:00
jake
33e8ee5265 Keep track of the ttes used to map the kernel and pass them to it as loader
metadata.  Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.
2002-02-23 11:06:37 +00:00
benno
b2f2771fbb Don't call critical_enter()/critical_exit() around calls to pmap_pvo_enter()
as it does it's own handling of critical sections.
2002-02-23 05:55:51 +00:00
msmith
9c77442559 AcpiOsPrintf and AcpiOsVprintf now return void. 2002-02-23 05:32:51 +00:00
msmith
298fdbbdac AcpiOsCallocate is no longer required. 2002-02-23 05:32:10 +00:00
msmith
2fc99bc1ee Match namespace cleanup changes in ACPI CA 20020217 update. 2002-02-23 05:31:38 +00:00
msmith
2192e34250 Add our own private defines for driver debug layers.
Obsolete the acpi_GetInto* interfaces.

Fix a typo to be less appropriate.
2002-02-23 05:30:54 +00:00
msmith
168360b0e8 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.

Convert to using a kthread rather than timeout() to avoid problems
with the interpreter sleeping.
2002-02-23 05:29:23 +00:00
msmith
7347e2a6b0 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.
2002-02-23 05:28:22 +00:00
msmith
e5a87e8216 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.

Use _ADR as well as _BBN to get our bus number.
2002-02-23 05:27:49 +00:00
msmith
6e083f357a Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
2002-02-23 05:26:45 +00:00
msmith
40fae72f51 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.

The ACPI global lock acquire takes a timeout value.  I'm not sure what
we should do about timeouts on it; a deadlock against this lock is
catastrophic.
2002-02-23 05:26:31 +00:00
msmith
c669913895 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.

Kill off the timeouts that used to read _BIF and _BST.  These are
invoked when the battery is actually read.  timeout() is dangerous
in combination with ACPI, as the interpreter can block.

This driver still needs more work.
2002-02-23 05:24:14 +00:00
msmith
4538ae7834 Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.

Add AcpiBatteryIsPresent helper to determine whether a battery device
is inserted.

Add ACPI_ALL_DRIVERS to the list of debug layers, now that we own the
namespace for this.

Pr:
2002-02-23 05:21:56 +00:00
msmith
82010cdc0f Resolve conflicts arising from the ACPI CA 20020217 import. 2002-02-23 05:16:34 +00:00
msmith
64989f50d8 This commit was generated by cvs2svn to compensate for changes in r91116,
which included commits to RCS files with non-trunk default branches.
2002-02-23 05:10:40 +00:00
msmith
b58b48bed8 Vendor import of the Intel ACPI CA 20020217 drop. 2002-02-23 05:10:40 +00:00
jake
7994a37bd4 Add -ffreestanding to CFLAGS. 2002-02-23 04:36:15 +00:00
jake
ce801add09 Add make variables for fs support and propagate them to CFLAGS. Put
-ffreestanding in CFLAGS.  Remove unnecessary LDFLAGS.
2002-02-23 04:35:28 +00:00
jake
8f643f6169 Fix test for != 0 that should be > 0. 2002-02-23 04:33:15 +00:00
jake
e187f56a06 Check the return values of index() and don't dereference it if its null;
the path may not have a ':' in it.  The mac address property is called
mac-address for sparc64.  Don't allocate a dma buffer for sparc64 either.
2002-02-23 04:31:30 +00:00
jake
c819020411 #if 0 more bootinfo stuff. 2002-02-23 04:13:02 +00:00
jake
c34e322792 Fix fs support ifdefs. Add tftp support. Add physical and virtual
watchpoint support for debugging (under LOADER_DEBUG).  Claim the
physical and virtual addresses used to map the kernel from the prom;
we map it ourselves behind the scenes though.  Add a reboot command.

Submitted by:	tmm
2002-02-23 04:04:30 +00:00
jake
9ee486a3f2 Allocate a frame on our initial stack so that it doesn't run off into
random memory.  Disable interrupts while loading the tlb.

Submitted by:	tmm
2002-02-23 03:38:18 +00:00
jake
3088b53a9a Add OF_claim_virt() and OF_release_phys().
Submitted by:	tmm
2002-02-23 03:36:04 +00:00
jake
cd8694ee32 Include <machine/metadata.h>. 2002-02-23 03:33:39 +00:00
jake
7549b9e515 Don't echo a comment during make depend. 2002-02-23 01:49:13 +00:00
jake
b27e79327d Make this compile.
Pointy hat to:	julian
2002-02-23 01:42:13 +00:00
julian
53eb1d9219 Add some DIAGNOSTIC code.
While in userland, keep the thread's ucred reference in a shadow
field so that the usual place to store it is NULL.
If DIAGNOSTIC is not set, the thread ucred is kept valid until the next
kernel entry, at which time it is checked against the process cred
and possibly corrected. Produces a BIG speedup in
kernels with INVARIANTS set. (A previous commit corrected it
for the non INVARIANTS case already)

Reviewed by:	dillon@freebsd.org
2002-02-22 23:58:22 +00:00
des
6de67298e2 (Belatedly) add the required EXPORT_SYMS. I'm not sure the list is complete,
but at least linprocfs works (I haven't had the opportunity to test other
stuff that depends on the linux module, like aac or tdfx)
2002-02-22 18:21:20 +00:00
arr
9b9fb8022f - Whitespace fixes leftover from previous commit.
Submitted by:	bde
2002-02-22 13:43:56 +00:00
arr
c5071de1ce - Whitespace fixup left over from previous commit.
- Remove bogus cast.

Submitted by:	bde
2002-02-22 13:33:10 +00:00
phk
fa959f1afd Convert p->p_runtime and PCPU(switchtime) to bintime format. 2002-02-22 13:32:01 +00:00
phk
6beb5af66c Use better scaling factor for NTPs correction.
Explain the magic.
2002-02-22 12:59:20 +00:00
phk
87ca6820c8 Allow PCI_ALLOW_UNSUPPORTED_IO_RANGE to leave broken setups broken enough
to work.
2002-02-22 11:21:02 +00:00
phk
b9b775cf13 GC: BIO_ORDERED, various infrastructure dealing with BIO_ORDERED. 2002-02-22 09:26:35 +00:00
phk
8b5a71f365 GC: BIO_ORDERED going away. 2002-02-22 09:18:46 +00:00
phk
7d2feac7d3 Disksort will not "munge" requests, BIO_ORDERED or not, so remove
use of BIO_ORDERED.
2002-02-22 09:14:06 +00:00
phk
62d248fb9e Replace bowrite() with BUF_WRITE in ufs.
Remove bowrite(), it is now unused.

This is the first step in getting entirely rid of BIO_ORDERED which is
a generally accepted evil thing.

Approved by:	mckusick
2002-02-22 09:03:00 +00:00
phk
921e42206a GC: bufqueues are not used under -current, we use bioqueues. 2002-02-22 07:45:16 +00:00
luigi
826d38aaa6 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
arr
80237bc833 - Massive style fixup.
Reviewed by: mike
Approved by: dfr
2002-02-22 04:14:49 +00:00
gallatin
38d02464ac recovery from new binutils part II: fix the alpha kernel so that
it handles R_ALPHA_RELATIVE relocs with addends properly.

tested by: ticso
2002-02-21 23:34:09 +00:00
mjacob
923ef3a594 Reorder some of the ioctls and add a few new ones.
MFC after:	1 day
2002-02-21 23:30:05 +00:00
bp
72144faea4 Add support for iovcnt greater than 1. This should resolve problems
with some applications.

Obtained from:	Darwin project
MFC after:	2 weeks
2002-02-21 16:23:38 +00:00
bp
5829508a14 Remove redundant checks for iovcnt > 1. This should be handled properly
in the subr_mchain.

Obtained from:	Darwin project
MFC after:	2 weeks
2002-02-21 16:18:39 +00:00
bp
6657ab0f30 Add unicode related definition for future use. Descibe Samba bug.
Obtained from:	Darwin project
MFC after:	2 weeks
2002-02-21 16:13:19 +00:00
bp
bc82329414 Add subfunction definition for future use.
MFC after:	2 weeks
2002-02-21 16:10:42 +00:00
simokawa
3396fcf863 - Add support for Simplified Direct Access Device, mostly for
Firewire/SBP-II devices.

- Add quirk for Logitec USB/Firewire HDD.

MFC after: 3 days.
2002-02-21 11:58:47 +00:00
bde
9fe42a4fee Reserved one of the spare fields in struct gmon to record the history
counter type, as threatened in rev.1.8 (the density doesn't need to
be recorded since it can be derived from other fields).  This doesn't
affect binary compatibility, but new utilities won't be able to depend
on the contents of this field because libc/gmon/gmon.c was broken --
it wrote garbage to the spare fields.

Added a history counter type field to struct gmonparam.  This breaks
binary compatibility a little, since kgmon wanted to read the whole
struct.  Fixed kgmon to only depend on reading the critical earlier
parts of the struct.  This should also fix 6+ year old breakage of
binary compatibility when the profrate field was added.

Only initialize the new field in struct gmon for now, so that the
compatibility code for this (in kgmon) gets tested.  The compatibility
code has to guesstimate the value.  The new field in struct gmonparam
is for the kernel to initialize so that kgmon doesn't have to guess.
2002-02-21 05:52:49 +00:00
davidc
d697d82de9 Document the hw.physmem kernel environment variable.
Reviewed by:	alfred
2002-02-21 05:15:52 +00:00
bde
e31f481df2 Fixed some style bugs. Added a comment about a bug in PT_SSTEP.
Approved by:	des
2002-02-21 04:47:38 +00:00
bde
57654bd7db Recover bits that were lost in transition in rev.1.76:
- P_INMEM checks in all the functions.  P_INMEM must be checked because
  PHOLD() is broken.  The old bits had bogus locking (using sched_lock)
  to lock P_INMEM.  After removing the P_INMEM checks, we were left with
  just the bogus locking.
- large comments.  They were too large, but better than nothing.

Remove obfuscations that were gained in transition in rev.1.76:
- PROC_REG_ACTION() is even more of an obfuscation than PROC_ACTION().

The change copies procfs_machdep.c rev.1.22 of i386/procfs_machdep.c
verbatim except for "fixing" the old-style function headers and adjusting
function names and comments.  It doesn't remove the bogus locking.

Approved by:	des
2002-02-21 04:37:55 +00:00
mjacob
d4fb4b6c57 Fix a problem where a local loop disk logs out- and we get a PORT LOGGED
OUT status. We are, apparently, required to force the f/w to log back in
if we want to try and talk to that disk again. This means either issuing
a LOGIN LOCAL LOOP PORT mailbox command, or by issuing a LIP. I've elected
to issue a LIP because this has a better chance of waking up the disk which
clearly just crashed and burned.

These should not occur at all. If they do, they should be darned rare.

MFC after:	1 week
2002-02-21 01:56:08 +00:00
peter
cf06489c2d 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
julian
8ff28c6ae2 Oops, used wrong error value for unimplemented syscalls. 2002-02-20 22:27:09 +00:00
peter
2799120701 Pass me the pointy hat please. Be sure to return a value in a non-void
function.  I've been running with this buried in the mountains of compiler
output for about a month on my desktop.
2002-02-20 22:25:54 +00:00
peter
1906d1360c Tidy up some unused variables 2002-02-20 21:25:44 +00:00
alfred
7b6d78ef23 Prefix structure members to protect them against clashes with eg.
c++ keywords.

This keeps us in sync with NetBSD because they actually committed
my delta first.

Ok'd by: lennard
2002-02-20 20:47:21 +00:00
julian
48024c8054 Cleanup of nmdm device 2002-02-20 20:13:13 +00:00
brooks
68b1876656 Add missing m_free() so we actually drain the send buffer in monitor mode.
Submitted by:	Kenjiro Cho <kjc@csl.sony.co.jp>
2002-02-20 18:23:59 +00:00
luigi
565d5dddb5 BUGFIX: make use of the pointer to the target of skipto rules,
so that after the first time we can follow the pointer instead
of having to scan the list.
This was the intended behaviour from day one.

PR: 34639
MFC-after: 3 days
2002-02-20 17:15:57 +00:00
alfred
139cdbc604 fix file descriptor leak.
Submitted by: Mark Santcroos <marks@ripe.net>
2002-02-20 17:06:37 +00:00
jlemon
cc3e7eecb1 When expanding a syncache entry into a socket, inherit the socket options
from the current listen socket instead of the cached (and possibly stale)
TCB pointer.
2002-02-20 16:47:11 +00:00
imp
fd666ea168 Check the status of the card bridge first thing, rather than last in
the loop.  This fixes the "my card is in the laptop on boot, but
doesn't attach" problem.
2002-02-20 16:20:27 +00:00
arr
2ea45f625c - Fix style further by adding parentheses around return values so that
they look like:
	return (val);  instead of:  return val;
2002-02-20 16:05:30 +00:00
brian
c53e73d628 Send a NGM_PPPOE_ACNAME message to userland when a node is connected.
Submitted by:		Andre Albsmeier <andre@albsmeier.net>
Shuffled about by:	brian
Approved by:		julian
2002-02-20 15:51:11 +00:00
rwatson
ad827f33f7 o Minor style fix on #endif, missing '_' in comment. 2002-02-20 15:44:43 +00:00
shiba
880c6debc5 Add a module of xe driver.
Approved by: imp
2002-02-20 15:00:34 +00:00
shiba
fd71244d4b Add some code which is compatible for NEWCARD. It makes manufacturer
id transfer from pccardd.

Reviewed by: imp
2002-02-20 14:42:36 +00:00
shiba
33bb91ea16 NEWCARD support for xe.
Reviewed by: imp
2002-02-20 14:33:42 +00:00
shiba
3af9954d93 Add u_int16 prodext value in CISTPL_MANF_ID. This gets a fifth byte
when manufacturer id tuple length is 5. This change is for xe driver.
This is a dirty hack. But there is no better idea.

Reviewd by: imp
2002-02-20 14:30:46 +00:00
arr
1b20e66ad4 - Style.9 formatting fix; this commit is mostly white space related with
the next commit actually doing the:
	return val; -> return (val);
  changes.  This commit was done in preparation for getting ``struct
  modules'' locked down.

Reviewed by: bde
Approved by: dfr
2002-02-20 14:30:02 +00:00
shiba
b7d0d162c2 Update xe driver to probe and attach in a NEWCARD kernel.
And separate probe and attach routine for PC Card from if_xe.c
to if_xe_pccard.c.

Reviewed by: imp
2002-02-20 14:23:58 +00:00
cjc
6374dfe01c Fix typos in some comments.
PR:		i386/35114
Submitted by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
2002-02-20 14:15:58 +00:00
nyan
9b1a7d6a2e MFi386: revision 1.497 2002-02-20 05:09:57 +00:00
peter
b3a3630cce Some more tidy-up of stray "unsigned" variables instead of p[dt]_entry_t
etc.
2002-02-20 01:05:57 +00:00
rwatson
5587a218c1 More cleanups relating to vm object allocation failure: make sure we
call VOP_CLOSE() with vp unlocked; clean up the return path a little,
in as much as our namei/vnode operation return paths can be cleared
up.  For a return case that was apparently never taken, this sure
is ugly.

Reviewed by:	jeffr
2002-02-20 00:11:57 +00:00
tegge
5f4060fe3b Add a page queue, PQ_HOLD, that temporarily owns pages with nonzero hold
count that would otherwise be on one of the free queues.  This eliminates a
panic when broken programs unmap memory that still has pending IO from raw
devices.

Reviewed by:	dillon, alc
2002-02-19 23:19:30 +00:00
silby
5e0801a04b Add one more comment to the OOM changes so that future readers of
the code may better understand the code.

Suggested by:	dillon
MFC after:	1 week
2002-02-19 18:50:49 +00:00
silby
d2e8b2531b Changes to make the OOM killer much more effective:
- Allow the OOM killer to target processes currently locked in
  memory.  These very often are the ones doing the memory hogging.
- Drop the wakeup priority of processes currently sleeping while
  waiting for their page fault to complete.  In order for the OOM
  killer to work well, the killed process and other system processes
  waiting on memory must be allowed to wakeup first.

Reviewed by:	dillon
MFC after:	1 week
2002-02-19 18:34:02 +00:00
nyan
8da9b74a31 Release allocated memory and bus_space_handle on an error.
Reviewed by:	jhay
2002-02-19 14:58:11 +00:00
n_hibma
70f9165fee Clean up some debugging output.
Add function to display the CBI command block.
2002-02-19 10:53:25 +00:00
imp
a253cc8bc2 Put the stard/end adjustments back. They are needed. Also make start
== 0 a special case.  I hope this fixes the real problem that phk and
others were seeing.
2002-02-19 07:05:22 +00:00
imp
ca03e62ab0 o Count the number of mem and io spaces we allocate. If none work, bail out
o Add some better debugging code.
o Minor style(9) fixes.
2002-02-19 05:04:37 +00:00
imp
de7d451aca Do the cast away of unsignedness in a way that is more commprehensible. 2002-02-19 05:01:43 +00:00
julian
cb1f971d38 Add change to teh PPC to keep it in step with i386 and MI code
Pointy hat this direction please...
2002-02-19 03:27:08 +00:00
julian
4efc87c9d9 Catch up with i386 change I forgot to commit. 2002-02-19 03:23:28 +00:00
julian
24b4ea7e20 Duplicate the changes to i386 to keep creds over the user boundary. 2002-02-19 03:16:50 +00:00
silby
e561ca6dce A few misc forkbomb defenses:
- Leave 10 processes for root-only use, the previous
  value of 1 was insufficient to run ps ax | more.
- Remove the printing of "proc: table full".  When the table
  really is full, this would flood the screen/logs, making
  the problem tougher to deal with.
- Force any process trying to fork beyond its user's maximum
  number of processes to sleep for .5 seconds before returning
  failure.  This turns 2000 rampaging fork monsters into 2000
  harmlessly snoozing fork monsters.

Reviewed by:	dillon, peter
MFC after:	1 week
2002-02-19 03:15:28 +00:00
gallatin
53507926a4 MFi386: merge changes from i386/trap.c rev 1.212
If the credential on an incoming thread is correct, don't bother
reaquiring it. In the same vein, don't bother dropping the thread cred
when going to userland. We are guaranteed to need it when we come back,
(which we are guaranteed to do).
2002-02-19 03:13:39 +00:00
julian
ffdde8ed99 Add stub syscalls and definitions for KSE calls.
"Book'em Danno"
2002-02-19 02:40:31 +00:00
julian
6ebb003bcc Add 5 KSE syscalls. Two will be implemented with the next KSE
step and the others are reservations for coming code.
All will be stubbed in this kernel in the next commit.
This will allow people to easily make KSE binaries for userland testing
(the syscalls will be in libc) but they will still need a real KSE kernel
to test it. (libc looks in /sys to decide what it should add stubs for).
2002-02-19 02:19:36 +00:00
mike
10ca98b24d Add C++ support. 2002-02-19 02:17:16 +00:00
julian
520242dafe Add the first shot at minimum KSE interface definitions.
This is to allow people to start playing with userland code.
I will also add some stub syscalls in a minute.
2002-02-19 02:12:36 +00:00
joe
2b020857cc Merge from NetBSD:
* rev 1.47: Update a URL
* rev 1.56: Keep track of device speed for USB 2.0.
2002-02-19 02:00:27 +00:00
alfred
ff615f0a6d Add play (but not record) support for the Sis 7012.
Submitted by: Mike Meyer <mwm@mired.org>
2002-02-19 00:59:23 +00:00
luigi
30e0214753 When the local link address is changed, send out gratuitous ARPs
to notify other nodes about the address change. Otherwise, they
might try and keep using the old address until their arp table
entry times out and the address is refreshed.

Maybe this ought to be done for INET6 addresses as well but i have
no idea how to do it. It should be pretty straightforward though.

MFC-after: 10 days
2002-02-18 22:50:13 +00:00
des
364e5bfeb6 Paranoia: if the process is setugid, set all sensitive files mode 0. 2002-02-18 21:41:11 +00:00
mike
bcee06d42c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
dillon
f2e166dc7a Load the current timecounter into tc. The timecounter global can change
at any time and we do not want to call one timercounter's function with
another timecounter's structural pointer.

MFC after:	3 days
2002-02-18 19:49:30 +00:00
dillon
7c64675013 Add kern_giant_ucred to instrument Giant around ucred related operations
such a getgid(), setgid(), etc...
2002-02-18 17:51:47 +00:00
phk
68389bd8ba Make v_addpollinfo() visible and non-inline.
Have callers only call it as needed.
Add necessary call in ufs_kqfilter().

Test-case found by:	Andrew Gallatin <gallatin@cs.duke.edu>
2002-02-18 16:18:02 +00:00
rwatson
22b5668b60 Rehash of 1.43: simply remove the comment, since it's highly redundant
and only partially correct.
2002-02-18 16:02:24 +00:00
jedgar
5a3fc2f8bb Correct path to pucdata.c
Reviewed by:	jhay
2002-02-18 15:46:10 +00:00
nyan
338edfed46 Add bus_space_unmap() and bus_space_free() functions to release
a bus_space_handle allocated by bus_space_subregion().
2002-02-18 13:44:46 +00:00
nyan
7e94257d40 Add stubs for bus_space_unmap() and bus_space_free(). They are needed to
release a bus_space_handle allocated by bus_space_subregion().
2002-02-18 13:43:19 +00:00
bsd
ec225f53d2 Add NO_6_BYTE quirk entry for the LaCie Ltd. 105311 80 Gig USB2 drive.
Submitted by:	Brian Schellenberger <bts@babbleon.org>
2002-02-18 13:35:30 +00:00
iedowse
269a0d55a1 Add the braces missed by revision 1.131.
Pointy hat to:	rwatson
2002-02-18 12:46:18 +00:00
sos
67db33ea3e Add support for the Highpoint HPT372 based cards (rocketraid 133).
HW Sponsored by: Mike Tancsa
2002-02-18 11:57:56 +00:00
sos
c9b72549b1 Fix the problem that some (in my book broken) disks reports
to be able to use 48bit addressing mode, but says the 48bit
size of the disk is 0, which according to spec means it can
address zero sectors in 48bit mode, why then say it supports
48bit mode at all..
2002-02-18 11:52:51 +00:00
phk
e340a5652f Take the common case of gettimeofday(&tv, NULL) out from under Giant. 2002-02-18 08:40:28 +00:00
phk
68320d04d1 Remove yet a redundant VN_KNOTE() macro. 2002-02-18 08:24:48 +00:00
obrien
ef99fc0762 style(9) 2002-02-18 06:24:55 +00:00
dillon
15dc81ca3d The ICANON flag is an lflag, not an iflag.
Submitted by:	Neelkanth Natu <neelnatu@yahoo.com>
MFC after:	3 days
2002-02-18 06:07:11 +00:00
julian
5338e9f418 Remove __P() before committing new prototypes with KSE stuff
in a couple of weeks.
2002-02-18 05:26:57 +00:00
rwatson
49c65a6b10 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
rwatson
43f97fe4ae When vn_open() is failing because it cannot allocate a vm object, call
VOP_CLOSE() on the vnode, so that VOP_OPEN() and VOP_CLOSE() calls
are symmetric in all failure cases.  This prevents an 'open' reference
from being leaked in that unlikely failure scenario.
2002-02-18 00:26:10 +00:00
rwatson
946a79fb74 style(9) prefers formatted comments in '/*' ... '*/' as opposed to
#if 0'd.
2002-02-18 00:23:44 +00:00
rwatson
fc479aab62 Per discussion at BSDCon, note that the vop_getattr locking protocol
should require a shared lock, rather than an exclusive lock, which can
improve performance.  No actual code change here, since a number of
VFS locking fixes are in the works.
2002-02-18 00:22:57 +00:00
mjacob
e4ecbf2c51 More for f/w crash dumps (bug fixing and adding ioctl entry points
and hints to enable for specific units)

MFC after:	1 week
2002-02-18 00:00:34 +00:00
phk
c2a47cdbe8 Move the stuff related to select and poll out of struct vnode.
The use of the zone allocator may or may not be overkill.
There is an XXX: over in ufs/ufs/ufs_vnops.c that jlemon may need
to revisit.

This shaves about 60 bytes of struct vnode which on my laptop means
600k less RAM used for vnodes.
2002-02-17 21:15:36 +00:00
phk
3348974369 Collect the VN_KNOTE() macro definitions on vnode.h 2002-02-17 21:07:57 +00:00
phk
76dbd933fb Always build all modules for LINT 2002-02-17 21:00:20 +00:00
phk
ac1df75e69 v_lease is unused, zap it. 2002-02-17 20:41:27 +00:00