summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* If a proposed swap device exceeds the 8G artificial limit which outphk2003-07-181-6/+6
| | | | radix-tree code imposes, truncate the device instead of rejecting it.
* Move the implementation of the vmspace_swap_count() (used only inphk2003-07-183-64/+65
| | | | | | | | | the "toss the largest process" emergency handling) from vm_map.c to swap_pager.c. The quantity calculated depends strongly on the internals of the swap_pager and by moving it, we no longer need to expose the internal metrics of the swap_pager to the world.
* Add a new function swap_pager_status() which reports the total size of thephk2003-07-184-18/+27
| | | | | | | paging space and how much of it is in use (in pages). Use this interface from the Linuxolator instead of groping around in the internals of the swap_pager.
* Merge swap_pager.c and vm_swap.c into swap_pager.c, the separationphk2003-07-184-582/+504
| | | | | | | | | is not natural and needlessly exposes a lot of dirty laundry. Move private interfaces between the two from swap_pager.h to swap_pager.c and staticize as much as possible. No functional change.
* Correct the device identifiers for the ProATM cards.harti2003-07-181-2/+2
|
* Add some debug messages.simokawa2003-07-181-4/+6
|
* Make the 80x60, 132x25, 132x43, 132x50, and 132x60 VESA text modesrobert2003-07-181-0/+12
| | | | | | | | | | | work when using a graphics chipset which identifies itself as `VIA CLE266', used in some VIA EPIA boards. Two values need to be patched in the VESA mode information structure: the widths of the modes mentioned above are encoded in a format which was unknown to the VESA module (and to my copy of the VBE spec.) whereas the window memory segment values seem to be just incorrect. I tested this on a VIA EPIA-M9000 and -M10000.
* To avoid a kernel panic provoked by a NULL pointer dereference,robert2003-07-172-1/+8
| | | | | | | | | | | | | | | | do not clear the `sb_sel' member of the sockbuf structure while invalidating the receive sockbuf in sorflush(), called from soshutdown(). The panic was reproduceable from user land by attaching a knote with EVFILT_READ filters to a socket, disabling further reads from it using shutdown(2), and then closing it. knote_remove() was called to remove all knotes from the socket file descriptor by detaching each using its associated filterops' detach call- back function, sordetach() in this case, which tried to remove itself from the invalidated sockbuf's klist (sb_sel.si_note). PR: kern/54331
* Avoid exposing declarations for kernel variables to userland.jake2003-07-171-0/+4
| | | | PR: 54528
* Fix sigwait to conform to POSIX.davidxu2003-07-171-67/+109
| | | | | | | | | | | When a signal is being delivered to process, first find a sigwait thread to deliver, POSIX's argument is speed of delivering signal to sigwait thread is faster than other ways. A signal in its wait set will cause sigwait to return the signal number, a signal not in its wait set but in not blocked by the thread also causes sigwait to return, but sigwait returns EINTR, sigwait is oneshot operation, only one signal can be delivered to its wait set, when a signal is delivered to the sigwait thread, the thread's sigwait state is canceled.
* o Refine kse_thr_interrupt to allow it to handle different commands.davidxu2003-07-1710-134/+138
| | | | | | | o Remove TDF_NOSIGPOST. o Add a member td_waitset to proc structure, it will be used for sigwait. Tested by: deischen
* Correct six return statements which returned zero instead ofrobert2003-07-171-9/+10
| | | | | | | | | | an appropriate error number after a failure condition. In particular, three of the changed statements return ESRCH for a failed pfind(), and in also three places a non-zero return from p_cansee() will be passed back, Also noticed by: rwatson
* Make sure that SWP_NPAGES always has the same value in all sourcephk2003-07-172-7/+5
| | | | | | | | | | | files, so that SWAP_META_PAGES does not vary either. swap_pager.c ended up with a value of 16, everybody else 8. Go with the 16 for now. This should only have any effect in the "kill processes because we are out of swap" scenario, where it will make some sort of estimate of something more precise.
* Style(9) cleanup. There was no consistent style in this driver, andmarkm2003-07-177-912/+830
| | | | | | | The next round of commits will be to fix up locking in it. This lot is to at least give a consistent base to work off. OK'ed by: imp, mdodd
* Fix a bogon in the previous commit. When suppressing multiple isabjhb2003-07-171-1/+1
| | | | | | devices, we have to allow for the case when the isab0 device is ourselves. Tested by: markm
* Correct comments to indicate that the EM_RADV and EM_TADV parametersjdp2003-07-171-2/+2
| | | | are not applicable to the 82544.
* Now that the dust has settled, make dflt_lock() always panic.scottl2003-07-171-4/+0
|
* Add quirk entry for IntelligentStick disc-on-key USB devices.thomas2003-07-171-0/+8
| | | | | | | Reported by Samuel Tardieu <sam@rfc1149.net>. Reviewed by: roberto MFC after: 1 week
* The card resets the S/Uni chip when it is resetted. Thereforharti2003-07-171-0/+5
| | | | | we need to reinitialize the PHY after the call to reset when stopping the interface.
* Drop Giant around syncache timer processing.hsu2003-07-171-1/+1
|
* Fix umtx locking, for libthr, in the kernel.mtm2003-07-172-24/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. There was a race condition between a thread unlocking a umtx and the thread contesting it. If the unlocking thread won the race it may try to wakeup a thread that was not yet in msleep(). The contesting thread would then go to sleep to await a wakeup that would never come. It's not possible to close the race by using a lock because calls to casuptr() may have to fault a page in from swap. Instead, the race was closed by introducing a flag that the unlocking thread will set when waking up a thread. The contesting thread will check for this flag before going to sleep. For now the flag is kept in td_flags, but it may be better to use some other member or create a new one because of the possible performance/contention issues of having to own sched_lock. Thanks to jhb for pointing me in the right direction on this one. 2. Once a umtx was contested all future locks and unlocks were happening in the kernel, regardless of whether it was contested or not. To prevent this from happening, when a thread locks a umtx it checks the queue for that umtx and unsets the contested bit if there are no other threads waiting on it. Again, this is slightly more complicated than it needs to be because we can't hold a lock across casuptr(). So, the thread has to check the queue again after unseting the bit, and reset the contested bit if it finds that another thread has put itself on the queue in the mean time. 3. Remove the if... block for unlocking an uncontested umtx, and replace it with a KASSERT. The _only_ time a thread should be unlocking a umtx in the kernel is if it is contested.
* Fix the ski loader, broken by the gcc upgrade. Update the linkermarcel2003-07-178-262/+230
| | | | | | script to match the one for the EFI loader and rewrite __start() in assembly to have gp defined without getting in the way of the compiler.
* Have the linker script look more like the default linker scriptmarcel2003-07-172-92/+78
| | | | | on ia64. This fixes the breakage caused by the gcc upgrade that resulted in a broken executable.
* Change the style of the english used to print accounting enabledbmilekic2003-07-161-2/+2
| | | | | | | and disabled. This means no period at the end and changing "Process accounting <foo>" to "Accounting <foo>". Pointed out by: bde
* seems like i386 && DIAGNOSTIC needs sys/proc.hjmg2003-07-161-0/+1
| | | | Noticed by: tinderbox
* Nuke the declaration of a function which was not implemented.truckman2003-07-161-1/+0
|
* Log process accounting activation/deactivation.bmilekic2003-07-161-0/+2
| | | | | | | Useful for some auditing purposes. Submitted by: Christian S.J. Peron <maneo@bsdpro.com> PR: kern/54529
* add missing machine/bus.h that is necessary to build now that usb is bus_dmajmg2003-07-161-0/+1
| | | | aware.
* add missing machine/bus.h headers that are now necessary because of thejmg2003-07-166-0/+6
| | | | bus_dma addition.
* change CLASS depending upon __ELF_WORD_SIZE. This is necessary ifjmg2003-07-161-1/+5
| | | | someone wants to try to run 32bit binaries on sparc64.
* Rearrange the SYSINIT order to call lockmgr_init() earlier so thattruckman2003-07-163-29/+6
| | | | | | the runtime lockmgr initialization code in lockinit() can be eliminated. Reviewed by: jhb
* Add support for the BCM5705 and its ilk. Changes:wpaul2003-07-164-111/+325
| | | | | | | | | | | | | | | | | | | - 5705 doesn't support jumbo frames - Statistics must be read from registers - RX return ring must be capped at 512 entries - Omit initialization of certain device blocks - Acknowledge link change interrupts by setting the 'link changed' bit in the status register (used to have no effect) - Remember to toggle the MI completion bit too - Set the mbuf low watermark differently (on-chip memory buffers, not BSD mbufs) - Don't enable Ethernet@WireSpeed feature for certain 5705 chip revs - Add additional PCI IDs for 5705 and 5782 parts - Add a forgotten 5704 PCI ID Most changes ripped kicking and screaming from the Broadcom linux driver. Thanks to Paul Saab for sanity testing. (My lack of sanity has been confirmed.)
* add support for interrupt counting on sparc64. This copies part of thejmg2003-07-166-4/+125
| | | | | | | | | code from i386. The code has a slight bogon that interrupts are counted twice. Once on the ithread dispatch and once on the dispatch for the vector vmstat -i and systat -vm now contains interrupt counts. Reviewed by: jake
* make allocation of the necessary data structures most efficent by usingjmg2003-07-152-5/+5
| | | | | | a full page instead of only part of a page. Reviewed by: joe
* fix support for umass and related devices on ohci. This is a partialjmg2003-07-153-79/+151
| | | | | | | | | | | sync of the NetBSD code. fix isochornous support for ohci. This gets webcams like my OV511 working on sparc64. PR: kern/52589 Submitted by: Bruce R. Montague (isochonous support) Reviewed by: joe among others
* Allow set 31 to be used for rules other than 65535.luigi2003-07-152-23/+28
| | | | | | | | | | | | | | | Set 31 is still special because rules belonging to it are not deleted by the "ipfw flush" command, but must be deleted explicitly with "ipfw delete set 31" or by individual rule numbers. This implement a flexible form of "persistent rules" which you might want to have available even after an "ipfw flush". Note that this change does not violate POLA, because you could not use set 31 in a ruleset before this change. sbin/ipfw changes to allow manipulation of set 31 will follow shortly. Suggested by: Paul Richards
* make usb bus_dma aware.jmg2003-07-1510-102/+362
| | | | Reviewed by: joe among others
* sync w/ NetBSDjmg2003-07-152-4/+4
| | | | | | part of: revision 1.101 date: 2002/06/01 23:51:04; author: lukem; state: Exp; lines: +5 -7
* minor white space fix upjmg2003-07-151-2/+4
| | | | | | initalize itds remove extra htole32. Things don't work to well when you do htole32(htole32(var))
* Unify the "send high" and "recover" variables as specified in thehsu2003-07-155-63/+83
| | | | | | | | | | | | lastest rev of the spec. Use an explicit flag for Fast Recovery. [1] Fix bug with exiting Fast Recovery on a retransmit timeout diagnosed by Lu Guohan. [2] Reviewed by: Thomas Henderson <thomas.r.henderson@boeing.com> Reported and tested by: Lu Guohan <lguohan00@mails.tsinghua.edu.cn> [2] Approved by: Thomas Henderson <thomas.r.henderson@boeing.com>, Sally Floyd <floyd@acm.org> [1]
* Change the msleep part of EcWaitEvent to be a separate loop, fixing anjl2003-07-151-31/+42
| | | | | | | problem that for some very slow ECs (~6 ms occasionally) causes a timeout. Also finish resource cleanup in the error case in attach. Tested by: ume
* Remove old defines since they are no longer used.njl2003-07-151-12/+0
|
* Fix the ACPI_DEBUG build for the non-module case. Move the #define intonjl2003-07-152-1/+2
| | | | | | | acfreebsd.h and remove it from the Makefile. Now ACPI_DEBUG implies ACPI_DISASSEMBLER. Noticed by: marcel
* Instead of returning an error call the ioctl() handler of the interfaceharti2003-07-151-2/+5
| | | | | when we get request that we cannot handle ourself. This allows userland to reach the ATM interfaces for ioctls.
* Test the OPEN flag to see whether a VCI is already open on the hook insteadharti2003-07-151-2/+2
| | | | to look for vci != 0. We can now open VCI 0 for monitoring purposes.
* Be careful to call bus_dmamap_load with BUS_DMA_NOWAIT so that theharti2003-07-151-7/+7
| | | | | | callback will never be deferred. ATM needs to prevent cell and packet ordering. Also use the default mutex and lock functions (those that panic) for the tag creation.
* If initial thread is still a bound thread, don't change its signal mask.davidxu2003-07-152-2/+2
|
* This is a driver for IDT77252 based ATM interfaces. It has been testedharti2003-07-1515-0/+14948
| | | | | | | | | | | | | | with a ProATM-155 and an IDT evaluation board and should also work with a ProATM-25 (it seems to work at least, I cannot really measure what the card emits). The driver has been tested on i386 and sparc64, but should work an other archs also. It supports UBR, CBR, ABR and VBR; AAL0, AAL5 and AALraw. As an additional feature VCI/VPI 0/0 can be opened for receiving in AALraw mode and receives all cells not claimed by other open VCs (even cells with invalid GFC, VPI and VCI fields and OAM cells). Thanks to Christian Bucari from ProSum for lending two cards and answering my questions.
* Remove three unneccessary comparisons that were always true.harti2003-07-151-6/+0
| | | | Spotted by: gcc
* Implement an utility function that can be used by device drivers toharti2003-07-152-0/+59
| | | | | | | implement the ATMIOCGVCCS ioctls. This routine handles changing VCC tables (which can occure because we cannot hold the driver mutex while allocating memory) with a loop and a re-allocation, should the table not fit in the allocated memory.
OpenPOWER on IntegriCloud