summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning.pjd2004-08-161-1/+1
|
* Add support for 32-bit Linux binary emulation on amd64:tjr2004-08-161-5/+16
| | | | | | | - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if building with the COMPAT_LINUX32 option. - make minimal changes to the i386 linprocfs_docpuinfo() function to support amd64. We return a fake CPU family of 6 for now.
* Regen.tjr2004-08-163-3/+3
|
* Add preliminary support for running 32-bit Linux binaries on amd64, enabledtjr2004-08-1616-1/+4915
| | | | | | | | | | with the COMPAT_LINUX32 option. This is largely based on the i386 MD Linux emulations bits, but also builds on the 32-bit FreeBSD and generic IA-32 binary emulation work. Some of this is still a little rough around the edges, and will need to be revisited before 32-bit and 64-bit Linux emulation support can coexist in the same kernel.
* Changes to MI Linux emulation code necessary to run 32-bit Linux binariestjr2004-08-1612-112/+244
| | | | | | | | | | | | | | | on AMD64, and the general case where the emulated platform has different size pointers than we use natively: - declare certain structure members as l_uintptr_t and use the new PTRIN and PTROUT macros to convert to and from native pointers. - declare some structures __packed on amd64 when the layout would differ from that used on i386. - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if compiling with COMPAT_LINUX32. This will need to be revisited before 32-bit and 64-bit Linux emulation support can coexist in the same kernel. - other small scattered changes. This should be a no-op on i386 and Alpha.
* Add a new type, l_uintptr_t, which is an unsigned integer type with thetjr2004-08-162-0/+8
| | | | | same width as a pointer under Linux. Add two new macros, PTRIN and PTROUT, which convert between l_uintptr_t and native pointers.
* Connect RAID3 GEOM class to the build.pjd2004-08-164-0/+5
|
* Don't need to declare cbb module. don't know why I never sawimp2004-08-162-2/+0
| | | | duplicate messages..
* Advertise that color is supported so that syscons doesn't come upgrehan2004-08-161-2/+2
| | | | in monochrome mode when run as init.
* Introduce GEOM RAID3 class, i.e. kernel module, which implements RAID3pjd2004-08-164-0/+3562
| | | | | | | transformation and graid3(8) userland utility, which can be used for configuration. No manual page yet, sorry. Hardware provided by: Daniel Seuffert
* - Introduce and use a new tunable "debug.mpsafevm". At present, settingalc2004-08-164-11/+36
| | | | | | | | | | | | | | "debug.mpsafevm" results in (almost) Giant-free execution of zero-fill page faults. (Giant is held only briefly, just long enough to determine if there is a vnode backing the faulting address.) Also, condition the acquisition and release of Giant around calls to pmap_remove() on "debug.mpsafevm". The effect on performance is significant. On my dual Opteron, I see a 3.6% reduction in "buildworld" time. - Use atomic operations to update several counters in vm_fault().
* Always acquire the UNIX domain socket subsystem lock (UNP lock)rwatson2004-08-161-46/+107
| | | | | | | | | | before dereferencing sotounpcb() and checking its value, as so_pcb is protected by protocol locking, not subsystem locking. This prevents races during close() by one thread and use of ths socket in another. unp_bind() now assert the UNP lock, and uipc_bind() now acquires the lock around calls to unp_bind().
* Rather than bringing back all of the changes to make VM map deletiongreen2004-08-161-1/+5
| | | | | | | | wait for system wires to disappear, do so (much more trivially) by instead only checking for system wires of user maps and not kernel maps. Alternative by: tor Reviewed by: alc
* Add the missing knote_fdclose().green2004-08-161-2/+4
|
* Allocate the marker, when scanning a kqueue, from the "heap" instead of thegreen2004-08-161-6/+12
| | | | | | | stack. When swapped out, a process's kernel stack would be unavailable, and we could get a page fault when scanning the same kqueue. PR: kern/61849
* Didn't intend to commit debugging code enabledimp2004-08-161-1/+0
|
* Annotate the current UNIX domain socket locking strategies, order,rwatson2004-08-161-0/+21
| | | | | strengths, and weaknesses in a comment. Assert a copyright over the changes made as part of the locking work.
* Major enhancements to pipe memory usage:silby2004-08-161-55/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pipespace is now able to resize non-empty pipes; this allows for many more resizing opportunities - Backing is no longer pre-allocated for the reverse direction of pipes. This direction is rarely (if ever) used, so this cuts the amount of map space allocated to a pipe in half. - Pipe growth is now much more dynamic; a pipe will now grow when the total amount of data it contains and the size of the write are larger than the size of pipe. Previously, only individual writes greater than the size of the pipe would cause growth. - In low memory situations, pipes will now shrink during both read and write operations, where possible. Once the memory shortage ends, the growth code will cause these pipes to grow back to an appropriate size. - If the full PIPE_SIZE allocation fails when a new pipe is created, the allocation will be retried with SMALL_PIPE_SIZE. This helps to deal with the situation of a fragmented map after a low memory period has ended. - Minor documentation + code changes to support the above. In total, these changes increase the total number of pipes that can be allocated simultaneously, drastically reducing the chances that pipe allocation will fail. Performance appears unchanged due to dynamic resizing.
* Tweak the compatibility macros a little so that the device printing isimp2004-08-1515-28/+29
| | | | moved into them.
* Other part of the cbb isa/pci split. This likely is causing problemsimp2004-08-152-10/+76
| | | | wrt cbb module.
* Add a kludge for building SBus-only kernels, i.e. kernels without supportmarius2004-08-151-3/+5
| | | | | | | | | for EBus, ISA and PCI, by compiling ofw_isa.c and ofw_pci_if.m unconditio- nally. The correct way is to rewrite OF_decode_addr() in ofw_machdep.c in a bus-neutral way. That's certainly possible but we unfortunately didn't make it for FreeBSD 5.3. Approved by: tmm
* Release the vnode cache mutex when calling vgone(), since vgone() maydes2004-08-151-26/+39
| | | | | sleep. This makes pfs_exit() even less efficient than before, but on the bright side, the vnode cache mutex no longer needs to be recursive.
* Correct some uses of the wrong members of the *min()/*max()-familiy, e.g.marius2004-08-153-5/+5
| | | | | | min() on unsigned long. None of these are believed to have been fatal though. Reviewed by: tmm
* - Make pmap_emulate_reference() MP and preemption safe. Previously, italc2004-08-151-30/+20
| | | | | | | | | | contained "sanity" checks that could be violated if another CPU modified the pmap between the emulation trap and locking the pmap in pmap_emulate_reference(). As a result, the pte could be inconsistent with the access that caused the emulation trap. In such cases, pmap_emulate_reference() now flushes the current CPU's TLB entry and returns. - Make pmap_changebit() an inline function, reducing object code size.
* Preemptive anti-footshooting: cause a #error if MP_WATCHDOG is compiledrwatson2004-08-152-0/+10
| | | | with SCHED_ULE.
* Spell MP_WATCHDIG right: I fixed the build without MP_WATCHDOG afterrwatson2004-08-151-1/+1
| | | | testing MP_WATCHDOG, and used an incorrect ifdef.
* Yet another tweak to the shutdown messages in boot():truckman2004-08-151-15/+12
| | | | | | | | | | | | | | | | | | | | | | Don't count busy buffers before the initial call to sync() and don't skip the initial sync() if no busy buffers were called. Always call sync() at least once if syncing is requested. This defers the "Syncing disks, buffers remaining..." message until after the initial sync() call and the first count of busy buffers. This backs out changes in kern_shutdown 1.162. Print a different message when there are no busy buffers after the initial sync(), which is now the expected situation. Print an additional message when syncing has completed successfully in the unusual situation where the work of syncing was done by boot(). Uppercase one message to make it consistent with all of the other kernel shutdown messages. Discussed with: bde (in a much earlier form, prior to 1.162) Reviewed by: njl (in an earlier form)
* Add an "options MP_WATCHDOG" to i386. This option allows one of therwatson2004-08-157-0/+529
| | | | | | | | | | | | | | | | | | | | | | | logical CPUs on a system to be used as a dedicated watchdog to cause a drop to the debugger and/or generate an NMI to the boot processor if the kernel ceases to respond. A sysctl enables the watchdog running out of the processor's idle thread; a callout is launched to reset a timer in the watchdog. If the callout fails to reset the timer for ten seconds, the watchdog will fire. The sysctl allows you to select which CPU will run the watchdog. A sample "debug.leak_schedlock" is included, which causes a sysctl to spin holding sched_lock in order to trigger the watchdog. On my Xeons, the watchdog is able to detect this failure mode and break into the debugger, which cannot otherwise be done without an NMI button. This option does not currently work with sched_ule due to ule's push notion of scheduling, similar to machdep.hlt_logical_cpus failing to work with that scheduler. On face value, this might seem somewhat inefficient, but there are a lot of dual-processor Xeons with HTT around, so using one as a watchdog for testing is not as inefficient as one might fear.
* move the declaration of struct kqlist into the non-KERNEL visable sectionjmg2004-08-151-3/+2
| | | | to fix userland.
* Avoid code duplication by introducing g_mirror_write_metadata() function,pjd2004-08-151-55/+29
| | | | | which is used now by g_mirror_clear_metadata() function and g_mirror_update_metadata() function.
* Replace linux_getitimer() and linux_setitimer() with implementationstjr2004-08-151-24/+77
| | | | | based on those in freebsd32_misc.c, removing the assumption that Linux uses the same layout for struct itimerval as we use natively.
* Avoid assuming that l_timeval is the same as the native struct timevaltjr2004-08-151-2/+7
| | | | in linux_select().
* Use sv_psstrings from the current process's sysentvec structure insteadtjr2004-08-151-2/+3
| | | | | | of PS_STRINGS. This is a no-op at present, but it will be needed when running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in addressable memory.
* Use the USBD_FORCE_SHORT_XFER flag when setting up transmit transfers.iedowse2004-08-151-1/+2
| | | | | | | | | Without this, the device cannot detect the end of ethernet packets whose size is a multiple of the USB packat size. PR: kern/70474 Submitted by: Andrew Thompson <andy@fud.org.nz> MFC after: 1 week
* Add locking to the kqueue subsystem. This also makes the kqueue subsystemjmg2004-08-1536-529/+1205
| | | | | | | | | | | | | a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops. Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases). Reviewed by: green, rwatson (both earlier versions)
* Fix a style(9) bug (variable definitions inside a nested scope) a patchmarius2004-08-151-4/+2
| | | | | | | of mine introduced in revision 1.10. Approved by: marcel Prodded by: marcel
* Add a new sysctl, debug.kdb.stop_cpus, which controls whether or not werwatson2004-08-151-2/+19
| | | | | | | | | | | attempt to IPI other cpus when entering the debugger in order to stop them while in the debugger. The default remains to issue the stop; however, that can result in a hang if another cpu has interrupts disabled and is spinning, since the IPI won't be received and the KDB will wait indefinitely. We probably need to add a timeout, but this is a useful stopgap in the mean time. Reviewed by: marcel
* sio(4), which never really worked on sparc64, was removed in favour ofmarius2004-08-151-2/+0
| | | | | uart(4) in sparc64/conf/GENERIC revision 1.63 about 9 months ago. Remove its source files here, too.
* - Introduce an uart_cpu_identify() which is implemented in uart_cpu_<arch>.cmarius2004-08-149-2/+86
| | | | | | | | | | | | | | | | | and that can be used as an identify function for all kinds of busses on a certain platform. Expect for sparc64 these are only stubs right now. [1] - For sparc64, add code to its uart_cpu_identify() for registering the on- board ISA UARTs and their resources based on information obtained from Open Firmware. It would be better if this would be done in the OFW ISA code. However, due to the common FreeBSD ISA code and PNP-IDs not always being present in the properties of the ISA nodes there seems to be no good way to implement that. Therefore special casing UARTs as the sole really relevant ISA devices on sparc64 seemed reasonable. [2] Approved by: marcel Discussed with: marcel [1], tmm [2] Tested by: make universe
* Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can usemarius2004-08-141-1/+2
| | | | | sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.
* Now that hme(4) is MI build its module on all platforms.marius2004-08-142-4/+6
| | | | Tested by: `make universe` and powerpc cross-build on i386
* Add hme(4) here now that it's MI.marius2004-08-141-0/+2
|
* Make hme(4), i.e. the PCI-variant, MI by reading the MAC address on sytemsmarius2004-08-141-3/+152
| | | | | | | | | | | | | | | without Open Firmware directly instead of using OF_getetheraddr(). This is a bit painful though, as the MAC address is contained in the NA field of the VPD of the EBus bridge, which is is another function of the same chip. To make it worse, the VPD of the EBus bridge can't be accessed via the PCI capability pointer but has to be digged out from the Boot PROM and has a non-standard format. The PCI VPD struct and macros used here should be part of the FreeBSD PCI code nevertheless. Approved by: tmm Based on: NetBSD Tested with: Sun X1032A (hme(4)-isp(4)-combo card) on alpha and i386
* Next step in making usb more newbus:imp2004-08-143-64/+50
| | | | | | | | | | | | | o reprobe children when a new driver is added to uhub o fix the usbd_probe_and_attach to set the ivars to a malloc'd area, as well as freeing the ivars on child destruction. o Don't delete children that don't attach. Evidentally, the need to do this is a common misconception. o minor formatting foo that may violate style(9) at the moment, but keeps the diffs against my p4 tree smaller. This does not solve the ugen gobbling things up problem, but the fixes I have for that expose bugs in other parts of the tree...
* - Make OF_getetheraddr() honour the "local-mac-address?" system configmarius2004-08-144-14/+13
| | | | | | | | | | | | | | | variable. If set to "true" OF_getetheraddr() will now return the unique MAC address stored in the "local-mac-address" property of the device's OFW node if present and the host address/system default MAC address if the node doesn't doesn't have such a property. If set to "false" the host address will be returned for all devices like before this change. This brings the behaviour of device drivers for NICs with OFW support/ FCode, i.e. dc(4) for on-board DM9102A on Sun machines, gem(4) and hme(4), regarding "local-mac-address?" in line with NetBSD and Solaris. The man pages of the respective drivers will be updated separately to reflect this change. - Remove OF_getetheraddr2() which was used as a stopgap in dc(4). Its functionality is now part of OF_getetheraddr().
* Remove confused comment.phk2004-08-141-4/+0
|
* Remove spl calls.alc2004-08-141-19/+2
|
* Cause pfind() not to return processes in the PRS_NEW state. As a result,rwatson2004-08-141-1/+8
| | | | | | | | | | | | | | threads consuming the result of pfind() will not need to check for a NULL credential pointer or other signs of an incompletely created process. However, this also means that pfind() cannot be used to test for the existence or find such a process. Annotate pfind() to indicate that this is the case. A review of curent consumers seems to indicate that this is not a problem for any of them. This closes a number of race conditions that could result in NULL pointer dereferences and related failure modes. Other related races continue to exist, especially during iteration of the allproc list without due caution. Discussed with: tjr, green
* Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSDdwmalone2004-08-1423-130/+29
| | | | | | | | | | | | | | | | | | | | | have already done this, so I have styled the patch on their work: 1) introduce a ip_newid() static inline function that checks the sysctl and then decides if it should return a sequential or random IP ID. 2) named the sysctl net.inet.ip.random_id 3) IPv6 flow IDs and fragment IDs are now always random. Flow IDs and frag IDs are significantly less common in the IPv6 world (ie. rarely generated per-packet), so there should be smaller performance concerns. The sysctl defaults to 0 (sequential IP IDs). Reviewed by: andre, silby, mlaier, ume Based on: NetBSD MFC after: 2 months
* Fix outgoing ICMP on global instance.phk2004-08-141-5/+5
|
OpenPOWER on IntegriCloud