aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Change spelling and eliminate a typo in comments to reduce diffs withEd Maste2008-03-141-11/+11
| | | | | | | | Adaptec's vendor driver. I have some fixes to bring in and this makes ongoing review of the FreeBSD-Adaptec driver diffs easier. Notes: svn path=/head/; revision=177184
* Add preliminary support for binding interrupts to CPUs:John Baldwin2008-03-1411-33/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing: intr_bind(rman_get_start(irq_res), cpu); however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally. Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER} Notes: svn path=/head/; revision=177181
* Correct IPsec behaviour with a 'use' level in SP but no SA available.Bjoern A. Zeeb2008-03-143-24/+61
| | | | | | | | | | | | In that case return an continue processing the packet without IPsec. PR: 121384 MFC after: 5 days Reported by: Cyrus Rahman (crahman gmail.com) Tested by: Cyrus Rahman (crahman gmail.com) [slightly older version] Notes: svn path=/head/; revision=177175
* Remove the "Fast " from theBjoern A. Zeeb2008-03-141-1/+1
| | | | | | | | | | | | | | "Fast IPsec: Initialized Security Association Processing." printf. People kept asking questions about this after the IPsec shuffle. This still is the Fast IPsec implementation so no worries that it would be any slower now. There are no functional changes. Discussed with: sam MFC after: 4 days Notes: svn path=/head/; revision=177173
* Add a quirk to ignore ASUS LCM display found on some ASUS laptops.Jung-uk Kim2008-03-142-0/+3
| | | | Notes: svn path=/head/; revision=177171
* Make the function prototype for cpu_search() match the declaration so thatJohn Baldwin2008-03-141-2/+2
| | | | | | | this still compiles with gcc3. Notes: svn path=/head/; revision=177169
* Correct reference counting on the SP for outgoing IPv6 IPsec connections.Bjoern A. Zeeb2008-03-142-7/+5
| | | | | | | | | | PR: 121374 Reported by: Cyrus Rahman (crahman gmail.com) Tested by: Cyrus Rahman (crahman gmail.com) MFC after: 5 days Notes: svn path=/head/; revision=177167
* #if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu().Bjoern A. Zeeb2008-03-142-6/+8
| | | | | | | | | | | No need to compile 'dead' code. I am leaving it in because we will have to review the concept and should use the common function in various places. MFC after: 5 days Notes: svn path=/head/; revision=177166
* Replace the function name in two identical printfsBjoern A. Zeeb2008-03-141-2/+4
| | | | | | | | | | | by __func__, __LINE__ so we can distinguish them when people report a problem. PR: 121373 MFC after: 5 days Notes: svn path=/head/; revision=177165
* Add stub for pc98.Yoshihiro Takahashi2008-03-141-0/+6
| | | | Notes: svn path=/head/; revision=177163
* Correct a typo.Joseph Koshy2008-03-141-2/+6
| | | | Notes: svn path=/head/; revision=177161
* Fix a silly bogon which prevented all the CPUs that are tagged as interruptJohn Baldwin2008-03-142-8/+8
| | | | | | | | | | | | | | | | | | receivers from being given interrupts if any CPUs in the system were not tagged as interrupt receivers that I introduced when switching the x86 interrupt code to track CPUs via FreeBSD CPU IDs rather than local APIC IDs. In practice this only affects systems with Hyperthreading (though disabling HTT in the BIOS would workaround the issue) as that is the only case currently where one can have CPUs that aren't tagged as interrupt receivers. On a Dell SC1425 test box with 2 x Xeon w/ HTT (so 4 logical CPUs of which 2 were interrupt receivers) the result was that all device interrupts were sent to CPU 0. MFC after: 1 week Pointy hat to: jhb Notes: svn path=/head/; revision=177160
* Rework how the nexus(4) device works on x86 to better handle the idea ofJohn Baldwin2008-03-1311-121/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different "platforms" on x86 machines. The existing code already handles having two platforms: ACPI and legacy. However, the existing approach was rather hardcoded and difficult to extend. These changes take the approach that each x86 hardware platform should provide its own nexus(4) driver (it can inherit most of its behavior from the default legacy nexus(4) driver) which is responsible for probing for the platform and performing appropriate platform-specific setup during attach (such as adding a platform-specific bus device). This does mean changing the x86 platform busses to no longer use an identify routine for probing, but to move that logic into their matching nexus(4) driver instead. - Make the default nexus(4) driver in nexus.c on i386 and amd64 handle the legacy platform. It's probe routine now returns BUS_PROBE_GENERIC so it can be overriden. - Expose a nexus_init_resources() routine which initializes the various resource managers so that subclassed nexus(4) drivers can invoke it from their attach routine. - The legacy nexus(4) driver explicitly adds a legacy0 device in its attach routine. - The ACPI driver no longer contains an new-bus identify method. Instead it exposes a public function (acpi_identify()) which is a probe routine that the MD nexus(4) drivers can use to probe for ACPI. All of the probe logic in acpi_probe() is now moved into acpi_identify() and acpi_probe() is just a stub. - On i386 and amd64, an ACPI-specific nexus(4) driver checks for ACPI via acpi_identify() and claims the nexus0 device if the probe succeeds. It then explicitly adds an acpi0 device in its attach routine. - The legacy(4) driver no longer knows anything about the acpi0 device. - On ia64 if acpi_identify() fails you basically end up with no devices. This matches the previous behavior where the old acpi_identify() would fail to add an acpi0 device again leaving you with no devices. Discussed with: imp Silence on: arch@ Notes: svn path=/head/; revision=177157
* Replace the non-MPSAFE timeout(9) API in ffs_softdep.c with the MPSAFEColeman Kane2008-03-131-8/+15
| | | | | | | | | | | callout_* API (e.g. callout_init_mtx(9)). This was one of the numerous items on the http://wiki.freebsd.org/SMPTODO list. Reviewed by: imp, obrien, jhb MFC after: 1 week Notes: svn path=/head/; revision=177156
* Use the SMAP data from the loader if it is provided instead of usingJohn Baldwin2008-03-131-60/+99
| | | | | | | | | | | | | | | | virtual 86 mode to query the BIOS directly. This is needed for certain HP machines whose BIOS only provide an SMAP when invoked from real mode. On such machines the loader will be able to query the SMAP successfully due to the recent BTX changes, but the kernel will not. One thing I'm not sure of is if we can skip the INT 12h probe altogether if we have the SMAP from the loader as it seems that we do the INT 12h probe to setup enough state so we can use vm86 to call the BIOS. MFC after: 1 week Notes: svn path=/head/; revision=177155
* style(9) & style.Makefile(9)David E. O'Brien2008-03-1314-258/+297
| | | | | | | Reviewed by: raj Notes: svn path=/head/; revision=177152
* Add the module dependency on the mem(4) module. This will fix the moduleColeman Kane2008-03-131-0/+1
| | | | | | | | | | | | failing to load on a kernel that has "nodevice mem" in the config. It will now properly bring in the mem(4) module. Submitted by: antoine Reviewed by: imp MFC after: 1 week Notes: svn path=/head/; revision=177147
* Since version 4.3, gcc changed its behaviour concerning the i386/amd64Konstantin Belousov2008-03-137-15/+15
| | | | | | | | | | | | | | | | | | | | | ABI and the direction flag, that is it now assumes that the direction flag is cleared at the entry of a function and it doesn't clear once more if needed. This new behaviour conforms to the i386/amd64 ABI. Modify the signal handler frame setup code to clear the DF {e,r}flags bit on the amd64/i386 for the signal handlers. jhb@ noted that it might break old apps if they assumed DF == 1 would be preserved in the signal handlers, but that such apps should be rare and that older versions of gcc would not generate such apps. Submitted by: Aurelien Jarno <aurelien aurel32 net> PR: 121422 Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=177145
* Add missed parenthesesKonstantin Belousov2008-03-131-1/+1
| | | | Notes: svn path=/head/; revision=177137
* Add const qualifier to cpuset mask's pointer, since the cpuset mask shouldDavid Xu2008-03-131-1/+1
| | | | | | | be not changed by the system call. Notes: svn path=/head/; revision=177135
* PR 117603Jeff Roberson2008-03-131-2/+5
| | | | | | | | | | | | | - Close a sleepqueue signal race by interlocking with the per-process spinlock. This was mistakenly omitted from the thread_lock patch and has been a race since. MFC After: 1 week PR: bin/117603 Reported by: Danny Braniss <danny@cs.huji.ac.il> Notes: svn path=/head/; revision=177132
* - The P_SA flag has been removed. Don't reference it in a KASSERT.Jeff Roberson2008-03-121-2/+1
| | | | Notes: svn path=/head/; revision=177127
* - Fix build breakage; there was a reference to a removed syscall inJeff Roberson2008-03-121-4/+3
| | | | | | | a KASSERT(). Attempt to cleanup the comment to reflect reality. Notes: svn path=/head/; revision=177126
* The variable MTRR registers actually have variable-sized PhysBase andJohn Baldwin2008-03-124-16/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PhysMask fields based on the number of physical address bits supported by the current CPU. The old code assumed 36 bits on i386 and 40 bits on amd64. In truth, all Intel CPUs up until recently used 36 bits (a newer Intel CPU uses 38 bits) and all the Opteron CPUs used 40 bits. In at least one case (the new Intel CPU) having the size of the mask field wrong resulted in writing questionable values into the MTRR registers on the application processors (BSP as well if you modify the MTRRs via memcontrol or running X, etc.). The result of the questionable physmask was that all of memory was apparently treated as uncached rather than write-back resulting in a very significant performance hit. Fix this by constructing a run-time mask for the PhysBase and PhysMask fields based on the number of physical address bits supported by the CPU. All 64-bit capable CPUs provide a count of PA bits supported via the 0x80000008 extended CPUID feature, so use that if it is available. If that feature is not available, then assume 36 PA bits. While I'm here, expand the (now-unused) macros for the PhysBase and PhysMask fields to the current largest possible value (52 PA bits). MFC after: 1 week PR: i386/120516 Reported by: Nokia Notes: svn path=/head/; revision=177125
* MFamd64: Break up the probe logic in the mem_drvinit routines so it'sJohn Baldwin2008-03-122-13/+18
| | | | | | | a bit easier to parse. Notes: svn path=/head/; revision=177124
* Minimize diffs with i686_mem.c:John Baldwin2008-03-122-6/+9
| | | | | | | | - A few whitespace changes I missed in the style(9) changes. - Move M_MEMDESC to mem.c. Notes: svn path=/head/; revision=177123
* Relax the BIOS/OS sempahore handoff code to workaround different hardJohn Baldwin2008-03-121-1/+4
| | | | | | | | | | | | | | | | | | hangs (one at boot, one at shutdown) in recent machines. First, only try to take ownership of the EHCI controller if the BIOS currently owns the controller. On a HP DL160 G5, the machine hangs when we try to take ownership. Second, don't bother trying to give up ownership of the controller during shutdown. It's not strictly required and a Dell DCS S29 hangs on shutdown after the config write. Both of these changes match the behavior of the Linux EHCI driver. I also think both of these hangs are caused by bugs in the BIOS' SMM handler causing it to get stuck in an infinite loop in SMM. MFC after: 1 week Notes: svn path=/head/; revision=177121
* Partially revert 1.95. It changed the probe for a mouse device to onlyJohn Baldwin2008-03-121-1/+4
| | | | | | | | | | | | accept a mouse using the boot subclass. Instead, restore the original hid_is_collection() test and fallback to testing the interface class, subclass, and protocol if that fails. MFC after: 1 week PR: usb/118670 Notes: svn path=/head/; revision=177120
* fix inverted test that disabled ACK's on xmitSam Leffler2008-03-121-1/+1
| | | | Notes: svn path=/head/; revision=177119
* add device hints to control the rx FIFO interrupt level on 16550A partsSam Leffler2008-03-122-1/+18
| | | | | | | | | | PR: kern/121421 Submitted by: UEMURA Tetsuya Reviewed by: marcel MFC after: 2 weeks Notes: svn path=/head/; revision=177117
* Add missing comma.Remko Lodder2008-03-121-1/+1
| | | | | | | | | | PR: bin/121645 Submitted by: OISHI Masakuni <yamasa at bsdhouse dot org> Approved by: imp (mentor, implicit for trivial changes) MFC after: 3 days Notes: svn path=/head/; revision=177116
* Add resume support to the agp_i810 family.Remko Lodder2008-03-121-0/+17
| | | | | | | | | | Submitted by: "Robert Noland" <rnoland at 2hip dot net> Reviewed by: anholt Approved by: anholt, imp (mentor) MFC after: 1 week Notes: svn path=/head/; revision=177115
* Convert TSEC watchdog to the new scheme.Rafal Jaworowski2008-03-122-18/+29
| | | | | | | | Reviewed by: imp, marcel Approved by: cognet (mentor) Notes: svn path=/head/; revision=177111
* Obtain TSEC h/w address from the parent bus (OCP) and not rely blindly on whatRafal Jaworowski2008-03-125-11/+51
| | | | | | | | | | | | | | | might be currently programmed into the registers. Underlying firmware (U-Boot) would typically program MAC address into the first unit only, and others are left uninitialized. It is now possible to retrieve and program MAC address for all units properly, provided they were passed on in the bootinfo metadata. Reviewed by: imp, marcel Approved by: cognet (mentor) Notes: svn path=/head/; revision=177110
* Improve handling U-Boot's "eth%daddr" while PowerPC metadata preparation.Rafal Jaworowski2008-03-121-3/+20
| | | | | | | | | | | We're now more robust against cases of non-sorted and/or non-continuous numbering of those entries. Reviewed by: imp, marcel Approved by: cognet (mentor) Notes: svn path=/head/; revision=177109
* Eliminate artificial increasing of 'netdev_opens' counter in loader's ↵Rafal Jaworowski2008-03-127-87/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net_open(). This was introduced as a workaround long time ago for some Alpha firmware (which is now gone), and actually prevented net_close() to ever be called. Certain firmwares (U-Boot) need local shutdown operations to be performed on a network controller upon transaction end: such platform-specific hooks are supposed to be called via netif_close() (from within net_close()). This change effectively reverts the following CVS commit: sys/boot/common/dev_net.c revision 1.7 date: 2000/05/13 15:40:46; author: dfr; state: Exp; lines: +2 -1 Only probe network settings on the first open of the network device. The alpha firmware takes a seriously long time to open the network device the first time. Also suppress excessive output while netbooting via loader, unless debugging. While there, make sys/boot/uboot more style(9) compliant. Reviewed by: imp Approved by: cognet (mentor) Notes: svn path=/head/; revision=177108
* Respect RF_SHAREABLE flag in ARM nexus_setup_intr()Rafal Jaworowski2008-03-121-0/+3
| | | | | | | | Reviewed by: imp Approved by: cognet (mentor) Notes: svn path=/head/; revision=177105
* Remove dead code which makes a call to mem_range_attr_set().Andrew Gallatin2008-03-121-18/+2
| | | | | | | | | | This fixes a bug where mxge did not declare a dependancy on mem(4), and failed to load with options nomem. Pointed out by: antoine Notes: svn path=/head/; revision=177104
* Improve ARM bus_dmamap_load_buffer() error handling.Rafal Jaworowski2008-03-121-2/+4
| | | | | | | | | Reviewed by: imp Approved by: cognet (mentor) Spotted by: Grzegorz Bernacki gjb AT semihalf DOT com Notes: svn path=/head/; revision=177103
* -Don't pass down the entire pkt to ProtoAliasIn, ProtoAliasOut, FragmentInPaolo Pisati2008-03-123-305/+43
| | | | | | | | and FragmentOut. -Axe the old PacketAlias API: it has been deprecated since 5.x. Notes: svn path=/head/; revision=177098
* Remove kernel support for M:N threading.Jeff Roberson2008-03-1269-2343/+79
| | | | | | | | | | | While the KSE project was quite successful in bringing threading to FreeBSD, the M:N approach taken by the kse library was never developed to its full potential. Backwards compatibility will be provided via libmap.conf for dynamically linked binaries and static binaries will be broken. Notes: svn path=/head/; revision=177091
* - Bump __FreeBSD_version for sleepq/cv_* api changes.Jeff Roberson2008-03-121-1/+1
| | | | Notes: svn path=/head/; revision=177086
* - Pass the priority argument from *sleep() into sleepq and down intoJeff Roberson2008-03-1214-95/+90
| | | | | | | | | | | | | | | | | | | | sched_sleep(). This removes extra thread_lock() acquisition and allows the scheduler to decide what to do with the static boost. - Change the priority arguments to cv_* to match sleepq/msleep/etc. where 0 means no priority change. Catch -1 in cv_broadcastpri() and convert it to 0 for now. - Set a flag when sleeping in a way that is compatible with swapping since direct priority comparisons are meaningless now. - Add a sysctl to ule, kern.sched.static_boost, that defaults to on which controls the boost behavior. Turning it off gives better performance in some workloads but needs more investigation. - While we're modifying sleepq, change signal and broadcast to both return with the lock held as the lock was held on enter. Reviewed by: jhb, peter Notes: svn path=/head/; revision=177085
* - KSE may free a thread that was never actually forked. This will leaveJeff Roberson2008-03-121-0/+5
| | | | | | | | | | | td_cpuset NULL. Check for this condition before dereferencing the cpuset. Reported by: david@catwhisker.org, miwi@freebsd.org Sponsored by: Nokia Notes: svn path=/head/; revision=177083
* Improve apply callback error reporting:Alexander Motin2008-03-113-10/+28
| | | | | | | | | | | | | | Before this patch callback returned result of the last finished call chain. Now it returns last nonzero result from all call chain results in this request. As soon as this improvement gives reliable error reporting, it is now possible to remove dirty workaround in ng_socket, made to return ENOBUFS error statuses of request-response operations. That workaround was responsible for returning ENOBUFS errors to completely unrelated requests working at the same time on socket. Notes: svn path=/head/; revision=177071
* Style(9) these files. No changes in the compiled code. (Verified byJohn Baldwin2008-03-113-855/+937
| | | | | | | diff'ing objdump -d output). Notes: svn path=/head/; revision=177070
* Add constants for the various fields in MTRR registers.John Baldwin2008-03-114-22/+54
| | | | | | | | MFC after: 1 week Verified by: md5(1) Notes: svn path=/head/; revision=177069
* In intr_lookup(), when adding an IRQ to powerpc_intrs[], alsoMarcel Moolenaar2008-03-111-7/+10
| | | | | | | | | | set a default name. If the IRQ is added as a consequence of configurating the IRQ without there ever being a handler assigned to it, we will not have a name. This breaks the fragile intrcnt/intrnames logic. Notes: svn path=/head/; revision=177068
* Don't enable the workaround for the jitter bug on the 5722.John Baldwin2008-03-111-3/+4
| | | | | | | Obtained from: Linux tg3 driver Notes: svn path=/head/; revision=177057
* Uncomment vr(4), vr(4) should work on all architectures.Pyun YongHyeon2008-03-111-1/+1
| | | | Notes: svn path=/head/; revision=177052