aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add geom_uzip -- geom class that implements read-only compressed disks.Max Khon2004-08-136-0/+535
| | | | | | | | Currently supports cloop V2.0 disk compression format. May support more formats in future. Notes: svn path=/head/; revision=133640
* Allow the use of a supplied function to set the PRD table. This isSøren Schmidt2004-08-133-39/+31
| | | | | | | needed for new chips that supports 64bit addressing. Notes: svn path=/head/; revision=133637
* Replace the linear search in vm_map_findspace() with an O(log n)Alan Cox2004-08-132-98/+213
| | | | | | | | | | | | | | | | | | | | | | | | algorithm built into the map entry splay tree. This replaces the first_free hint in struct vm_map with two fields in vm_map_entry: adj_free, the amount of free space following a map entry, and max_free, the maximum amount of free space in the entry's subtree. These fields make it possible to find a first-fit free region of a given size in one pass down the tree, so O(log n) amortized using splay trees. This significantly reduces the overhead in vm_map_findspace() for applications that mmap() many hundreds or thousands of regions, and has a negligible slowdown (0.1%) on buildworld. See, for example, the discussion of a micro-benchmark titled "Some mmap observations compared to Linux 2.6/OpenBSD" on -hackers in late October 2003. OpenBSD adopted this approach in March 2002, and NetBSD added it in November 2003, both with Red-Black trees. Submitted by: Mark W. Krentel Notes: svn path=/head/; revision=133636
* looks like rwatson forgot tabs... :)John-Mark Gurney2004-08-131-2/+2
| | | | Notes: svn path=/head/; revision=133635
* Move PNP IDs back into oldcard filesWarner Losh2004-08-133-2/+13
| | | | Notes: svn path=/head/; revision=133632
* MPSAFE lockingNate Lawson2004-08-132-4/+40
| | | | | | | | | * Serialize access to the sysctl routines and the notify handler * Assert that the sx lock is held in any functions they call. * Note that recursively calling to re-enable the hotkeys is sub-optimal. Notes: svn path=/head/; revision=133630
* MPSAFE lockingNate Lawson2004-08-132-4/+30
| | | | | | | | * Serialize access to the sysctl routines and the notify handler * Assert that the sx lock is held in any functions they call. Notes: svn path=/head/; revision=133629
* MPSAFE lockingNate Lawson2004-08-132-0/+20
| | | | | | | * Serialize access to the sysctl routines and the notify handler. Notes: svn path=/head/; revision=133628
* MPSAFE lockingNate Lawson2004-08-131-38/+9
| | | | | | | | | * Simplify taskqueue locking. * Don't acquire Giant around calls to the taskqueue function. * Remove 4.x compatibility routines. Notes: svn path=/head/; revision=133627
* MPSAFE lockingNate Lawson2004-08-131-22/+2
| | | | | | | | | | * Remove the interrupt wrapper that locked Giant and call the handler directly. Mark the handler as MPSAFE. * Don't attempt to detect if a handler is installed. Leave that to the bus_alloc_resource() function. Notes: svn path=/head/; revision=133626
* MPSAFE lockingNate Lawson2004-08-131-24/+48
| | | | | | | | | | | * Serialize operations in acpi_video_bind_outputs(), acpi_video_detach(), acpi_video_notify_handler(), acpi_video_power_profile(), and the sysctls. The main goal is to protect the shared device list and prevent conflicting settings. * Add assertions that the sx lock is held in the leaf functions. Notes: svn path=/head/; revision=133625
* MPSAFE lockingNate Lawson2004-08-131-120/+108
| | | | | | | | | | | | | | | | * Restructure the event handling path. acpi_tz_thread() now calls acpi_tz_timeout() any time an event occurs. acpi_tz_timeout() checks the flags and calls acpi_tz_power_profile(), acpi_tz_establish(), and acpi_tz_monitor() as appropriate. Notifies only do a wakeup and let acpi_tz_thread() do the actual work. This path is cleaner and allows locking since the call path is now always a D.A.G. * Add the acpi_tz_signal() function to set flags and wake the thread. * Remove the tz_tmp_updating flag since calls are serialized by acpi_tz_thread(). * Remove Giant locking. Notes: svn path=/head/; revision=133624
* MPSAFE locking: Add a comment that we need resource list and device_tNate Lawson2004-08-131-0/+1
| | | | | | | refcounting/locking. Notes: svn path=/head/; revision=133623
* MPSAFE lockingNate Lawson2004-08-131-33/+55
| | | | | | | | | | | * Serialize acpi_pwr_switch_consumer() and acpi_pwr_wake_enable(). * Make acpi_pwr_switch_consumer() have a single exit point. * Add assertions to the leaf functions they call. * Fix a memory leak in acpi_pwr_deregister_consumer(). However, it is currently ifdefed out so this code was unused. Notes: svn path=/head/; revision=133622
* MPSAFE lockingNate Lawson2004-08-131-0/+9
| | | | | | | | * Serialize calls to acpi_pcib_route_interrupt(). * Note that acpi_pcib_attach() should not be called concurrently. Notes: svn path=/head/; revision=133621
* MPSAFE lockingNate Lawson2004-08-131-6/+27
| | | | | | | | | * Serialize access to acpi_pci_link_config(), acpi_pci_find_prt(), acpi_pci_link_route(), and acpi_pci_link_resume(). * Add lock assertions to all functions called by them. Notes: svn path=/head/; revision=133620
* MPSAFE lockingNate Lawson2004-08-131-4/+10
| | | | | | | * Serialize access to acpi_pci_set_powerstate_method(). Notes: svn path=/head/; revision=133619
* MPSAFE lockingNate Lawson2004-08-131-15/+33
| | | | | | | | | | * Serialize notifying the user in acpi_lid_notify_status_changed(). This way multiple lid events occur in order. * Add an initialization pass to get the lid status at boot-time. This pass does not notify any apps but gets the initial status. Notes: svn path=/head/; revision=133618
* MPSAFE lockingNate Lawson2004-08-131-21/+19
| | | | | | | | | * Use the common serialization macros instead of rolling our own. * Increase the coverage of the lock in EcSpaceHandler() to cover the entire loop to avoid dropping the lock when reading more than one byte. Notes: svn path=/head/; revision=133617
* MPSAFE lockingNate Lawson2004-08-131-15/+14
| | | | | | | | * Hold the ACPI lock over table register writes. * Serialize calls to acpi_cpu_throttle_set() and the sysctls. Notes: svn path=/head/; revision=133616
* MPSAFE lockingNate Lawson2004-08-131-171/+127
| | | | | | | | | | | | | | | | * Serialize ops in acpi_cmbat_notify_handler(), acpi_cmbat_ioctl(), acpi_cmbat_init_battery(), and acpi_cmbat_get_battinfo(). * Get the softc directly in acpi_cmbat_get_total_battinfo() rather than build an array of them. * Don't queue a _BIF query after receiving a notify. Since we clear the timespec, a _BIF query will be done in the context of the next caller. * Add asserts to leaf functions that operate on shared data. * Remove the bst/bif updating flags now that we hold the lock over the full query. * Explain various comments in more detail. Notes: svn path=/head/; revision=133615
* MPSAFE lockingNate Lawson2004-08-131-36/+53
| | | | | | | | | | * Serialize acpi_battery_get_battdesc(), acpi_battery_register(), and acpi_battery_remove(). * Assert that the sx lock is held in acpi_batteries_init(). * Remove check for device_get_softc() returning NULL. Notes: svn path=/head/; revision=133614
* MPSAFE lockingNate Lawson2004-08-131-30/+16
| | | | | | | | | | * Serialize notification of acline changes in acpi_acad_get_status(). * Remove the initializing flag. With the locking, we don't need to push off requests for the acline before initialization is done. * Don't check device_get_softc(), it can't return NULL. Notes: svn path=/head/; revision=133613
* MPSAFE lockingNate Lawson2004-08-131-35/+79
| | | | | | | | | | | | | | | | | | * Serialize calls to acpi_alloc_resource(), acpi_release_resource(), acpi_Enable(), acpi_Disable(), and acpi_debug_sysctl(). * Acquire the ACPI mutex in acpi_register_ioctl(), acpi_deregister_ioctl(), and acpiioctl(). * Acquire the mutex while disabling subsequent requests to enter a sleep state in acpi_SetSleepState(). * Be sure to re-enable sleep requests and don't run resume methods when the current request fails. * Don't check if sleep requests are disabled in the ACPIIO_SETSLPSTATE ioctl. acpi_SetSleepState() does this for us. * Remove the acquisition of Giant from the struct cdevsw. * Remove the ACPI_USE_THREADS option. Notes: svn path=/head/; revision=133612
* MPSAFE lockingNate Lawson2004-08-131-28/+33
| | | | | | | | | | | * Add and comment our locking primitives. The mutex primitives use a a static mutex and the serialization ones use a static sx lock. A global acpi_mutex is used for access to global resources (i.e., writes to the SMI_CMD register.) * Remove 4.x compat defines. Notes: svn path=/head/; revision=133611
* Add support for the Adaptec RAID-On-Chip architecture. This in turnScott Long2004-08-134-3/+118
| | | | | | | | provides support for the Adaptec 2130S adapter. Thanks to Adaptec for providing hardware for this. Notes: svn path=/head/; revision=133606
* Don't keep evaluating our own cpu mask..Julian Elischer2004-08-131-2/+3
| | | | | | | it's not likely to have changed.... Notes: svn path=/head/; revision=133605
* Add a macro to define the size of a subsection of a structure.Julian Elischer2004-08-131-0/+2
| | | | | | | Used in fork1() and thr_create() Notes: svn path=/head/; revision=133604
* Added two new media types for 10GBASE-SR and 10GBASE-LRTony Ackerman2004-08-121-0/+5
| | | | Notes: svn path=/head/; revision=133603
* add support for SanDisk Cruzer Mini 256MB USB 2.0 Flash DriveMIHIRA Sanpei Yoshiro2004-08-122-0/+5
| | | | | | | | | PR: kern/65438 Submitted by: Peter D. Quilty <pdquilty@adelphia.net> MFC after: 1 week Notes: svn path=/head/; revision=133602
* add support Frontier Labs NEX IA+ Digital Audio Player with USB CF card ↵MIHIRA Sanpei Yoshiro2004-08-121-1/+9
| | | | | | | | | | | reader/writer PR: kern/70158 Submitted by: Bernd Strau. <no_bs@web.de> MFC after: 1 week Notes: svn path=/head/; revision=133601
* Add the ability to associate ipfw rules with a specific prison ID.Christian S.J. Peron2004-08-122-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the only thing truly unique about a prison is it's ID, I figured this would be the most granular way of handling this. This commit makes the following changes: - Adds tokenizing and parsing for the ``jail'' command line option to the ipfw(8) userspace utility. - Append the ipfw opcode list with O_JAIL. - While Iam here, add a comment informing others that if they want to add additional opcodes, they should append them to the end of the list to avoid ABI breakage. - Add ``fw_prid'' to the ipfw ucred cache structure. - When initializing ucred cache, if the process is jailed, set fw_prid to the prison ID, otherwise set it to -1. - Update man page to reflect these changes. This change was a strong motivator behind the ucred caching mechanism in ipfw. A sample usage of this new functionality could be: ipfw add count ip from any to any jail 2 It should be noted that because ucred based constraints are only implemented for TCP and UDP packets, the same applies for jail associations. Conceptual head nod by: pjd Reviewed by: rwatson Approved by: bmilekic (mentor) Notes: svn path=/head/; revision=133600
* - Use bus_space_subregion() rather than arithmetic on bus_space_handle_t. [1]Marius Strobl2004-08-124-28/+30
| | | | | | | | | | | - Properly use the error variable and return it on failure in the attach- routines. Reviewed by: tmm Inspired by: NetBSD [1] Notes: svn path=/head/; revision=133599
* The vm map lock is needed in vm_fault() after the page has been found,Tor Egge2004-08-123-58/+141
| | | | | | | | | | | | to avoid later changes before pmap_enter() and vm_fault_prefault() has completed. Simplify deadlock avoidance by not blocking on vm map relookup. In collaboration with: alc Notes: svn path=/head/; revision=133598
* add support Sitecom CN-311 usb flash reader(aka SIIG_WINTERREADER)MIHIRA Sanpei Yoshiro2004-08-122-0/+5
| | | | | | | | | PR: kern/64722 Submitted by: Thiemo Nordenholz <nz@thiemo.net> MFC after: 1 week Notes: svn path=/head/; revision=133597
* When allocating the IPv6 header to stick in front of raw packet beingRobert Watson2004-08-121-1/+5
| | | | | | | | | | sent via a raw IPv6 socket, use M_DONTWAIT not M_TRYWAIT, as we're holding the raw pcb mutex. Reported, tested by: kuriyama Notes: svn path=/head/; revision=133592
* In tcp6_ctlinput, lock tcbinfo around the call to syncache_unreachDavid Malone2004-08-122-0/+4
| | | | | | | | | so that the locks held are the same as the IPv4 case. Reviewed by: rwatson Notes: svn path=/head/; revision=133591
* Trim trailing white space.Robert Watson2004-08-121-11/+11
| | | | Notes: svn path=/head/; revision=133590
* - Introduce an ofw_bus kobj-interface for retrieving the OFW node and aMarius Strobl2004-08-1250-738/+738
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subset ("compatible", "device_type", "model" and "name") of the standard properties in drivers for devices on Open Firmware supported busses. The standard properties "reg", "interrupts" und "address" are not covered by this interface because they are only of interest in the respective bridge code. There's a remaining standard property "status" which is unclear how to support properly but which also isn't used in FreeBSD at present. This ofw_bus kobj-interface allows to replace the various (ebus_get_node(), ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type() vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one. This in turn allows to simplify and remove code-duplication in drivers for devices that can hang off of more than one OFW supported bus. - Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the drivers for their children to use the ofw_bus kobj-interface. The IVAR- interfaces of the Central, EBus and FHC are entirely replaced by this. The PCI bus driver used its own kobj-interface and now also uses the ofw_bus one. The IVARs special to the SBus, e.g. for retrieving the burst size, remain. Beware: this causes an ABI-breakage for modules of drivers which used the IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be recompiled. The style-inconsistencies introduced in some of the bus drivers will be fixed by tmm@ in a generic clean-up of the respective drivers later (he requested to add the changes in the "new" style). - Convert the powerpc MacIO bus driver and the drivers for its children to use the ofw_bus kobj-interface. This invloves removing the IVARs related to the "reg" property which were unused and a leftover from the NetBSD origini of the code. There's no ABI-breakage caused by this because none of these driver are currently built as modules. There are other powerpc bus drivers which can be converted to the ofw_bus kobj-interface, e.g. the PCI bus driver, which should be done together with converting powerpc to use the OFW PCI code from sparc64. - Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take advantage of the ofw_bus kobj-interface and simplify them a bit. Reviewed by: grehan, tmm Approved by: re (scottl) Discussed with: tmm Tested with: Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386 Notes: svn path=/head/; revision=133589
* Minor formatting fixes for lines > 80 charactersWarner Losh2004-08-122-29/+31
| | | | Notes: svn path=/head/; revision=133588
* Re-delete the comment from r1.352.Brian Feldman2004-08-121-3/+0
| | | | Notes: svn path=/head/; revision=133587
* Skip dependent functions when finding the resource from _PRS to use forNate Lawson2004-08-121-4/+8
| | | | | | | | | | later calls to _SRS. Add note that this code should be centralized at some point. Bug from: Jiawei Ye <leafy7382_AT_gmail.com> Notes: svn path=/head/; revision=133586
* Only print the link name if there is a link. For the hardwired case, don'tNate Lawson2004-08-121-4/+7
| | | | | | | | | | bother printing it. This fixes a panic and acpi_name() has been more robust as well. Bug from: Tai-hwa Liang <avatar-at-mmlab.cse.yzu.edu.tw> Notes: svn path=/head/; revision=133585
* Allow null handles to be passed into acpi_name().Nate Lawson2004-08-121-1/+1
| | | | Notes: svn path=/head/; revision=133584
* Allow the ATM call control module to be built into the kernel.Hartmut Brandt2004-08-123-0/+10
| | | | Notes: svn path=/head/; revision=133580
* Add the module build stuff for the ATM call control module.Hartmut Brandt2004-08-122-0/+18
| | | | Notes: svn path=/head/; revision=133579
* This is the netgraph node framework for the user side call controlHartmut Brandt2004-08-123-0/+1422
| | | | | | | node for ATM. This node implements the API to the signalling services. Notes: svn path=/head/; revision=133578
* Loopback fix from Mathieu Sauve-Frankel:Max Laier2004-08-121-2/+3
| | | | | | | | Add missing check for NULL in DIOCCHANGERULE. This prevents a crash in certain rare cases. Notes: svn path=/head/; revision=133577
* Loopback fix from Daniel Hartmeier:Max Laier2004-08-123-7/+13
| | | | | | | | | | | | pf_cksum_fixup() was called without last argument from normalization, also fixup checksum when random-id modifies ip_id. This would previously lead to incorrect checksums for packets modified by scrub random-id. (Originally) Submitted by: yongari Notes: svn path=/head/; revision=133574
* Loopback fix from Henning Brauer:Max Laier2004-08-121-0/+4
| | | | | | | | | | skip over interface addresses without IFA_ROUTE, fixes some issue with pppd PR: misc/69954 Notes: svn path=/head/; revision=133573