Commit Graph

78126 Commits

Author SHA1 Message Date
Konstantin Belousov
13cedde2cb Regenerate 2010-06-28 18:17:21 +00:00
Konstantin Belousov
0d9d996d39 Despite system call deregistration drains the threads executing System V
shm syscalls, and initial check for the number of allocated segments
in the module deinitialization code, the following might happen:
   after the check for active segment, while waiting for threads to
   leave some other syscall, shmget(2) is called. Then, we can end
   up with the shared segment that cannot be detached since sysvshm
   module is unloaded.

Prevent the leak by rechecking and disclaiming a reference to the vm
object owned by sysvshm module, that might have grown during the drain.

Tested by:	pho
Reviewed by:	jhb
MFC after:	1 month
2010-06-28 18:12:42 +00:00
Konstantin Belousov
153ac44cf6 Count number of threads that enter and leave dynamically registered
syscalls. On the dynamic syscall deregistration, wait until all
threads leave the syscall code. This somewhat increases the safety
of the loadable modules unloading.

Reviewed by:	jhb
Tested by:	pho
MFC after:	1 month
2010-06-28 18:06:46 +00:00
Konstantin Belousov
dc2db34f42 Use C99 initializers for the struct sysent generated by MAKE_SYSENT().
MFC after:	1 week
2010-06-28 17:59:45 +00:00
Attilio Rao
b2488fc159 Fix a lock leak in the deadlock resolver in case the ticks counter
wrapped up.

Sponsored by:	Sandvine Incorporated
Submitted by:	pluknet <pluknet at gmail dot com>
Reported by:	Anton Yuzhaninov <citrin at citrin dot ru>
Reviewed by:	jhb
MFC after:	3 days
2010-06-28 17:45:00 +00:00
Jaakko Heinonen
bc96d3d17a Correct a comment typo. 2010-06-27 12:19:09 +00:00
Rui Paulo
cb3fbd1b92 Fix typo introduced in previous revision. 2010-06-27 10:17:11 +00:00
Pawel Jakub Dawidek
3297cdd096 Correct arguments order. 2010-06-26 21:44:45 +00:00
Rui Paulo
fcfe3ad480 Fix the AR_SREV_MERLIN_20_OR_LATER() check.
Submitted by:	Alex Kozlov <spam at rm-rf.kiev.ua>
MFC after:	2 weeks
2010-06-26 20:59:10 +00:00
Michael Tuexen
e1c97831ec * Do not dereference a NULL pointer when calling an SCTP send syscall
not providing a destination address and using ktrace.
* Do not copy out kernel memory when providing sinfo for sctp_recvmsg().
Both bug where reported by Valentin Nechayev.
The first bug results in a kernel panic.
MFC after: 3 days.
2010-06-26 19:26:20 +00:00
Rui Paulo
c6b2b6fce6 Add NTFS partition type to GEOM_MBR. 2010-06-26 13:20:40 +00:00
Rui Paulo
bbe4a97d41 Import the acpi_aibs(4) driver written by Constantine A. Murenin.
It has more features than acpi_aiboost(4) and it will eventually replace
acpi_aiboost(4).

Submitted by:	Constantine A. Murenin <cnst at FreeBSD.org>
Reviewed by:	freebsd-acpi, imp
MFC after:	1 month
2010-06-25 15:32:46 +00:00
George V. Neville-Neil
5ea4d522bb Make sure that all the exposed counters and variables are actually
being updated.

Pointed out by:	jfv
2010-06-24 21:17:58 +00:00
Jayachandran C.
4fddb8ed6f Add linker script and configuration file for n32 kernel.
Approved by:	rrs (mentor)
2010-06-24 10:14:31 +00:00
Jayachandran C.
9fa0972cf9 Merge jmallett@'s n64 work into HEAD - changeset 7
Initial support for n32 and n64 ABIs from
http://svn.freebsd.org/base/user/jmallett/octeon

Changes are:
 - syscall, exception and trap support for n32/n64 ABIs
 - 64-bit address space defines
 - _jmp_buf for n32/n64
 - casts between registers and ptr/int updated to work on n32/n64

