Commit Graph

120470 Commits

Author SHA1 Message Date
David Xu
1a2d6e30c8 o Add some pad fields into struct sigevent for future extension.
(suggested by alfred@)
o Reuse si_band field in struct __siginfo, add a mqd member which will
  be used by mqueue.
o Add code SI_KERNEL to indicate a signal is queued by kernel.
2005-12-06 06:02:35 +00:00
David Xu
027f760408 Fix a lock leak in childproc_continued(). 2005-12-06 05:30:13 +00:00
Yaroslav Tykhiy
0ce3dc049a Since rc.subr is a library of functions, it should not use exit
every now and then.  It is up to the caller to choose a proper
action upon an error condition.  Therefore, use return, not exit,
except for some special cases.

Consistently return 1 to indicate an error.

Submitted by:	sem (initially)
Reviewed by:	freebsd-rc (silence)
MFC after:	2 weeks
2005-12-06 05:27:11 +00:00
Jung-uk Kim
ae275efcae Add experimental BPF Just-In-Time compiler for amd64 and i386.
Use the following kernel configuration option to enable:

	options BPF_JITTER

If you want to use bpf_filter() instead (e. g., debugging), do:

	sysctl net.bpf.jitter.enable=0

to turn it off.

Currently BIOCSETWF and bpf_mtap2() are unsupported, and bpf_mtap() is
partially supported because 1) no need, 2) avoid expensive m_copydata(9).

Obtained from:	WinPcap 3.1 (for i386)
2005-12-06 02:58:12 +00:00
Peter Wemm
7bb2af36b7 Fix ypwhich -m. This should be MFC'ed back at least as far as RELENG_5.
Submitted by: Gil Kloepfer <gil@arlut.utexas.edu>
PR: 64445
2005-12-06 02:01:06 +00:00
Warner Losh
7640c87195 The Oxford 16C950 based CardBus Serial device that I was given some
time ago appears to be based not on the typical 1.8432MHz clock, or
the other more typical multiple of 8 of this (14.7456MHz), but instead
it appears to be 1/2 the PCI clock rate or 16.50000MHz.  I'm not 100%
sure that this is right, but since I did the original entry, I'm going
to go ahead and modify it.  With the 14.7456MHz value, I was getting
bits that were ~7.3us instead of ~8.6us like they are supposed to be.

My measuring gear for today is a stupid handheld scope with two
signficant digits.  So I don't know if it is 33.000000/2 MHz or some
other value close to 16.5MHz, but 16.5MHz works well enough for me to
use a couple of different devices at 115200 baud, and is a nice even
multiple of a well known clock frequency...
2005-12-05 23:30:28 +00:00
Scott Long
71bb1f9b0c More review and adjustment for reality that should have happened 3 years
ago.  Document the real behavior of bus_dma_tag_create, bus_dmamap_load,
and other functions.  Also document their arguments and return values.

