Commit Graph

30364 Commits

Author SHA1 Message Date
David E. O'Brien
65955377e3 I was able to boot this kernel using the latest WIP kernel sources.
I don't believe anyone is quite using the sparc64 kernel sources in CVS
yet -- things aren't just quite ready (but almost).  So this commit should
be OK to make.
2002-02-25 22:13:44 +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
Peter Wemm
963131fe0a Tidy up some warnings 2002-02-25 21:42:23 +00:00
Jake Burkholder
4c4a1a19e8 Implement a nested window state. This avoids attempting to spill a user
window to the user stack while in a nested kernel trap.  We do this for
entry to the kernel from user mode, but if we get an interrupt in kernel
mode while there are still user windows in the cpu, and we attempt to spill
to the user stack, we may take too many nested traps and overflow the trap
stack, causing a red state exception.  This is needed by upcoming changes
to allow the user tsb to not be locked in the tlb.

Reviewed by:	tmm
2002-02-25 18:37:17 +00:00
Poul-Henning Kamp
cb877d0050 Add a new test_counter() function which tries to determine the width of
the inter-value histogram for 2000 samples.  If the width is 3 or less
for 10 consequtive samples, we trust the counter to be good, otherwise
we use the *_safe() method.

This method may be too strict, but the worst which can happen is that
we take the performance hit of the *_safe() method when we should not.

Make the *_safe() method more discriminating by mandating that the three
samples do not span more than 15 ticks on the counter.

Disable the PCI-ident based probing as a means to recognize good
counters.

Inspiration from:	dillon and msmith
2002-02-25 09:51:17 +00:00
Alfred Perlstein
6d53e16389 Document what inpcb->inp_vflag is for.
Submitted by: Marco Molteni <molter@tin.it>
2002-02-25 09:41:43 +00:00
Crist J. Clark
2ca2159f22 The TCP code did not do sufficient checks on whether incoming packets
were destined for a broadcast IP address. All TCP packets with a
broadcast destination must be ignored. The system only ignored packets
that were _link-layer_ broadcasts or multicast. We need to check the
IP address too since it is quite possible for a broadcast IP address
to come in with a unicast link-layer address.

Note that the check existed prior to CSRG revision 7.35, but was
removed. This commit effectively backs out that nine-year-old change.

PR:		misc/35022
2002-02-25 08:29:21 +00:00
Jake Burkholder
3c997c536c Modify the tte format to not include the tlb context number and to store the
virtual page number in a much more convenient way; all in one piece.  This
greatly simplifies the comparison for a matching tte, and allows the fault
handlers to be much simpler due to not having to load wierd masks.
Rewrite the tlb fault handlers to account for the new format.  These are also
written to allow faults on the user tsb inside of the fault handlers; the
kernel fault handler must be aware of this and not clobber the other's
registers.  The faults do not yet occur due to other support that is needed
(and still under my desk).

Bug fixes from:	tmm
2002-02-25 04:56:50 +00:00
Bruce Evans
0c6ec4aca0 Declare time(not3) instead of depending on namespace pollution 3 layers
deep in <stand.h> to eventually include <time.h> to declare the user
version.

This is not quite the right place to declare it, but <stand.h> would
be worse because time() is very MD so it isn't in libstand.

