Age | Commit message (Collapse) | Author | Files | Lines |
|
Changes to fpga_region_register function to not set drvdata.
Setting drvdata is fine for DT based devices that will have one region
per platform device. However PCIe based devices may have multiple
FPGA regions under one PCIe device. Without these changes, the PCIe
solution has to create an extra device for each child region to hold
drvdata.
Signed-off-by: Alan Tull <[email protected]>
Reported-by: Jiuyue Ma <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In C, we don't need such a cast.
Fixes: ae20b254306a ("Drivers: hv: vmbus: enable VMBus protocol version 5.0")
Reported-by: Stephen Hemminger <[email protected]>
Signed-off-by: Dexuan Cui <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Running 'test -r' on an awk variable name whose value is an empty
string results in test being run with no arguments, and causes system()
to return 0, which indicates success when used to test values returned
by function calls. This results in code within the if blocks being run
when it should not be.
Instead of testing if a file is accessible and readable via calls to
system("test -r " file), rely on the value returned by getline to perform
this kind of testing. Getline returns -1 on error, with the code within
the while loops not being run.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove stderr redirection to stdout from all the parameters to the
version() function, and put it with the body of the version() function
instead.
This improves code readability.
Signed-off-by: Alexander Kapshuk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This driver is a logical device which provides an
interface between the hypervisor and a management
partition. This interface is like a message
passing interface. This management partition
is intended to provide an alternative to HMC-based
system management.
VMC enables the Management LPAR to provide basic
logical partition functions:
- Logical Partition Configuration
- Boot, start, and stop actions for individual
partitions
- Display of partition status
- Management of virtual Ethernet
- Management of virtual Storage
- Basic system management
This driver is to be used for the POWER Virtual
Management Channel Virtual Adapter on the PowerPC
platform. It provides a character device which
allows for both request/response and async message
support through the /dev/ibmvmc node.
Signed-off-by: Bryant G. Ly <[email protected]>
Reviewed-by: Steven Royer <[email protected]>
Reviewed-by: Adam Reznechek <[email protected]>
Reviewed-by: Randy Dunlap <[email protected]>
Tested-by: Taylor Jakobson <[email protected]>
Tested-by: Brad Warrum <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Michael Ellerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Due to missing a missing entry in file2alias.c MODULE_DEVICE_TABLE() are
not generating the proper module aliases. Add the needed entry here.
Fixes: bcabbccabffe ("rpmsg: add virtio-based remote processor messaging bus")
Reported-by: Suman Anna <[email protected]>
Signed-off-by: Andrew F. Davis <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
1wire family module autoload fails because of upper/lower
case mismatch.
Signed-off-by: Ingo Flaschberger <[email protected]>
Acked-by: Evgeniy Polyakov <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
According to the API, you may only call clk_get_rate() after actually
enabling it.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: a5fd9139f74c ("w1: add 1-wire master driver for i.MX27 / i.MX31")
Signed-off-by: Stefan Potyra <[email protected]>
Acked-by: Evgeniy Polyakov <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from
the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the
'version', 'size_in', and 'size_out' fields of 'hdr' are verified.
Before this commit, after the checks a buffer for the entire request would
be allocated and then all data including the verified header would be
copied from the userspace 'arg' pointer again.
Given that the 'arg' pointer resides in userspace, a malicious userspace
process can race to change the data pointed to by 'arg' between the two
copies. By doing so, the user can bypass the verifications on the ioctl
argument.
This commit fixes this by using the already checked copy of the header
to fill the header part of the allocated buffer and only copying the
remainder of the data from userspace.
Signed-off-by: Wenwen Wang <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Loading a NuBus driver module on a non-NuBus machine triggers the
BUG_ON(!drv->bus->p) in driver_register(), because bus_register() was
not called, because it is conditional on MACH_IS_MAC.
Fix the crash by calling bus_register() unconditionally. Call it from
a postcore_initcall(), like other busses do.
Hence, the bus type is available for device_register(), which happens
in a subsys initcall, and for driver_register(), which happens in a
device or module initcall.
Cc: Greg Kroah-Hartman <[email protected]>
Reported-by: Michael Schmitz <[email protected]>
Tested-by: Stan Johnson <[email protected]>
Fixes: 7f86c765a6a2 ("nubus: Add support for the driver model")
Signed-off-by: Finn Thain <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Indentation is one TAB and 7 spaces instead of 2 TABs.
Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Todd Kjos <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use new return type vm_fault_t for fault handler. For
now, this is just documenting that the function returns
a VM_FAULT value rather than an errno. Once all instances
are converted, vm_fault_t will become a distinct type.
Commit 1c8f422059ae ("mm: change return type to vm_fault_t")
Signed-off-by: Souptick Joarder <[email protected]>
Reviewed-by: Matthew Wilcox <[email protected]>
Acked-by: Dimitri Sivanich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes below warning when driver is compiled with W=1
qcom-ctrl.c: In function 'qcom_slim_rxwq':
qcom-ctrl.c:442:13: warning: variable 'len' set but not used
[-Wunused-but-set-variable]
len seems to be unused in this function, so remove it.
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Function nvmem_reg_read can return a non zero value indicating an error.
This returned value must be read and error propagated to
nvmem_cell_prepare_write_buffer. Silence the following gcc warning (W=1):
drivers/nvmem/core.c:1093:9: warning: variable 'rc' set but
not used [-Wunused-but-set-variable]
Signed-off-by: Mathieu Malaterre <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Document dev parameter which not described in devm_nvmem_unregister
and devm_nvmem_register functions.
Fix below warnings when kernel is compiled with W=1
drivers/nvmem/core.c:579: warning: Function parameter or member
'dev' not described in 'devm_nvmem_register'
nvmem/core.c:615: warning: Function parameter or member 'dev'
not described in 'devm_nvmem_unregister'
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add write support to the meson-gx efuse driver.
Beware, this efuse is one time programmable !
Reviewed-by: Kevin Hilman <[email protected]>
Signed-off-by: Jerome Brunet <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Most of the code and variables in the read callback is not necessary.
Keep only what is required.
Signed-off-by: Jerome Brunet <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Having a global structure holding a reference to the device
structure is not very nice. Allocate the econfig instead and fill
the nvmem information as before
Reviewed-by: Kevin Hilman <[email protected]>
Signed-off-by: Jerome Brunet <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add driver providing access to EEPROMs connected to RAVE SP devices
Cc: Srinivas Kandagatla <[email protected]>
Cc: [email protected]
Cc: Chris Healy <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Aleksander Morgado <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add Device Tree bindings for RAVE SP EEPROM driver - an MFD cell of
parent RAVE SP driver (documented in
Documentation/devicetree/bindings/mfd/zii,rave-sp.txt).
Cc: Srinivas Kandagatla <[email protected]>
Cc: [email protected]
Cc: Chris Healy <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Aleksander Morgado <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: [email protected]
Signed-off-by: Andrey Smirnov <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Not all platforms use device tree. It is useful to be able to add
cells to a NVMEM device from code. Export nvmem_add_cells() so making
this possible.
This required changing the parameters a bit, so that just the cells
and the number of cells are passed, not the whole nvmem config
structure.
Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Andrey Smirnov <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The driver prints pcsr twice: the first time it uses specifier %px to
print hexadecimal pcsr value and the second time uses specifier %pS for
output kernel symbols.
As suggested by Kees, using %pS should be sufficient and %px isn't
necessary; the reason is if the pcsr is a kernel space address, we can
easily get to know the code line from %pS format, on the other hand, if
the pcsr value doesn't fall into kernel space range (e.g. if the CPU is
stuck in firmware), %pS also gives out pcsr hexadecimal value.
So this commit removes useless %px and update section "Output format"
in the document for alignment between the code and document.
Suggested-by: Kees Cook <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The simple removal of an extra newline, no change in functionality.
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Variable 'paddr' can't be used if uninitialised but is nonetheless
confusing to some static checker. As such simply initialise it to zero.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
While operating from sysFS the TMC-ETR driver needs to make sure it has
memory to work with but doesn't allocate memory uselessly either. Since
the main memory handle for this driver is drvdata::vaddr, use it throughout
function tmc_enable_etr_sink_sysfs() so that things are consistent.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Moving all kernel side CoreSight framework and drivers to SPDX identifier.
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Never directly free @dev after calling device_register(), even
if it returned an error. Always use put_device() to give up the
reference initialized.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Prevent destruction of a uio_device while user space apps hold open
file descriptors to that device. Further, access to the 'info' member
of the struct uio_device is protected by spinlock. This is to ensure
stale pointers to data not under control of the UIO subsystem are not
dereferenced.
Signed-off-by: Hamish Martin <[email protected]>
Reviewed-by: Chris Packham <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Drive all return paths for uio_write() through a single block at the
end of the function.
Signed-off-by: Hamish Martin <[email protected]>
Reviewed-by: Chris Packham <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In 4.9 kernel, the sysfs files for Hyper-V VMBus changed name but
the documentation files were not updated. The current sysfs file
names are /sys/bus/vmbus/devices/<UUID>/...
See commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent")
and commit f6b2db084b65 ("vmbus: make sysfs names consistent with PCI")
Reported-by: Michael Kelley <[email protected]>
Signed-off-by: Stephen Hemminger <[email protected]>
Cc: [email protected]
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
With VMBus protocol 5.0, we're able to better support new features, e.g.
running two or more VMBus drivers simultaneously in a single VM -- note:
we can't simply load the current VMBus driver twice, instead, a secondary
VMBus driver must be implemented.
This patch adds the support for the new VMBus protocol, which is available
on new Windows hosts, by:
1) We still use SINT2 for compatibility;
2) We must use Connection ID 4 for the Initiate Contact Message, and for
subsequent messages, we must use the Message Connection ID field in
the host-returned VersionResponse Message.
Notes for developers of the secondary VMBus driver:
1) Must use VMBus protocol 5.0 as well;
2) Must use a different SINT number that is not in use.
3) Must use Connection ID 4 for the Initiate Contact Message, and for
subsequent messages, must use the Message Connection ID field in
the host-returned VersionResponse Message.
4) It's possible that the primary VMBus driver using protocol version 4.0
can work with a secondary VMBus driver using protocol version 5.0, but it's
recommended that both should use 5.0 for new Hyper-V features in the future.
Signed-off-by: Dexuan Cui <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
Cc: Michael Kelley <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use new return type vm_fault_t for fault handler in
struct vm_operations_struct. For now, this is just
documenting that the function returns a VM_FAULT
value rather than an errno. Once all instances are
converted, vm_fault_t will become a distinct type.
Reference id -> 1c8f422059ae ("mm: change return type
to vm_fault_t")
Signed-off-by: Souptick Joarder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
binder_update_page_range needs down_write of mmap_sem because
vm_insert_page need to change vma->vm_flags to VM_MIXEDMAP unless
it is set. However, when I profile binder working, it seems
every binder buffers should be mapped in advance by binder_mmap.
It means we could set VM_MIXEDMAP in binder_mmap time which is
already hold a mmap_sem as down_write so binder_update_page_range
doesn't need to hold a mmap_sem as down_write.
Please use proper API down_read. It would help mmap_sem contention
problem as well as fixing down_write abuse.
Ganesh Mahendran tested app launching and binder throughput test
and he said he couldn't find any problem and I did binder latency
test per Greg KH request(Thanks Martijn to teach me how I can do)
I cannot find any problem, too.
Cc: Ganesh Mahendran <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Arve Hjønnevåg <[email protected]>
Cc: Todd Kjos <[email protected]>
Reviewed-by: Martijn Coenen <[email protected]>
Signed-off-by: Minchan Kim <[email protected]>
Reviewed-by: Joel Fernandes (Google) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When to execute binder_stat_br the e->cmd has been modifying as BR_OK
instead of the original return error cmd, in fact we want to know the
original return error, such as BR_DEAD_REPLY or BR_FAILED_REPLY, etc.
instead of always BR_OK, in order to avoid the value of the e->cmd is
always BR_OK, so we need assign the value of the e->cmd to cmd before
e->cmd = BR_OK.
Signed-off-by: songjinshi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
New devices launching with Android P need to use the 64-bit
binder interface, even on 32-bit SoCs [0].
This change removes the Kconfig option to select the 32-bit
binder interface. We don't think this will affect existing
userspace for the following reasons:
1) The latest Android common tree is 4.14, so we don't
believe any Android devices are on kernels >4.14.
2) Android devices launch on an LTS release and stick with
it, so we wouldn't expect devices running on <= 4.14 now
to upgrade to 4.17 or later. But even if they did, they'd
rebuild the world (kernel + userspace) anyway.
3) Other userspaces like 'anbox' are already using the
64-bit interface.
Note that this change doesn't remove the 32-bit UAPI
itself; the reason for that is that Android userspace
always uses the latest UAPI headers from upstream, and
userspace retains 32-bit support for devices that are
upgrading. This will be removed as well in 2-3 years,
at which point we can remove the code from the UAPI
as well.
Finally, this change introduces build errors on archs where
64-bit get_user/put_user is not supported, so make binder
unavailable on m68k (which wouldn't want it anyway).
[0]: https://android-review.googlesource.com/c/platform/build/+/595193
Signed-off-by: Martijn Coenen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next
Vinod writes:
soundwire streaming
This contains:
- Support for SoundWire Streaming
- Documentation updates for streaming
- Cadence and Intel driver updates for streaming
- ASoC API for programming soundwire stream
|
|
Add DAI registration and DAI ops for the Intel driver along with
callback for topology configuration.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add Intel stream init routines which initialize the Physical
Data Interface (PDI), Audio Link Hub (ALH) and Audio shim.
Also add bank switch routines.
Signed-off-by: Hardik T Shah <[email protected]>
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add support for Cadence stream initialization and implement
stream APIs.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add support for Cadence port management and implement
master port ops.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
There can be instances where drivers using Cadence IP might want
to set sdw_master_ops differently per instance of it's use, so
remove the cdns_master_ops and export the APIs.
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
SoundWire stream needs to be propagated to all the DAIs(cpu, codec).
So, add a snd_soc_dai_set_sdw_stream() API for the same.
Signed-off-by: Shreyas NC <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add APIs for prepare, enable, disable and de-prepare stream.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
SoundWire supports two registers banks. So, program the alternate bank
with new configuration and then performs bank switch.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add helpers to configure, prepare, enable, disable and
de-prepare ports.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Master and Slave port registers need to be programmed for each port
used in a stream. Add the helpers for port register programming.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add Soundwire port data structures and APIS for initialization
and release of ports.
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
This patch adds APIs and relevant stream data structures
for initialization and release of stream.
Signed-off-by: Hardik T Shah <[email protected]>
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
This adds documentation for error handling, locking and streams.
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Sanyog Kale <[email protected]>
Signed-off-by: Shreyas NC <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Update the email address for SoundWire maintainer
Signed-off-by: Vinod Koul <[email protected]>
|