summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fix panic when loading libiconv.ko on sparc64.imura2005-09-051-2/+4
| | | | | | | | | | | | | | | | | | It seems that this issue only become obvious when compiled with -O2 on sparc64. Since each struct iconv_converter_class has been initialized by DEFINE_CLASS macro, not all members of struct iconv_converter_class has been allocated on memory and cc_link member has not been initialized, while iconv_register_converter() wanted to access it with TAILQ. Now we modify KICONV_CONVERTER macro and fix this bug. Problem reported on: freebsd-sparc64 Pointed out by: yongari Discussed with: yongari Tested by: yongari MFC after: 3 days
* Remove Giant mutex from polling(4) and use a separate poll_mtx(4)glebius2005-09-051-38/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead. Detailed changelist: o Add flags field to struct pollrec, to indicate that are particular entry is being worked on. o Define a macro PR_VALID() to check that a pollrec is valid and pollable. o Mark ISRs as mpsafe. o ether_poll() - Acquire poll_mtx while traversing pollrec array. - Skip pollrecs, that are being worked on. - Conditionally acquire Giant when entering handler. o netisr_pollmore() - Conditionally assert Giant. - Acquire poll_mtx while working with statistics. o netisr_poll() - Conditionally assert Giant. - Acquire poll_mtx while working with statistics and traversing pollrec array. o ether_poll_register(), ether_poll_deregister() - Conditionally assert Giant. - Acquire poll_mtx while working with pollrec array. o poll_idle() - Remove all strange manipulations with Giant. In collaboration with: ru, pjd In collaboration with: Oleg Bulyzhin <oleg rinet.ru> In collaboration with: dima <_pppp mail.ru>
* Remove a race condition that could result in processes being stuckphk2005-09-041-24/+30
| | | | | | | | | | | | waiting for geom events to happen: Instead of maintaining a count of outstanding events, simply look if the queue is empty. Make sure to not remove events from the queue until they are executed in order to not open a new race. Much work by: pjd Tested by: kris MT6: yes, should be.
* Eliminate unnecessary TLB invalidations by pmap_enter(). Specifically,alc2005-09-042-32/+45
| | | | | | | | | eliminate TLB invalidations when permissions are relaxed, such as when a read-only mapping is changed to a read/write mapping. Additionally, eliminate TLB invalidations when bits that are ignored by the hardware, such as PG_W ("wired mapping"), are changed. Reviewed by: tegge
* When padding with zero, do pad after prefixes rather than paddingdelphij2005-09-041-1/+5
| | | | | | | | | | | | before prefixes. Use cases: printf("%05d", -42); --> "00-42" (should be "-0042") printf("%#05x", 12); --> "000xc" (should be "0x00c") Submitted by: Oliver Fromme PR: kern/85520 MFC After: 1 week
* clear lock on error in O_LIMIT case of install_statesam2005-09-041-0/+1
| | | | | Submitted by: Ted Unangst MFC after: 3 days
* reclaim sbuf and clear lock on error in ifconfsam2005-09-041-1/+4
| | | | | | Submitted by: Ted Unangst Reviewed by: rwatson MFC after: 3 days
* When bge_stop() is called from bge_detach(), mii is already NULL, so checkpjd2005-09-041-5/+10
| | | | | | | | before trying to use it. This fix allows to 'kldunload if_bge' without panicing. Reviewed by: bz MFC after: 3 days
* de(4) is now properly busdma'ed.obrien2005-09-041-1/+0
| | | | Reviewed by: jhb
* o s/vhpt_size/pmap_vhpt_log2size/gmarcel2005-09-033-48/+88
| | | | | | | | | | | | | | o s/vhpt_base/pmap_vhpt_base/g o s/vhpt_bucket/pmap_vhpt_bucket/g o Declare the above in <machine/pmap.h> o Move the vm.stats.vhpt.* sysctls to machdep.vhpt.* o Create a tunable machdep.vhpt.log2size, with corresponding sysctl. The tunable allows the user to specify the VHPT size from the loader. o Don't keep track of the number of PTEs in the VHPT. Calculate the population when necessary by iterating the buckets and summing up the length of the buckets. o Don't perform the tpa instruction with a bucket lock held. The instruction can (theoretically) fault and locking is not needed.
* More consistantly return the correct BAR size. Before, we'd onlyimp2005-09-031-6/+8
| | | | | | return the correct bar size if we encountered a 64-bit BAR that had its resources already assigned. If the resources weren't yet assigned, we'd bogusly assume it was a 32-bit bar and return 1.
* Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.ssouhlal2005-09-035-8/+6
| | | | Another pointyhat to: ssouhlal
* Fix collision chain termination checks. The result of IA64_PHYS_TO_RR7marcel2005-09-031-16/+18
| | | | | | | | | | is never 0, so one cannot test for a NULL pointer after a physical address is translated into a virtual pointer with said macro. Instead, keep the physical address around and test it against 0. Note that this obviously implies that a PTE can never be allocated at physical address 0. This isn't exactly guaranteed, but hasn't been a problem so far. We test the physical address against 0 for as long as the ia64 port exists...
* Pass a value of type vm_prot_t to pmap_enter_quick() so that it determinealc2005-09-0312-24/+32
| | | | whether the mapping should permit execute access.
* Typo.phk2005-09-031-1/+1
|
* If we ignore an unknown % sequence, we must stop interpreting thephk2005-09-031-2/+9
| | | | | | | | remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument. Sponsored by: Napatech.com
* Unbreak the build.ssouhlal2005-09-031-2/+4
| | | | Pointyhat to: ssouhlal
* Add a SYSUNINIT() to SX_SYSINIT() to call sx_destroy() to destroy the sxjhb2005-09-021-3/+5
| | | | | | | | lock when a module is unloaded similar to the recent change made to MTX_SYSINIT(). Suggested by: pjd MFC after: 3 days
* - Add some comments to some of the static lock orders. Don't explicitlyjhb2005-09-021-5/+14
| | | | | | | | | | | link proctree and allproc to Giant since that order is already implicitly enforced. - Use a goto to handle the case where we want to enforce a reversal before calling isitmydescendant() in witness_checkorder() so that the logic is easier to follow and so that it is easier to add more forced-reversal cases in the future. MFC after: 3 days
* - Add an assertion to panic if one tries to call mtx_trylock() on a spinjhb2005-09-021-1/+4
| | | | | | | mutex. - Don't panic if a spin lock is held too long inside _mtx_lock_spin() if panicstr is set (meaning that we are already in a panic). Just keep spinning forever instead.
* Add witness warnings to panic if a thread tries to exit while holding anyjhb2005-09-022-0/+5
| | | | | | | locks. Requested by: jeff MFC after: 3 days
* Use non-debug macros inside debugging functions, to preventglebius2005-09-021-4/+4
| | | | important information from being rewritten.
* Change default KTR_COMPILE from KTR_GEN to KTR_ALL, to match withglebius2005-09-021-1/+1
| | | | | | manual page. Reviewed by: jhb, pjd
* Break out the checks for duplicates and absolute settings being too highnjl2005-09-021-8/+17
| | | | | | | instead of trying to do them all at once. This should fix the level sorting problems from the previous revision. Testing help: ume
* Print out a warning and a backtrace if we try to unlock a lockmgr thatssouhlal2005-09-021-0/+7
| | | | | | | we do not hold. Glanced at by: phk MFC after: 3 days
* Use vput() instead of vrele() in null_reclaim() since the lower vnodessouhlal2005-09-021-4/+5
| | | | | | is locked. MFC after: 3 days
* *_mountfs() (if the filesystem mounts from a device) needs devvp to bessouhlal2005-09-026-39/+26
| | | | | | | locked, so lock it. Glanced at by: phk MFC after: 3 days
* ffs_mountfs() needs devvp to be locked, so lock it.ssouhlal2005-09-021-5/+3
| | | | | | Glanced at by: phk Tested by: pjd MFC after: 3 days
* Don't unbusy the devfs mount in vfs_mountroot_try() as it gets accessedssouhlal2005-09-021-1/+0
| | | | | | | | and unbusied in devfs_fixup(), which assumes that the devfs mount is still locked. Granced at by: phk MFC after: 3 days
* MFp4: kill bogus commentimp2005-09-021-5/+0
|
* In case of mac_check_vnode_rename_from() or vn_start_write() failure,pjd2005-09-012-2/+4
| | | | | | | vn_finished_write() should not be called. Reviewed by: ssouhlal MFC after: 3 days
* At some point in the past, we read the PROM by words. Now we readimp2005-09-011-6/+2
| | | | | | | | | | PROM by bytes. Adjust the extraction of the MAC address from this data to reflect this change. This gets the AX88x90 based PC Cards MAC address working again (my UMAX Ethernet and Linksys EC2T cards now work). MFC After: 3 days
* Typo in comment.jhb2005-09-011-1/+1
|
* Treat resources that are 0xfffff.... as being 'unassigned'.imp2005-09-011-1/+6
| | | | | | Reviewed by: jhb Tested by: Mark Kirkwood MFC After: 3 days
* - Add md_mtx lock to protect ID number and list of devices.pjd2005-08-311-25/+37
| | | | | | | | | | - Always check mdnew() return value, as even in !autounit case kthread_create() can fail. Those two changes fix serval panics provked by simple stress test. Tested by: Kris The BugMagnet MFC after: 3 days
* Fix dangling callout problem in the Bluetooth L2CAP code that leads toemax2005-08-313-5/+14
| | | | | | | | | | | | panic. The panic happens when outgoing L2CAP connection descriptor is deleted with the L2CAP command(s) pending in the queue. In this case when the last L2CAP command is deleted (due to cleanup) and reference counter for the L2CAP connection goes down to zero the auto disconnect timeout is incorrectly set. pjd gets credit for tracking this down and committing bandaid. Reported by: Jonatan B <onatan at gmail dot com> MFC after: 3 days
* - Only call txp_release_resources() once if attach fails.jhb2005-08-311-38/+31
| | | | | | | - Set errno to ENXIO instead of 0 in several attach failure cases. - Setup the interrupt handler at the very end of txp_attach() after ether_ifattach(). - Various whitespace fixes in function prototypes.
* Use if_printf() and device_printf() for printf's and remove the unit numberjhb2005-08-312-20/+15
| | | | | | from the softc. MFC after: 3 days
* Update for a few recently discovered Olicom token ring cards:imp2005-08-311-1/+3
| | | | | OC3231 Token Ring + 28.8 modem OC3232 Token Ring + 33.6 modem
* Use VLAN_TAG_VALUE() not only to read a dot1q tagyar2005-08-312-3/+8
| | | | | | | | | | | | | value from an m_tag, but also to set it. This reduces complex code duplication and improves its readability. Alas, we shouldn't rename the macro to VLAN_TAG_LVALUE() globally because that would cause pain for kernel module port maintainers and vendors using FreeBSD as their codebase. Added a clarifying comment instead. Discussed with: ru, glebius X-MFC-After: 6.0-RELEASE (MFC is good just to reduce the diff)
* net.graph.ngqfreemax has been deprecated.glebius2005-08-311-1/+0
|
* FDOPT_NORETRY is an option, and must be compared with fd->options,rodrigc2005-08-301-1/+1
| | | | | | | | not fd->flags. PR: kern/85481 Submitted by: Lev Levinson <llevinson at inbox dot ru> MFC after: 1 day
* Changes and cleanups to m_sanity():andre2005-08-301-18/+17
| | | | | | | | | o for() instead of while() looping over mbuf chain o paren's around all flag checks o more verbose function and purpose description o some more style changes Based on feedback from: sam
* Unbreak m_demote() and put back the 'all' flag. Without it we cannotandre2005-08-302-2/+4
| | | | correctly test for m_nextpkt in an mbuf chain.
* Various locking fixes and mark MPSAFE:jhb2005-08-302-60/+95
| | | | | | | | | | | - Add locked variants of start(), init(), ifmedia_upd(), and poll() and stop recursing on the driver lock. - Add locking to ifmedia_upd() and ifmedia_sts(). - Use callout_*() instead of timeout/untimeout. - Fix locking in ioctl(). Tested by: Bob Bishop rb at gid dot co dot uk MFC after: 3 days
* o Remove the 'all' flag from m_demote(). Users can simply call it withandre2005-08-302-6/+4
| | | | | | | | m_demote(m->m_next) if they wish to start at the second mbuf in chain. o Test m_type with == instead of &. o Check m_nextpkt against NULL instead of implicit 0. Based on feedback from: sam
* Prevent division by zero errors in sc_mouse_move()rodrigc2005-08-305-14/+17
| | | | | | | | | | by explicitly setting sc->font_width, in the same places where sc->font_size is set, instead of relying on the default initialized value of 0 for sc->font_width. PR: kern/84836 Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru> MFC after: 2 days
* Use the correct mbuf type for MGET().andre2005-08-305-5/+5
|
* Use the correct mbuf type for MGET().andre2005-08-301-1/+1
|
* Test the mbuf flags against the correct constant. The previous versionandre2005-08-301-1/+1
| | | | worked as intended but only by chance. MT_HEADER == M_PKTHDR == 0x2.
OpenPOWER on IntegriCloud