Approved by:	rrs(mentor), jmallett
2010-06-24 08:08:43 +00:00
Michael Tuexen
370d524f00 Fix a bug I introduced in r209470.
MFC after: 3 days
2010-06-24 07:43:25 +00:00
Marcel Moolenaar
bcec9ed0f1 Assign PCI intline values for ISA interrupts using the new INTR_VEC()
macro.
2010-06-24 05:49:58 +00:00
Marcel Moolenaar
ed571bca9f Remove debugging printf() -- that is, I assume it was for debugging :-) 2010-06-24 05:47:00 +00:00
Adrian Chadd
7107f92fd6 Comment about the shared pins I know about. 2010-06-24 05:17:21 +00:00
Marcel Moolenaar
ec120b9476 Pass the device_t of the AT PIC driver to atpic_intr() so that
we don't have to use a global variable. Pass a NULL frame pointer
to the dispatch function just like openpic(4).
2010-06-24 05:05:18 +00:00
Nathan Whitehorn
bcebf6a165 Reverse the logic of the if statement that sets the default value of
HZ; the list of 1000 Hz platforms was getting unwieldy.

Suggested by:	marcel
2010-06-24 00:27:20 +00:00
Jung-uk Kim
28ef508f86 Use M_WAITOK for VESA BIOS initialization consistently. 2010-06-23 23:34:56 +00:00
Nathan Whitehorn
e864acd42f Move default HZ from 100 to 1000 on powerpc.
Reviewed by:	marcel
MFC after:	2 weeks
2010-06-23 23:26:14 +00:00
Marcel Moolenaar
79312a0b25 With openpic(4) using active-low as the default polarity, reconfigure
the internal interrupt sources as active-high. The internal interrupt
sources are disabled when programmed as active-low.

Note that the internal interrupts have no sense bit like the external
interrupts. We program them as edge-triggered to make sure we write a
0 value to a reserved register. It does not in any way say anything
about the sense of internal interrupt.
2010-06-23 23:16:27 +00:00
Nathan Whitehorn
08393b3efa Configure interrupts on SMP systems to be distributed among all online
CPUs by default, and provide a functional version of BUS_BIND_INTR().
While here, fix some potential concurrency problems in the interrupt
handling code.
2010-06-23 22:33:03 +00:00
Marcel Moolenaar
bd077006c0 In the attach method, refactor to take into account that
BUS_GET_RESOURCE_LIST() can return a NULL pointer -- and
will for MPC85xx kernels.
2010-06-23 22:25:52 +00:00
Konstantin Belousov
595473a587 Clear DF bit in eflags/rflags on the kernel entry. The i386 and amd64
ABI specifies the DF should be zero, and newer compilers do not clear
DF before using DF-sensitive instructions.

The DF clearing for signal handlers was done some time ago.

MFC after:	1 week
2010-06-23 20:44:07 +00:00
Jayachandran C.
78fe0672b6 Merge jmallett@'s n64 work into HEAD - changeset 6
PTE flag cleanup from http://svn.freebsd.org/base/user/jmallett/octeon
- Rename PTE_xx flags to match their MIPS names
- Use the new pte_set/test/clear macros uniformly, instead of a mixture
  of mips_pg_xxx(), pmap_pte_x() macros and direct access.
- Remove unused macros and defines from pte.h and pmap.c

Discussed on freebsd-mips@

Approved by:	rrs(mentor), jmallett
2010-06-23 19:42:01 +00:00
Jung-uk Kim
362487c0ba Let x86bios_alloc() pass contigmalloc(9) flags. Use it to set M_WAITOK
from VESA BIOS initialization.  All other malloc(9) uses in the function is
blocking any way.
2010-06-23 17:20:51 +00:00
Michael Tuexen
749c49ac62 * Implement sctp_does_stcb_own_this_addr() correclty. It was taking the
wrong side into account.
* sctp_findassociation_ep_addr() must check the local address if available.
This fixes a bug where ABORT chunks were accepted even in the case where
the local was not owned by the endpoint.
Thanks to brucec for pointing out a bug in my first version of the fix.
MFC after: 3 days
2010-06-23 15:19:07 +00:00
Rebecca Cran
10eee561f4 Add some more modules to loader.conf. Remove if_awi since support for it
was removed 2 years ago.

