summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change the linprocfs <pid>/maps and procfs <pid>/map handlers to usekib2008-12-082-16/+51
| | | | | | | | | | | | sbuf instead of doing uiomove. This allows for reads from non-zero offsets to work. Patch is forward-ported des@' one, and was adopted to current code by dchagin@ and me. Reviewed by: des (linprocfs part) PR: kern/101453 MFC after: 1 week
* Do drop vm map lock earlier in the sysctl_kern_proc_vmmap(), to avoidkib2008-12-081-38/+40
| | | | | | | locking a vnode while having vm map locked. Reported and tested by: pho MFC after: 1 week
* Document processor errata that affect performance measurement.jkoshy2008-12-081-0/+52
|
* The dqrele() function syncs the dq, then acquires the dqh lock, and thenkib2008-12-081-1/+13
| | | | | | | | | | | | | | | does final drop of the the dq reference to put it onto the free list. There is a possibility that the dq would be found by another thread after sync and before the dqh lock is acquired. If that other thread drops the dq before we have taken the dqh lock, the dirty dq is put on the free list. Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if the dq is dirty. This ensures that up to date dq is written in the quota file and fixes assertion in dqget(). Reported and tested by: Frode Nordahl <frode nordahl net> MFC after: 3 days
* mutex.h is needed here. It got it by namespace pollution.yongari2008-12-081-0/+2
| | | | Pointed out by: bde
* Clean up the mac GPIO interface a little. Also remove bogus copyrightnwhitehorn2008-12-082-26/+29
| | | | | | and 3rd license clause. Submitted by: Marco Trillo
* Reduce spin wait time consumed in GMII register access routines.yongari2008-12-081-4/+2
| | | | | | | | Waiting for 1ms for each GMII register access looks overkill and it may also decrease overall performance of driver because re(4) invokes mii_tick for every hz. Tested by: rpaulo
* Accidentally left ADB out of the PowerPC NOTES file during initial import.nwhitehorn2008-12-081-0/+3
|
* Add facilities to pmu(4) to interrogate battery status on Apple PowerPCnwhitehorn2008-12-083-15/+241
| | | | | | laptops. This includes battery presence detection, charging status, current and voltage readouts, and charge level indication. The sysctl interface is somewhat ACPI-like.
* o Implemented miibus_statchg handler. It detects whether re(4)yongari2008-12-082-28/+52
| | | | | | | | | | | | | | | | established a valid link or not. In miibus_statchg handler add a check for established link is valid one for the controller(e.g. 1000baseT is not a valid link for fastethernet controllers.) o Added a flag RE_FLAG_FASTETHER to mark fastethernet controllers. o Added additional check to know whether we've really encountered watchdog timeouts or missed Tx completion interrupts. This change may help to track down the cause of watchdog timeouts. o In interrupt handler, removed a check for link state change interrupt. Not all controllers have the bit and re(4) did not rely on the event for a long time. In addition, re(4) didn't request the interrupt in RL_IMR register. Tested by: rpaulo
* Make sure to return the result of meida change request.yongari2008-12-081-2/+3
| | | | Previously it used to return success regardless of the result.
* Add missing include to sys/lock.h before sys/rwlock.himp2008-12-083-0/+3
|
* - According to the corresponding Linux, NetBSD and OpenSolarismarius2008-12-072-36/+47
| | | | | | | | drivers, there should be a 1us delay after every write when bit-banging the MII. Also insert barriers in order to ensure the intended ordering. These changes hopefully will solve the bus wedging occasionally experienced with DM9102A since r182461. - Deobfuscate dc_mii_readreg() a bit.
* Minor tweaks to some of the comments. Also, add a XXX wondering if weimp2008-12-071-17/+18
| | | | | need to frob the 16-bit EXCA registers during the new interrupt-driven power-up sequence.
* Restore opt_inet.h include which was lost in the last commit.thompsa2008-12-071-0/+1
|
* - convert radix node head lock from mutex to rwlockkmacy2008-12-0710-74/+135
| | | | | | | | - make radix node head lock not recursive - fix LOR in rtexpunge - fix LOR in rtredirect Reviewed by: sam
* PROBLEM: putting in a loader config file a line of the formluigi2008-12-071-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loader_conf_files="foo bar baz" should cause loading the files listed, and then resume with the remaining config files (from previous values of the variable). Unfortunately, sometimes the line was ignored -- actually even modifying the line in /boot/default/loader.conf sometimes doesn't work. ANALYSIS: After much investigation, turned out to be a bug in the logic. The existing code detected a new assignment by looking at the address of the the variable containing the string. This only worked by pure chance, i.e. if the new string is longer than the previous value then the memory allocator may return a different address to store the string hence triggering the detection. SOLUTION: This commit contains a minimal change to fix the problem, without altering too much the existing structure of the code. However, as a step towards improving the quality and reliability of this code, I have introduced a handful of one-line functions (strget, strset, strfree, string= ) that could be used in dozens of places in the existing code. HOWEVER: There is a much bigger problem here. Even though I am no Forth expert (as most fellow src committers) I can tell that much of the forth code (in support.4th at least) is in severe need of a review/refactoring: + pieces of code are replicated multiple times instead of writing functions (see e.g. set_module_*); + a lot of stale code (e.g. "structure" definitions for preloaded_files, kernel_module, pnp stuff) which is not used or at least belongs elsewhere. The code bload is extremely bad as the loader runs with very small memory constraints, and we already hit the limit once (see http://svn.freebsd.org/viewvc/base?view=revision&revision=185132 Reducing the footprint of the forth files is critical. + two different styles of coding, one using pure stack functions (maybe beautiful but surely highly unreadable), one using high level mechanisms to give names to arguments and local variables (which leads to readable code). Note that this code is used by default by all FreeBSD installations, so the fragility and the code bloat are extremely damaging. I will try to work fixing the three items above, but if others have time, please have a look at these issues. MFC after: 4 weeks
* honor IEEE80211_BPF_CRYPTO for raw xmit; fixes shared key auth in sta modesam2008-12-071-2/+50
| | | | PR: kern/129022
* New periodic calibration scheme needed for 11n parts that havesam2008-12-072-54/+92
| | | | | | | | | | | | | | | multiple algorithms and potentially collect multiple samples. Instead of a single calibration interval we now have short and long intervals; the long interval roughly corresponds to the previous single interval. The short interval is used to speedup collection of samples and happens much quicker. We make calls using the short interval until we're told the calibration work is complete at which point we fallback to the long interval. In addition there is a much longer reset interval used to flush all calibration state and cause everthing to start anew. With these changes you can also disable calibration entirely by setting the long interval to zero.
* bring in diagnostic tools that are useful now that we have hal source codesam2008-12-0723-7/+4222
|
* Use "allowed_peer" throughout this manual page.trhodes2008-12-071-2/+3
|
* Use '0' rather than PZERO to not change the priority that I'm waitingimp2008-12-071-3/+3
| | | | | | | | | | at. I don't think this will make a huge difference, but I have received a report of a interrupt storm on one 16-bit card that this might fix (chances are it won't, since I think that we may need to check both the CBB registers for the 16-bit card as well as the PCIC registers for power state change). Submitted by: jhb@
* Use atomic_add_int rather than a simple ++ to ensure no cache races ifimp2008-12-071-1/+1
| | | | | | | | the power interrupt and init code waiting for the interrupt are running on different CPUs. I haven't seen this make any real difference, but I've also had some reports of odd behavior I can't otherwise explain. It is an infrequent operation, and certainly wouldn't hurt.
* Improve usefulness of the panic by printing the pointer to the problematickib2008-12-071-1/+1
| | | | | | | dquot. In-tree gdb is often unable to get the dq value, so supply it in panic message. MFC after: 3 days
* Fix spelling error (find -> found).nwhitehorn2008-12-071-1/+1
|
* Now that pmu(4) has features, it should also have a man page.nwhitehorn2008-12-072-0/+96
|
* Add filler man pages for the kinfo functions I added recently.peter2008-12-073-1/+149
| | | | While here, hook up the hexdump(3) man page which wasn't being installed.
* When libthr and rtld start up, there are a number of magic spells castpeter2008-12-071-1/+1
| | | | | | | | | | | | | | in order to get the symbol binding state "just so". This is to allow locking to be activated and not run into recursion problems later. However, one of the magic bits involves an explicit call to _umtx_op() to force symbol resolution. It does a wakeup operation on a fake, uninitialized (ie: random contents) umtx. Since libthr isn't active, this is harmless. Nothing can match the random wakeup. However, valgrind finds this and is not amused. Normally I'd just write a suppression record for it, but the idea of passing random args to syscalls (on purpose) just doesn't feel right.
* Add support for automated reboot after power failure on Apple Core99 machinesnwhitehorn2008-12-071-3/+61
| | | | | (G3 laptops, all G4 machines, early G5s, G5 Xserves). The relevant sysctl is named dev.pmu.0.server_mode for mental compatibility with Linux.
* Fix some nasty race conditions in the VIA-CUDA driver that ended up preventingnwhitehorn2008-12-067-141/+214
| | | | | | my right mouse button and keyboard LEDs from working due to mangled configuration packets. Fixed several other races and associated problems in the main ADB stack that were exposed while fixing this.
* Carefully handle memory errors to keep peers compression/encryption statemav2008-12-061-11/+24
| | | | | consistent. There are some cases reported where peers fatally getting out of sync without any visible reason. I hope this solve the problem.
* Cleanup msleep() arguments.mav2008-12-061-2/+2
| | | | Move wakeup() out of the lock.
* Implement suspend/resume for mmc and mmcsd drivers.mav2008-12-062-66/+164
| | | | | | | | | | | Now it is possible to suspend/resume with inserted and active card. To reinitialize card on resume and to detect card change while suspended, implement bus rescan routines. It can also be used by controllers without card presence detection signals or with multiple cards per slot support. While there, cleanup msleep() usage. We have no any rights to exit without "request done" signal from driver as it could lead to modify after free.
* Restore memory clobber, to cause mb on the compiler level too.kib2008-12-061-3/+3
| | | | | | Use more sane formatting of the assembler. Pointed out by: bde
* The startall variable should default to zero, otherwise the vap is restartedthompsa2008-12-061-6/+5
| | | | | | everytime an ioctl happens. While I am here, limit the locking scope to SIOCSIFFLAGS.
* Change the default value for the flag enabling superpage mapping andalc2008-12-061-1/+1
| | | | | | | promotion to "on". Reminded by: jhb Tested by: kris
* Add a -L option to wc(1), for finger compatibility with the GNUkeramida2008-12-062-11/+60
| | | | | | | | | | wc utility. The -L option can be used to report the length of the longest line wc has seen in one or more files. It is disabled by default, and wc uses the standard `-lwc'. Submitted by: Sheldon Givens, sheldon at sigsegv.ca Reviewed by: kib MFC after: 1 week
* in_rtalloc1(9) returns a locked route, so make sure that we usecsjp2008-12-061-4/+4
| | | | | | | | | | | | RTFREE_LOCKED() here. This macro makes sure the reference count on the route is being managed properly. This elimates another case which results in the following message being printed to the console: rtfree: 0xc841ee88 has 1 refs Reviewed by: bz MFC after: 2 weeks
* Correct include path for i386 specific includes. This allows zfsps2008-12-061-1/+1
| | | | to boot on systems where the loader is built on amd64 systems.
* - Eliminate unused variable. [1]stas2008-12-061-5/+2
| | | | | | | | - Check for runt frames entering the stack. [2] Suggested by: ganbold[1], yongari[2] Approved by: kib (mentor) MFC after: 2 weeks
* This is simple testing program for revision 185647.ganbold2008-12-061-0/+81
| | | | | | | It invokes multiple parallel threads and each thread calls vfork() system call. Approved by: kib
* Code from the hack-session known as the IETF (and arrs2008-12-0625-885/+6917
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bit of debugging afterwards): - Fix protection code for notification generation. - Decouple associd from vtag - Allow vtags to have less strigent requirements in non-uniqueness. o don't pre-hash them when you issue one in a cookie. o Allow duplicates and use addresses and ports to discriminate amongst the duplicates during lookup. - Add support for the NAT draft draft-ietf-behave-sctpnat-00, this is still experimental and needs more extensive testing with the Jason Butt ipfw changes. - Support for the SENDER_DRY event to get DTLS in OpenSSL working with a set of patches from Michael Tuexen (hopefully heading to OpenSSL soon). - Update the support of SCTP-AUTH by Peter Lei. - Use macros for refcounting. - Fix MTU for UDP encapsulation. - Fix reporting back of unsent data. - Update assoc send counter handling to be consistent with endpoint sent counter. - Fix a bug in PR-SCTP. - Fix so we only send another FWD-TSN when a SACK arrives IF and only if the adv-peer-ack point progressed. However we still make sure a timer is running if we do have an adv_peer_ack point. - Fix PR-SCTP bug where chunks were retransmitted if they are sent unreliable but not abandoned yet. With the help of: Michael Teuxen and Peter Lei :-) MFC after: 4 weeks
* Make it possible to use gjournal for the root filesystem. Previously,trasz2008-12-062-0/+18
| | | | | | | | | an unclean shutdown would make it impossible to mount rootfs at boot. PR: kern/128529 Reviewed by: pjd Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation
* - correct variable namedanger2008-12-061-1/+1
| | | | | | PR: docs/129448 Submitted by: Kenyon Ralph <kralph@gmail.com> MFC after: Revision 1.91 is merged
* Import the strndup(3) function.kib2008-12-064-3/+75
| | | | | | | | Copyright attribution is kept the same as in original NetBSD source. Submitted by: Florian Smeets <flo kasimir com> Obtained from: NetBSD MFC after: 2 weeks
* Order the str*.c files mostly alphabetical.kib2008-12-061-3/+3
| | | | | Submitted by: Florian Smeets <flo kasimir com> MFC after: 2 weeks
* bsdtar is synced up with 2.5.903akientzle2008-12-061-1/+1
|
* bsdtar always supports long options now, so we can removekientzle2008-12-061-2/+2
| | | | a documentation disclaimer.
* Only use GCC-specific __dead2 marker when building with GCC.kientzle2008-12-062-1/+11
|
* Custom command line parser for cpio; this is a little morekientzle2008-12-065-119/+198
| | | | | code but should be a lot fewer cross-platform compatibility headaches.
OpenPOWER on IntegriCloud