aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-04VMware balloon: add batching to the vmw_balloon.Xavier Deguillard1-53/+353
Introduce a new capability to the driver that allow sending 512 pages in one hypervisor call. This reduce the cost of the driver when reclaiming memory. Signed-off-by: Xavier Deguillard <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Philip P. Moltmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: genwqe: fix a comment typoGeliang Tang1-1/+1
Just fix a typo in the code comment. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: sgi-gru: fix return of errorSudip Mukherjee1-10/+10
If kzalloc() fails then gms is NULL and we are returning NULL, but the functions which called this function gru_register_mmu_notifier() are not expecting NULL as the return. They are expecting either a valid pointer or the error code in ERR_PTR. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: sgi-gru: gruhandles.c: Remove unused functionRickard Strandqvist2-7/+0
Remove the function tfh_restart() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: sgi-gru: use time_before()Manuel Schölling1-1/+3
To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: Manuel Schölling <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF RMA nodeqp and minor miscellaneous changesSudeep Dutt14-40/+516
This patch adds the SCIF kernel node QP control messages required to enable SCIF RMAs. Examples of such node QP control messages include registration, unregistration, remote memory allocation requests, remote memory unmap and SCIF remote fence requests. The patch also updates the SCIF driver with minor changes required to enable SCIF RMAs by adding the new files to the build, initializing RMA specific information during SCIF endpoint creation, reserving SCIF DMA channels, initializing SCIF RMA specific global data structures, adding the IOCTL hooks required for SCIF RMAs and updating RMA specific debugfs hooks. Reviewed-by: Ashutosh Dixit <[email protected]> Reviewed-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF fenceSudeep Dutt1-0/+771
This patch implements the fence APIs required to synchronize DMAs. SCIF provides an interface to return a "mark" for all DMAs programmed at the instant the API was called. Users can then "wait" on the mark provided previously by blocking inside the kernel. Upon receipt of a DMA completion interrupt the waiting thread is woken up. There is also an interface to signal DMA completion by polling for a location to be updated via a "signal" cookie to avoid the interrupt overhead in the mark/wait interface. SCIF allows programming fences on both the local and the remote node for both the mark/wait or the fence signal APIs. Reviewed-by: Ashutosh Dixit <[email protected]> Reviewed-by: Nikhil Rao <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF DMA and CPU copy interfaceSudeep Dutt1-0/+1979
SCIF allows users to read from or write to registered remote memory via CPU copies or DMA. The API verifies that both local and remote windows are valid before initiating the CPU or DMA transfers. SCIF has optimized algorithms for handling byte aligned as well as cache line aligned DMA engines. A registration cache is maintained to avoid the overhead of pinning pages repeatedly if buffers are reused. The registration cache is invalidated upon receipt of MMU notifier callbacks. SCIF windows are destroyed and the pages are unpinned only once all prior DMAs initiated using that window are drained. Users can request synchronous DMA operations as well as tail byte ordering if required. CPU copies are always performed synchronously. Reviewed-by: Ashutosh Dixit <[email protected]> Reviewed-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF remote memory map/unmap interfaceSudeep Dutt1-0/+699
This patch implements the SCIF mmap/munmap interface. A similar capability is provided to kernel clients via the scif_get_pages()/scif_put_pages() APIs. The SCIF mmap interface queries to check if a window is valid and then remaps the local virtual address to the remote physical pages. These mappings are subsequently destroyed upon receipt of the VMA close operation or scif_get_pages(). This functionality allows SCIF users to directly access remote memory without any driver interaction once the mappings are created thereby providing bare-metal PCIe latency. These mappings are zapped to avoid RMA accesses from user space, if a Coprocessor is reset. Reviewed-by: Ashutosh Dixit <[email protected]> Reviewed-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF RMA list operationsSudeep Dutt2-0/+348
This patch adds the implementation for operations performed on the list of SCIF windows. Examples of such operations includes adding the windows to the list of registered (or cached) windows, querying the list of self or remote windows and unregistering windows. The query operation is used by SCIF APIs which initiate DMAs, CPU copies or fences to ensure that a window remains valid during a transfer. Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF memory registration and unregistrationSudeep Dutt1-0/+1770
This patch implements the SCIF APIs required to pin and unpin pages. SCIF registration locks down the pages. It then sends a remote window allocation request to the peer. Once the peer has allocated memory, the local SCIF endpoint copies the pinned page information to the peer and notifies the peer once the copy has complete. The peer upon receipt of the registration notification adds the new remote window to its list. At this point the window page information is available on both self and remote nodes so that they can start performing SCIF DMAs, CPU copies and fences. The unregistration API tears down the registration at both self and remote nodes. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF RMA header fileSudeep Dutt1-0/+464
This patch adds the internal data structures required to perform SCIF RMAs. The data structures required to maintain per SCIF endpoint, RMA information are contained in scif_endpt_rma_info. scif_pinned_pages describes a set of SCIF pinned pages maintained locally. The scif_window is a data structure which contains all the fields required to describe a SCIF registered window on self and remote nodes. It contains an offset which is used as a key to perform SCIF DMAs and CPU copies between self and remote registered windows. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF RMA header file and IOCTL changesSudeep Dutt2-10/+309
This patch updates the SCIF header file and IOCTL interface with the changes required to support RMAs. APIs added include the ability to pin pages and register those pages with SCIF. SCIF kernel clients can also add references to remote registered pages and access them via the CPU. The user space IOCTL interface has been updated to enable SCIF registration, RDMA/CPU copies and fence APIs for RDMA synchronization. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: Update MIC host daemon with COSM changesAshutosh Dixit9-175/+285
This patch updates the MIC host daemon to work with corresponding changes in COSM. Other MIC daemon fixes, cleanups and enhancements as are also rolled into this patch. Changes to MIC sysfs ABI which go into effect with this patch are also documented. Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: Remove COSM functionality from the MIC card driverAshutosh Dixit5-105/+23
Since card side COSM functionality, to trigger MIC device shutdowns and communicate shutdown status to the host, is now moved into a separate COSM client driver, this patch removes this functionality from the base MIC card driver. The mic_bus driver is also updated to use the device index provided by COSM rather than maintain its own device index. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: Remove COSM functionality from the MIC host driverAshutosh Dixit13-1145/+204
Since COSM functionality is now moved into a separate COSM driver drivers, this patch removes this functionality from the base MIC host driver. The MIC host driver now implements cosm_hw_ops and registers a COSM device which allows the COSM driver to trigger boot/shutdown/reset of the MIC devices via the cosm_hw_ops. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: COSM client driverAshutosh Dixit2-0/+282
The COSM client driver running on the MIC cards is implemented as a kernel mode SCIF client. It responds to a "shutdown" message from the host by triggering a card shutdown and also communicates the shutdown or reboot status back the host. It is also responsible for syncing the card time to that of the host. Because SCIF messaging cannot be used in a panic context, the COSM client driver also periodically sends a heartbeat SCIF message to the host thereby enabling the host to detect card crashes. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: COSM SCIF serverAshutosh Dixit1-0/+405
The COSM driver communicates with the MIC cards over SCIF. A SCIF "server" listens for incoming connections from "client" MIC cards as they boot. After the connection is accepted a separate work item is scheduled for each MIC card. This work item normally stays blocked in scif_poll but wakes up to process messages from the card. The SCIF connection between the host and card COSM components is used to (a) send the command to shut down the card (b) receive shutdown status back from the card upon completion of shutdown (c) receive periodic heartbeat messages to detect card crashes (d) send host time to the card to enable the card to sync its time to the host. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: Coprocessor State Management (COSM) driverAshutosh Dixit5-0/+1084
The COSM driver allows boot, shutdown and reset of Intel MIC devices via sysfs. This functionality was previously present in the Intel MIC host driver but has now been taken out into a separate driver so that it can be shared between multiple generations of Intel MIC products. The sysfs kernel ABI used by the COSM driver is the same as that defined originally for the MIC host driver in Documentation/ABI/testing/sysfs-class-mic.txt. The COSM driver also contains support for dumping the MIC card log_buf and doing a "force reset" for the card via debugfs. The OSPM support present in the MIC host driver has now largely been moved to user space and only a small required OSPM functionality is now present in the driver. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: MIC COSM busAshutosh Dixit4-2/+296
The MIC COSM bus allows the co-processor state management (COSM) functionality to be shared between multiple generations of Intel MIC products. The COSM driver registers itself on the COSM bus. The base PCIe drivers implement the bus ops and register COSM devices on the bus, resulting in the COSM driver being probed with the COSM devices. COSM bus ops, e.g. start, stop, ready, reset, therefore abstract out common functionality from its specific implementation for individual generations of MIC products. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: Add support for kernel mode SCIF clientsAshutosh Dixit8-221/+255
Add support for registration/de-registration of kernel mode SCIF clients. SCIF clients are probed with new and existing SCIF peer devices. Similarly the client remove method is called when SCIF peer devices are removed. Changes to SCIF peer device framework necessitated by supporting kernel mode SCIF clients are also included in this patch. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: mic: SCIF pollAshutosh Dixit5-1/+264
SCIF poll allows both user and kernel mode clients to wait on events on a SCIF endpoint. These events include availability of space or data in the SCIF ring buffer, availability of connection requests on a listening endpoint and completion of connections when using async connects. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04dma: Add support to program MIC x100 status descriptiorsSiva Yerramreddy2-1/+42
The MIC X100 DMA engine has a special status descriptor which writes an 8 byte value to a destination location. This is used to signal completion of all DMA descriptors prior to the status descriptor. This patch add a new DMA engine API which enables updating a destination address with an 8 byte immediate data value. Reviewed-by: Nikhil Rao <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: Lawrynowicz, Jacek <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Siva Yerramreddy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04iommu: Allow iova to be used without requiring IOMMU_SUPPORTSudeep Dutt1-3/+3
iova is a library which can be built without IOMMU_SUPPORT Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04iommu: Make the iova library a moduleSakari Ailus2-1/+5
The iova library has use outside the intel-iommu driver, thus make it a module. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04iommu: iova: Export symbolsSakari Ailus1-0/+10
Use EXPORT_SYMBOL_GPL() to export the iova library symbols. The symbols include: init_iova_domain(); iova_cache_get(); iova_cache_put(); iova_cache_init(); alloc_iova(); find_iova(); __free_iova(); free_iova(); put_iova_domain(); reserve_iova(); copy_reserved_iova(); Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04iommu: iova: Move iova cache management to the iova librarySakari Ailus3-39/+54
This is necessary to separate intel-iommu from the iova library. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc/genwqe: get rid of atomic allocationsSebastian Ott3-5/+6
we received reports of failed allocations in genwqe code: [ 733.550955] genwqe_gzip: page allocation failure: order:1, mode:0x20 [ 733.550964] CPU: 2 PID: 1846 Comm: genwqe_gzip Not tainted 4.3.0-rc3-00042-g3225031 #78 [ 733.550968] 000000002782b830 000000002782b8c0 0000000000000002 0000000000000000 000000002782b960 000000002782b8d8 000000002782b8d8 00000000001134a0 0000000000000000 0000000000892b2a 0000000000871d0a 000000000000000b 000000002782b920 000000002782b8c0 0000000000000000 0000000000000000 0000000000000000 00000000001134a0 000000002782b8c0 000000002782b920 [ 733.551003] Call Trace: [ 733.551013] ([<0000000000113388>] show_trace+0xf8/0x158) [ 733.551018] [<0000000000113452>] show_stack+0x6a/0xe8 [ 733.551024] [<00000000004611d4>] dump_stack+0x7c/0xd8 [ 733.551031] [<000000000024dc22>] warn_alloc_failed+0xda/0x150 [ 733.551036] [<000000000025268e>] __alloc_pages_nodemask+0x94e/0xbc0 [ 733.551041] [<000000000012bcd8>] s390_dma_alloc+0x70/0x1a0 [ 733.551054] [<000003ff804d8e8c>] __genwqe_alloc_consistent+0x84/0xd0 [genwqe_card] [ 733.551063] [<000003ff804d90c2>] genwqe_alloc_sync_sgl+0x13a/0x328 [genwqe_card] [ 733.551066] [<000003ff804d41a0>] do_execute_ddcb+0x1f8/0x388 [genwqe_card] [ 733.551069] [<000003ff804d48c8>] genwqe_ioctl+0x598/0xd50 [genwqe_card] [ 733.551072] [<00000000002cc90c>] do_vfs_ioctl+0x3f4/0x590 [ 733.551074] [<00000000002ccb46>] SyS_ioctl+0x9e/0xb0 [ 733.551078] [<00000000006c8166>] system_call+0xd6/0x258 [ 733.551080] [<000003fffd25819a>] 0x3fffd25819a [ 733.551082] no locks held by genwqe_gzip/1846. This specific allocation and some others in genwqe are unnecessary flagged as atomic. All of genwqe's atomic allocations happen in a context where it's allowed to sleep. Change these to use GFP_KERNEL. Signed-off-by: Sebastian Ott <[email protected]> Acked-by: Frank Haverkamp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: hpilo: Change e-mail address from hp.com to hpe.comMasanari Iida1-2/+2
This patch changes maintainer's email address from hp.com to hpe.com in hpilo.c. Signed-off-by: Masanari Iida <[email protected]> Acked-by: David Altobelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04misc: hpilo: Add min and max value of module parameter in descriptionMasanari Iida1-1/+1
This patch add minimum and maximum value of module parameter max_ccb in hpilo.c. Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04uio: fix false positive __might_sleep warning splatMichal Hocko1-0/+1
Andy has reported a __might_sleep warning [ 5174.883617] WARNING: CPU: 0 PID: 1532 at /home/agrover/git/kernel/kernel/sched/core.c:7389 __might_sleep+0x7d/0x90() [ 5174.884407] do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffffa02a5821>] uio_read+0x91/0x170 [uio] [ 5174.885198] Modules linked in: tcm_loop target_core_user uio target_core_pscsi target_core_file target_core_iblock iscsi_target_mod target_core_mod uinput fuse nfsv3 nfs_acl nfs lockd grace fscache sunrpc microcode i2c_piix4 virtio_balloon i2c_core xfs libcrc32c crc32c_intel virtio_net virtio_blk [ 5174.887351] CPU: 0 PID: 1532 Comm: tcmu-runner Not tainted 4.2.0-rc7+ [ 5174.887853] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 [ 5174.888633] ffffffff81a3b870 ffff880045393ca8 ffffffff817afaae 0000000000000000 [ 5174.889224] ffff880045393cf8 ffff880045393ce8 ffffffff8109a846 ffff880045393cd8 [ 5174.889793] ffffffffa02a7150 00000000000002dc 0000000000000000 ffff880045008000 [ 5174.890375] Call Trace: [ 5174.890562] [<ffffffff817afaae>] dump_stack+0x4c/0x65 [ 5174.890938] [<ffffffff8109a846>] warn_slowpath_common+0x86/0xc0 [ 5174.891388] [<ffffffff8109a8c6>] warn_slowpath_fmt+0x46/0x50 [ 5174.891808] [<ffffffffa02a5821>] ? uio_read+0x91/0x170 [uio] [ 5174.892237] [<ffffffffa02a5821>] ? uio_read+0x91/0x170 [uio] [ 5174.892653] [<ffffffff810c584d>] __might_sleep+0x7d/0x90 [ 5174.893055] [<ffffffff811ea023>] __might_fault+0x43/0xa0 [ 5174.893448] [<ffffffff817b31ce>] ? schedule+0x3e/0x90 [ 5174.893820] [<ffffffffa02a58c2>] uio_read+0x132/0x170 [uio] [ 5174.894240] [<ffffffff810cbb80>] ? wake_up_q+0x70/0x70 [ 5174.894620] [<ffffffff81236168>] __vfs_read+0x28/0xe0 [ 5174.894993] [<ffffffff81353233>] ? security_file_permission+0xa3/0xc0 [ 5174.895541] [<ffffffff8123678f>] ? rw_verify_area+0x4f/0xf0 [ 5174.896006] [<ffffffff812368ba>] vfs_read+0x8a/0x140 [ 5174.896391] [<ffffffff817b28f5>] ? __schedule+0x425/0xcc0 [ 5174.896788] [<ffffffff812375d9>] SyS_read+0x49/0xb0 The warning is a false positive because uio_read doesn't depent on TASK_INTERRUPTIBLE after copy_to_user so it is safe to silence the warning by an explicit setting the state to TASK_RUNNING in the path which might call into TASK_RUNNING. Reported-by: Andy Grover <[email protected]> Signed-off-by: Michal Hocko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04uio: uio_fsl_elbc_gpcm: Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04mei: hbm: fix error in state check logicAlexander Usyskin1-1/+1
Use || instead && in state check. The latter is bogus and leads to following warning: drivers/misc/mei/hbm.c:1212:46: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op] Fixes: 70ef835c84b3 ("mei: support for dynamic clients") Reported-by: David Binderman <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: sunxi: Check for memory allocation failureMaxime Ripard1-1/+10
The sunxi_sid driver doesn't check for kmalloc return status before derefencing the returned pointer, which could lead to a NULL pointer dereference if kmalloc failed. Check for its return code to make sure it deosn't happen. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: core: Fix memory leak in nvmem_cell_writeAxel Lin1-1/+1
A tmp buffer is allocated if cell->bit_offset || cell->nbits. So the tmp buffer needs to be freed at the same condition to avoid leak. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: core: Handle shift bits in-place if cell->nbits is non-zeroAxel Lin1-1/+1
It's pointless to test (cell->bit_offset || cell->bit_offset). nvmem_shift_read_buffer_in_place() should be called when (cell->bit_offset || cell->nbits). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: core: fix the out-of-range leak in read/write()ZhengShunQian1-2/+2
The position to read/write must be less than max register size. Signed-off-by: ZhengShunQian <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: rockchip_efuse_regmap_config can be statickbuild test robot1-3/+3
Signed-off-by: Fengguang Wu <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: Adding bindings for rockchip-efuseZhengShunQian3-0/+198
There are some SoC specified values store in eFuse, such as the cpu_leakage and cpu_version, this driver can expose these values to /sys base on nvmem. Signed-off-by: Caesar Wang <[email protected]> Signed-off-by: ZhengShunQian <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: rockchip-efuse: describe the usage of eFuseZhengShunQian1-0/+38
This patch add the bindings document of rockchip eFuse driver. Cc: Srinivas Kandagatla <[email protected]> Cc: Heiko Stuebner <[email protected]> Signed-off-by: ZhengShunQian <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: add driver for ocotp in i.MX23 and i.MX28Stefan Wahren3-0/+270
This patch brings read-only support for the On-Chip OTP cells in the i.MX23 and i.MX28 processor. The driver implements the new NVMEM provider API. Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: add binding for mxs-ocotpStefan Wahren1-0/+25
This patch adds the devicetree bindings for the Freescale MXS On Chip OTP driver. Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: imx-ocotp: Add i.MX6 OCOTP driverPhilipp Zabel3-0/+167
This driver handles the i.MX On-Chip OTP Controller found in i.MX6Q/D, i.MX6S/DL, i.MX6SL, and i.MX6SX SoCs. Currently it just returns the values stored in the shadow registers. Signed-off-by: Philipp Zabel <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: Add i.MX6 OCOTP device tree binding documentationPhilipp Zabel1-0/+20
This patch documents the i.MX6 OCOTP device tree binding. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: Add Vybrid OCOTP supportSanchayan Maity3-0/+314
The patch adds support for the On Chip One Time Programmable Peripheral (OCOTP) on the Vybrid platform. Signed-off-by: Sanchayan Maity <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04nvmem: Add DT binding documentation for Vybrid OCOTP driverSanchayan Maity1-0/+19
Add the devicetree bindings for the Freescale Vybrid On-Chip OTP driver. Signed-off-by: Sanchayan Maity <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04Merge tag 'md/4.3-fixes' of git://neil.brown.name/mdLinus Torvalds7-26/+28
Pull md fixes from Neil Brown: "Assorted fixes for md in 4.3-rc. Two tagged for -stable, and one is really a cleanup to match and improve kmemcache interface. * tag 'md/4.3-fixes' of git://neil.brown.name/md: md/bitmap: don't pass -1 to bitmap_storage_alloc. md/raid1: Avoid raid1 resync getting stuck md: drop null test before destroy functions md: clear CHANGE_PENDING in readonly array md/raid0: apply base queue limits *before* disk_stack_limits md/raid5: don't index beyond end of array in need_this_block(). raid5: update analysis state for failed stripe md: wait for pending superblock updates before switching to read-only
2015-10-04Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds13-144/+82
Pull MIPS updates from Ralf Baechle: "This week's round of MIPS fixes: - Fix JZ4740 build - Fix fallback to GFP_DMA - FP seccomp in case of ENOSYS - Fix bootmem panic - A number of FP and CPS fixes - Wire up new syscalls - Make sure BPF assembler objects can properly be disassembled - Fix BPF assembler code for MIPS I" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: scall: Always run the seccomp syscall filters MIPS: Octeon: Fix kernel panic on startup from memory corruption MIPS: Fix R2300 FP context switch handling MIPS: Fix octeon FP context switch handling MIPS: BPF: Fix load delay slots. MIPS: BPF: Do all exports of symbols with FEXPORT(). MIPS: Fix the build on jz4740 after removing the custom gpio.h MIPS: CPS: #ifdef on CONFIG_MIPS_MT_SMP rather than CONFIG_MIPS_MT MIPS: CPS: Don't include MT code in non-MT kernels. MIPS: CPS: Stop dangling delay slot from has_mt. MIPS: dma-default: Fix 32-bit fall back to GFP_DMA MIPS: Wire up userfaultfd and membarrier syscalls.
2015-10-04Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds3-3/+21
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "This update contains: - Fix for a long standing race affecting /proc/irq/NNN - One line fix for ARM GICV3-ITS counting the wrong data - Warning silencing in ARM GICV3-ITS. Another GCC trying to be overly clever issue" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Count additional LPIs for the aliased devices irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined genirq: Fix race in register_irq_proc()
2015-10-04MIPS: scall: Always run the seccomp syscall filtersMarkos Chandras4-73/+42
The MIPS syscall handler code used to return -ENOSYS on invalid syscalls. Whilst this is expected, it caused problems for seccomp filters because the said filters never had the change to run since the code returned -ENOSYS before triggering them. This caused problems on the chromium testsuite for filters looking for invalid syscalls. This has now changed and the seccomp filters are always run even if the syscall is invalid. We return -ENOSYS once we return from the seccomp filters. Moreover, similar codepaths have been merged in the process which simplifies somewhat the overall syscall code. Signed-off-by: Markos Chandras <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11236/ Signed-off-by: Ralf Baechle <[email protected]>