Commit graph

898,732 commits

Author SHA1 Message Date
Yue Ma
a7ed86496f cnss2: Move power on and bus init to the end of platform probe call
Device power on and bus init should happen when all platform related
init are done since it means all platform configs are ready and it is
good to bring up device. Hence move them to the end of platform probe
call.

Change-Id: I22a69be4a25de6f8c45994dca23f6f631fd1474f
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2021-05-13 10:44:20 -07:00
qctecmdr
e38c09a5b8 Merge "pci: msm: msm_pcie_iatu_config API clean" 2021-05-11 18:40:45 -07:00
qctecmdr
e65b513369 Merge "pci: msm: Add dynamic iATU config for ep config space access" 2021-05-11 15:52:29 -07:00
qctecmdr
887e689725 Merge "Fixing the GVM suspend failure due to veth_ipa_suspend" 2021-05-11 04:21:50 -07:00
qctecmdr
8f48489bc2 Merge "clk: qcom: gcc-blair: Add support for AHB clocks" 2021-05-11 01:42:47 -07:00
qctecmdr
b9ca7556ae Merge "drivers: rename_block: Enable A/B support" 2021-05-11 01:42:47 -07:00
Hemant Kumar
12f060439d pci: msm: msm_pcie_iatu_config API clean
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>
2021-05-10 21:12:13 -07:00
Hemant Kumar
5d4e8db03a pci: msm: Refactor endpoint event registration
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>
2021-05-10 21:12:05 -07:00
Hemant Kumar
5d3e24ee00 pci: msm: Use endpoint list to track suspend and resume
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>
2021-05-10 21:12:00 -07:00
Hemant Kumar
3d8ab59065 pic: msm: Clean up msm_pcie_pm_control API
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>
2021-05-10 21:11:54 -07:00
Hemant Kumar
aae80a9b0f pci: msm: Add dynamic iATU config for ep config space access
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>
2021-05-10 21:11:47 -07:00
Hemant Kumar
b492f59d0f pci: msm: Use operation config read/write APIs in AER handler
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>
2021-05-10 21:11:31 -07:00
Hemant Kumar
4ae8c3a83e pci: msm: Handle AER in threaded irq context
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>
2021-05-10 21:11:01 -07:00
qctecmdr
07852f68c9 Merge "srcu: Avoid escaped section names" 2021-05-10 20:12:42 -07:00
qctecmdr
eb6b3094be Merge "pci: msm: Refactor msm_pcie_confirm_linkup function" 2021-05-10 17:29:47 -07:00
qctecmdr
8b02e66e74 Merge "drivers: thermal: Snapshot of lmh cpu VDD driver from msm-4.19" 2021-05-10 07:00:10 -07:00
qctecmdr
22033f03e8 Merge "defconfig: sdmsteppeauto: Enable kenel debug flags" 2021-05-10 07:00:10 -07:00
qctecmdr
5743323a4d Merge "net: qrtr: Use cyclic idr allocator for port assignment" 2021-05-10 07:00:07 -07:00
Jagadeesh Kona
ae78a04c5f clk: qcom: gcc-blair: Add support for AHB clocks
Add support for Camera, Display, GPU and Video
AHB clocks.

Change-Id: I1c60f2f720b57659ab92e770448c1ce1c27a359e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-05-10 14:09:41 +05:30
qctecmdr
8e8bbdacf2 Merge "msm: kgsl: Avoid flooding kernel log with invalid ioctl errors" 2021-05-10 01:39:19 -07:00
Nick Desaulniers
b8cbf3a702 srcu: Avoid escaped section names
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>
2021-05-10 01:35:52 -07:00
Bojun Pan
8a64c61c18 Fixing the GVM suspend failure due to veth_ipa_suspend
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>
2021-05-10 00:43:10 -07:00
Venkata Rao Kakani
57d4114d68 drivers: rename_block: Enable A/B support
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>
2021-05-10 13:08:57 +05:30
Vinay Sudra
7a5cc733fe defconfig: sdmsteppeauto: Enable kenel debug flags
Enable debug flags for various kernel subsystem

