summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* * Add acpi_pcpu_get_id(idx, *acpi_id, *cpu_id) which fetches thenjl2003-11-262-51/+53
| | | | | | | | | | | | | | | | | | | | | | idx'th present CPU with pc_acpi_id equal to *acpi_id. If *acpi_id does not match that processor's pc_acpi_id, return the value for ProcId derived from the MADT in *acpi_id. If pc_acpi_id is 0xffffffff, always override it with the value of *acpi_id. Finally, return pc_cpuid in *cpu_id and use that as our primary key. * Use pc_cpuid as our unique key because we know it is valid since MD code set it. The values for ProcId in the ASL and MADT don't match up on some machines (!), forcing us to fall back to ordered probing in that case. * Remove some #ifdef SMP since the refcount doesn't hurt performance and will be needed for dynamic _CST objects. Only one #ifdef SMP (for smp_rendezvous) remains. * Hook up SMP in the compile flags in the Makefile. Tested by: marcel, truckman Approved by: re (scottl)
* Split the "inp" mutex class into separate classes for each of divert,sam2003-11-268-11/+13
| | | | | | | | raw, tcp, udp, raw6, and udp6 sockets to avoid spurious witness complaints. Reviewed by: rwatson Approved by: re (rwatson)
* Restructure a too broad ifdef which was disabling the setting of theandre2003-11-252-4/+8
| | | | | | tcp flightsize sysctl value for local networks in the !INET6 case. Approved by: re (scottl)
* workaround LOR in rt_setgatesam2003-11-251-1/+3
| | | | | Reviewed by: andre Approved by: re (rwatson)
* Turns out that building modules with the kernel opt files isimp2003-11-251-1/+0
| | | | | | | | | | | uncovering some interesting problems. Be conservative and effecitvely disable this by default. Interested parties may still define KERNBUILDDIR by hand to achive the same effect. I plan on referting this change after 5.2 is released, or sooner if the issues with building releases are resolved and re@ approves. Approved by: re@ (scottl, marcel)
* Write the correct value to `td_be' for the second and furtheriedowse2003-11-251-1/+1
| | | | | | | | | | | transfer descriptors when a large request needs to be split into more than one 8k chunk. The bug was that the calculation did not take into account the offset of the chunk within the overall request. This is reported to fix crashes and data corruption on ohci controllers. Submitted by: green Approved by: re
* Correct the former patch, I accidently committed the wrong version.sos2003-11-241-2/+2
| | | | Approved by: re@
* Fix panic on certain failed configs.sos2003-11-241-4/+11
| | | | Approved by: re@
* Be less noisy when GEOM probes around during boot if drive containssos2003-11-241-0/+5
| | | | | | invalid media (ie empty CD/DVD) Approved by: re@
* Initalize buffer headers correctly for current version of bio subsystem.grog2003-11-243-1/+6
| | | | | | | Not mentioned by: phk Approved by: re (scottl) This makes Vinum work again, at least in my testing.
* Correct a problem where ipfw-generated packets were being returnedsam2003-11-242-7/+12
| | | | | | | | | | | | | | for ipfw processing w/o an indication the packets were generated by ipfw--and so should not be processed (this manifested itself as a LOR.) The flag bit in the mbuf that was used to mark the packets was not listed in M_COPYFLAGS so if a packet had a header prepended (as done by IPsec) the flag was lost. Correct this by defining a new M_PROTO6 flag and use it to mark packets that need this processing. Reviewed by: bms Approved by: re (rwatson) MFC after: 2 weeks
* pktopt may be null.ume2003-11-241-0/+3
| | | | Approved by: re (rwatson)
* Long overdue comment claification: RFC 2783 was approved long time ago.phk2003-11-231-2/+2
| | | | Approved by: re@
* Use MPSAFE callouts only when debug.mpsafenet is 1. Both timer routinessam2003-11-232-2/+2
| | | | | | | | potentially transmit packets that may enter KAME IPsec w/o Giant if the callouts are marked MPSAFE. Reviewed by: ume Approved by: re (rwatson)
* Do not attempt to destroy NULL vfs options list.kan2003-11-231-1/+1
| | | | | Approved by: re (scottl) Reported by: Christian Laursen <xi atborderworlds dot dk>
* Fix vinum by correctly setting the b_offset bio filed when doing I/O.scottl2003-11-233-2/+7
| | | | Submitted by: grog
* Avoid NULL pointer dereference.phk2003-11-231-1/+2
| | | | Approved by: re@
* bzero() the the sockaddr used for the destination address fortmm2003-11-231-0/+1
| | | | | | | | | | | | rtalloc_ign() in in_pcbconnect_setup() before it is filled out. Otherwise, stack junk would be left in sin_zero, which could cause host routes to be ignored because they failed the comparison in rn_match(). This should fix the wrong source address selection for connect() to 127.0.0.1, among other things. Reviewed by: sam Approved by: re (rwatson)
* Move us into 5.2-BETAscottl2003-11-221-2/+2
|
* New defines that paves the way for new midi features and ports.matk2003-11-221-0/+2
| | | | | | | | | Changes consists of an IOCTL (SNDCTL_SEQ_GETTIME) and a constant. PR: kern/59233 Approved by: tanimura (mentor) Approved by: scottl (re) MFC after: 3 weeks
* Use function pointers to remove the depenancy cross dependancy on nfs4alfred2003-11-227-107/+46
| | | | | | | | and the nfs3 client. Also fix some bugs that happen to be causing crashes in both v3 and v4 introduced by the v4 import. Submitted by: Jim Rees <rees@umich.edu> Approved by: re
* Argh! The Athlon64 and Opteron only implement 40 bits of address space inpeter2003-11-221-5/+4
| | | | | | | | | | | | | the MTRR Base/Mask registers. If you use the documented algorithm in the systems programming guide, you'll get a GPF. The only thing that has prevented this so far is that the bios pre-sets some MTRR entries which we mis-interpreted sufficiently to fool the memcontrol interface into thinking all the address space was taken and therefore rejected XFree86's requests. However, not all bioses do this.. You get an insta-panic in that case. Grrr. A better fix (dynamic mask) will happen by 5.3/5-stable so that we automatically adapt to more than 40 physical bits. Approved by: re (scottl)
* Commit rev 1.1.1.20 to HEAD. This file was off the vendor branch and thusnjl2003-11-221-9/+19
| | | | | | the changes need to be made to HEAD. Approved by: re (previously)
* Fix support for the cmd646 chip.sos2003-11-211-2/+27
| | | | | Spotted by: tmm reviewed by: re@
* - Split cpu_mp_probe() into two parts. cpu_mp_setmaxid() is still calledjhb2003-11-218-46/+106
| | | | | | | | | | | | | | | | | | | | very early (SI_SUB_TUNABLES - 1) and is responsible for setting mp_maxid. cpu_mp_probe() is now called at SI_SUB_CPU and determines if SMP is actually present and sets mp_ncpus and all_cpus. Splitting these up allows an architecture to probe CPUs later than SI_SUB_TUNABLES by just setting mp_maxid to MAXCPU in cpu_mp_setmaxid(). This could allow the CPU probing code to live in a module, for example, since modules sysinit's in modules cannot be invoked prior to SI_SUB_KLD. This is needed to re-enable the ACPI module on i386. - For the alpha SMP probing code, use LOCATE_PCS() instead of duplicating its contents in a few places. Also, add a smp_cpu_enabled() function to avoid duplicating some code. There is room for further code reduction later since much of this code is also present in cpu_mp_start(). - All archs besides i386 still set mp_maxid to the same values they set it to before this change. i386 now sets mp_maxid to MAXCPU. Tested on: alpha, amd64, i386, ia64, sparc64 Approved by: re (scottl)
* This commit was generated by cvs2svn to compensate for changes in r122945,njl2003-11-212-25/+45
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Update code for checking the reference count and performing the finalnjl2003-11-212-25/+45
| | | | | | | | | | | | | | | | | | | | delete of objects. Also revert our temporary workaround in dsmthdat.c that always copied objects. This is the correct fix for errors evaluating _BST (and GBST) on IBM Thinkpads where an argument (Arg3) was returned to the caller and the object was freed while still in use. This will be in a future ACPI-CA dist. Thanks to: kochi@netbsd.org, shaohua.li@intel.com
| * Add the byte offset to the base address for IndexField objects. Thisnjl2003-11-211-9/+19
| | | | | | | | | | | | | | | | | | | | fixes an interrupt storm for certain users. This is done on the vendor branch since the code is already in the 20031029 ACPI-CA dist and will be imported after 5.2R. Tested by: sebastian ssmoller <sebastian.ssmoller@gmx.net> PR: i386/57909 Approved by: re (jhb)
* | New major number:imp2003-11-211-0/+1
| | | | | | | | | | | | | | | | 185 ce Cronyx Tau-32 E1 adapter <rik@cronyx.ru> (likely unneeded for current, but required for older versions of FreeBSD). Approved by: re@ (scottl)
* | With the beastie menu a problem was introduced in which selecting adcs2003-11-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different kernel to boot with kernel="NAME" would load the kernel and loader.conf-selected modules from /boot/NAME, but it would not change module_path. So, for instance, the automatically loaded acpi.ko would come from /boot/kernel/acpi.ko, *always*. Mind you, this happened for unassisted boot. If you interrupted, typed "unload" and then "boot NAME", it would Do The Right Thing. The source of the problem is the double initialization with beastie's loader.rc. One would happen inside "start", and would load the kernel. The next one would happen later in the loader.rc script, resetting module_path. Because module_path is set to the Right Value by the functions in support.4th that actually load the kernel, when beastie.4th proceeded to boot module_path would remain wrong, as the kernel was already loaded. This can be corrected by removing either initialization, and also by changing the command used by beastie.4th from "boot" to "boot-conf", which makes sure you use the right kernel and modules. I chose to remove the second initialization, since this let you interrupt (or confirm) boot before beastie even comes up. I avoid also doing the boot-conf change because that would simply cause the kernel and modules to be loaded twice (in fact, that was my original patch, until, in writing this very commit message, I saw the error of my ways). This commit changes the semantics of module loading when using the beastie menu. Now it does what one would expect it to, but not what it was actually doing, so something may break for unusual setups depending on broken behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-) Approved by: re (scottl)
* | Turn on NO_MIXED_MODE for amd64 generic. It turns out that all thepeter2003-11-211-0/+1
| | | | | | | | | | | | | | | | | | known samples of broken chipsets that needed mixed mode in the first place are so broken (ie: locks up) that we can't use IO APIC mode at all and it needs to be turned off in the bios. So, the MIXED_MODE penalty on the good chipsets gained nothing. Approved by: re (scottl)
* | Cosmetic and/or trivial sync up with i386.peter2003-11-2121-50/+52
| | | | | | | | Approved by: re (rwatson)
* | MFi386 rev 1.54 (jhb): Add interrupts that are actually available to thepeter2003-11-211-3/+19
| | | | | | | | | | | | resource manager, rather than adding everything. Approved by: re (scottl)
* | MFi386: pre-register idt slots for atpic so we catch any strays withoutpeter2003-11-211-6/+22
| | | | | | | | | | | | blowing up. Approved by: re (scottl)
* | MFi386 rev 1.207 (phk): Don't mistakenly disable the TSC when usingpeter2003-11-211-10/+10
| | | | | | | | | | | | statclock_disable. Approved by: re (scottl)
* | Argh! Followup to previous commit. I checked in the patch with anpeter2003-11-201-1/+1
| | | | | | | | unintended local change. Change Xurthread back to curthread.
* | MFamd64: use a less compiler-intensive MD implementation of 'curthread'peter2003-11-202-0/+13
| | | | | | | | | | | | so that the compiler doesn't have to do so much work. Approved by: re (jhb)
* | Provide a streamlined '#define curthread __curthread()' for amd64 to avoidpeter2003-11-202-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | the compiler having to parse and optimize the PCPU_GET(curthread) so often. __curthread() is an inline optimized version of PCPU_GET(curthread) that knows that pc_curthread is at offset zero in the pcpu struct. Add a CTASSERT() to catch any possible changes to this. This accounts for just over a 1% wall clock speedup for total kernel compile/link time, and 20% compile time speedup on some specific files depending on which compile options are used. Approved by: re (jhb)
* | Allow the MD backend to provide an alternative topeter2003-11-201-0/+2
| | | | | | | | | | | | #define curthread PCPU_GET(curthread) since its so heavily used in the kernel and ripe for compile-speed optimization on some platforms.
* | Fix a typo in my patches to support extended IRQ resources that broke thejhb2003-11-201-1/+1
| | | | | | | | | | | | type checking for _PRS for a link device's interrupt resources. Approved by: re (scottl)
* | Introduce tcp_hostcache and remove the tcp specific metrics fromandre2003-11-201-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the routing table. Move all usage and references in the tcp stack from the routing table metrics to the tcp hostcache. It caches measured parameters of past tcp sessions to provide better initial start values for following connections from or to the same source or destination. Depending on the network parameters to/from the remote host this can lead to significant speedups for new tcp connections after the first one because they inherit and shortcut the learning curve. tcp_hostcache is designed for multiple concurrent access in SMP environments with high contention and is hash indexed by remote ip address. It removes significant locking requirements from the tcp stack with regard to the routing table. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
* | Try all of the possible interrupts for a link device when programmingjhb2003-11-201-1/+1
| | | | | | | | | | | | | | | | | | boot-disabled devices instead of skipping the last interrupt. This is especially important for devices that only have one interrupt as this bug was keeping any interrupt from being tried at all. Reviewed by: msmith Approved by: re (scottl)
* | Update the size of the OS string table that wasn't updated in the previousjhb2003-11-201-1/+1
| | | | | | | | | | | | | | commit that removed the UNIX entry. Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Approved by: re (rwatson)
* | Introduce tcp_hostcache and remove the tcp specific metrics fromandre2003-11-2031-1153/+1686
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the routing table. Move all usage and references in the tcp stack from the routing table metrics to the tcp hostcache. It caches measured parameters of past tcp sessions to provide better initial start values for following connections from or to the same source or destination. Depending on the network parameters to/from the remote host this can lead to significant speedups for new tcp connections after the first one because they inherit and shortcut the learning curve. tcp_hostcache is designed for multiple concurrent access in SMP environments with high contention and is hash indexed by remote ip address. It removes significant locking requirements from the tcp stack with regard to the routing table. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
* | Remove RTF_PRCLONING from routing table and adjust users of itandre2003-11-2012-55/+39
| | | | | | | | | | | | | | | | | | | | | | | | accordingly. The define is left intact for ABI compatibility with userland. This is a pre-step for the introduction of tcp_hostcache. The network stack remains fully useable with this change. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
* | Set the ACPI processor Id in the PCPU structure so that CPU idlingmarcel2003-11-201-1/+1
| | | | | | | | | | | | | | | | | | on SMP systems has a chance of working. This was a loose end of the implementation of the ACPI Cx idle states. Since our logical CPU Id is the ACPI processor Id, we do not need to jump through hoops to obtain it. Approved: re@ (jhb)
* | Fix a major faux pas of mine. I was causing 2 very bad things tomarkm2003-11-203-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | happen in interrupt context; 1) sleep locks, and 2) malloc/free calls. 1) is fixed by using spin locks instead. 2) is fixed by preallocating a FIFO (implemented with a STAILQ) and using elements from this FIFO instead. This turns out to be rather fast. OK'ed by: re (scottl) Thanks to: peter, jhb, rwatson, jake Apologies to: *
* | Fix an arguments order in check_uidgid() call.maxim2003-11-201-2/+2
| | | | | | | | | | | | PR: kern/59314 Submitted by: Andrey V. Shytov Approved by: re (rwatson, jhb)
* | Remove unneeded file. (could be repo removed as nothing ever referenced it.)alfred2003-11-201-101/+0
| | | | | | | | Submitted by: Jim Rees <rees@umich.edu>
* | eliminate an unnecessary 8Kbyte bzero that was being done for eachsam2003-11-191-8/+5
| | | | | | | | | | | | | | | | submitted operation Submitted by: Thor Lancelot Simon Reviewed by: jhb Approved by: re (jhb)
OpenPOWER on IntegriCloud