Loading .gitignore +3 −0 Original line number Diff line number Diff line Loading @@ -92,3 +92,6 @@ extra_certificates signing_key.priv signing_key.x509 x509.genkey # Kconfig presets all.config Documentation/00-INDEX +20 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ DMA-ISA-LPC.txt - How to do DMA with ISA (and LPC) devices. DMA-attributes.txt - listing of the various possible attributes a DMA region can have dmatest.txt - how to compile, configure and use the dmatest system. DocBook/ - directory with DocBook templates etc. for kernel documentation. EDID/ Loading Loading @@ -77,6 +79,8 @@ arm/ - directory with info about Linux on the ARM architecture. arm64/ - directory with info about Linux on the 64 bit ARM architecture. assoc_array.txt - generic associative array intro. atomic_ops.txt - semantics and behavior of atomic and bitmask operations. auxdisplay/ Loading @@ -87,6 +91,8 @@ bad_memory.txt - how to use kernel parameters to exclude bad RAM regions. basic_profiling.txt - basic instructions for those who wants to profile Linux kernel. bcache.txt - Block-layer cache on fast SSDs to improve slow (raid) I/O performance. binfmt_misc.txt - info on the kernel support for extra binary formats. blackfin/ Loading Loading @@ -171,6 +177,8 @@ early-userspace/ - info about initramfs, klibc, and userspace early during boot. edac.txt - information on EDAC - Error Detection And Correction efi-stub.txt - How to use the EFI boot stub to bypass GRUB or elilo on EFI systems. eisa.txt - info on EISA bus support. email-clients.txt Loading @@ -195,8 +203,8 @@ futex-requeue-pi.txt - info on requeueing of tasks from a non-PI futex to a PI futex gcov.txt - use of GCC's coverage testing tool "gcov" with the Linux kernel gpio.txt - overview of GPIO (General Purpose Input/Output) access conventions. gpio/ - gpio related documentation hid/ - directory with information on human interface devices highuid.txt Loading Loading @@ -255,6 +263,8 @@ kernel-docs.txt - listing of various WWW + books that document kernel internals. kernel-parameters.txt - summary listing of command line / boot prompt args for the kernel. kernel-per-CPU-kthreads.txt - List of all per-CPU kthreads and how they introduce jitter. kmemcheck.txt - info on dynamic checker that detects uses of uninitialized memory. kmemleak.txt Loading Loading @@ -299,8 +309,6 @@ memory-devices/ - directory with info on parts like the Texas Instruments EMIF driver memory-hotplug.txt - Hotpluggable memory support, how to use and current status. memory.txt - info on typical Linux memory problems. metag/ - directory with info about Linux on Meta architecture. mips/ Loading @@ -311,6 +319,8 @@ mmc/ - directory with info about the MMC subsystem mn10300/ - directory with info about the mn10300 architecture port module-signing.txt - Kernel module signing for increased security when loading modules. mtd/ - directory with info about memory technology devices (flash) mono.txt Loading Loading @@ -343,6 +353,8 @@ pcmcia/ - info on the Linux PCMCIA driver. percpu-rw-semaphore.txt - RCU based read-write semaphore optimized for locking for reading phy.txt - Description of the generic PHY framework. pi-futex.txt - documentation on lightweight priority inheritance futexes. pinctrl.txt Loading Loading @@ -431,6 +443,8 @@ sysrq.txt - info on the magic SysRq key. target/ - directory with info on generating TCM v4 fabric .ko modules this_cpu_ops.txt - List rationale behind and the way to use this_cpu operations. thermal/ - directory with information on managing thermal issues (CPU/temp) trace/ Loading Loading @@ -469,6 +483,8 @@ wimax/ - directory with info about Intel Wireless Wimax Connections workqueue.txt - information on the Concurrency Managed Workqueue implementation ww-mutex-design.txt - Intro to Mutex wait/would deadlock handling.s x86/x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. xtensa/ Loading Documentation/PCI/MSI-HOWTO.txt +109 −10 Original line number Diff line number Diff line Loading @@ -82,7 +82,19 @@ Most of the hard work is done for the driver in the PCI layer. It simply has to request that the PCI layer set up the MSI capability for this device. 4.2.1 pci_enable_msi_range 4.2.1 pci_enable_msi int pci_enable_msi(struct pci_dev *dev) A successful call allocates ONE interrupt to the device, regardless of how many MSIs the device supports. The device is switched from pin-based interrupt mode to MSI mode. The dev->irq number is changed to a new number which represents the message signaled interrupt; consequently, this function should be called before the driver calls request_irq(), because an MSI is delivered via a vector that is different from the vector of a pin-based interrupt. 4.2.2 pci_enable_msi_range int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec) Loading Loading @@ -147,6 +159,11 @@ static int foo_driver_enable_msi(struct pci_dev *pdev, int nvec) return pci_enable_msi_range(pdev, nvec, nvec); } Note, unlike pci_enable_msi_exact() function, which could be also used to enable a particular number of MSI-X interrupts, pci_enable_msi_range() returns either a negative errno or 'nvec' (not negative errno or 0 - as pci_enable_msi_exact() does). 4.2.1.3 Single MSI mode The most notorious example of the request type described above is Loading @@ -158,7 +175,27 @@ static int foo_driver_enable_single_msi(struct pci_dev *pdev) return pci_enable_msi_range(pdev, 1, 1); } 4.2.2 pci_disable_msi Note, unlike pci_enable_msi() function, which could be also used to enable the single MSI mode, pci_enable_msi_range() returns either a negative errno or 1 (not negative errno or 0 - as pci_enable_msi() does). 4.2.3 pci_enable_msi_exact int pci_enable_msi_exact(struct pci_dev *dev, int nvec) This variation on pci_enable_msi_range() call allows a device driver to request exactly 'nvec' MSIs. If this function returns a negative number, it indicates an error and the driver should not attempt to request any more MSI interrupts for this device. By contrast with pci_enable_msi_range() function, pci_enable_msi_exact() returns zero in case of success, which indicates MSI interrupts have been successfully allocated. 4.2.4 pci_disable_msi void pci_disable_msi(struct pci_dev *dev) Loading @@ -172,7 +209,7 @@ on any interrupt for which it previously called request_irq(). Failure to do so results in a BUG_ON(), leaving the device with MSI enabled and thus leaking its vector. 4.2.3 pci_msi_vec_count 4.2.4 pci_msi_vec_count int pci_msi_vec_count(struct pci_dev *dev) Loading Loading @@ -257,7 +294,7 @@ possible, likely up to the limit returned by pci_msix_vec_count() function: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, 1, nvec); } Loading @@ -269,7 +306,7 @@ In this case the function could look like this: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, FOO_DRIVER_MINIMUM_NVEC, nvec); } Loading @@ -282,10 +319,15 @@ parameters: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, nvec, nvec); } Note, unlike pci_enable_msix_exact() function, which could be also used to enable a particular number of MSI-X interrupts, pci_enable_msix_range() returns either a negative errno or 'nvec' (not negative errno or 0 - as pci_enable_msix_exact() does). 4.3.1.3 Specific requirements to the number of MSI-X interrupts As noted above, there could be devices that can not operate with just any Loading Loading @@ -332,7 +374,64 @@ Note how pci_enable_msix_range() return value is analized for a fallback - any error code other than -ENOSPC indicates a fatal error and should not be retried. 4.3.2 pci_disable_msix 4.3.2 pci_enable_msix_exact int pci_enable_msix_exact(struct pci_dev *dev, struct msix_entry *entries, int nvec) This variation on pci_enable_msix_range() call allows a device driver to request exactly 'nvec' MSI-Xs. If this function returns a negative number, it indicates an error and the driver should not attempt to allocate any more MSI-X interrupts for this device. By contrast with pci_enable_msix_range() function, pci_enable_msix_exact() returns zero in case of success, which indicates MSI-X interrupts have been successfully allocated. Another version of a routine that enables MSI-X mode for a device with specific requirements described in chapter 4.3.1.3 might look like this: /* * Assume 'minvec' and 'maxvec' are non-zero */ static int foo_driver_enable_msix(struct foo_adapter *adapter, int minvec, int maxvec) { int rc; minvec = roundup_pow_of_two(minvec); maxvec = rounddown_pow_of_two(maxvec); if (minvec > maxvec) return -ERANGE; retry: rc = pci_enable_msix_exact(adapter->pdev, adapter->msix_entries, maxvec); /* * -ENOSPC is the only error code allowed to be analyzed */ if (rc == -ENOSPC) { if (maxvec == 1) return -ENOSPC; maxvec /= 2; if (minvec > maxvec) return -ENOSPC; goto retry; } else if (rc < 0) { return rc; } return maxvec; } 4.3.3 pci_disable_msix void pci_disable_msix(struct pci_dev *dev) Loading Documentation/RCU/00-INDEX +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ listRCU.txt - Using RCU to Protect Read-Mostly Linked Lists lockdep.txt - RCU and lockdep checking lockdep-splat.txt - RCU Lockdep splats explained. NMI-RCU.txt - Using RCU to Protect Dynamic NMI Handlers rcubarrier.txt Loading Documentation/arm/00-INDEX +14 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ Booting - requirements for booting Interrupts - ARM Interrupt subsystem documentation IXP4xx - Intel IXP4xx Network processor. msm - MSM specific documentation Netwinder Loading @@ -24,8 +26,16 @@ SPEAr - ST SPEAr platform Linux Overview VFP/ - Release notes for Linux Kernel Vector Floating Point support code cluster-pm-race-avoidance.txt - Algorithm for CPU and Cluster setup/teardown empeg/ - Ltd's Empeg MP3 Car Audio Player firmware.txt - Secure firmware registration and calling. kernel_mode_neon.txt - How to use NEON instructions in kernel mode kernel_user_helpers.txt - Helper functions in kernel space made available for userspace. mem_alignment - alignment abort handler documentation memory.txt Loading @@ -34,3 +44,7 @@ nwfpe/ - NWFPE floating point emulator documentation swp_emulation - SWP/SWPB emulation handler/logging description tcm.txt - ARM Tightly Coupled Memory vlocks.txt - Voting locks, low-level mechanism relying on memory system atomic writes. Loading
.gitignore +3 −0 Original line number Diff line number Diff line Loading @@ -92,3 +92,6 @@ extra_certificates signing_key.priv signing_key.x509 x509.genkey # Kconfig presets all.config
Documentation/00-INDEX +20 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ DMA-ISA-LPC.txt - How to do DMA with ISA (and LPC) devices. DMA-attributes.txt - listing of the various possible attributes a DMA region can have dmatest.txt - how to compile, configure and use the dmatest system. DocBook/ - directory with DocBook templates etc. for kernel documentation. EDID/ Loading Loading @@ -77,6 +79,8 @@ arm/ - directory with info about Linux on the ARM architecture. arm64/ - directory with info about Linux on the 64 bit ARM architecture. assoc_array.txt - generic associative array intro. atomic_ops.txt - semantics and behavior of atomic and bitmask operations. auxdisplay/ Loading @@ -87,6 +91,8 @@ bad_memory.txt - how to use kernel parameters to exclude bad RAM regions. basic_profiling.txt - basic instructions for those who wants to profile Linux kernel. bcache.txt - Block-layer cache on fast SSDs to improve slow (raid) I/O performance. binfmt_misc.txt - info on the kernel support for extra binary formats. blackfin/ Loading Loading @@ -171,6 +177,8 @@ early-userspace/ - info about initramfs, klibc, and userspace early during boot. edac.txt - information on EDAC - Error Detection And Correction efi-stub.txt - How to use the EFI boot stub to bypass GRUB or elilo on EFI systems. eisa.txt - info on EISA bus support. email-clients.txt Loading @@ -195,8 +203,8 @@ futex-requeue-pi.txt - info on requeueing of tasks from a non-PI futex to a PI futex gcov.txt - use of GCC's coverage testing tool "gcov" with the Linux kernel gpio.txt - overview of GPIO (General Purpose Input/Output) access conventions. gpio/ - gpio related documentation hid/ - directory with information on human interface devices highuid.txt Loading Loading @@ -255,6 +263,8 @@ kernel-docs.txt - listing of various WWW + books that document kernel internals. kernel-parameters.txt - summary listing of command line / boot prompt args for the kernel. kernel-per-CPU-kthreads.txt - List of all per-CPU kthreads and how they introduce jitter. kmemcheck.txt - info on dynamic checker that detects uses of uninitialized memory. kmemleak.txt Loading Loading @@ -299,8 +309,6 @@ memory-devices/ - directory with info on parts like the Texas Instruments EMIF driver memory-hotplug.txt - Hotpluggable memory support, how to use and current status. memory.txt - info on typical Linux memory problems. metag/ - directory with info about Linux on Meta architecture. mips/ Loading @@ -311,6 +319,8 @@ mmc/ - directory with info about the MMC subsystem mn10300/ - directory with info about the mn10300 architecture port module-signing.txt - Kernel module signing for increased security when loading modules. mtd/ - directory with info about memory technology devices (flash) mono.txt Loading Loading @@ -343,6 +353,8 @@ pcmcia/ - info on the Linux PCMCIA driver. percpu-rw-semaphore.txt - RCU based read-write semaphore optimized for locking for reading phy.txt - Description of the generic PHY framework. pi-futex.txt - documentation on lightweight priority inheritance futexes. pinctrl.txt Loading Loading @@ -431,6 +443,8 @@ sysrq.txt - info on the magic SysRq key. target/ - directory with info on generating TCM v4 fabric .ko modules this_cpu_ops.txt - List rationale behind and the way to use this_cpu operations. thermal/ - directory with information on managing thermal issues (CPU/temp) trace/ Loading Loading @@ -469,6 +483,8 @@ wimax/ - directory with info about Intel Wireless Wimax Connections workqueue.txt - information on the Concurrency Managed Workqueue implementation ww-mutex-design.txt - Intro to Mutex wait/would deadlock handling.s x86/x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. xtensa/ Loading
Documentation/PCI/MSI-HOWTO.txt +109 −10 Original line number Diff line number Diff line Loading @@ -82,7 +82,19 @@ Most of the hard work is done for the driver in the PCI layer. It simply has to request that the PCI layer set up the MSI capability for this device. 4.2.1 pci_enable_msi_range 4.2.1 pci_enable_msi int pci_enable_msi(struct pci_dev *dev) A successful call allocates ONE interrupt to the device, regardless of how many MSIs the device supports. The device is switched from pin-based interrupt mode to MSI mode. The dev->irq number is changed to a new number which represents the message signaled interrupt; consequently, this function should be called before the driver calls request_irq(), because an MSI is delivered via a vector that is different from the vector of a pin-based interrupt. 4.2.2 pci_enable_msi_range int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec) Loading Loading @@ -147,6 +159,11 @@ static int foo_driver_enable_msi(struct pci_dev *pdev, int nvec) return pci_enable_msi_range(pdev, nvec, nvec); } Note, unlike pci_enable_msi_exact() function, which could be also used to enable a particular number of MSI-X interrupts, pci_enable_msi_range() returns either a negative errno or 'nvec' (not negative errno or 0 - as pci_enable_msi_exact() does). 4.2.1.3 Single MSI mode The most notorious example of the request type described above is Loading @@ -158,7 +175,27 @@ static int foo_driver_enable_single_msi(struct pci_dev *pdev) return pci_enable_msi_range(pdev, 1, 1); } 4.2.2 pci_disable_msi Note, unlike pci_enable_msi() function, which could be also used to enable the single MSI mode, pci_enable_msi_range() returns either a negative errno or 1 (not negative errno or 0 - as pci_enable_msi() does). 4.2.3 pci_enable_msi_exact int pci_enable_msi_exact(struct pci_dev *dev, int nvec) This variation on pci_enable_msi_range() call allows a device driver to request exactly 'nvec' MSIs. If this function returns a negative number, it indicates an error and the driver should not attempt to request any more MSI interrupts for this device. By contrast with pci_enable_msi_range() function, pci_enable_msi_exact() returns zero in case of success, which indicates MSI interrupts have been successfully allocated. 4.2.4 pci_disable_msi void pci_disable_msi(struct pci_dev *dev) Loading @@ -172,7 +209,7 @@ on any interrupt for which it previously called request_irq(). Failure to do so results in a BUG_ON(), leaving the device with MSI enabled and thus leaking its vector. 4.2.3 pci_msi_vec_count 4.2.4 pci_msi_vec_count int pci_msi_vec_count(struct pci_dev *dev) Loading Loading @@ -257,7 +294,7 @@ possible, likely up to the limit returned by pci_msix_vec_count() function: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, 1, nvec); } Loading @@ -269,7 +306,7 @@ In this case the function could look like this: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, FOO_DRIVER_MINIMUM_NVEC, nvec); } Loading @@ -282,10 +319,15 @@ parameters: static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) { return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, return pci_enable_msix_range(adapter->pdev, adapter->msix_entries, nvec, nvec); } Note, unlike pci_enable_msix_exact() function, which could be also used to enable a particular number of MSI-X interrupts, pci_enable_msix_range() returns either a negative errno or 'nvec' (not negative errno or 0 - as pci_enable_msix_exact() does). 4.3.1.3 Specific requirements to the number of MSI-X interrupts As noted above, there could be devices that can not operate with just any Loading Loading @@ -332,7 +374,64 @@ Note how pci_enable_msix_range() return value is analized for a fallback - any error code other than -ENOSPC indicates a fatal error and should not be retried. 4.3.2 pci_disable_msix 4.3.2 pci_enable_msix_exact int pci_enable_msix_exact(struct pci_dev *dev, struct msix_entry *entries, int nvec) This variation on pci_enable_msix_range() call allows a device driver to request exactly 'nvec' MSI-Xs. If this function returns a negative number, it indicates an error and the driver should not attempt to allocate any more MSI-X interrupts for this device. By contrast with pci_enable_msix_range() function, pci_enable_msix_exact() returns zero in case of success, which indicates MSI-X interrupts have been successfully allocated. Another version of a routine that enables MSI-X mode for a device with specific requirements described in chapter 4.3.1.3 might look like this: /* * Assume 'minvec' and 'maxvec' are non-zero */ static int foo_driver_enable_msix(struct foo_adapter *adapter, int minvec, int maxvec) { int rc; minvec = roundup_pow_of_two(minvec); maxvec = rounddown_pow_of_two(maxvec); if (minvec > maxvec) return -ERANGE; retry: rc = pci_enable_msix_exact(adapter->pdev, adapter->msix_entries, maxvec); /* * -ENOSPC is the only error code allowed to be analyzed */ if (rc == -ENOSPC) { if (maxvec == 1) return -ENOSPC; maxvec /= 2; if (minvec > maxvec) return -ENOSPC; goto retry; } else if (rc < 0) { return rc; } return maxvec; } 4.3.3 pci_disable_msix void pci_disable_msix(struct pci_dev *dev) Loading
Documentation/RCU/00-INDEX +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ listRCU.txt - Using RCU to Protect Read-Mostly Linked Lists lockdep.txt - RCU and lockdep checking lockdep-splat.txt - RCU Lockdep splats explained. NMI-RCU.txt - Using RCU to Protect Dynamic NMI Handlers rcubarrier.txt Loading
Documentation/arm/00-INDEX +14 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ Booting - requirements for booting Interrupts - ARM Interrupt subsystem documentation IXP4xx - Intel IXP4xx Network processor. msm - MSM specific documentation Netwinder Loading @@ -24,8 +26,16 @@ SPEAr - ST SPEAr platform Linux Overview VFP/ - Release notes for Linux Kernel Vector Floating Point support code cluster-pm-race-avoidance.txt - Algorithm for CPU and Cluster setup/teardown empeg/ - Ltd's Empeg MP3 Car Audio Player firmware.txt - Secure firmware registration and calling. kernel_mode_neon.txt - How to use NEON instructions in kernel mode kernel_user_helpers.txt - Helper functions in kernel space made available for userspace. mem_alignment - alignment abort handler documentation memory.txt Loading @@ -34,3 +44,7 @@ nwfpe/ - NWFPE floating point emulator documentation swp_emulation - SWP/SWPB emulation handler/logging description tcm.txt - ARM Tightly Coupled Memory vlocks.txt - Voting locks, low-level mechanism relying on memory system atomic writes.