Change-Id: I3e61d072a935811ecece09e45870e0e200a45bb0
Signed-off-by: Vinay Sudra <vsudra@codeaurora.org>
2021-05-09 23:48:06 -07:00
qctecmdr
8336f3edcd Merge "msm: kgsl: Expose memtype stats through sysfs" 2021-05-09 22:55:46 -07:00
qctecmdr
45a1229071 Merge "msm: adsprpc: return fastrpc ioctl call if process exit sequence start" 2021-05-08 09:42:59 -07:00
qctecmdr
899be810b4 Merge "msm: kgsl: Print the process id for the context on a pagefault" 2021-05-08 07:00:06 -07:00
qctecmdr
37c10a988e Merge "pci: msm: Use framework API to enable AER for endpoints" 2021-05-08 04:17:20 -07:00
qctecmdr
aefbccb56c Merge "slatecom-events-bridge: Add driver for events from Slate" 2021-05-08 01:30:21 -07:00
Hemant Kumar
a2a2d557fb pci: msm: Refactor msm_pcie_confirm_linkup function
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>
2021-05-07 10:40:57 -07:00
Hemant Kumar
9ecf13f417 pci: msm: Use framework API to enable AER for endpoints
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>
2021-05-07 10:39:47 -07:00
qctecmdr
e9d55dd9b8 Merge "iommu/arm-smmu: sign extend iova for fault handler" 2021-05-07 10:25:17 -07:00
qctecmdr
460f85c07a Merge "defconfig: steepauto: Enable INCFS" 2021-05-07 10:25:17 -07:00
qctecmdr
9e8437a8e5 Merge "defconfig: autogvm: Enable INCFS" 2021-05-07 10:25:16 -07:00
qctecmdr
83157d9075 Merge "defconfig: gen3auto: Enable INCFS" 2021-05-07 10:25:16 -07:00
qctecmdr
34c54ac16d Merge "arm: defconfig: Enable PCI Express AER driver" 2021-05-07 10:25:16 -07:00
qctecmdr
b382f222c2 Merge "serial: msm_geni_serial: Allow clock_on/off ioctl to be optional" 2021-05-07 10:25:15 -07:00
Kamal Agrawal
547129b6ad msm: kgsl: Avoid flooding kernel log with invalid ioctl errors
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>
2021-05-07 00:44:15 -07:00
Jeya R
2a98c1c02d msm: adsprpc: return fastrpc ioctl call if process exit sequence start
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>
2021-05-07 12:18:40 +05:30
qctecmdr
dcb612382b Merge "scsi: ufs: Narrow down fast pass in system suspend path" 2021-05-06 22:23:00 -07:00
qctecmdr
ede504cedc Merge "defconfig: autogvm: Enable boot marker for KPI measurement" 2021-05-06 22:23:00 -07:00
qctecmdr
39d09dfcce Merge "usb: f_fs: Fix use-after-free for epfile" 2021-05-06 22:23:00 -07:00
qctecmdr
a5af1843ad Merge "mtd: msm_qpic_nand: Enable Pagescope read feature and reset status_desc" 2021-05-06 22:22:59 -07:00
qctecmdr
36d9ba8f4c Merge "sched/walt: consider average max_nr when compare max_nr" 2021-05-06 22:22:59 -07:00
qctecmdr
54a9c89962 Merge "icnss2: Add support for MHI state info" 2021-05-06 22:22:59 -07:00
qctecmdr
5ab7307c8a Merge "adsprpc: Map dynamic loading memory persistent" 2021-05-06 22:22:58 -07:00
qctecmdr
e3e00bfbe0 Merge "power: qcom: Add QTI QBG(Qualcomm Battery Gauging) driver" 2021-05-06 22:22:58 -07:00
qctecmdr
7b79fdc03f Merge "defconfig: Add initial defconfig fragments for scuba" 2021-05-06 22:22:58 -07:00
qctecmdr
5aeb2f7dfe Merge "PCIe: ASPM: Save/restore ASPM-L1SS controls in reverse order" 2021-05-06 22:22:57 -07:00
Ashish Kori
790ab2f4d7 serial: msm_geni_serial: Allow clock_on/off ioctl to be optional
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>
2021-05-06 21:53:14 -07:00