summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Merge from DRI CVS as of 2004-05-26. Most of the meat is new PCI IDs and a newanholt2004-06-1121-249/+609
| | | | packet for Radeon.
* Make sysctl_wire_old_buffer() respect ENOMEM from vslock() by markinggreen2004-06-111-2/+5
| | | | | | | the valid length as 0. This prevents vsunlock() from removing a system wire from memory that was not successfully wired (by us). Submitted by: tegge
* Remove second <sys/cdefs.h> and __FBSDID.marius2004-06-101-3/+0
|
* Argh. Add the mini-stack-frame back in for mcount's benefit for syscallpeter2004-06-101-0/+4
| | | | stubs.
* Make profiling work for varargs functions.. %al is an additional argumentpeter2004-06-101-0/+2
| | | | | which indicates the number of xmm registers used in the varargs. This stops the explosion that happened when profiling printf() etc.
* Add a first version of a pcf(4) front-end for the Sun i2c devices ("i2c"marius2004-06-101-0/+261
| | | | | | | | | | | | | | | | | | | is the actual name here) on EBus and which are PCF8584 (on systems having a boot-bus controller the i2c are said to not be a PCF8584). Similar to the SUNW,envctrl devices, onboard slaves for monitoring fans, temperatures and such hang off of these i2c devices. But there's also stuff like EEPROMs housing the hostid of the system and the boards usally have a connector to add custom slave devices (on CP1500 there's actually a second PCF8584 with its own I2C bus for these). This driver already works fine but I'm not yet sure if access to the slave devices on CP1400/CP1500 marked as "reserved for factory use" in the docs should be blocked (most likely these are the voltage controllers wich aren't meant to be controller by software and even not by the firmware). Once the issues with polled mode are fixed in the common pcf(4) part in pcf.c, this front-end should probably honour the poll-mode property of the i2c devices. Tested on Ultra AXe and CP1500 (Netra t1 100). OK'ed by: joerg, nsouch
* - Add missing <sys/module.h>.marius2004-06-101-3/+4
| | | | | | | | - Use "envctrl" as the name when registering this module rather than "pcf"; we can't have "pcf" as the name for all pcf(4) front-ends or we would get conflicts. OK'ed by: joerg
* - Add missing <sys/module.h>.marius2004-06-101-20/+20
| | | | | | | | | - s,pcf_,pcf_isa, to better reflect the purpose of this front-end and to avoid conflicts. - Don't use this front-end for attaching to EBus, declaring it as an EBus driver was a cut&paste accident according to joerg. OK'ed by: joerg, nsouch
* - #define\tFOO\tBARmarius2004-06-101-2/+2
| | | | | | - Remove two tabs from an otherwise empty line. OK'ed by: nsouch
* Introduce a subsystem lock around UNIX domain sockets in order to protectrwatson2004-06-101-58/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global and allocated variables. This strategy is derived from work originally developed by BSDi for BSD/OS, and applied to FreeBSD by Sam Leffler: - Add unp_mtx, a global mutex which will protect all UNIX domain socket related variables, structures, etc. - Add UNP_LOCK(), UNP_UNLOCK(), UNP_LOCK_ASSERT() macros. - Acquire unp_mtx on entering most UNIX domain socket code, drop/re-acquire around calls into VFS, and release it on return. - Avoid performing sodupsockaddr() while holding the mutex, so in general move to allocating storage before acquiring the mutex to copy the data. - Make a stack copy of the xucred rather than copying out while holding unp_mtx. Copy the peer credential out after releasing the mutex. - Add additional assertions of vnode locks following VOP_CREATE(). A few notes: - Use of an sx lock for the file list mutex may cause problems with regard to unp_mtx when garbage collection passed file descriptors. - The locking in unp_pcblist() for sysctl monitoring is correct subject to the unpcb zone not returning memory for reuse by other subsystems (consistent with similar existing concerns). - Sam's version of this change, as with the BSD/OS version, made use of both a global lock and per-unpcb locks. However, in practice, the global lock covered all accesses, so I have simplified out the unpcb locks in the interest of getting this merged faster (reducing the overhead but not sacrificing granularity in most cases). We will want to explore possibilities for improving lock granularity in this code in the future. Submitted by: sam Sponsored by: FreeBSD Foundatiuon Obtained from: BSD/OS 5 snapshot provided by BSDi
* Insta-MFi386: ignore disabled cpu apic id's entirelypeter2004-06-101-13/+8
|
* - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 isjhb2004-06-105-12/+6
| | | | | | | present and thus that the PnPBIOS probe should be skipped instead of having ACPI zero out the PnPBIOStable pointer. - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is the only place it is used.
* Remove atdevbase and replace it's remaining uses with direct references tojhb2004-06-1020-22/+17
| | | | KERNBASE instead.
* init_tables() must be run after sys/net/route.c:route_init().ru2004-06-101-1/+4
|
* Completely ignore disabled CPU entries as their APIC IDs tend to bejhb2004-06-101-13/+8
| | | | invalid.
* Free tty at detach().rik2004-06-101-1/+15
| | | | | Tested by: `pstat -t` Requested by: phk
* Fix typo that prevents esp_sbus.c and lsi64854.c from being built on sparc64.marius2004-06-101-1/+1
|
* Add esp(4) to NOTES.scottl2004-06-101-0/+2
|
* Add esp to the sparc64 GENERICscottl2004-06-101-0/+1
|
* Add the esp(4) files. Two of them are sbus-specific and therefore onlyscottl2004-06-102-0/+3
| | | | apply to sparc64.
* Port the NetBSD esp(4) driver. This only includes the sbus front-end, soscottl2004-06-1011-0/+6363
| | | | | | | | | | | its primary use is for the FEPS/FAS366 SCSI found in Sun Ultra 1e and 2 machines. Once the pci front-end is ported, this driver can replace the amd(4) driver. The code as-is is fairly stable. I've disabled tagged-queueing until I can figure out a corruption bug related to it. I'm importing it now so that people with these machines can (finally) stop netbooting and report bugs before 5.3.
* MFamd64alc2004-06-101-5/+1
| | | | | | Significantly reduce the number of preallocated pv entries in pmap_init(). Tested by: kensmith@
* Initialise `restartcnt' in the newly malloc'd usbd_port structure,iedowse2004-06-101-0/+1
| | | | | | | | | as otherwise the junk it contains may cause uhub_explore to give up without ever trying to restart the port. This fixes the following errors I was seeing with a VIA UHCI controller: uhub0: port error, restarting port 1 uhub0: port error, giving up port 1
* - Add a LLADDR() forgotten in the conversion to ether_crc32_le().marius2004-06-101-4/+2
| | | | | | - Remove a variable no longer used after the conversion. - While here, save on another one no longer really necessary after the conversion.
* Plug a race where upon free this scenario could occur:bmilekic2004-06-101-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (time grows downward) thread 1 thread 2 ------------|------------ dec ref_cnt | | dec ref_cnt <-- ref_cnt now zero cmpset | free all | return | | alloc again,| reuse prev | ref_cnt | | cmpset, read | already freed | ref_cnt ------------|------------ This should fix that by performing only a single atomic test-and-set that will serve to decrement the ref_cnt, only if it hasn't changed since the earlier read, otherwise it'll loop and re-read. This forces ordering of decrements so that truly the thread which did the LAST decrement is the one that frees. This is how atomic-instruction-based refcnting should probably be handled. Submitted by: Julian Elischer
* - Remove a variable no longer used after the conversion to ether_crc32_le().marius2004-06-101-4/+2
| | | | | - While here, save on another one no longer really necessary after the conversion.
* Add eisa_if.himp2004-06-091-1/+1
|
* Add eisa_if.h to the list of things to build for new eisa_if.m for theimp2004-06-091-1/+1
| | | | case where we build modules with world.
* Backout previous change, I think Julian has a better solution whichbmilekic2004-06-091-1/+1
| | | | does not require type-stable refcnts here.
* Introduce a new feature to IPFW2: lookup tables. These are usefulru2004-06-094-1/+354
| | | | | | | for handling large sparse address sets. Initial implementation by Vsevolod Lobko <seva@ip.net.ua>, refined by me. MFC after: 1 week
* Make the sysctl kern.geom.collectstats more granular.phk2004-06-091-8/+8
| | | | | | | | | Bit 0 controls statistics collection on GEOM providers. Bit 1 controls statistics collection on GEOM consumers. Default value is 1. Prodded by: scottl
* Make the slabrefzone, the zone from which we allocated slabs withbmilekic2004-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | internal reference counters, UMA_ZONE_NOFREE. This way, those slabs (with their ref counts) will be effectively type-stable, then using a trick like this on the refcount is no longer dangerous: MEXT_REM_REF(m); if (atomic_cmpset_int(m->m_ext.ref_cnt, 0, 1)) { if (m->m_ext.ext_type == EXT_PACKET) { uma_zfree(zone_pack, m); return; } else if (m->m_ext.ext_type == EXT_CLUSTER) { uma_zfree(zone_clust, m->m_ext.ext_buf); m->m_ext.ext_buf = NULL; } else { (*(m->m_ext.ext_free))(m->m_ext.ext_buf, m->m_ext.ext_args); if (m->m_ext.ext_type != EXT_EXTREF) free(m->m_ext.ref_cnt, M_MBUF); } } uma_zfree(zone_mbuf, m); Previously, a second thread hitting the above cmpset might actually read the refcnt AFTER it has already been freed. A very rare occurance. Now we'll know that it won't be freed, though. Spotted by: julian, pjd
* Check if we control device. Else we will go to panic cause we don't haverik2004-06-091-1/+1
| | | | properly initialized dev_t structure at open.
* When adding files to the repo, it is very important to not forgetimp2004-06-091-0/+65
| | | | the cvs add function.
* Step 1 in moving EISA devices to kobj/newbus. Use kobj methods forimp2004-06-094-14/+39
| | | | | | | | | | | | | | all of the interface between the driver and the bus. This will enable us to stop special casing eisa bus attachments in modules and treat them like we treat all other busses. In the longer run, we need to eliminate much (all?) of these interfaces and switch to using the standard bus_alloc_resource(), but that's not done right now. # I've not updated the modules to include eisa, etc, just yet Tested on: Compaq Proliant 3000/333 purchased for eisa work
* Add some special case code to fix a problem with the BCM5704 in TBI (fiber)wpaul2004-06-092-0/+71
| | | | | | | | | | | mode. The 5704 apparently has some s00p3r s33kr1t registers for setting the advertisement of pause frame ability (i.e flow control) when in autoneg mode. If we don't set these registers correctly, we may not be able to negotiate a proper link with some switches. (Symptom is that the NIC reports the link as up (PCS synched) but no traffic can be exchanged.) PR: kern/67598
* Fix a panic happening when m_getm() is called with len < MCLBYTES.mux2004-06-091-1/+1
| | | | | | Reported by: ale Tested by: ale Reviewed by: bosko
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-0932-796/+78
|
* Add a comment explaining td_critnest's initial state and its life from thatjmallett2004-06-091-0/+13
| | | | | | | point on, as it happens relatively indirectly, and in a codepath the casual reader may not be acquainted with or find obvious. Glanced at by: jhb
* Rename struct pt_ioctl to "ptsc" and pointers to it from "pti" to "pt"phk2004-06-091-65/+65
|
* Ditch K&R function stylephk2004-06-091-63/+15
|
* Reference count struct tty.phk2004-06-093-24/+104
| | | | | | | | | | | Add two new functions: ttyref() and ttyrel(). ttymalloc() creates a struct tty with a reference count of one. when ttyrel sees the count go to zero, struct tty is freed. Hold references for open ttys and for ttys which are controlling terminal for sessions. Until drivers start using ttyrel(), this commit will make no difference.
* Fix a race in destruction of sessions.phk2004-06-091-2/+3
|
* Move PTY private defines into PTY private files.phk2004-06-092-3/+4
|
* style.Makefile(5)obrien2004-06-092-12/+12
|
* Only match cards that claim to be network cards. I've had twoimp2004-06-091-0/+10
| | | | | | | | | different cards that matched vendor/id, but weren't wi cards. This is because the vendor foolishly didn't have unique product ids. Symbol has a serial card that would otherwise match the wi driver, for example... Taken from a patch for xe posted by: Carlos Velasco
* Introduce a netisr to deliver kernel-generated routing, avoidingrwatson2004-06-093-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | recursive entering of the socket code from the routing code: - Modify rt_dispatch() to bundle up the sockaddr family, if any, associated with a pending mbuf to dispatch to routing sockets, in an m_tag on the mbuf. - Allocate NETISR_ROUTE for use by routing sockets. - Introduce rtsintrq, an ifqueue to be used by the netisr, and introduce rts_input(), a function to unbundle the tagged sockaddr and inject the mbuf and address into raw_input(), which previously occurred in rt_dispatch(). - Introduce rts_init() to initialize rtsintrq, its mutex, and register the netisr. Perform this at the same point in system initialization as setup of the domains. This change introduces asynchrony between the generation of a pending routing socket message and delivery to sockets for use by userspace. It avoids socket->routing->rtsock->socket use and helps to avoid lock order reversals between the routing code and socket code (in particular, raw socket control blocks), as route locks are held over calls to rt_dispatch(). Reviewed by: "George V.Neville-Neil" <gnn@neville-neil.com> Conceptual head nod by: sam
* Replace convoluted and broken CRC calcuation with ether_crc32_le().naddy2004-06-091-41/+6
| | | | This should fix multicast reception.
* * Fix multicast reception.naddy2004-06-091-28/+10
| | | | | | | | | * Replace handrolled crc calculation with ether_crc32_le(). Based on: PR: 67544 Submitted by: HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
* Recognise NOINET6 as an indication to not build IPv6 enabled source evendarrenr2004-06-082-2/+4
| | | | | | if FreeBSD header files, etc, support it. Submitted by: Sergey Mokryshev <mokr@mokr.net>
OpenPOWER on IntegriCloud