In linux guest restart case, during probe, stop_rx_sequencer is
getting called because of residual state set before restart.
spin_lock which is used in stop_rx_sequencer is not initialized.
To, resolve spin_lock debug mentioned below, initialize spin_lock
early.
spin_dump+0x84/0x88
do_raw_spin_lock+0xd4/0x12c
raw_spin_lock+0x20/0x2c
handle_rx_dma_xfer+0x44/0x330
stop_rx_sequencer+0x118/0x420
start_rx_sequencer+0xc0/0x1a0
msm_geni_serial_runtime_resume+0x54/0xb8
pm_generic_runtime_resume+0x44/0x80
__rpm_callback+0x98/0x208
rpm_resume+0x458/0x6a4
__pm_runtime_resume+0x60/0xa0
__device_attach.llvm.18035772682363603059+0xa0/0x174
bus_probe_device+0x3c/0xdc
device_add+0x95c/0xb84
serdev_controller_add_platform+0x2c/0x1d0
serdev_tty_port_register+0xf8/0x188
tty_port_register_device_attr_serdev+0x50/0x90
uart_add_one_port+0x268/0x60c
msm_geni_serial_probe+0x630/0x780
platform_drv_probe+0xac/0xf0
really_probe+0x210/0x7d8.
Change-Id: I9e139897681ece174a9ead63f57bb999585ff0bf
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
Get rid of access to pciedev_table. Update data type
for bdf from unsigned long to u32. Prevent iATU config
for root port BDF. Do not save config values to rc_shadow
as iATU is configured dynamically.
Change-Id: I9e7254d1e6d91869db71c71f1c5b699a4d6376f4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For endpoint event registration do not depend on
num_ep, active_num_ep and pending_ep_reg variables.
Instead, create a list of registered endpoints and
notify an endpoint by iterating over the list of
registered endpoints with their corresponding
registered event. This also removes dependency on
PCIe device table and simplifies
msm_pcie_config_device_table function. Keep the
handling of upstream port I/O, memory and BME.
Change-Id: I5ab25ef300f0bc59ae5c2d973c662a0f81e44f43
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Decouple endpoint event registration from link suspend.
Instead of relying on pending_ep_reg and num_active_ep
create an enumerated endpoint list at the time of endpoint
enumeration and move it to suspended endpoint list up
on link suspend. If enumerated endpoint list becomes
empty allow link suspend. Move endpoint back to enumerated
list upon resume. This also removes a race where all
endpoints have not completed their enumeration and one of
the endpoints request to suspend the link.
Change-Id: I22ac6e52a4c93d294d2a365da63cc7292e5e36ce
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Instead of using global array of msm_pcie_dev use
existing PCIe device pointer in the function. Also
fix the indentation of the debug log strings.
Change-Id: I82eaaf2bfcbd4f588d1970131e0185f51d0f8ea5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
It possible that EP gets PCI probe and tries to access EP config
space before driver could finish setting up PCIe device table.
Due to this race before driver could populate the config base
address in table, operation config call back from framework
tries to de-reference config base address which is NULL. Fix
this issue by dynamically configuring iATU with config space
address range mapping to the BDF for which config space is
requested for. This prevents access to pcie device table which
is used for static mapping for multiple device config space to
its BDF.
Change-Id: Ie6a83355087912369e46f028d8ffe5e4b5a5fba5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handler is directly using raw read and write APIs to access
endpoint config space. Instead, use PCI framework provided APIs
as well as the register macros to stream line all config space
reads and writes to go through PCI read and write operation.
Also, use PCI framework APIs to find the pci device using BDF
this removes the dependency on local pci device table.
Change-Id: I5b0fa2dc6eb383d9db2dc42f026a2b6cb85b3d71
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handling requires finding the source pci device on
the bus which causes the AER. Source pci device is found
using bus, device and function number. Finding pci device
requires sleeping context because bus is walked by holding
semaphore. Hence move AER handling to threaded irq context.
Change-Id: Ia51b91560326be2a85e17ce98315ea39d25641e2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add support for Camera, Display, GPU and Video
AHB clocks.
Change-Id: I1c60f2f720b57659ab92e770448c1ce1c27a359e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
The stringification operator, `#`, in the preprocessor escapes strings.
For example, `# "foo"` becomes `"\"foo\""`. GCC and Clang differ in how
they treat section names that contain \".
The portable solution is to not use a string literal with the
preprocessor stringification operator.
Change-Id: I7ec44bd2ef15fa8019f2fa5efe2eddf40585ab5a
Link: https://bugs.llvm.org/show_bug.cgi?id=42950
Fixes: fe15b50cde ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Git-commit: c1370c128cf49147f1d4c670b7101134231b3dc5
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: lixiang <lixiang@codeaurora.org>
veth_ipa_suspend function returning an error when the interface
is already in deactivated is fixed. Changed the return
value from -EPERM to non error as there is no error in this case.
Change-Id: I10f283e767a442e6897c4d35cc370bbc84dd2d9d
Acked-by: Sarosh Hasan <sarohasa@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Enable A/B support by appending slot suffix based on
androidboot.slot_suffix.
Change-Id: I7bdc798f6203ba026606d56cf0bc76e0cfbb6b4a
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
For link training Data link layer, active bit is checked
in link status register of the root complex. Hence create
a new function msm_pcie_dll_link_active() to check the link
status. Use same function in msm_pcie_confirm_linkup() as well.
In order to check endpoint access use pci_device_is_present()
provided by framework. This allows all ep config space access
to go through operation config callback from framework.
Also, remove reading of root complex vendor id and device id
which is redundant now.
Change-Id: I46fdb566ed20759d38d991ceeb23703759c04ecd
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Currently advanced error reporting is enabled by pci msm
controller driver using custom API. Since AER root port
service driver provides exported API
pci_enable_pcie_error_reporting() use this API to enable
support for AER and get rid of custom API. Framework API
needs to be wrapped under QGKI kernel config to prevent
GKI ABI breakage.
Change-Id: I3856fdc958a6234fe5e0a888733ce9f57fa5a48e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For invalid ioctl inputs from user, kgsl already returns -ENOIOCTLCMD error
code. Avoid flooding kernel log with such errors.
Change-Id: Iaf9c8eb0c51b221738482e2b4b02289913a2878e
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Added check to return fastrpc ioctl call when process exit sequence is
in progress.
Change-Id: I83915cb3fb75cc69d245a56800dcf42b492e01ea
Acked-by: Nishant Chaubey <chaubey@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
Add support in the driver to manage power without enabling pm runtime.
UART driver gives control to user space client to vote for clock on/off
by exposing ioctls. These vote clock on/off APIs depend on PM runtime
framework for power related operations.
This change relaxes driver from depending on userspace ioctls to invoke
runtime resume/suspend for basic uart functionality which will now be
done by system suspend/resume. This will block PM framework API's and
use system suspend/resume API for UART on/off.
Change-Id: Idf0632c0e2d40907f7a226cd7e3e814d1c1f6751
Signed-off-by: Ashish Kori <akori@codeaurora.org>