aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
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: Update MIC host daemon with COSM changesAshutosh Dixit3-5/+12
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 Dixit4-104/+21
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 Dixit7-221/+197
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 Dixit4-1/+190
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-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-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-04debugfs: Pass bool pointer to debugfs_create_bool()Viresh Kumar1-1/+1
Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument, when all it needs is a boolean pointer. It would be better to update this API to make it accept 'bool *' instead, as that will make it more consistent and often more convenient. Over that bool takes just a byte. That required updates to all user sites as well, in the same commit updating the API. regmap core was also using debugfs_{read|write}_file_bool(), directly and variable types were updated for that to be bool as well. Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-01cxl: fix leak of ctx->mapping when releasing kernel API contextsAndrew Donnellan1-3/+10
When a context is created via the kernel API, ctx->mapping is allocated within the kernel and thus needs to be freed when the context is freed. reclaim_ctx() attempts to do this for contexts with the ctx->kernelapi flag set, but afu_release() (which can be called from the kernel API through cxl_fd_release()) sets ctx->mapping to NULL before calling cxl_context_free() to free the context. Add a check to afu_release() so that the mappings in contexts created via the kernel API are left alone so reclaim_ctx() can free them. Reported-by: Matthew R. Ochs <[email protected]> Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API") Signed-off-by: Andrew Donnellan <[email protected]> Acked-by: Ian Munsie <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-01cxl: fix leak of ctx->irq_bitmap when releasing context via kernel APIAndrew Donnellan2-2/+3
At present, ctx->irq_bitmap is freed in afu_release_irqs(), which is called from afu_release() via cxl_context_detach(). Move the freeing of ctx->irq_bitmap from afu_release_irqs() to reclaim_ctx() (called through cxl_context_free()) so it's freed when releasing a context via the kernel API (cxl_release_context()) or the userspace API (afu_release()). Reported-by: Matthew R. Ochs <[email protected]> Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API") Signed-off-by: Andrew Donnellan <[email protected]> Acked-by: Ian Munsie <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-10-01cxl: fix leak of IRQ names in cxl_free_afu_irqs()Andrew Donnellan3-1/+3
cxl_free_afu_irqs() doesn't free IRQ names when it releases an AFU's IRQ ranges. The userspace API equivalent in afu_release_irqs() calls afu_irq_name_free() to release the IRQ names. Call afu_irq_name_free() in cxl_free_afu_irqs() to release the IRQ names. Make afu_irq_name_free() non-static to allow this. Reported-by: Matthew R. Ochs <[email protected]> Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API") Signed-off-by: Andrew Donnellan <[email protected]> Signed-off-by: Ian Munsie <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-09-29drivers: misc: Drop unlikely before IS_ERR(_OR_NULL)Viresh Kumar1-1/+1
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2015-09-27Merge 4.3-rc3 into char-misc-nextGreg Kroah-Hartman2-1/+4
We want those fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-26Merge tag 'char-misc-4.3-rc3' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here's some tiny char and misc driver fixes that resolve some reported errors for 4.3-rc3. All of these have been in linux-next with no problems for a while" * tag 'char-misc-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: extcon: Fix attached value returned by is_extcon_changed Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc mei: fix debugfs files leak on error path thunderbolt: Allow loading of module on recent Apple MacBooks with thunderbolt 2 controller
2015-09-23cxl: Fix lockdep warning while creating afu_err_buff attributeVaibhav Jain1-0/+2
Presently a lockdep warning is reported during creation of afu_err_buff bin_attribute for the afu. This is caused due to the variable attr.key not pointing to a static class key, hence the function lockdep_init_map reports this warning: BUG: key <some-address> not in .data! The patch fixes this issue by calling sysfs_attr_init on the attr_eb.attr structure before populating it with the afu_err_buff file details. This will populate the attr.key variable with a static class key so that lockdep_init_map stops complaining about the lockdep key not being static. Reported-by: Daniel Axtens <[email protected]> Signed-off-by: Vaibhav Jain <[email protected]> Acked-by: Ian Munsie <[email protected]> Reviewed-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-09-20ti-st: use worker instead of calling st_int_write in wake upMuhammad Hamza Farooq1-2/+16
The wake up method is called with the port lock held. The st_int_write method calls port->ops->write with tries to acquire the lock again, causing CPU to wait infinitely. Right way to do is to write data to port in worker thread. Signed-off-by: Muhammad Hamza Farooq <[email protected]> Signed-off-by: Jacob Siverskog <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: fix debugfs files leak on error pathTomas Winkler1-1/+2
if dbgfs_dir is not set then debugfs_remove_recursive is not called on the error path Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: fix possible NULL dereferenceSudip Mukherjee1-2/+3
If mmu_find_ops() returns NULL then we are allocating memory for gms using kzalloc. But kzalloc can return NULL and we were dereferencing gms in gru_dbg(). Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20misc: ad525x_dpot: Remove unnecessary MODULE_ALIAS()Javier Martinez Canillas1-1/+0
The driver has a I2C device id table that is used to create the module aliases and also "ad_dpot" isn't a supported I2C id, so it's never used. Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc: make kgdbts.c slightly more explicitly non-modularPaul Gortmaker1-5/+5
The Kconfig currently controlling compilation of this code is: lib/Kconfig.kgdb:config KGDB_TESTS lib/Kconfig.kgdb: bool "KGDB: internal test suite" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We can't remove the module.h include since we've kept the use of module_param in this file for now. Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: me: fix d0i3 register offset in tracingAlexander Usyskin1-2/+2
Fix copy-paste error in D0i3 register access tracing Fixes: 13b14c3f ("mei: me: d0i3: add d0i3 enter/exit state machine") Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: use mei_cl_bus_ prefix consistentlyTomas Winkler3-16/+17
Use mei_cl_bus_ for internal bus function consistently. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: use mei_cldev_ prefix for the API functionsTomas Winkler1-33/+34
Use mei_cldev_ prefix for all mei client bus api functions in order to resolve prefix conflict with functions that handle client function and are defined in client.c Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: export mei_cldev_enabled functionTomas Winkler1-0/+13
Let me client device driver query of the device is connected and hence enabled. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: export uuid and protocol version to mei_cl bus driversTomas Winkler1-0/+26
Export the uuid and the protocol version of the underlying me client for me client bus drivers usage. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: add client protocol version to the device aliasTomas Winkler1-7/+21
The device alias now looks like mei:S:uuid:N:* In that way we can bind different drivers to clients with different protocol versions if required. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: bus: export client protocol versionTomas Winkler2-0/+30
export me client protocol version to sysfs and uevent Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20mei: make modules.alias UUID information easier to readPrarit Bhargava1-5/+2
scripts/mod/file2alias.c:add_uuid() convert UUID into a single string which does not conform to the standard little endian UUID formatting. This patch changes add_uuid() to output same format as %pUL and modifies the mei driver to match the change. Signed-off-by: Prarit Bhargava <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: remove unused variableSudip Mukherjee1-2/+0
dw was only assigned some value and was never reused. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: fix dereference of ERR_PTRSudip Mukherjee1-1/+6
gru_alloc_gts() can fail and it can return ERR_PTR(errvalue). We should not dereference it if it has returned error. And incase it has returned error then wait for some time and try again. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: remove always false conditionSudip Mukherjee1-1/+1
The member gid in struct gru_dump_chiplet_state_req is unsigned int. So it can never be less than 0. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: make functions staticSudip Mukherjee1-3/+3
The functions gru_get_cb_exception_detail_str() and gru_abort() were only called locally from that file. We can make them static. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20drivers/misc/sgi-gru: add return on errorSudip Mukherjee1-8/+6
If the buffer is too small then return the error and in the process remove the variables which became unused. Signed-off-by: Sudip Mukherjee <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-20misc/vmw_vmci: use kmemdup rather than duplicating its implementationAndrzej Hajda1-2/+1
The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-18Merge tag 'powerpc-4.3-2' of ↵Linus Torvalds3-3/+7
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix 32-bit TCE table init in kdump kernel from Nish - Fix kdump with non-power-of-2 crashkernel= from Nish - Abort cxl_pci_enable_device_hook() if PCI channel is offline from Andrew - Fix to release DRC when configure_connector() fails from Bharata - Wire up sys_userfaultfd() - Fix race condition in tearing down MSI interrupts from Paul - Fix unbalanced pci_dev_get() in cxl_probe() from Daniel - Fix cxl build failure due to -Wunused-variable gcc behaviour change from Ian - Tell the toolchain to use ABI v2 when building an LE boot wrapper from Benh - Fix THP to recompute hash value after a failed update from Aneesh - 32-bit memcpy/memset: only use dcbz once cache is enabled from Christophe * tag 'powerpc-4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc32: memset: only use dcbz once cache is enabled powerpc32: memcpy: only use dcbz once cache is enabled powerpc/mm: Recompute hash value after a failed update powerpc/boot: Specify ABI v2 when building an LE boot wrapper cxl: Fix build failure due to -Wunused-variable behaviour change cxl: Fix unbalanced pci_dev_get in cxl_probe powerpc/MSI: Fix race condition in tearing down MSI interrupts powerpc: Wire up sys_userfaultfd() powerpc/pseries: Release DRC when configure_connector fails cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel= powerpc/powernv/pci-ioda: fix 32-bit TCE table init in kdump kernel
2015-09-15cxl: Fix build failure due to -Wunused-variable behaviour changeIan Munsie1-1/+1
A recent change in gcc caused this build failure: /var/lib/jenkins/workspace/gcc_kernel_build/linux/drivers/misc/cxl/cxl.h:72:27: error: ‘CXL_PSL_DLCNTL’ defined but not used [-Werror=unused-const-variable] static const cxl_p1_reg_t CXL_PSL_DLCNTL = {0x0060}; Because of this gcc commit: Commit 1bca8cbd0c68366f07277f98ce6963e10c2aa617 by mark PR28901 -Wunused-variable ignores unused const initialised variables in C 12 years ago it was decided that -Wunused-variable shouldn't warn about static const variables because some code used const static char rcsid[] strings which were never used but wanted in the code anyway. But as the bug points out this hides some real bugs. These days the usage of rcsids is not very popular anymore. So this patch changes the default to warn about unused static const variables in C with -Wunused-variable. And it adds a new option -Wno-unused-const-variable to turn this warning off. For C++ this new warning is off by default, since const variables can be used as #defines in C++. New testcases for the new defaults in C and C++ are included testing the new warning and suppressing it with an unused attribute or using -Wno-unused-const-variable. gcc/ChangeLog The cxl driver uses static consts in place of #defines in some cases for type safety, so this change causes the driver to fail to build on new copilers as these constants are not all used in every file that imports the header. Suppress the warning for this driver to return to the old behaviour of -Wunused-variable. Reported-by: Anton Blanchard <[email protected]> Signed-off-by: Ian Munsie <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-09-15cxl: Fix unbalanced pci_dev_get in cxl_probeDaniel Axtens1-2/+0
Currently the first thing we do in cxl_probe is to grab a reference on the pci device. Later on, we call device_register on our adapter. In our remove path, we call device_unregister, but we never call pci_dev_put. We therefore leak the device every time we do a reflash. device_register/unregister is sufficient to hold the reference. Therefore, drop the call to pci_dev_get. Here's why this is safe. The proposed cxl_probe(pdev) calls cxl_adapter_init: a) init calls cxl_adapter_alloc, which creates a struct cxl, conventionally called adapter. This struct contains a device entry, adapter->dev. b) init calls cxl_configure_adapter, where we set adapter->dev.parent = &dev->dev (here dev is the pci dev) So at this point, the cxl adapter's device's parent is the PCI device that I want to be refcounted properly. c) init calls cxl_register_adapter *) cxl_register_adapter calls device_register(&adapter->dev) So now we're in device_register, where dev is the adapter device, and we want to know if the PCI device is safe after we return. device_register(&adapter->dev) calls device_initialize() and then device_add(). device_add() does a get_device(). device_add() also explicitly grabs the device's parent, and calls get_device() on it: parent = get_device(dev->parent); So therefore, device_register() takes a lock on the parent PCI dev, which is what pci_dev_get() was guarding. pci_dev_get() can therefore be safely removed. Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for userspace access") Cc: [email protected] Signed-off-by: Daniel Axtens <[email protected]> Acked-by: Ian Munsie <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-09-11Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds1-0/+1
Pull watchdog updates from Wim Van Sebroeck: - new driver for NXP LPC18xx Watchdog Timer - new driver for SAMA5D4 watchdog timer - add support for MCP79 to nv_tco driver - clean-up and improvement of the mpc8xxx watchdog driver - improvements to gpio-wdt - at91sam9_wdt clock improvements ... and other small fixes and improvements * git://www.linux-watchdog.org/linux-watchdog: (25 commits) Watchdog: Fix parent of watchdog_devices watchdog: at91rm9200: Correct check for syscon_node_to_regmap() errors watchdog: at91sam9: get and use slow clock Documentation: dt: binding: atmel-sama5d4-wdt: for SAMA5D4 watchdog driver watchdog: add a driver to support SAMA5D4 watchdog timer watchdog: mpc8xxx: allow to compile for MPC512x watchdog: mpc8xxx: use better error code when watchdog cannot be enabled watchdog: mpc8xxx: use dynamic memory for device specific data watchdog: mpc8xxx: use devm_ioremap_resource to map memory watchdog: mpc8xxx: make use of of_device_get_match_data watchdog: mpc8xxx: simplify registration watchdog: mpc8xxx: remove dead code watchdog: lpc18xx_wdt_get_timeleft() can be static DT: watchdog: Add NXP LPC18xx Watchdog Timer binding documentation watchdog: NXP LPC18xx Watchdog Timer Driver watchdog: gpio-wdt: ping already at startup for always running devices watchdog: gpio-wdt: be more strict about hw_algo matching Documentation: watchdog: at91sam9_wdt: add clocks property watchdog: booke_wdt: Use infrastructure to check timeout limits watchdog: (nv_tco) add support for MCP79 ...
2015-09-10mm: mark most vm_operations_struct constKirill A. Shutemov1-1/+1
With two exceptions (drm/qxl and drm/radeon) all vm_operations_struct structs should be constant. Signed-off-by: Kirill A. Shutemov <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-09-09Watchdog: Fix parent of watchdog_devicesPratyush Anand1-0/+1
/sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by: Pratyush Anand <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Lubomir Rintel <[email protected]> Acked-by: Maxime Coquelin <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-08Merge branch 'akpm' (patches from Andrew)Linus Torvalds1-1/+1
Merge second patch-bomb from Andrew Morton: "Almost all of the rest of MM. There was an unusually large amount of MM material this time" * emailed patches from Andrew Morton <[email protected]>: (141 commits) zpool: remove no-op module init/exit mm: zbud: constify the zbud_ops mm: zpool: constify the zpool_ops mm: swap: zswap: maybe_preload & refactoring zram: unify error reporting zsmalloc: remove null check from destroy_handle_cache() zsmalloc: do not take class lock in zs_shrinker_count() zsmalloc: use class->pages_per_zspage zsmalloc: consider ZS_ALMOST_FULL as migrate source zsmalloc: partial page ordering within a fullness_list zsmalloc: use shrinker to trigger auto-compaction zsmalloc: account the number of compacted pages zsmalloc/zram: introduce zs_pool_stats api zsmalloc: cosmetic compaction code adjustments zsmalloc: introduce zs_can_compact() function zsmalloc: always keep per-class stats zsmalloc: drop unused variable `nr_to_migrate' mm/memblock.c: fix comment in __next_mem_range() mm/page_alloc.c: fix type information of memoryless node memory-hotplug: fix comments in zone_spanned_pages_in_node() and zone_spanned_pages_in_node() ...