MFC After: 3 days
2005-12-05 23:25:59 +00:00
John Baldwin
2dce95a085 Change the i386 code to pass the interrupt vector as a separate argument
rather than embedding it in the intrframe as if_vec.  This reduces diffs
with amd64 somewhat.
- Remove cf_vec from clockframe (it wasn't used anyway) and stop pushing
  dummy vector arguments for ipi_bitmap_handler() and lapic_handle_timer()
  since clockframe == trapframe now.
- Fix ddb to handle stack traces across interrupt entry points that just
  have a trapframe on their stack and not a trapframe + vector.
- Change intr_execute_handlers() to take a trapframe rather than an
  intrframe pointer.
- Change lapic_handle_intr() and atpic_handle_intr() to take a vector and
  trapframe rather than an intrframe.
- GC struct intrframe now that nothing uses it anymore.
- GC CLOCK_TO_TRAPFRAME() and INTR_TO_TRAPFRAME().

Reviewed by:	bde
Requested by:	peter
2005-12-05 22:39:09 +00:00
Scott Long
dc7a8b0067 FreeBSD has had endian conversion macros for a long time. Axe the custom
macros in this driver.

MFC After: 3 days
2005-12-05 22:37:37 +00:00
Søren Schmidt
b39424ba7a Dont use the BUS_DMA_ALLOCNOW flag. Instead use BUS_DMA_NOWAIT and return
ENOMEM to the upper layers if we run out of memory.

This solves part of the trouble with running on >4GB memory systems.
2005-12-05 22:31:55 +00:00
John Baldwin
f0b9813920 - Move the code to deal with handling an IPI_STOP IPI out of
ipi_nmi_handler() and into a new cpustop_handler() function.  Change
  the Xcpustop IPI_STOP handler to call this function instead of
  duplicating all the same logic in assembly.
- EOI the local APIC for the lapic timer interrupt in C rather than
  assembly.
- Bump the lazypmap IPI counter if COUNT_IPIS is defined in C rather than
  assembly.
2005-12-05 22:25:41 +00:00
John Baldwin
7e70788a5c Remove unused local variable misssed in previous commit. 2005-12-05 22:20:23 +00:00
Sam Leffler
a196b35f08 correct handling of dtim for periods > 1
Obtained from:	madwifi
2005-12-05 22:14:13 +00:00
John Baldwin
ac7326e338 Don't panic if IRQ 13 doesn't exist. On some machines (see previous
commit to atpic.c) there may not be an IRQ 13.  Instead, just keep going.
If the INT16 interface doesn't work then we will eventually panic anyway.

FWIW: We could probably just axe the support for IRQ 13 altogether at this
point.  The only thing we'd lose support for are 486sx systems with
external 487 FPUs.

MFC after:	1 week
2005-12-05 22:11:44 +00:00
Jesus R. Camou
d0057d3576 Fix a couple typos.
PR:		docs/89881
Submitted by:	Seán Farley <sean-freebsd@farley.org>
Approved by:	trhodes (mentor)
MFC after:	3 days
2005-12-05 22:10:09 +00:00
John Baldwin
5ae84c09e7 Really slam the door on mixed mode now that we don't depend on it for a
working IRQ0 with APIC anymore.  Previously, it was possible to have
some other ATPIC IRQS "leak" through in a few edge cases.  For example, on
my x86 test machine, ACPI re-routes the SCI (IRQ 9) to intpin 13 on the
first I/O APIC.  This leaves a hole for IRQ 13 (since the APIC doesn't
provide a source for IRQ 13 in that case) with the result that the ATPIC
IRQ13 source was registered instead.  This changes the 8259A drivers to
only register their interrupt sources if none of the 16 ISA IRQs have an
interrupt source already installed.

MFC after:	1 week
2005-12-05 22:09:30 +00:00
John Baldwin
48c8cbcb82 - Move PUSH_FRAME and POP_FRAME into machine/asmacros.h.
- Add a new SET_KERNEL_SREGS macro that sets up %ds and %es to point to
  kernel data and %fs to point to per-CPU data and use the new macro
  in several kernel entry points including trap and interrupt handlers.
- Convert the IPI_STOP handler Xcpustop to push a standard trap frame
  rather than an application frame.
- Make the TRAP() macro private to exception.s since it is only used
  there.
- Move the PCPU_*() macros in asmacros.h out of the middle of the
  profiling macros.

Reviewed by:	bde
Requested by:	bde (4, 5)
2005-12-05 21:44:47 +00:00
John Baldwin
5714e9ea59 - Don't make the driver lock recursive, it shouldn't be recursively
acquired anywhere in the driver now.
- Axe the spin mutex used for the nve_oslock*() routines.  The driver lock
  already provides sufficient synchronization.
- Don't mess around with IFF_UP when the link state changes.  IFF_UP is
  an administrative flag, not a link status indicator.

MFC after:	1 week
2005-12-05 20:49:45 +00:00
John Baldwin
5d2162b2f8 Tweak witness handling of lock object to shave 2 pointers off of each
lock object (and thus off of each mutex and sx lock):
- Rename the all_locks list to pending_locks and only put locks initialized
  before SI_SUB_WITNESS on the list so that the SI_SUB_WITNESS can add them
  to witness once it starts up.
- Now that pending_locks is only used during early startup, change it from
  a TAILQ to an STAILQ.  This removes a pointer from the STAILQ_ENTRY in
  struct lock_object.
- Since the pending_locks list is only used during the single-threaded
  early boot it no longer needs to be protected by a mutex, so remove
  all_mtx.
- Since the lo_list member of struct lock_object is now only used during
  early boot before witness is running, collapse lo_list and lo_witness
  into a union.  This shaves the second pointer off of struct lock_object.
- Axe lock_cur_cnt and lock_max_cnt.

With these changes, struct mtx shrinks from 36 to 28 bytes on 32-bit
platforms and from 72 to 56 bytes on 64-bit platforms.  Note that this
commit will completely and utterly destroy the kernel ABI, so no MFC.

Tested on:	alpha, amd64, i386, sparc64
2005-12-05 20:45:24 +00:00
John Baldwin
f9959468bb If pci_link has been disabled via the acpi_disable tunable, then bail
immediately from acpi_pci_link_route_interrupt() since we aren't going
to have a valid pci_link device to talk to try to route interrupts.  This
fixes a page fault if you disable just pci_link.  Note that trying to use
ACPI without pci_link is probably not advised however.

MFC after:	1 week
Tested by:	Eugene Grosbein eugen at kuzbass dot ru
2005-12-05 19:50:00 +00:00
Tai-hwa Liang
8bfc230455 Recent nmount(2) adoption in mount_smbfs(8) did not flag the "long" option
since mount_smbfs(8) assumed long name mounting by default unless "-n long"
was explicitly specified.

Rather than supplying a "long" option in mount_smbfs(8), this commit brings
back the original behaviour by associating SMBFS_MOUNT_NO_LONG with the
"nolong" option.  This should fix the broken long file names on smbfs people
observed recently.

Reported by:	Vladimir Grebenschikov <vova at fbsd dot ru>
Reviewed by:	phk
Tested by:	Slawa Olhovchenkov <slw at zxy dot spb dot ru>
2005-12-05 19:05:06 +00:00
Christian Brueffer
74a2a2d543 Document Intel MatrixRAID write support. 2005-12-05 18:11:36 +00:00
Søren Schmidt
02268a2d11 Switch off debugging that was left on in last commit. 2005-12-05 17:58:11 +00:00
Søren Schmidt
eed08844c9 Add support for writing Intel MatrixRAID arrays.
Do a little better on handling volumes as well, however we cant create
multiple volumes from FreeBSD yet.

HW sponsored by:        Mullet Scandinavia AB
2005-12-05 17:33:57 +00:00
Joseph Koshy
7b710ab25b Document the public targets and make variables supported by the
build system.

Reviewed by:	ru (multiple passes)
2005-12-05 16:59:45 +00:00
Ruslan Ermilov
8c7a62275a Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.
Reviewed by:	nyan
2005-12-05 14:22:12 +00:00
Robert Watson
1c36ac6bc6 Add a simple KVM tool to dump the kernel state of UMA, including walking
the keg/zone lists, summarizing cache state, and walking bucket lists in
each zone.  I seem to get inconsistent results on SMP, possibly due to
local header problems, but it seems to work quite well on UP.  This tool
requires sufficient privilege to read /dev/mem (or a core dump), and is
for debugging purposes rather than administrative monitoring purposes
(use vmstat instead).
2005-12-05 13:04:00 +00:00
Olivier Houchard
5b6aaee426 Try to use contigmalloc() even if M_NOWAIT has been specified. 2005-12-05 12:58:44 +00:00
Olivier Houchard
d0cd9702ef Teach the elf trampoline how to deal with gzipped kernels. 2005-12-05 12:55:46 +00:00
Marius Strobl
802cab0330 - Rev. 1.175 fixed compilation on sparc64 but also backed out zeroing of
the eaddr array (introduced in rev. 1.174) prior to writing to it. As
  dc_read_eeprom() is told to write only 3 16-bit words to eaddr but eaddr
  in fact is somewhat larger removal of the zeroing defeated the check
  whether the MAC address is all zero as there can be some random garbage
  in eaddr past the 3 words written to it and the check verifys all bits
  in eaddr. Solve this by changing the check to verify only the 3 words
  (happenning to be ETHER_ADDR_LEN bytes) written to eaddr.
- While here change the notation of "FCode" in a nearby comment to the
  official way.

Ok'ed by:	marcel, ru
2005-12-05 12:32:20 +00:00
Ruslan Ermilov
342ed5d948 Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.
2005-12-05 11:58:35 +00:00
David Xu
52cf88e2ef Fix markup.
Submitted by: ru
2005-12-05 09:31:49 +00:00
David Xu
afcf37b05c Fix markup. 2005-12-05 09:31:23 +00:00
Craig Rodrigues
1bcf331236 Bump __FreeBSD_version to reflect removal of MNT_NODEV mount option.
Requested by:	marcus
2005-12-05 09:13:35 +00:00
Stefan Farfeleder
45244a5d13 Add an MLINKS entry for times.1.
Noticed by:	ru
2005-12-05 08:01:10 +00:00
Doug Barton
b37ccb58ef Change how *.sh scripts are handled. If the script is in /etc/rc.d,
source it into the shell. If not, handle it in a subshell the same
way that "real" rc.d-style scripts are handled. This will dramatically
ease the "process local scripts in the base rcorder" transition.

Add *.bak to the list of files in */rc.d that we ignore.
2005-12-05 07:04:15 +00:00
Doug Barton
dbc1cd4c36 Canonify, correct, and add citations related to Douglas Adams' work.
Correct a quotation from Hitchhiker's.
2005-12-05 06:47:23 +00:00
David Xu
ae43b1a8a7 Add document about mqueuefs. 2005-12-05 05:18:23 +00:00
David Xu
8c1e5ef215 Document SIGEV_NONE and SIGEV_SIGNAL. 2005-12-05 04:44:39 +00:00
David Xu
052ea11c71 After reading some documents, I realized SIGEV_NONE != NULL, also
fix code in mqueue_send_notification to handle SIGEV_NONE.
2005-12-05 04:41:32 +00:00
David Xu
9947b45978 Handle SIGEV_NONE, if notification is SIGEV_NONE, error status and
return status will be set, but no notification will be registered.
Increase hard limit of maxmsg to 100, so posixtestsuite ports can run.
2005-12-05 03:23:27 +00:00
Florent Thoumie
645cf3805a - Add Product IDs for iPod 3G and iPod Video.
- Add an USB quirk for iPods, da(4) devices are now successfully created.

Approved by:	ssouhlal
MFC after:	1 week
2005-12-05 01:51:28 +00:00
Alan Cox
717f7d5962 Simplify vmspace_dofree(). 2005-12-04 22:55:41 +00:00
Stefan Farfeleder
7162e01ce9 Sort. 2005-12-04 20:01:48 +00:00
Stefan Farfeleder
435323ed25 Remove a few commented out builtins from the original ash. The files
implementing them were never part of FreeBSD.
2005-12-04 19:37:07 +00:00
Stefan Farfeleder
aeca3a4d15 Add the times builtin. 2005-12-04 18:59:34 +00:00
Stefan Farfeleder
1974986a82 Add the times builtin. It reports the user and system time for the shell
itself and its children.  Instead of calling times() (as implied by POSIX) this
implementation directly calls getrusage() to get the times because this is more
convenient.
2005-12-04 18:44:21 +00:00
Philip Paeps
5df9daab27 Catch up with 64bit time_t on sparc64. The rstat packet expects a 32bit
time_t and times will look incorrect on machines with 64bit time_t.

PR:		88788
Submitted by:	Keith White <Keith.White -at- site.uottawa.ca>
MFC after:	1 week
2005-12-04 18:25:26 +00:00
Bruce A. Mah
7f6ff3fe2f Add Sony TJ37 to the uvisor manpage.
Prompted by:	simon
MFC after:	1 week
2005-12-04 15:44:54 +00:00
Bruce Evans
0f06be5a4d Fixed the approximation to pio4. pio4_hi must be pio2_hi/2 since it
shares its low half with pio2_hi.  pio2_hi is rounded down although
rounding to nearest would be a tiny bit better, so pio4_hi must be
rounded down too.  It was rounded to nearest, which happens to be
different in float precision but the same in double precision.

This fixes about 13.5 million errors of more than 1 ulp in asinf().
The largest error was 2.81 ulps on amd64 and 2.57 ulps on i386 -O1.
Now the largest error is 0.93 ulps on amd65 and 0.67 ulps on i386 -O1.
2005-12-04 13:52:46 +00:00