summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r232473. I have been convinced by Doug Barton and Bjoern Zeebdim2012-03-034-12/+12
| | | | | | | | | | | | | | | | | | | | | | | that it is better to error out when people attempt to build using the wrong bsd.*.mk files, than to silently ignore the problem. This means, that after this commit, if you want to build kernel modules by hand (or via a port) from a head source tree, you *must* make sure the files in /usr/share/mk are in sync with that tree. If that isn't possible, for example when you are running on an older FreeBSD branch, you can: - Run "make buildenv" from your head source tree, to have the correct environment setup. (It's advisable to have run "make buildworld", or at a minimum "make toolchain" first.) - Alternatively, set MAKESYSPATH to the share/mk directory under your head source tree. If your build tools are too old, other problems may still occur. - Alternatively, use "make -m" and specify the share/mk directory under your head source tree. Again, build tools that are too old may still result in trouble. MFC after: 2 weeks
* On MIPS, _ALIGN always aligns to 8 bytes, even for 32-bit binaries. This mightjmallett2012-03-031-0/+4
| | | | | | | not be ideal, but is the ABI we've shipped so far. Fix macros which reflect the results of _ALIGN on 32-bit MIPS to use the right alignment. This fixes sendmsg under COMPAT_FREEBSD32 on n64 MIPS kernels.
* After r232322, it turned out many people (and some ports) are buildingdim2012-03-034-12/+12
| | | | | | | | | | | | | | | | | | | | | kernel modules using their old installed /usr/share/mk/bsd.*.mk files, instead of the updated ones in their source tree. This leads to errors like: "sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") Obviously, these errors will go away after a "make installworld", or alternatively, by using "make buildenv" before attempting to manually build modules. However, since it is apparently an expected use case to build using old .mk files, change the way we test for clang, so it also works when the MK_CLANG_IS_CC macro doesn't exist. Note the conditional expressions are becoming rather unreadable now, but I will attempt to fix that on a followup commit. MFC after: 2 weeks
* Expand the set of APIs available for locating PCI capabilities:jhb2012-03-037-7/+181
| | | | | | | | | - pci_find_extcap() is repurposed to be used for fetching PCI-express extended capabilities (PCIZ_* constants in <dev/pci/pcireg.h>). - pci_find_htcap() can be used to locate a specific HyperTransport capability (PCIM_HTCAP_* constants in <dev/pci/pcireg.h>). - Cache the starting location of the PCI-express capability for PCI-express devices in PCI device ivars.
* Document the [n]eei and [n]bacc optionseadler2012-03-031-1/+23
| | | | | | | PR: docs/165009 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Approved by: bcr MFC after: 1 week
* Use pci_find_cap() instead of pci_find_extcap() to locate PCIjhb2012-03-032-6/+6
| | | | | | find capabilities as the latter API is deprecated for this purpose. MFC after: 2 weeks
* Bump date to today (since I modified it)eadler2012-03-031-1/+1
| | | | | | PR: bin/165321 Approved by: gjb MFC after: 3 days
* The name caching changes of r230394 exposed an intermittent bugrmacklem2012-03-031-0/+1
| | | | | | | | | | | | in the new NFS server for NFSv4, where it would report ENOENT when the file actually existed on the server. This turned out to be caused by not initializing ni_topdir before calling lookup() and there was a rare case where the value on the stack location assigned to ni_topdir happened to be a pointer to a ".." entry, such that "dp == ndp->ni_topdir" succeeded in lookup(). This patch initializes ni_topdir to fix the problem. MFC after: 5 days
* Direct users to swapinfo and pstat from dfeadler2012-03-031-0/+2
| | | | | | | PR: bin/165321 Submitted by: jhs Approved by: bcr MFC after: 3 days
* Update the pci_get_vpd_readonly() wrapper to use 'vptr' instead ofjhb2012-03-031-2/+2
| | | | | 'identptr' for its last parameter to match the default implementation as well as the method definition in pci_if.m.
* Fix a typo.jhb2012-03-031-1/+1
|
* Expand and reorganize the pci(9) manpage a bit:jhb2012-03-032-51/+417
| | | | | | | | | | | | | | | - Document the following routines: pci_alloc_msi(), pci_alloc_msix(), pci_find_cap(), pci_get_max_read_req(), pci_get_vpd_ident(), pci_get_vpd_readonly(), pci_msi_count(), pci_msix_count(), pci_pending_msix(), pci_release_msi(), pci_remap_msix(), and pci_set_max_read_req(). - Group the functions into five sub-sections: raw configuration access, locating devices, device information, device configuration, and message signaled interrupts. - Discourage use of pci_disable_io() and pci_enable_io() in device drivers. The PCI bus driver handles this automatically as resources are activated. MFC after: 2 weeks
* Make kern.proc.umask sysctl readonly.trociny2012-03-031-21/+4
| | | | | Requested by: src MFC after: 1 week
* Fix bug of r232207, when cpu_search() could prefer CPU group with bestmav2012-03-031-5/+7
| | | | | load, but with no CPU matching given limitations. It caused kernel panics in some cases when thread was bound to specific CPUs with cpuset(1).
* Unbreak n64 build without COMPAT_FREEBSD32 by fixing mismatched preprocessorjmallett2012-03-031-1/+1
| | | | conditionals.
* Use snprintf(3) constantly when generating CAM error messages.jh2012-03-031-44/+58
| | | | | | PR: bin/57088 Submitted by: Rui Lopes, arundel MFC after: 2 weeks
* o) Add COMPAT_FREEBSD32 support for MIPS kernels using the n64 ABI with ↵jmallett2012-03-0326-68/+761
| | | | | | | | | | | | | | | | | | | | | userlands using the o32 ABI. This mostly follows nwhitehorn's lead in implementing COMPAT_FREEBSD32 on powerpc64. o) Add a new type to the freebsd32 compat layer, time32_t, which is time_t in the 32-bit ABI being used. Since the MIPS port is relatively-new, even the 32-bit ABIs use a 64-bit time_t. o) Because time{spec,val}32 has the same size and layout as time{spec,val} on MIPS with 32-bit compatibility, then, disable some code which assumes otherwise wrongly when built for MIPS. A more general macro to check in this case would seem like a good idea eventually. If someone adds support for using n32 userland with n64 kernels on MIPS, then they will have to add a variety of flags related to each piece of the ABI that can vary. That's probably the right time to generalize further. o) Add MIPS to the list of architectures which use PAD64_REQUIRED in the freebsd32 compat code. Probably this should be generalized at some point. Reviewed by: gonzo
* Make sure that the USB system suspend event is executed synchronouslyhselasky2012-03-031-2/+21
| | | | | | | | | and not asynchronously. This fixes problems related to USB system suspend and resume. It is assumed that we are always allowed to sleep from the device_suspend() method. MFC after: 1 week Submitted by: jkim
* Add entry for packages-8.3-release directory.kensmith2012-03-031-0/+1
|
* Post r230394, the Lookup RPC counts for both NFS clients increasedrmacklem2012-03-035-40/+93
| | | | | | | | | | | | | | | | | | | | | significantly. Upon investigation this was caused by name cache misses for lookups of "..". For name cache entries for non-".." directories, the cache entry serves double duty. It maps both the named directory plus ".." for the parent of the directory. As such, two ctime values (one for each of the directory and its parent) need to be saved in the name cache entry. This patch adds an entry for ctime of the parent directory to the name cache. It also adds an additional uma zone for large entries with this time value, in order to minimize memory wastage. As well, it fixes a couple of cases where the mtime of the parent directory was being saved instead of ctime for positive name cache entries. With this patch, Lookup RPC counts return to values similar to pre-r230394 kernels. Reported by: bde Discussed with: kib Reviewed by: jhb MFC after: 2 weeks
* Add VESA option to GENERIC for amd64 and i386.jkim2012-03-032-0/+2
| | | | MFC after: 1 month
* Fix a problem that was causing the mpt(4) driver to attach to MegaRAIDken2012-03-021-6/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cards that should be handled by the mfi(4) driver. The root of the problem is that the mpt(4) driver was masking off the bottom bit of the PCI device ID when deciding which cards to attach to. It appears that a number of the mpt(4) Fibre Channel cards had a LAN variant whose PCI device ID was just one bit off from the FC card's device ID. The FC cards were even and the LAN cards were odd. The problem was that this pattern wasn't carried over on the SAS and parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device IDs were either even numbers, or they would get masked to a supported adjacent PCI device ID, and everything worked well. Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb SAS device IDs for their new MegaRAID cards. This is causing the mpt(4) driver to attach to the RAID cards instead of the mfi(4) driver. The solution is to stop masking off the bottom bit of the device ID, and explicitly list the PCI device IDs of all supported cards. This change should be a no-op for mpt(4) hardware. The only intended functional change is that for the 929X, the is_fc variable gets set. It wasn't being set previously, but needs to be because the 929X is a Fibre Channel card. Reported by: Kashyap Desai <Kashyap.Desai@lsi.com> MFC After: 3 days
* When creating a handle for a subregion, be sure to actually math out the newjmallett2012-03-022-10/+8
| | | | | | | | handle address, where we're using handles as raw addresses. This fixes devices with subregions on Octeon PCI specifically, and likely also on MIPS more generally, where there isn't another bus_space in use that was doing the math already.
* If an Atheros device is attached to an Octeon, it's going to be by PCI.jmallett2012-03-021-0/+1
|
* - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.jhb2012-03-026-20/+84
| | | | | | | | | | | | | | | The tag enforces a single restriction that all DMA transactions must not cross a 4GB boundary. Note that while this restriction technically only applies to PCI-express, this change applies it to all PCI devices as it is simpler to implement that way and errs on the side of caution. - Add a softc structure for PCI bus devices to hold the bus_dma tag and a new pci_attach_common() routine that performs actions common to the attach phase of all PCI bus drivers. Right now this only consists of a bootverbose printf and the allocate of a bus_dma tag if necessary. - Adjust all PCI bus drivers to allocate a PCI bus softc and to call pci_attach_common() from their attach routines. MFC after: 2 weeks
* Unbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo intojmallett2012-03-021-0/+1
| | | | sysinfo. This should have been done as part of replacing bootinfo with sysinfo.
* Similar to the fixes in 226967 and 226987, purge any name cache entriesjhb2012-03-022-0/+9
| | | | | | | | | associated with the previous vnode (if any) associated with the target of a rename(). Otherwise, a lookup of the target pathname concurrent with a rename() could re-add a name cache entry after the namei(RENAME) lookup in kern_renameat() had purged the target pathname. MFC after: 2 weeks
* Fix typo.andreast2012-03-021-1/+1
|
* Eliminate stale incorrect ARGSUSED comments.alc2012-03-021-3/+0
| | | | Submitted by: bde
* Removed excessive _seekdir() call in closedir(). This saves one lseek()ru2012-03-021-3/+1
| | | | | | | | | | | | | | | syscall. Before r5958, seekdir() was called for its side effect of freeing memory allocated by opendir() for rewinddir(), but that revision added _reclaim_telldir() that frees all memory allocated by telldir() calls, making this call redundant. This introduces a slight change. If an application duplicated the descriptor obtained through dirfd(), it can no longer rely on file position to be reset to the start of file after a call to closedir(). It's believed to be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux, OS X) rewind the file offset pointer on closedir(). Reported by: Igor Sysoev
* Belatedly add dl_iterate_phdr(3) to the list of installed manpages.kib2012-03-021-1/+1
| | | | MFC after: 3 days
* Finally removed the stat() and fstat() calls from the opendir() code.ru2012-03-021-24/+14
| | | | | | | | | | | They were made excessive in r205424 by opening with O_DIRECTORY. Also eliminated the fcntl() call used to set FD_CLOEXEC by opening with O_CLOEXEC. (fdopendir() still checks that the passed descriptor is a directory, and sets FD_CLOEXEC on it.) Reviewed by: ed
* Reflect the renaming of ifmaof_ifpforaddr() to if_findmulti() in r148652.pluknet2012-03-021-5/+5
| | | | MFC after: 1 week
* Do not expose unlocked unconstructed nullfs vnode on mount list.kib2012-03-021-1/+1
| | | | | | | Lock the native nullfs vnode lock before switching the locks. Tested by: pho MFC after: 1 week
* ifp->if_ioctl() has moved to u_long cmd in r36735.pluknet2012-03-021-1/+1
| | | | | | Somehow that change had not reached here together with ifioctl(). MFC after: 1 week
* Fix names of some Marvell SATA chips. It looks like chips with proprietarymav2012-03-026-23/+23
| | | | | | | | interface supported by mvs(4) are 88SX, while AHCI-like chips are 88SE. PR: kern/165271 Submitted by: Jia-Shiun Li <jiashiun@gmail.com> MFC after: 1 week
* Allow to configure net.inet6.ip6.{accept_rtadv,no_radr} by the loader tunableshrs2012-03-021-0/+2
| | | | | as well because they have to be configured before interface initialization for AF_INET6.
* Remove a redundant check.hrs2012-03-021-10/+0
|
* Kill EoL whitespaces, and minor lint.pluknet2012-03-022-297/+295
|
* Add ahci(4) and siis(4) to the hardware notes.mav2012-03-021-0/+4
| | | | MFC after: 1 week
* Wrap another ATH_LOCK around the scanning flag.adrian2012-03-021-0/+2
| | | | PR: kern/163318
* Wrap the scan code state change stuff behind ATH_LOCK and the PCU fiddlingadrian2012-03-021-0/+10
| | | | | | | behind the PCU lock. sc_scanning is being checked without ATH_LOCK behind held and could in theory run from multiple threads.
* Attempt to catch scan cancellations at exactly the wrong time from occuring.adrian2012-03-021-0/+13
| | | | | | | | | | | | | | | | | | | The scan code unlocks the comlock and calls into the driver. It then assumes the state hasn't changed from underneath it. Although I haven't seen this particular condition trigger, I'd like to be informed if I or anyone else sees it. What I'm thinking may occur: * A cancellation comes in during the scan_end call; * the cancel flag is set; * but it's never checked, so scandone isn't updated; * .. and the interface stays in the STA power save mode. It's a subtle race, if it even exists. PR: kern/163318
* Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-Xjhb2012-03-011-4/+6
| | | | | | | allocation fails. Reviewed by: jfv MFC after: 2 weeks
* - Add support for the Intel Sandy Bridge microarchitecture (both core and ↵davide2012-03-0110-177/+1946
| | | | | | | | | | | uncore counting events) - New manpages with event lists. - Add MSRs for the Intel Sandy Bridge microarchitecture Reviewed by: attilio, brueffer, fabient Approved by: gnn (mentor) MFC after: 3 weeks
* Provide pre/post transfer method callbacks for icbbbkan2012-03-012-2/+55
| | | | | | | | | | clients. These are helful when making certain drivers work on both Linux and FreeBSD without changing the code flow too much. Reviewed by: kib, wlosh MFC after: 1 month
* Add regression test for USB enumeration.hselasky2012-03-011-0/+30
| | | | MFC after: 1 week
* Update the documentation on pci_get/set_powerstate(). These methods arejhb2012-03-011-10/+8
| | | | | | | not ACPI-specific at all, but deal with PCI power states. Also, pci_set_powerstate() fails with EOPNOTSUPP if a request is made that the underlying device does not support rather than falling back to somehow setting D0.
* Sort function prototypes.jhb2012-03-011-23/+23
|
* Style change: Expand redundant #if's. Remove a couple of empty lines.hselasky2012-03-011-101/+12
| | | | MFC after: 1 week
OpenPOWER on IntegriCloud