aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove ng_setisr() call from ng_dequeue(). It is useless as we any wayAlexander Motin2008-03-271-11/+0
| | | | | | | | | | | will never exit ngintr(), while there is some ready requests on the queue. It was made years ago with hope of parallel queue processing by several net threads. But even if we have several threads sometimes, we have no rights to process queue in parallel as it will break original requests serialization that is critically important for some setups. Notes: svn path=/head/; revision=177673
* Remove option headers that do not exist and are not usedAntoine Brodin2008-03-277-10/+10
| | | | | | | | | | from the Makefiles in sys/modules. (opt_devfs.h, opt_bdg.h, opt_emu10kx.h and opt_uslcom.h) Approved by: rwatson (mentor) Notes: svn path=/head/; revision=177671
* Switch from timeval to bintime, to use 1/(2^20) of seconds instead ofAlexander Motin2008-03-271-22/+23
| | | | | | | | microseconds. It allows to use bit shifts instead of some heavy 64bit mul/div math operations. Notes: svn path=/head/; revision=177670
* Add IFF_NEEDSGIANT to IFF_CANTCHANGE, to prevent user-level codeIan Dowse2008-03-271-1/+2
| | | | | | | | | | | | | from clearing the IFF_NEEDSGIANT flag on Giant-locked interfaces. In particular, wpa_supplicant was doing this on USB interfaces, causing panics when Giant-locked code was then called without Giant. Submitted by: Alexey Popov Reviewed by: rwatson MFC after: 3 days Notes: svn path=/head/; revision=177669
* Remove the '-k' option.Doug Rabson2008-03-271-1/+1
| | | | Notes: svn path=/head/; revision=177666
* Add nfslockd and krpc modules.Doug Rabson2008-03-272-0/+67
| | | | Notes: svn path=/head/; revision=177663
* Add kernel module support for nfslockd and krpc. Use the module systemDoug Rabson2008-03-2722-11/+74
| | | | | | | | | | to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k' option to rpc.lockd and make kernel NLM the default. A user can still force the use of the old user NLM by building a kernel without NFSLOCKD and/or removing the nfslockd.ko module. Notes: svn path=/head/; revision=177662
* When building a kernel module, define MAXCPU the same as SMP soJohn Birrell2008-03-277-12/+12
| | | | | | | that modules work with and without SMP. Notes: svn path=/head/; revision=177661
* MFamd64 with few changes:Alan Cox2008-03-272-91/+1108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add support for automatic promotion of 4KB page mappings to 2MB page mappings. Automatic promotion can be enabled by setting the tunable "vm.pmap.pg_ps_enabled" to a non-zero value. By default, automatic promotion is disabled. Tested by: kris 2. To date, we have assumed that the TLB will only set the PG_M bit in a PTE if that PTE has the PG_RW bit set. However, this assumption does not hold on recent processors from Intel. For example, consider a PTE that has the PG_RW bit set but the PG_M bit clear. Suppose this PTE is cached in the TLB and later the PG_RW bit is cleared in the PTE, but the corresponding TLB entry is not (yet) invalidated. Historically, upon a write access using this (stale) TLB entry, the TLB would observe that the PG_RW bit had been cleared and initiate a page fault, aborting the setting of the PG_M bit in the PTE. Now, however, P4- and Core2-family processors will set the PG_M bit before observing that the PG_RW bit is clear and initiating a page fault. In other words, the write does not occur but the PG_M bit is still set. The real impact of this difference is not that great. Specifically, we should no longer assert that any PTE with the PG_M bit set must also have the PG_RW bit set, and we should ignore the state of the PG_M bit unless the PG_RW bit is set. Notes: svn path=/head/; revision=177659
* Remove the C flag from slip.log. The current slip userbase does notBrooks Davis2008-03-271-1/+1
| | | | | | | | justify the presence of a (usually empty) /var/log/slip.log on every FreeBSD box. Notes: svn path=/head/; revision=177658
* Regen after makesyscalls.sh change.John Birrell2008-03-271-0/+4767
| | | | Notes: svn path=/head/; revision=177657
* Generate another function for the DTrace syscall provider to specifyJohn Birrell2008-03-271-2/+14
| | | | | | | | | | the syscall argument types. This code is only compiled into the systrace kernel modul and has no effect otherwise. Notes: svn path=/head/; revision=177656
* Allow awk (the one true one!) to handle 64 files instead of just 20.John Birrell2008-03-271-1/+1
| | | | | | | | | | | | | | The current FreeBSD syscall generation script uses all 20 and I need another open file. It's a shame that something named as the 'one-true-awk' is so limited by an old denition like FOPEN_MAX when it could just make the file handling dynamic. This is done to avoid touching contrib sources on a vendor branch. Notes: svn path=/head/; revision=177655
* Really, smb_iod_main() is not totally MPSAFE, so just acquire and dropAttilio Rao2008-03-271-0/+3
| | | | | | | | | | Giant around it in order to assume MPSAFETY. Reported by: jhb, rwatson Pointy hat to: attilio Notes: svn path=/head/; revision=177654
* Allow an application to define FOPEN_MAX (like we allow for OPEN_MAXJohn Birrell2008-03-261-0/+2
| | | | | | | in sys/syslimits.h). Notes: svn path=/head/; revision=177653
* Removed no longer existing CTL_MACHDEP defines.Ruslan Ermilov2008-03-261-12/+1
| | | | | | | Inspired by: phk Notes: svn path=/head/; revision=177652
* Back in the good old days, PC's had random pieces of rock forPoul-Henning Kamp2008-03-2611-601/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frequency generation and what frequency the generated was anyones guess. In general the 32.768kHz RTC clock x-tal was the best, because that was a regular wrist-watch Xtal, whereas the X-tal generating the ISA bus frequency was much lower quality, often costing as much as several cents a piece, so it made good sense to check the ISA bus frequency against the RTC clock. The other relevant property of those machines, is that they typically had no more than 16MB RAM. These days, CPU chips croak if their clocks are not tightly within specs and all necessary frequencies are derived from the master crystal by means if PLL's. Considering that it takes on average 1.5 second to calibrate the frequency of the i8254 counter, that more likely than not, we will not actually use the result of the calibration, and as the final clincher, we seldom use the i8254 for anything besides BEL in syscons anyway, it has become time to drop the calibration code. If you need to tell the system what frequency your i8254 runs, you can do so from the loader using hw.i8254.freq or using the sysctl kern.timecounter.tc.i8254.frequency. Notes: svn path=/head/; revision=177651
* Further cleanup of sound generation in syscons:Poul-Henning Kamp2008-03-262-17/+1
| | | | | | | | | | | The timer_spkr_*() functions take care of the enabling/disabling of the speaker. Test on the existence of timer_spkr_*() functions, rather than architectures. Notes: svn path=/head/; revision=177650
* Allow the characters .-+/ to appear in ppp profile names by folding themBrooks Davis2008-03-262-5/+31
| | | | | | | | | | | to _ when evaluating ppp_<profile>_nat and ppp_<profile>_mode. Document the per-profile variables. PR: conf/121452, conf/122127 (partial) MFC after: 1 week Notes: svn path=/head/; revision=177649
* Make speaker a pseudo device driver instead of attaching to a PnP id.Poul-Henning Kamp2008-03-261-90/+19
| | | | | | | | If somebody cleaned this code up to proper style(9), it could become a great educational starting point for aspiring kernel hackers. Notes: svn path=/head/; revision=177648
* Add a comment explaining that we initialize the 'a' buffer forRobert Watson2008-03-261-0/+5
| | | | | | | | | | | | zero-copy to the store buffer position on the BPF descriptor, and the 'b' buffer as the free buffer in order to fill them in the order documented in bpf(4). MFC after: 4 months Suggested by: csjp Notes: svn path=/head/; revision=177647
* Some minor code and math optimizations.Alexander Motin2008-03-261-40/+21
| | | | Notes: svn path=/head/; revision=177646
* Fix a nit with the 'nofoo' options where 'foo' is mapped to 'nonofoo'John Baldwin2008-03-262-4/+4
| | | | | | | | | | | | | | | | (such as 'atime' vs 'noatime'). The filesystems will always see either 'nofoo' or 'nonofoo', never plain 'foo'. As such, their list of valid mount options should include 'nofoo' instead of 'foo'. With this fix, you can do 'mount -u -o atime' on a FFS filesystem that isn't marked as noatime without getting an error. You can also update a noatime FFS filesystem mounted via mount(2) (e.g. 6.x /sbin/mount binary) to 'atime' using nmount(2) (e.g. 7.x /sbin/mount binary). MFC after: 1 week Reviewed by: crodig Notes: svn path=/head/; revision=177645
* Remove two variables which are handled MI now.Poul-Henning Kamp2008-03-261-3/+0
| | | | Notes: svn path=/head/; revision=177644
* Eliminate unnecessary #includesPoul-Henning Kamp2008-03-261-9/+0
| | | | Notes: svn path=/head/; revision=177643
* The "free-lance" timer in the i8254 is only used for the speakerPoul-Henning Kamp2008-03-2626-332/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | these days, so de-generalize the acquire_timer/release_timer api to just deal with speakers. The new (optional) MD functions are: timer_spkr_acquire() timer_spkr_release() and timer_spkr_setfreq() the last of which configures the timer to generate a tone of a given frequency, in Hz instead of 1/1193182th of seconds. Drop entirely timer2 on pc98, it is not used anywhere at all. Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if they exist, and do nothing otherwise. Remove prototypes and empty acquire-/release-timer() and sysbeep() functions from the non-beeping archs. This eliminate the need for the speaker driver to know about i8254frequency at all. In theory this makes the speaker driver MI, contingent on the timer_spkr_*() functions existing but the driver does not know this yet and still attaches to the ISA bus. Syscons is more tricky, in one function, sc_tone(), it knows the hz and things are just fine. In the other function, sc_bell() it seems to get the period from the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode the 1193182 and leave it at that. It's probably not important. Change a few other sysbeep() uses which obviously knew that the argument was in terms of i8254 frequency, and leave alone those that look like people thought sysbeep() took frequency in hertz. This eliminates the knowledge of i8254_freq from all but the actual clock.c code and the prof_machdep.c on amd64 and i386, where I think it would be smart to ask for help from the timecounters anyway [TBD]. Notes: svn path=/head/; revision=177642
* Fix the __FreeBSD_version check.Doug Rabson2008-03-261-1/+1
| | | | Notes: svn path=/head/; revision=177638
* Bump __FreeBSD_version for the addition of 'l_sysid' to the flock structure.Doug Rabson2008-03-261-1/+1
| | | | Notes: svn path=/head/; revision=177637
* Add some regression tests for posix record locks.Doug Rabson2008-03-262-0/+1356
| | | | Notes: svn path=/head/; revision=177636
* Add \n to the end of a printf string and remove it from panic strings.Ed Maste2008-03-261-6/+6
| | | | Notes: svn path=/head/; revision=177635
* Regen.Doug Rabson2008-03-2610-13/+33
| | | | Notes: svn path=/head/; revision=177634
* Add the new kernel-mode NFS Lock Manager. To use it instead of theDoug Rabson2008-03-2680-525/+20923
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | user-mode lock manager, build a kernel with the NFSLOCKD option and add '-k' to 'rpc_lockd_flags' in rc.conf. Highlights include: * Thread-safe kernel RPC client - many threads can use the same RPC client handle safely with replies being de-multiplexed at the socket upcall (typically driven directly by the NIC interrupt) and handed off to whichever thread matches the reply. For UDP sockets, many RPC clients can share the same socket. This allows the use of a single privileged UDP port number to talk to an arbitrary number of remote hosts. * Single-threaded kernel RPC server. Adding support for multi-threaded server would be relatively straightforward and would follow approximately the Solaris KPI. A single thread should be sufficient for the NLM since it should rarely block in normal operation. * Kernel mode NLM server supporting cancel requests and granted callbacks. I've tested the NLM server reasonably extensively - it passes both my own tests and the NFS Connectathon locking tests running on Solaris, Mac OS X and Ubuntu Linux. * Userland NLM client supported. While the NLM server doesn't have support for the local NFS client's locking needs, it does have to field async replies and granted callbacks from remote NLMs that the local client has contacted. We relay these replies to the userland rpc.lockd over a local domain RPC socket. * Robust deadlock detection for the local lock manager. In particular it will detect deadlocks caused by a lock request that covers more than one blocking request. As required by the NLM protocol, all deadlock detection happens synchronously - a user is guaranteed that if a lock request isn't rejected immediately, the lock will eventually be granted. The old system allowed for a 'deferred deadlock' condition where a blocked lock request could wake up and find that some other deadlock-causing lock owner had beaten them to the lock. * Since both local and remote locks are managed by the same kernel locking code, local and remote processes can safely use file locks for mutual exclusion. Local processes have no fairness advantage compared to remote processes when contending to lock a region that has just been unlocked - the local lock manager enforces a strict first-come first-served model for both local and remote lockers. Sponsored by: Isilon Systems PR: 95247 107555 115524 116679 MFC after: 2 weeks Notes: svn path=/head/; revision=177633
* Rename timer0_max_count to i8254_max_count.Poul-Henning Kamp2008-03-2612-253/+258
| | | | | | | | Rename timer0_real_max_count to i8254_real_max_count and make it static. Rename timer_freq to i8254_freq and make it a loader tunable. Notes: svn path=/head/; revision=177631
* The RTC related pscnt and psdiv variables have no business being public.Poul-Henning Kamp2008-03-267-14/+6
| | | | Notes: svn path=/head/; revision=177628
* Remove old sysctl stuff which is long gone in other arch's.Poul-Henning Kamp2008-03-261-21/+0
| | | | Notes: svn path=/head/; revision=177627
* Fix some "in in" typos in comments.Christian Brueffer2008-03-2612-12/+12
| | | | | | | | | | PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days Notes: svn path=/head/; revision=177626
* Document the removal data for usbdevs.h and usbdevs_data.h,Remko Lodder2008-03-261-2/+3
| | | | | | | | | | | | sort the entry into it's correct place (behind 200407XX before 200406XX because we have an explicit date here). PR: misc/122098 Submitted by: "John Hein" <jhein@timing.com> MFC after: 3 days Notes: svn path=/head/; revision=177625
* Enable the automatic creation of superpage reservations.Alan Cox2008-03-261-2/+2
| | | | Notes: svn path=/head/; revision=177624
* split out tty create part of ucom_attach into ucom_attach_tty soSam Leffler2008-03-252-7/+13
| | | | | | | | | | derived drivers can use it Submitted by: Jared Go MFC after: 3 weeks Notes: svn path=/head/; revision=177623
* add some CDMA modemsSam Leffler2008-03-251-0/+9
| | | | | | | | Submitted by: Jared Go MFC after: 1 week Notes: svn path=/head/; revision=177622
* Implement taskqueue_block() and taskqueue_unblock(). These functions allowScott Long2008-03-252-1/+30
| | | | | | | | | | | | | the owner of a queue to block and unblock execution of the tasks in the queue while allowing tasks to continue to be added queue. Combining this with taskqueue_drain() allows a queue to be safely disabled. The unblock function may run (or schedule to run) the queue when it is called, just as calling taskqueue_enqueue() would. Reviewed by: jhb, sam Notes: svn path=/head/; revision=177621
* fix botched merge of syslog support to the vendor branch; these filesSam Leffler2008-03-252-2/+13
| | | | | | | were off the branch so we need to pull the changes back up Notes: svn path=/head/; revision=177620
* Add 64-bit array support for RAIDs > 2TB. This corresponds to ~ AdaptecEd Maste2008-03-254-5/+17
| | | | | | | | | | | | | driver build 15317. Tested on: Adaptec 2230S, Firmware 4.2-0 (8205) ICP ICP5085BL, Firmware 5.2-0 (12814) Submitted by: Adaptec Notes: svn path=/head/; revision=177619
* add __noinlineSam Leffler2008-03-251-0/+6
| | | | | | | | | Submitted by: imp Reviewed by: kan (long ago) MFC after: 3 weeks Notes: svn path=/head/; revision=177618
* expose if_purgemaddrs, it will be used by the vap code unless someoneSam Leffler2008-03-252-2/+2
| | | | | | | | | redesigns the mcast support code in the next few weeks MFC after: 3 weeks Notes: svn path=/head/; revision=177617
* IFM_IEEE80211_IBSSMASTER hasn't been used in many years; replace itSam Leffler2008-03-251-2/+2
| | | | | | | | | with IFM_IEEE80211_WDS which will be used by the forthcoming vap code MFC after: 3 weeks Notes: svn path=/head/; revision=177616
* enable dynamic addition of "show all" commandsSam Leffler2008-03-253-2/+15
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=177615
* Bring this manpage more in line with other wlan driver manpages.Christian Brueffer2008-03-251-10/+15
| | | | Notes: svn path=/head/; revision=177614
* Regen.John Baldwin2008-03-254-6/+21
| | | | Notes: svn path=/head/; revision=177613
* Add entries for the cpuset-related system calls. The existing system callsJohn Baldwin2008-03-251-0/+12
| | | | | | | | | can be used on little endian systems. Pointy hat to: jeff Notes: svn path=/head/; revision=177612