aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Introduce grab and ungrab upcalls. When the kernel desires to grab theWarner Losh2014-01-1911-37/+271
| | | | | | | | | | | | | | | console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Should have been part of r260889, but waasn't due to command line typo. Reviewed by: bde (with reservations) Notes: svn path=/head/; revision=260890
* Introduce grab and ungrab upcalls. When the kernel desires to grab theWarner Losh2014-01-197-5/+199
| | | | | | | | | | | | | console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Reviewed by: bde (with reservations) Notes: svn path=/head/; revision=260889
* Add VT kernel configuration to ease testing of vt(9), aka NewconsEd Maste2014-01-192-0/+28
| | | | Notes: svn path=/head/; revision=260888
* Add nand device and NANDFS into the mix for those boards that haveWarner Losh2014-01-193-2/+12
| | | | | | | support for it at the moment. Notes: svn path=/head/; revision=260887
* Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201.Warner Losh2014-01-193-22/+173
| | | | | | | # expect more refinement as do more boards. Notes: svn path=/head/; revision=260886
* Generalize AT91 NAND support a bit. Be more flexible about ALE and CLEWarner Losh2014-01-192-11/+81
| | | | | | | address line assignment. Provide convenince function to set these things. Notes: svn path=/head/; revision=260885
* Add standard memory controller helper functions.Warner Losh2014-01-193-0/+208
| | | | Notes: svn path=/head/; revision=260884
* Removed unneeded and dangerous assignment. It would probably cause NULLAlexander Motin2014-01-191-1/+0
| | | | | | | | | | refererence panic if compiler not optimize it out. Found with: Clang static analyzer MFC after: 2 weeks Notes: svn path=/head/; revision=260883
* Further rework netinet6 address handling code:Alexander V. Chernikov2014-01-195-134/+166
| | | | | | | | | | | | | | | | | | | | | | * Set ia address/mask values BEFORE attaching to address lists. Inet6 address assignment is not atomic, so the simplest way to do this atomically is to fill in ia before attach. * Validate irfa->ia_addr field before use (we permit ANY sockaddr in old code). * Do some renamings: in6_ifinit -> in6_notify_ifa (interaction with other subsystems is here) in6_setup_ifa -> in6_broadcast_ifa (LLE/Multicast/DaD code) in6_ifaddloop -> nd6_add_ifa_lle in6_ifremloop -> nd6_rem_ifa_lle * Split working with LLE and route announce code for last two. Add temporary in6_newaddrmsg() function to mimic current rtsock behaviour. * Call device SIOCSIFADDR handler IFF we're adding first address. In IPv4 we have to call it on every address change since ARP record is installed by arp_ifinit() which is called by given handler. IPv6 stack, on the opposite is responsible to call nd6_add_ifa_lle() so there is no reason to call SIOCSIFADDR often. Notes: svn path=/head/; revision=260882
* Enable vt. This brings VGA-based console and terminal support toMarcel Moolenaar2014-01-191-1/+4
| | | | | | | | | | | | ia64 for the very first time. Only 9 years in the making... Note that the vt/vga driver does not actually make sure there's VGA hardware at the standard/legacy VGA I/O port and memory I/O addresses. This can cause machine checks if the H/W does not have a VGA controller. Notes: svn path=/head/; revision=260875
* There's actually no data in the PMU_GET_VERSION command. Don't send any.Justin Hibbits2014-01-191-1/+1
| | | | | | | | | This change now allows the PMU to be used on PowerBook5,8. MFC after: 1 week Notes: svn path=/head/; revision=260872
* If the flowid is available for the mbuf that finalised the creationAdrian Chadd2014-01-181-0/+10
| | | | | | | | | | | | | | | of a syncache connection, copy it into the inp_flowid field. Without this, an incoming TCP connection won't have an inp_flowid marked until some data comes in, and this means that things like the per-CPU TCP timer option will choose a different CPU for the timer work. (It also means that if one grabbed the flowid via an ioctl from userland, it won't be available until some data has been received.) Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=260871
* Simplify filling sockaddr_dl structure for if_resolvemulti()Alexander V. Chernikov2014-01-189-96/+63
| | | | | | | | | | | | | | | | | callback providers. link_init_sdl() function can be used to fill most of the parameters. Use caller stack instead of allocation / freing memory for each request. Do not drop support for extra-long (probably non-existing) link-layer protocols by introducing link_alloc_sdl() (used by if_resolvemulti() callback) and link_free_sdl() (used by caller). Since this change breaks KBI, MFC requires slightly different approach (link_init_sdl() auto-allocating buffer if necessary to handle cases with unmodified if_resolvemulti() callers). MFC after: 2 weeks Notes: svn path=/head/; revision=260870
* Some processor's don't allow NMI injection if the STI_BLOCKING bit is set inNeel Natu2014-01-181-69/+80
| | | | | | | | | | | | the Guest Interruptibility-state field. However, there isn't any way to figure out which processors have this requirement. So, inject a pending NMI only if NMI_BLOCKING, MOVSS_BLOCKING, STI_BLOCKING are all clear. If any of these bits are set then enable "NMI window exiting" and inject the NMI in the VM-exit handler. Notes: svn path=/head/; revision=260863
* Use in6_localip() instead of hand-rolled cycle.Alexander V. Chernikov2014-01-181-17/+9
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=260861
* Add in6_prepare_ifra() function to ease preparing in-kernel IPv6Alexander V. Chernikov2014-01-184-49/+30
| | | | | | | | | address requests. MFC after: 2 weeks Notes: svn path=/head/; revision=260860
* Style changes in vm_pageout_scan():Alan Cox2014-01-181-12/+11
| | | | | | | | | | | | | | | | | | | 1. Be consistent in the style of "act_delta" manipulations between the inactive and active queue scans. 2. Explicitly compare to zero. 3. The deactivation of a page is based is based on its recent history and not just the current call to vm_pageout_scan(). The variable "act_delta" represents the current state of the page, and not its history. Avoid possible confusion by not (ab)using "act_delta" for the making the deactivation decision. Submitted by: kib [1] Reviewed by: kib [2,3] Notes: svn path=/head/; revision=260859
* Do some style(9) not done in r260851 to improve readability.Alexander V. Chernikov2014-01-181-45/+40
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=260852
* Split in6_update_ifa() into smaller pieces leaving functionality intact.Alexander V. Chernikov2014-01-181-78/+131
| | | | | | | | Discussed with: ae MFC after: 2 weeks Notes: svn path=/head/; revision=260851
* Add very simple virtio_random(4) driver to harvest entropy from hostBryan Venteicher2014-01-188-1/+273
| | | | | | | Reviewed by: markm (random bits only) Notes: svn path=/head/; revision=260847
* If the guest exits due to a fault while it is executing IRET then restoreNeel Natu2014-01-182-4/+68
| | | | | | | | the state of "Virtual NMI blocking" in the guest's interruptibility-state field before resuming the guest. Notes: svn path=/head/; revision=260836
* MFV r260834:Xin LI2014-01-181-9/+8
| | | | | | | | Fix memory leak of compressed buffers in l2arc_write_done (Illumos #3995). Notes: svn path=/head/; revision=260835
* Add ID for one more ASMedia AHCI-compatible controller.Alexander Motin2014-01-171-0/+1
| | | | | | | | Reported by: ignace.peeters@gmail.com MFC after: 2 weeks Notes: svn path=/head/; revision=260830
* Fix comment.Gleb Smirnoff2014-01-171-1/+1
| | | | Notes: svn path=/head/; revision=260819
* Fix a possible memory use after free and leak situation associatedHans Petter Selasky2014-01-172-26/+24
| | | | | | | | | | | | | | with USB device detach when using character device handles. This also includes LibUSB. It turns out that "usb_close()" cannot always get a reference to clean up its USB transfers and such, if called during the kernel USB device detach. Analysis by: hselasky @ Reported by: Juergen Lock <nox@jelal.kn-bremen.de> MFC after: 1 week Notes: svn path=/head/; revision=260814
* traverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECTAndriy Gapon2014-01-171-6/+6
| | | | | | | | | | | | | | | | | | This is done to ensure that visited object IDs are always increasing. Also, pass correct object ID to prefetch_dnode_metadata for os_groupused_dnode. Without this change we would hit an assert if traversal was paused on a GROUPUSED object, which is unlikely but possible. Apparently the same change was independently developed by Deplhix. Reviewed by: Matthew Ahrens <mahrens@delphix.com> MFC after: 10 days Sponsored by: HybridCluster Notes: svn path=/head/; revision=260812
* Close a minor deadlock.Hans Petter Selasky2014-01-171-0/+7
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=260808
* Implement a kqueue notification path for sendfile.Adrian Chadd2014-01-174-16/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fires off a kqueue note (of type sendfile) to the configured kqfd when the sendfile transaction has completed and the relevant memory backing the transaction is no longer in use by this transaction. This is analogous to SF_SYNC waiting for the mbufs to complete - except now you don't have to wait. Both SF_SYNC and SF_KQUEUE should work together, even if it doesn't necessarily make any practical sense. This is designed for use by applications which use backing cache/store files (eg Varnish) or POSIX shared memory (not sure anything is using it yet!) to know when a region of memory is free for re-use. Note it doesn't mark the region as free overall - only free from this transaction. The application developer still needs to track which ranges are in the process of being recycled and wait until all pending transactions are completed. TODO: * documentation, as always Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=260806
* Add in a default initialiser for the EVOPS_SENDFILE kqueue filterops.Adrian Chadd2014-01-171-0/+1
| | | | | | | Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=260805
* Implement the extension api for sendfile to allow for kqueue notifications.Adrian Chadd2014-01-171-0/+26
| | | | | | | | | | | | | This is still under a bit of flux, as the final API hasn't been nailed down. It's also unclear whether we should define the two new types in the header or not - it may allow bad code to compile that shouldn't (ie, since uintX's are defined, the developer may not include sys/types.h.) Reviewed by: peter, imp, bde Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=260804
* forgot to update this file in 2607000Luigi Rizzo2014-01-171-42/+88
| | | | Notes: svn path=/head/; revision=260803
* If a VM-exit happens during an NMI injection then clear the "NMI Blocking" bitNeel Natu2014-01-172-12/+26
| | | | | | | | | | | | | in the Guest Interruptibility-state VMCS field. If we fail to do this then a subsequent VM-entry will fail because it is an error to inject an NMI into the guest while "NMI Blocking" is turned on. This is described in "Checks on Guest Non-Register State" in the Intel SDM. Submitted by: David Reed (david.reed@tidalscale.com) Notes: svn path=/head/; revision=260802
* Fix various places where we don't properly release a lockGeorge V. Neville-Neil2014-01-161-8/+18
| | | | | | | | | PR: 185043 Submitted by: Michael Bentkofsky MFC after: 2 weeks Notes: svn path=/head/; revision=260796
* Remove two redundantly repetitive assignments.Warner Losh2014-01-161-2/+0
| | | | Notes: svn path=/head/; revision=260790
* Fix build after FDT changes.Aleksandr Rybalko2014-01-161-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=260752
* Simplify wait/nowait code, eventually killing last remnant ofGleb Smirnoff2014-01-162-28/+19
| | | | | | | | | historical mbuf(9) allocator flag. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=260719
* Another round of removing historical mbuf(9) allocator flags.Gleb Smirnoff2014-01-165-13/+13
| | | | | | | | | They are breeding! New ones arouse since last round. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=260718
* fix a build problem with INVARIANTS enabled introduced in r260704Andriy Gapon2014-01-161-1/+1
| | | | | | | | | Reported by: glebius MFC after: 5 days X-MFC with: r260704 Notes: svn path=/head/; revision=260717
* Remove historical macro.Gleb Smirnoff2014-01-161-1/+1
| | | | | | | Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=260716
* Substitute flags from historical mbuf(9) allocator with modern ones.Gleb Smirnoff2014-01-162-11/+11
| | | | | | | Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=260715
* fix a bug in ZFS mirror code for handling multiple DVAaAndriy Gapon2014-01-161-3/+6
| | | | | | | | | | | | | | | | | | | The bug was introduced in r256956 "Improve ZFS N-way mirror read performance". The code in vdev_mirror_dva_select erroneously considers already tried DVAs for the next attempt. Thus, it is possible that a failing DVA would be retried forever. As a secondary effect, if the attempts fail with checksum error, then checksum error reports are accumulated until the original request ultimately fails or succeeds. But because retrying is going on indefinitely the cheksum reports accumulation will effectively be a memory leak. Reviewed by: gibbs MFC after: 13 days Sponsored by: HybridCluster Notes: svn path=/head/; revision=260713
* Revert r260705: wrong patch committed by accidentAndriy Gapon2014-01-161-4/+0
| | | | | | | An earlier, less efficient version was committed by accident. Notes: svn path=/head/; revision=260711
* Cleanup comments and whitespace. No functional changes.Gleb Smirnoff2014-01-161-18/+14
| | | | Notes: svn path=/head/; revision=260709
* Fix refcount leak on netinet ifa.Alexander V. Chernikov2014-01-161-4/+4
| | | | | | | | | Reviewed by: glebius MFC after: 2 weeks Sponsored by: Yandex LLC Notes: svn path=/head/; revision=260707
* zfs_deleteextattr: name buffer from namei is needed by zfs_renameAndriy Gapon2014-01-161-1/+3
| | | | | | | | | | | | If we prematurely free the name buffer and it gets quickly recycled, then zfs_rename may see data from another lookup or even unmapped memory via cn_nameptr. MFC after: 6 days Sponsored by: HybridCluster Notes: svn path=/head/; revision=260706
* fix a bug in ZFS mirror code for handling multiple DVAaAndriy Gapon2014-01-161-0/+4
| | | | | | | | | | | | | | | | | | | The bug was introduced in r256956 "Improve ZFS N-way mirror read performance". The code in vdev_mirror_dva_select erroneously considers already tried DVAs for the next attempt. Thus, it is possible that a failing DVA would be retried forever. As a secondary effect, if the attempts fail with checksum error, then checksum error reports are accumulated until the original request ultimately fails or succeeds. But because retrying is going on indefinitely the cheksum reports accumulation will effectively be a memory leak. Reviewed by: gibbs MFC after: 13 days Sponsored by: HybridCluster Notes: svn path=/head/; revision=260705
* zfs: getnewvnode_reserve must be called outside of a zfs transactionAndriy Gapon2014-01-163-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we could run into the following deadlock. A thread has a transaction open and assigned to a transaction group. That would prevent the transaction group from be quiesced and synced. The thread is blocked in getnewvnode_reserve waiting for a vnode to a be reclaimed. vnlru thread is blocked trying to enter ZFS VOP because a filesystem is suspended by an ongoing rollback or receive operation. In its turn the operation is waiting for the current transaction group to be synced. zfs_zget is always used outside of active transactions, but zfs_mknode is always used in a transaction context. Thus, we hoist getnewvnode_reserve from zfs_mknode to its callers. While there, assert that ZFS always calls getnewvnode while having a vnode reserved. Reported by: adrian Tested by: adrian MFC after: 17 days Sponsored by: HybridCluster Notes: svn path=/head/; revision=260704
* Fix ipfw fwd for IPv4 traffic broken by r249894.Alexander V. Chernikov2014-01-161-0/+8
| | | | | | | | | | | | | | | | | | | Problem case: Original lookup returns route with GW set, so gw points to rte->rt_gateway. After that we're changing dst and performing lookup another time. Since fwd host is most probably directly reachable, resulting rte does not contain rt_gateway, so gw is not set. Finally, we end with packet transmitted to proper interface but wrong link-layer address. Found by: lstewart Discussed with: ae,lstewart MFC after: 2 weeks Sponsored by: Yandex LLC Notes: svn path=/head/; revision=260702
* netmap_user.h:Luigi Rizzo2014-01-163-24/+33
| | | | | | | | | | | | | | | | | | | | | add separate rx/tx ring indexes add ring specifier in nm_open device name netmap.c, netmap_vale.c more consistent errno numbers netmap_generic.c correctly handle failure in registering interfaces. tools/tools/netmap/ massive cleanup of the example programs (a lot of common code is now in netmap_user.h.) nm_util.[ch] are going away soon. pcap.c will also go when i commit the native netmap support for libpcap. Notes: svn path=/head/; revision=260700
* Add data so we can convert a PIO unit number into a base address.Warner Losh2014-01-156-5/+51
| | | | Notes: svn path=/head/; revision=260696