PR: conf/147126
PR: conf/116071
Approved by: rrs (mentor)
2010-06-23 14:06:05 +00:00
Konstantin Belousov
692add74d8 Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also,
note that usercontext is not initialized anymore in fpstate_drop().

Systematically replace references to npxgetregs() and npxsetregs()
by npxgetuserregs() and npxsetuserregs() in comments.

Noted by:	bde
2010-06-23 12:17:13 +00:00
Konstantin Belousov
1060a94fb5 After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by:	bde
Tested by:	pho
2010-06-23 11:21:19 +00:00
Konstantin Belousov
699d648aab Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by:	bde
Tested by:	pho (previous version)
2010-06-23 11:12:58 +00:00
Konstantin Belousov
95882b9865 Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by:	bde
Tested by:	pho (previous version)
2010-06-23 10:40:28 +00:00
Alexander Motin
926911c8ff Do not trust IRQ reported by ACPI. There are cases when it is wrong. 2010-06-23 05:43:21 +00:00
Adrian Chadd
e3ded4845c AR71XX GPIO register definitions.
Reviewed by:	gonzo@
2010-06-23 03:59:26 +00:00
Andrew Thompson
e3e05e50d9 - fix for USB audio devices which use the 7-byte endpoint descriptor instead of
the 9-byte one.
- remove sync-endpoint code, which is currently unused.

Reported by:	Antun Matanovi
Submitted by:	Hans Petter Selasky
2010-06-22 21:16:18 +00:00
Andrew Thompson
3851442c61 Reduce MIDI input buffer size to one USB packet, hence some USB devices don't
properly short terminate their transfers. This fixes a problem where input
appears several seconds late.

Reported by:	Alexander Yerenkow
Submitted by:	Hans Petter Selasky
2010-06-22 21:13:36 +00:00
Andrew Thompson
33ba3721c9 Add new device id.
PR:		usb/147190
2010-06-22 21:08:45 +00:00
Andrew Thompson
0f66567792 Add a mass storage quirk.
PR:		usb/147196
2010-06-22 21:03:13 +00:00
Andrew Thompson
8f55d259c2 Add new device id.
PR:		usb/146907
2010-06-22 21:01:40 +00:00
Andrew Thompson
a4cadedb58 Add support for LOW speed BULK transfers. This mode is not recommended by the
USB 2.0 standard, though some USB devices use it anyway.

Submitted by:	Hans Petter Selasky
2010-06-22 20:57:48 +00:00
Andrew Thompson
ca9d2489c6 Add missing opt_compat.h dependency.
Found by:	Garrett Cooper
2010-06-22 20:52:35 +00:00
Alexander Motin
49ed68bbf3 Add "legacy route" support to HPET driver. When enabled, this mode makes
HPET to steal IRQ0 from i8254 and IRQ8 from RTC timers. It can be suitable
for HPETs without FSB interrupts support, as it gives them two unshared
IRQs. It allows them to provide one per-CPU event timer on dual-CPU system,
that should be suitable for further tickless kernels.

To enable it, such lines may be added to /boot/loader.conf:
hint.atrtc.0.clock=0
hint.attimer.0.clock=0
hint.hpet.0.legacy_route=1
2010-06-22 19:42:27 +00:00
Alexander Motin
25eb1b8c15 Some style fixes for r209371.
Submitted by:	jhb@
2010-06-22 16:20:10 +00:00
Alexander Motin
e723056a58 Do not set level-triggered interrupt mode if we are not going to use it.
This fixes QEMU crash due to unsupported level-triggered HPET interrupts.

Reported by:	kib@
2010-06-22 16:10:48 +00:00
Andriy Gapon
12b3a08d09 udf_vnops: cosmetic followup to r208671 - better looking code
Suggested by:	jhb
MFC after:	3 days
2010-06-22 08:22:25 +00:00
Alan Cox
91b4f42767 Introduce vm_page_next() and vm_page_prev(), and use them in
vm_pageout_clean().  When iterating over a range of pages, these functions
can be cheaper than vm_page_lookup() because their implementation takes
advantage of the vm_object's memq being ordered.

Reviewed by:	kib@
MFC after:	3 weeks
2010-06-21 23:27:24 +00:00
Alexander Motin
6519968e59 "time lock" is no longer a spin-lock since r209371.
Reported by:	kib@
2010-06-21 21:15:51 +00:00