Set the default for FW_CACHE to n to match Android expectations.
Signed-off-by: Mark Salyzyn <[email protected]>
Bug: 32180327
Bug: 137566496
Change-Id: I86a28040be07fb2f30125d28f7f379798727785c
(cherry picked from commit 8331ce00073074134a283a72a5731cb4689a28e6)
Because firmware caching generates uevent messages that are sent over
a netlink socket, it can prevent suspend on many platforms. It's
also not always useful, so make it a configurable option.
Signed-off-by: Mark Salyzyn <[email protected]>
Cc: Tim Murray <[email protected]>
Cc: Venkata Narendra Kumar Gutta <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Luis Chamberlain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit c74f8056621738f5be9f5d3d7e0caa927b21aef6 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-testing)
Signed-off-by: Mark Salyzyn <[email protected]>
Bug: 32180327
Bug: 137566496
Change-Id: I1250512b27edb56caa78d536e5ccf1fb669476ad
(cherry picked from commit cd403ef6a75c38bc126b1b7f2362ab6426062df0)
By conditionally dropping support for the legacy binding and exporting
the newly introduced 'arm_smmu_impl_init()' function we can allow the
ARM SMMU driver to be built as a module.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: Id42da5829cb180966a0d051ec636be0c9f90efed
When removing the SMMU driver, we need to clear any state that we
registered during probe. This includes our bus ops, sysfs entries and
the IOMMU device registered for early firmware probing of masters.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I5dd6e68a609ac60bc704f9f916acc0f31dc1bd67
By removing the redundant call to 'pci_request_acs()' we can allow the
ARM SMMUv3 driver to be built as a module.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I1d8fbe26ab7114af6409ea13a68fff8afed49703
When removing the SMMUv3 driver, we need to clear any state that we
registered during probe. This includes our bus ops, sysfs entries and
the IOMMU device registered for early firmware probing of masters.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I54372d917c871231ced86250498fe2e45cf39246
Forcefully unbinding the Arm SMMU drivers is a pretty dangerous operation,
since it will likely lead to catastrophic failure for any DMA devices
mastering through the SMMU being unbound. When the driver then attempts
to "handle" the fatal faults, it's very easy to trip over dead data
structures, leading to use-after-free.
On John's machine, he reports that the machine was "unusable" due to
loss of the storage controller following a forced unbind of the SMMUv3
driver:
| # cd ./bus/platform/drivers/arm-smmu-v3
| # echo arm-smmu-v3.0.auto > unbind
| hisi_sas_v2_hw HISI0162:01: CQE_AXI_W_ERR (0x800) found!
| platform arm-smmu-v3.0.auto: CMD_SYNC timeout at 0x00000146
| [hwprod 0x00000146, hwcons 0x00000000]
Prevent this forced unbinding of the drivers by setting "suppress_bind_attrs"
to true.
Link: https://lore.kernel.org/lkml/[email protected]
Reported-by: John Garry <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I8b1c439f7ba11d6fc38cdf686948ef5909871dfb
'bus_set_iommu()' allows IOMMU drivers to register their ops for a given
bus type. Unfortunately, it then doesn't allow them to be removed, which
is necessary for modular drivers to shutdown cleanly so that they can be
reloaded later on.
Allow 'bus_set_iommu()' to take a NULL 'ops' argument, which clear the
ops pointer for the selected bus_type.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: Ia89fa2df61d2a9ad04901d4c2e71e293c4c6171d
Ensure that we hold a reference to the IOMMU driver module while calling
the '->of_xlate()' callback during early device probing.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: Ica9ef2d5ed172c2451c0a19538dc28852c2270d5
To avoid accidental removal of an active IOMMU driver module, take a
reference to the driver module in 'iommu_probe_device()' immediately
prior to invoking the '->add_device()' callback and hold it until the
after the device has been removed by '->remove_device()'.
Suggested-by: Joerg Roedel <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I8f6a8aad8c41faa51df9c3a440c8b80c74e3ce8a
Building drivers for ATS-aware IOMMUs as modules requires access to
pci_ats_disabled(). Export it as a GPL symbol to get things working.
Acked-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: Ia5457fd6c4593565799b97f40c0def3558a97696
To avoid having to export 'pci_request_acs()' to modular IOMMU drivers,
move the call into the 'of_dma_configure()' path in a similar manner to
the way in which ACS is configured when probing via ACPI/IORT.
Signed-off-by: Will Deacon <[email protected]>
Bug: 140290589
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Will Deacon <[email protected]>
Change-Id: I3c689845ca493fbe037a2def2050a089036fb7d3
Commit 8e12257dead7 ("of: property: Add device link support for iommus,
mboxes and io-channels") added device link support for IOMMU linkages
described using the "iommus" property. For PCI devices, this property
is not present and instead the "iommu-map" property is used on the host
bridge node to map the endpoint RequesterIDs to their corresponding
IOMMU instance.
Add support for "iommu-map" to the device link supplier bindings so that
probing of PCI devices can be deferred until after the IOMMU is
available.
Cc: Rob Herring <[email protected]>
Cc: Robin Murphy <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Acked-by: Saravana Kannan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry-picked from commit e149573b2f84d0517648dafc0db625afa681ed54
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next)
Signed-off-by: Will Deacon <[email protected]>
Change-Id: Ife0cf1ed0256af47ed0cae7156f3184de355c42c
That data structure was used for constructing the commands
before executing them, but it was never really useful. Using
the structure just complicated the driver. The commands are
64-bit wide, so it is enough to simply fill a u64 variable.
No data structures needed.
This simplifies the driver considerable and makes it much
easier to for example add support for big endian systems
later on.
Change-Id: I3533a2c24c3a91ea51e2ebdefe6bc2351223ca0b
Signed-off-by: Heikki Krogerus <[email protected]>
Tested-by: Ajay Gupta <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: 470ce43a1a810117f09aa4bcad6ca2be6b29c8d1
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <[email protected]>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The interrupt
handler will from now on read the CCI (Command Status and
Connector Change Indication) register, and call
ucsi_connector_change() function and/or complete pending
command completions based on it.
Change-Id: I9dfdc70b10544d6e65a0d289491be7cd9232e4af
Signed-off-by: Heikki Krogerus <[email protected]>
Tested-by: Ajay Gupta <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: e32fd989ac1c45f993fbe89ad0a89aa9ea6993d2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <[email protected]>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The ACPI
notification (interrupt) handler will from now on read the
CCI (Command Status and Connector Change Indication)
register, and call ucsi_connector_change() function and/or
complete pending command completions based on it.
Change-Id: Ia7c8e9e87f23ce6a70a657bf0e053345caf543cc
Signed-off-by: Heikki Krogerus <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: f56de278e8ec963637995944156527162dcf3021
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <[email protected]>
Adding more simplified API for interface registration and
read and write operations.
The registration is split into separate creation and
registration phases. That allows the drivers to properly
initialize the interface before registering it if necessary.
The read and write operations are supplied in a completely
separate struct ucsi_operations that is passed to the
ucsi_register() function during registration. The new read
and write operations will work more traditionally so that
the read callback function reads a requested amount of data
from an offset, and the write callback functions write the
given data to the offset. The drivers will have to support
both non-blocking writing and blocking writing. In blocking
writing the driver itself is responsible of waiting for the
completion event.
The new API makes it possible for the drivers to perform
tasks also independently of the core ucsi.c, and that should
allow for example quirks to be handled completely in the
drivers without the need to touch ucsi.c.
The old API is kept until all drivers have been converted to
the new API.
Change-Id: Ica25b44b228a96adbc2bd397d74978db6074c82e
Signed-off-by: Heikki Krogerus <[email protected]>
Tested-by: Ajay Gupta <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: bdc62f2bae8fb0e8e99574de5232f0a3c54a27df
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <[email protected]>
This change updates bits for testing on emulation platform.
Also, the change fixes spss_utils probe dependency on subsys-pil-tz.
Change-Id: I6924f73b3b69d3d4d57c989a1f8fd2217a2553ef
Signed-off-by: Konstantin Dorfman <[email protected]>
Add new macro SNDRV_AUDIO_QGKI and userspace can
check if AUDIO_QGKI is enabled or not.
Change-Id: I8c0a8c350c41a5feb616a7ee9895d88f182c91dc
Signed-off-by: Meng Wang <[email protected]>
Drivers may need to use the ASoC core function to
find out whether a particular component is already
registered with ALSA core or not.
Export the function so that drivers can use it outside
of the file.
Change-Id: I13e4a053de085974b0b53c392a9453e46f1aa66d
Signed-off-by: Banajit Goswami <[email protected]>
Signed-off-by: Meng Wang <[email protected]>
Pull cramfs fix from Al Viro:
"Regression fix, fallen through the cracks"
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
cramfs: fix usage on non-MTD device