Age | Commit message (Collapse) | Author | Files | Lines |
|
The correct lock order is
cl_bus_lock
device_lock
me_clients_rwsem
This order was violated in bus rescan and remove routines
when me_client_rwsem was locked before cl_bus_lock.
Chain exists of:
[ 4.321653] &dev->device_lock --> &dev->me_clients_rwsem -->
&dev->cl_bus_lock
[ 4.321653]
[ 4.321679] Possible unsafe locking scenario:
[ 4.321679]
[ 4.321693] CPU0 CPU1
[ 4.321701] ---- ----
[ 4.321709] lock(&dev->cl_bus_lock);
[ 4.321720]
lock(&dev->me_clients_rwsem);
[ 4.321733] lock(&dev->cl_bus_lock);
[ 4.321745] lock(&dev->device_lock);
[ 4.321755]
[ 4.321755] *** DEADLOCK ***
[ 4.321755]
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Alexander Kuleshov <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch replaces timeval with timespec64 as 32 bit 'struct timeval'
will not give current time beyond 2038.
The patch changes the code to use ktime_get_real_ts64() which returns
a 'struct timespec64' instead of do_gettimeofday() which returns a
'struct timeval'
This patch also alters the format string in pr_info() for now.tv_sec
to incorporate 'long long' on 32 bit architectures.
Signed-off-by: Amitoj Kaur Chawla <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Upon registering a FPGA Manager low level driver, FPGA Manager
core overwrites the platform drvdata pointer. Prior to this commit
zynq-fpga falsely relied on this pointer to still be valid at remove()
time.
Reported-by: Alan Tull <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
Acked-by: Alan Tull <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unnecessary null pointer checks. We want the caller of
these functions to do their own pointer checks. Add some
comments to document this.
Signed-off-by: Alan Tull <[email protected]>
Reviewed-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Ensure device and driver lifetime from of_fpga_mgr_get() to
fpga_mgr_put().
* Don't put_device() in of_fpga_mgr_get, do it in fpga_mgr_put().
(still do put_device if there is an error).
* Do module_get on the low level driver.
* Don't need to module_get(THIS_MODULE) since we won't be allowed
to unload the fpga manager core without unloading low level
driver first.
* Remove unnedessary null check for node pointer.
Signed-off-by: Alan Tull <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This gets rid of the code to strip away the header and byteswap,
as well as the check for the sync word.
Signed-off-by: Moritz Fischer <[email protected]>
Reviewed-by: Josh Cartwright <[email protected]>
Acked-by: Michal Simek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This commit fixes the unbalanced clock handling, where
a failed probe would leave the clock with an enable count of -1.
Reported-by: Josh Cartwright <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The change fixes a warning found by sparse:
drivers/misc/sram.c:134:20: warning: incorrect type in assignment (different address spaces)
drivers/misc/sram.c:134:20: expected void *base
drivers/misc/sram.c:134:20: got void [noderef] <asn:2>*
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Supplementing ABI documentation with a description of the newly
added interface.
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes an off by one array size.
Signed-off-by: Dmitry Kalinkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This commit adds FPGA Manager support for the Xilinx Zynq chip.
The code borrows some from the xdevcfg driver in Xilinx'
vendor tree.
Signed-off-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Added addtional nodes required for FPGA Manager operation
of the Xilinx Zynq Devc configuration interface.
Reviewed-by: Sören Brinkmann <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch is more of a personal preference, rather than a fix for a problem.
The current implementation used a combination of both 'cat' and 'sed'
to generate an unsorted list of kernel modules separated by while space.
The proposed implementation uses 'sort' and 'sed' to generate a sort
list of kernel modules separated by while space.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Arch Linux
openSuSE 13.2
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Tested on:
Gentoo Linux
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
'udevinfo' no longer seems to be available across various
distros. 'udevadm' seems to be the currently valid way to look up the
'udev' version.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
'loadkeys -h' no longer prints the version number across all distros,
despite the claim to do so in the manpage, which I found to be the case
on a Debian Linux system.
The proposed implementation utilises the output of 'loadkeys -V' to
acquire the version of both 'Kbd' and 'Console-tools'.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Neither 'libg++.so', nor 'libstdc++.so' were found where the current
implementation expects them to be found in the distros below.
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Which results in zero ouput generated.
The proposed implementation relies on 'ldconfig' to locate the libraries
in question. 'Sed' is used to do the text processing.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'head' + 'awk'.
The '-v' flag either seems to have been deprecated in some distros, e.g. Gentoo, or is an alias for '--version' in others. The proposed implementation uses the latter flag only.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The current implementation has been found not to work across all distros.
The proposed implementation relies on 'sed' to both output the string
'Linux C Library' as well as to open '/proc/self/maps' without having
to use output redirection.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Arch Linux
openSuSE 13.2
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Tested on:
Oracle Linux
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'sed' + 'awk'.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Proposed implementation also eliminates the necessity to invoke 'grep' + 'sed' + 'awk'.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The current implementation relies on 'fdformat' to output the version of
'util-linux'. This does not seem to be reliable any longer, as 'fdformat'
does not seem to come preinstalled in all ditros these days.
The proposed implementation uses 'mount' to output both the version
of 'util-linux' and 'mount' proper, as 'mount' is also a part of the
'util-linux' package.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Rely on regex to find the version number, rather than a field number.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Current implementation output on Gentoo Linux:
binutils 2.25.1
1.1
2.25.1
Proposed implementation:
Binutils 2.25.1
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Rely on regex to find the version number.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than a field number.
Reduce the number of 'awk' invocations from two to one.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Rely on regex to find the version number, rather than a field number.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This change adds functionality to operate on reserved SRAM partitions
described in device tree file. Two partition properties are added,
"pool" and "export", the first one allows to share a specific partition
for usage by a kernel consumer in the same manner as it is done for
the whole SRAM device, and "export" property provides access to some
SRAM area from userspace over sysfs interface. Practically it is
possible to specify both properties for an SRAM partition, however
simultaneous access from a kernel consumer and from userspace is not
serialized, but still the combination may be useful for debugging
purpose.
The change opens the following scenarios of SRAM usage:
* updates in a particular SRAM area specified by offset and size are
done by bootloader, then this information is utilized by the kernel,
* a particular SRAM area is rw accessed from userspace, the stored
data is persistent on soft reboots,
* a device driver secures SRAM area for its purposes,
* etc.
Note, strictly speaking the added optional properties describe policy
of SRAM usage, rather than hardware, but here the policy mostly
resembles flash partitions in devicetree, which is undoubtedly
a very popular option but it does not describe hardware.
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add entry for MIC drivers to the MAINTAINERS file
Signed-off-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Sudeep Dutt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We should be returning -ENOMEM here instead of success.
Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration')
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Sudeep Dutt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The caller expects that we take this lock again before returning
otherwise it you get double unlocks and races.
Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration')
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Sudeep Dutt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Spotted by coccicheck:
drivers/misc/mei/amthif.c:479:5-26: WARNING: Comparison of bool to 0/1
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
s/send/receive/
The buffer in the receive function is
not used for sending
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
KDoc function section start with double start: /** instead of /*
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Long messages are read in chunks, to prevent trashing runtime pm between
the reading of the chunks we call pm_runtime_mark_last_busy() on
non-final chunk message as the next chunk of the same message will be
received immediately in the next interrupt with high probablity.
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In process of client devices removal from the bus there still
might be communication between a driver and the mei device
hence we need to cancel supporting workers only after all
the client devices were removed.
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Let's stop using legacy platform driver hooks for power management and
switch to using the standard dev_pm_ops-based hooks.
Also, instead of guarding PM methods with #ifdef CONFIG_PM annotate them
as __maybe_unused as it provides better compile coverage.
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In scif_node_connect() we were returning if the initialization of p2p_ji
fails. But at that time p2p_ij has already been initialized and
resources allocated for it. And since p2p_ij is not added to the list
till now so we will have a leak.
Lets deinitialize and release the resources connected to p2p_ij.
Signed-off-by: Sudip Mukherjee <[email protected]>
Reviewed-by: Sudeep Dutt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Handle a failed device_register(), replace kfree() with put_device(),
which will call cosm/mbus/scif_release_dev().
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes randconfig build error reported at
http://www.spinics.net/lists/kernel/msg2092346.html
Reported-by: Jim Davis <[email protected]>
Reviewed-by: Dasaratharaman Chandramouli <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Gabriel Laskar <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|