Many places in the boot sources still get the user version using only
1 layer of pollution (#include <sys/time.h>.  Some pollute themselves
directly (#include <time.h>).  But the boot Makefiles are too broken
to enable warnings for redeclarations.
2002-02-25 04:31:25 +00:00
Bruce Evans
fa883367ab Removed mounds of unused variables. 2002-02-25 03:45:09 +00:00
Mike Smith
5da19f398a The thermal thread needs to take Giant before it does anything with the
interpreter.

Submitted by:	Magnus B{ckstr|m <b@etek.chalmers.se>
2002-02-25 02:21:22 +00:00
Ian Dowse
ddb7d629f1 Sockets passed into uipc_abort() have been allocated by sonewconn()
but never accept'ed, so they must be destroyed. Originally, unp_drop()
detected this situation by checking if so->so_head is non-NULL.
However, since revision 1.54 of uipc_socket.c (Feb 1999), so->so_head
is set to NULL before calling soabort(), so any unix-domain sockets
waiting to be accept'ed are leaked if the server socket is closed.

Resolve this by moving the socket destruction code into uipc_abort()
itself, and making it unconditional (the other caller of unp_drop()
never needs the socket to be destroyed). Use unp_detach() to avoid
the original code duplication when destroying the socket.

PR:		kern/17895
Reviewed by:	dwmalone (an earlier version of the patch)
MFC after:	1 week
2002-02-25 00:03:34 +00:00
Benno Rice
dfc02c301d Make atomic_cmpset_32 correctly return 0 on failure. 2002-02-24 23:31:49 +00:00
Alfred Perlstein
0077e8223b Fix style bugs:
Missing `const' qualifier.
Initialization in declaration.

Submitted by: mike
2002-02-24 23:24:01 +00:00
Matthew Dillon
d32e27a9f4 Tests by numerous people have shown that many chipsets do not properly
latch the acpi timer, resulting in weird deltas.  The problem is severe
enough to adversely effect the timecounter code.

Default to the 'safe' version of the get-timecount function.  The probe
will override it if a known-good chipset is found.  This is temporary
until a more complete solution is found.

Reviewed by:	phk
2002-02-24 22:58:15 +00:00
Alfred Perlstein
3f7ad4d593 bump __FreeBSD_version for usb structure rename. 2002-02-24 22:45:33 +00:00
Alfred Perlstein
b2e4739f7e 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
Poul-Henning Kamp
5b7d8efa8d 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
Poul-Henning Kamp
e9be968e95 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
David E. O'Brien
44bec8227d 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
Søren Schmidt
acf7db1110 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
Mike Smith
e941505796 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
Dag-Erling Smørgrav
a0eed7bc1c 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
Thomas Moestl
d2d45a4aa5 Fix LINT breakage by adding a missing include. 2002-02-23 22:55:47 +00:00
Jake Burkholder
b450bd2a37 Add PMAP_STATS option so pmap.c compiles. 2002-02-23 22:35:57 +00:00
Jake Burkholder
27886bcca9 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 Burkholder
4852de3022 Add needed include of ucontext.h. 2002-02-23 22:03:25 +00:00
Dag-Erling Smørgrav
649e717865 Fix namespace pollution introduced in previous commit. 2002-02-23 21:14:43 +00:00
Jake Burkholder
4d6fc96f19 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 Burkholder
e87e98c1d6 Use intr_disable/intr_restore instead of TLB_ATOMIC_START/END.
Submitted by:	tmm
2002-02-23 20:59:35 +00:00
Jake Burkholder
b7e93803fb 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 Burkholder
919f71f0fc 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 Burkholder
7cc66bde35 Add statistic gathering for various tsb operations.
Submitted by:	tmm
2002-02-23 20:11:11 +00:00
Jake Burkholder
d250bf3668 Remove debug code. 2002-02-23 20:08:06 +00:00
Jake Burkholder
b07078429e Add statistic gathering for various pmap operations.
Submitted by:	tmm
2002-02-23 20:06:19 +00:00
Jake Burkholder
ca0d9d125e 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 Burkholder
502a371561 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 Burkholder
120a25d68a 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 Burkholder
40e8552ea0 Include intr_machdep.h only for !LOCORE. 2002-02-23 18:41:34 +00:00
Jake Burkholder
4d4b329999 Add needed include of ucontext.h. Fix braino setting curpcb. 2002-02-23 18:39:09 +00:00
Jake Burkholder
47fc42e6a0 Add metadata types for dtlb and itlb data, and number of slots used. 2002-02-23 17:43:44 +00:00
Seigo Tanimura
f591779bb5 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 Burkholder
4aaca88542 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 Rice
f8e03c1093 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
Mike Smith
222c49a4c7 AcpiOsPrintf and AcpiOsVprintf now return void. 2002-02-23 05:32:51 +00:00
Mike Smith
9232a543e6 AcpiOsCallocate is no longer required. 2002-02-23 05:32:10 +00:00
Mike Smith
72e5754cfb Match namespace cleanup changes in ACPI CA 20020217 update. 2002-02-23 05:31:38 +00:00
Mike Smith
dd5d65087b 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
Mike Smith
1a6f2d2ab3 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