summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Implement RB_PREV() AND RB_FOREACH_REVERSE().jasone2007-12-281-0/+29
|
* In "show lockedvnods" DDB command, use db_printf() rather than printf()rwatson2007-12-281-1/+1
| | | | | | | | | so that the results end up in the DDB output stream rather than the console output stream. This should likely also be done for the vprint() function it calls. MFC after: 3 months
* Trimm out now unused option LK_EXCLUPGRADE from the lockmgr namespace.attilio2007-12-284-22/+1
| | | | | | | | | | | | | This option just adds complexity and the new implementation no longer will support it, so axing it now that it is unused is probabilly the better idea. FreeBSD version is bumped in order to reflect the KPI breakage introduced by this patch. In the ports tree, kris found that only old OSKit code uses it, but as it is thought to work only on 2.x kernels serie, version bumping will solve any problem.
* Unbreak LINT on non-i386/amd64 platforms.des2007-12-271-4/+0
|
* In order to avoid a huge class of deadlocks (in particular in interactionsattilio2007-12-271-1/+9
| | | | | | | | | | with the interlock), owner of the lock should be only curthread or at least, for its limited usage, NULL which identifies LK_KERNPROC. The thread "extra argument" for the lockmgr interface is going to be removed in the near future, but for the moment, just let kernel run for some days with this check on in order to find potential deadlocking places around the kernel and fix them.
* Return ESRCH when a kernel stack is queried on a process in execve() --rwatson2007-12-271-1/+2
| | | | | | | | | | | | | p_candebug() will return EAGAIN which, if the other process never leaves execve(), will result in the sysctl spinning and never returning to userspace. Processes should always eventually leave execve(), but spinning in kernel while we wait is bad for countless reasons, and particularly harmful if execve() itself is deadlocked. Possibly we should return another error, or return a marker indicating the thread is in execve() so it can be reported that way in userspace. Reported by: kris
* As LK_EXCLUPGRADE is used in conjuction with LK_NOWAIT, LK_UPGRADE becamesattilio2007-12-271-1/+1
| | | | | | | | | | equivalent with this and so operate the switch. That call is the only one remaining LK_EXCLUPGRADE consumer and removing it will prepare the ground for LK_EXCLUPGRADE axing and further lockmgr improvements. Discussed with: jeff, ups
* Add asmc(4).rpaulo2007-12-271-0/+4
| | | | Approved by: njl (mentor)
* Add a list of reservations to the vm object structure.alc2007-12-271-0/+2
| | | | | | | | Recycle the vm object's "pg_color" field to represent the color of the first virtual page address at which the object is mapped instead of the color of the object's first physical page. Since an object may not be mapped, introduce a flag "OBJ_COLORED" that indicates whether "pg_color" is valid.
* Add the superpage reservation type.alc2007-12-271-0/+3
|
* Add configuration knobs for the superpage reservation system. Initially,alc2007-12-278-0/+70
| | | | the reservation will only be enabled on amd64.
* A partial solution to some of the 'pull the umass device with aimp2007-12-272-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | mounted FS' problems. These are more along the lines of 'avoiding an avoidable panic' than a complete solution to removable devices. We now close the barn door after the horse has gotten lose and has been hit by a truck, as it were. The barn no longer catches fire in this case, but the horse is still dead :-). The vfs_bio.c fix causes us not to put a failed write back into the dirty pool if the error returned was ENXIO. In that case, the buffer is treated like any other clean buffer that's being retured. ENXIO means the device isn't there anymore and will never be there again in the future, so retrying is futile. The vfs_mount.c fix treats 'ENXIO' as success for unmounting a file system. If the device is gone, retrying later won't help and we'll never be able to unmount the device. These two are part of a larger patch set submitted by the author. The other patches will be forth coming. I added comments to these two patches. Submitted by: Henrik Gulbrandsen Reviewed by: phk@ PR: usb/46176 (partial)
* Add a workaround for a deadlock between the rt_setgate() and rt_check()mux2007-12-272-1/+11
| | | | | | | | functions. It is easily triggered by running routed, and, I expect, by running any other daemon that uses routing sockets. Reviewed by: net@ MFC after: 1 week
* Update two tracepoints, i.e., CTRx() invocations, to reflect the demise ofalc2007-12-272-6/+4
| | | | page coloring a few months ago.
* Fix some bugs in the FreeBSD 4/5/6 pci(4) IOCTLs compatibility code:marius2007-12-261-12/+9
| | | | | | | | | | | | | | | | - Use the correct offsets when copying out the results of PCIOCGETCONF_OLD. This happened to not affect the 64-bit architectures because there the addition of pc_domain to struct pcisel didn't change the overall size of struct pci_conf. [1] - Always copy the name and unit information to conf_old so it's also part of the output once this information is cached in dinfo. - Use the correct type for flags in struct pci_match_conf_old. This change is more or less cosmetic though. Reported and tested by: bde [1] Reviewed by: imp MFC after: 3 days Committed from: 24C3
* Fix incorrectly placed bracket in pppoe_find_svc().mav2007-12-261-1/+1
|
* "FreeBSD/Open Firmware/PowerPC ..." is confusing and non-standard.marcel2007-12-261-1/+1
| | | | Use "FreeBSD/powerpc Open Firmware ..." instead.
* Remove some prehistoric never used defines.mav2007-12-261-5/+0
|
* Update to 2008.imp2007-12-261-3/+3
| | | | MFC After: 1s
* Sync with rev 1.63 of NetBSD's ums.c:rpaulo2007-12-261-14/+49
| | | | | | | | | | | | If a mouse has both a wheel and a Z direction we report both. XXX Due to tradition the wheel is reported as the Z direction (and the Z direction as W). Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver doesn't know what to do with the new coordinate. MFC after: 3 months Approved by: njl (mentor), imp
* Add textdump(4) facility, which provides an alternative form of kernelrwatson2007-12-266-4/+644
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dump using mechanically generated/extracted debugging output rather than a simple memory dump. Current sources of debugging output are: - DDB output capture buffer, if there is captured output to save - Kernel message buffer - Kernel configuration, if included in kernel - Kernel version string - Panic message Textdumps are stored in swap/dump partitions as with regular dumps, but are laid out as ustar files in order to allow multiple parts to be stored as a stream of sequentially written blocks. Blocks are written out in reverse order, as the size of a textdump isn't known a priori. As with regular dumps, they will be extracted using savecore(8). One new DDB(4) command is added, "textdump", which accepts "set", "unset", and "status" arguments. By default, normal kernel dumps are generated unless "textdump set" is run in order to schedule a textdump. It can be canceled using "textdump unset" to restore generation of a normal kernel dump. Several sysctls exist to configure aspects of textdumps; debug.ddb.textdump.pending can be set to check whether a textdump is pending, or set/unset in order to control whether the next kernel dump will be a textdump from userspace. While textdumps don't have to be generated as a result of a DDB script run automatically as part of a kernel panic, this is a particular useful way to use them, as instead of generating a complete memory dump, a simple transcript of an automated DDB session can be captured using the DDB output capture and textdump facilities. This can be used to generate quite brief kernel bug reports rich in debugging information but not dependent on kernel symbol tables or precisely synchronized source code. Most textdumps I generate are less than 100k including the full message buffer. Using textdumps with an interactive debugging session is also useful, with capture being enabled/disabled in order to record some but not all of the DDB session. MFC after: 3 months
* Define a new kernel dump "architecture", TEXTDUMPMAGIC, which is usedrwatson2007-12-261-0/+2
| | | | | | | | | | to identify textdumps in the swap/dump partition. While textdumps aren't really an architecture, they are architecture-neutral and so don't really correspond to any existing architecture. Define a version number for textdumps, KERNELDUMP_TEXT_VERSION, of 1. MFC after: 3 months
* Remove duplicate $FreeBSD$ that snuck in.rwatson2007-12-261-2/+0
| | | | MFC after: 3 months
* Add a simple scripting facility to DDB(4), allowing the user torwatson2007-12-268-10/+666
| | | | | | | | | | | | | | | | | | | | | | define a set of named scripts. Each script consists of a list of DDB commands separated by ";"s that will be executed verbatim. No higher level language constructs, such as branching, are provided for: scripts are executed by sequentially injecting commands into the DDB input buffer. Four new commands are present in DDB: "run" to run a specific script, "script" to define or print a script, "scripts" to list currently defined scripts, and "unscript" to delete a script, modeled on shell alias commands. Scripts may also be manipulated using sysctls in the debug.ddb.scripting MIB space, although users will prefer to use the soon-to-be-added ddb(8) tool for usability reasons. Scripts with certain names are automatically executed on various DDB events, such as entering the debugger via a panic, a witness error, watchdog, breakpoint, sysctl, serial break, etc, allowing customized handling. MFC after: 3 months
* Fix a panic where if the mbuf was consumed by the filter for requeueingthompsa2007-12-261-0/+7
| | | | | | | | | (dummynet), ipsec_filter() would return the empty error code and the ipsec code would continue to forward/deference the null mbuf. Found by: m0n0wall Reviewed by: bz MFC after: 3 days
* Add a new DDB(4) facility, output capture. Input and output from DDB may berwatson2007-12-257-0/+330
| | | | | | | | | | | | | captured to a memory buffer for later inspection using sysctl(8), or in the future, to a textdump. A new DDB command, "capture", is added, which accepts arguments "on", "off", "reset", and "status". A new DDB sysctl tree, debug.ddb.capture, is added, which can be used to resize the capture buffer and extract buffer contents. MFC after: 3 months
* "vt" doesn't refer to any existing device anymore. Remove it.wkoszek2007-12-252-3/+1
| | | | | Reviewed by: cognet@ (mentor) Approved by: cognet@ (mentor)
* Rewrite kern.console handling in sbuf(9). My intention is to leavewkoszek2007-12-251-21/+16
| | | | | | | | kern.console format as is. Thus, no difference in output format should appear after this commit. Reviewed by: cognet@ (mentor) Approved by: cognet@ (mentor)
* Add support for the BMC5722.remko2007-12-252-0/+2
| | | | | Reported by: Chris Shenton <chris at shenton dot org> on current@ Approved by: imp (mentor)
* Bump __FreeBSD_version to 800007 to reflect kdb_enter change.rwatson2007-12-251-1/+1
|
* Add a new kernel startup event for DDB services, which will include DDBrwatson2007-12-251-0/+1
| | | | output capture, scripting, and textdumps.
* Add a new privilage category for DDB(4), and add PRIV_DDB_CAPTURE torwatson2007-12-251-1/+6
| | | | control access to the DDB capture buffer.
* Add a new 'why' argument to kdb_enter(), and a set of constants to userwatson2007-12-2533-48/+95
| | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
* Rename "mbuf_jumbo_pagesize" to "mbuf_jumbo_page". It makes it aligned correctlywkoszek2007-12-251-1/+1
| | | | | | | | | within ddb(4) and in the vmstat(8) output. This change requires netstat(8) to be recompiled. Reviewed by: rwatson@ Tested by: make LINT
* Use __FBSDID() in the kernel BPF implementation.rwatson2007-12-252-4/+6
| | | | MFC after: 3 days
* Change "audit_pipe_preselect" to "audit_pipe_presel" to make it printwkoszek2007-12-251-1/+1
| | | | | | with proper alignment in ddb(4) and vmstat(8). Reviewed by: rwatson@
* Workaround p->numbytes overflow, which can result in infinite loop insideoleg2007-12-251-7/+22
| | | | | | dummynet module (prerequisite is using queues with "fat" pipe). PR: kern/113548
* Add sysctl mibs for _TSP, _TC1 and _TC2 which is user overridableume2007-12-241-0/+40
| | | | | | | | but is blocked on user_override mib. Not a few people want to use a passive cooling without their ACPI BIOS support. Reviewed by: njl
* Move the check for the snp device being already attached after thekib2007-12-241-11/+6
| | | | | | | | | | | | | | | | fget() call, that is sleeping point, and possibly dropping Giant. The snp_target == NULL implies the snp_tty == NULL. Remove the code that is put under snp_target == NULL and snp_tty != NULL clause. In snpclose(), do the snp_detach() before scheduling the snp device destruction. Otherwise, after the return from snpclose(), the snp device is already removed from the snp_list, but tty is still in snooped state. Any attempt to do i/o on such tty cause panic because ttytosnp() returns NULL. Tested by: Peter Holm MFC after: 1 week
* Various fixes:marcel2007-12-241-41/+25
| | | | | | | | | | | | | | | o BSD disklabels have relative offsets. Even for the BSD in MBR slice setup, except when the mbroffset ioctl is supported. Since we don't support that ioctl, bsdlabel(8) expects relative offsets. So, when reading an existing disklabel, correct for disklabels that mistakenly have the mbroffset offsets. o Don't take the geometry seriously, because it's untrustworthy. We do expect the numbers to be within range. This means that the secperunit field will not be computed from secpercyl and ncyls, but simply is the mediasize in sectors. o Don't enforce partitions to be aligned to track boundaries. The default label, constructed by bsdlabel(8), puts partition a at offset BBSIZE bytes, which commonly means sector 16.
* - Fix a typo in comments.stas2007-12-231-1/+1
| | | | | MFC after: 1 week Approved by: cognet
* - remove code from oroginal file, which is not required on BWCT boardsticso2007-12-231-52/+86
| | | | | | | - Be more chatty on startup, since we have enough code space on AT91RM9200 - init DS1672 charging - init USART GPIO
* BWCT boards uses two different SPI flash chipsticso2007-12-231-2/+3
| | | | check for both status codes
* Remove trailing whitespace from lines in BPF.rwatson2007-12-232-7/+7
| | | | MFC after: 3 days
* When IPSEC fails to allocate policy state for an inpcb, and MAC is in use,rwatson2007-12-221-1/+5
| | | | | | | | free the MAC label on the inpcb before freeing the inpcb. MFC after: 3 days Submitted by: tanyong <tanyong at ercist dot iscas dot ac dot cn>, zhouzhouyi
* give thread0 the tid 100000 and bumpt the others to start at 100001julian2007-12-222-1/+3
| | | | MFC after: 1 week
* Make SCHED_ULE buildable with gcc3.wkoszek2007-12-211-17/+17
| | | | | Reviewed by: cognet (mentor), jeffr Approved by: cognet (mentor), jeffr
* More properly handle links who only have 1 valid IRQ in their bitmask. Thejhb2007-12-211-13/+12
| | | | | | | | | | | | | | | | | | | | | old code special cased them too early which caused a few differences for these sort of links relative to other PCI links: - They were always re-routed via the BIOS call instead of assuming that they were already routed if the BIOS had programmed the IRQ into a matching device during POST. - If the BIOS did route that link to a different IRQ that was marked as invalid, we trusted the $PIR table rather than the BIOS IRQ. This change moves the special casing for "unique IRQ" links to only take that into account when picking an IRQ for an unrouted link so that these links will now not be routed if the BIOS appears to have routed it already (some BIOSen have problems with that) and so that if the BIOS uses a different IRQ than the $PIR, we trust the BIOS routing instead (this is what we do for all other links as well). Reported by: Bruce Walter walter of fortean com MFC after: 1 week
* Update the comment describing vm_phys_unfree_page().alc2007-12-211-1/+3
|
* Apply missing s/rv/res/g in previous commit.marcel2007-12-214-4/+4
|
OpenPOWER on IntegriCloud