Commit graph

1512 commits

Author SHA1 Message Date
Linux Build Service Account
b3b6467d66 Merge "soc: qcom: glink_pkt: Modify conversion of CTS/DTR signals" 2017-11-30 14:02:14 -08:00
Dhoat Harpal
3946f6ea3f soc: qcom: glink_pkt: Modify conversion of CTS/DTR signals
SMD_DTR_SIG and SMD_CTS_SIG signals are converted to TIOCM_DTR
and TIOCM_RTS respectively, for client notification. This is
incorrect conversion.

SMD_DTR_SIG and SMD_CTS_SIG signals conversion is modified to
TIOCM_DSR and TIOCM_CTS respectively.

CRs-Fixed: 2148119
Change-Id: I7cd61afe4639fc7c5fd993f4047fad3ff04c53a7
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-11-30 17:27:52 +05:30
Yong Ding
d7d4a3ea54 soc: qcom: hab: add clean up for GVM normal exit
When a GVM exits normally, it should detach from the shmem
to notify those who are also attached to this shmem.

Change-Id: I37e9d89e321a2feabf1ea134ced4b6d8dd2d3622
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2017-11-30 11:20:13 +08:00
Yong Ding
063f936fe2 soc: qcom: hab: add time profiling function
With this profiling function, hab communication overhead can be
measured for performance debug.

Change-Id: I26dd487cfd1bbb811de69d8b35a7c095a21361ac
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2017-11-30 11:20:12 +08:00
Yong Ding
ef8ff2ece9 soc: qcom: hab: add __packed for export_desc
The export_desc structure is shared among Hypervisor and
GVMs(Guest Virtual Machines). With the explicit __packed
declared, it can have exactly the same memory layout in
Hypervisor and GVMs.

Change-Id: Iccd25e617dd3152f808593dd54b0a20baad02541
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2017-11-30 11:20:12 +08:00
Yong Ding
29a654b022 soc: qcom: hab: backend should listen without timeout
In the handshake stage of openning hab virtual channel,
hab backend should listen without timeout so that it just
keeps waiting for the coming connection from hab frontend.

Change-Id: I399fe050c5460bf3b56f862141320b2e2afe55e1
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2017-11-30 11:20:11 +08:00
Yong Ding
7776191562 soc: qcom: hab: add some pchans for camera and clk
Add several more physical channels as MM_CAM2, MM_CLK_VM1
and MM_CLK_VM2.

Change-Id: I5f3138a9635e8ad0e1fcf2012d406b2d6a3db6c1
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2017-11-30 11:20:11 +08:00
Linux Build Service Account
de7627fc2a Merge "icnss: Add dev to all export APIs in ICNSS" 2017-11-29 15:24:41 -08:00
Linux Build Service Account
e648f8c78b Merge "icnss: Remove MSA0 permission only when modem is crashed" 2017-11-29 04:26:03 -08:00
Sarada Prasanna Garnayak
f89e708410 icnss: Add dev to all export APIs in ICNSS
Add device pointer in all export symbol to
add support for numerous WLAN module.

CRs-Fixed: 2138446
Change-Id: I981155c165e4e5c2794b778afe647f8a588dd860
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-11-29 01:33:36 -08:00
Odelu Kukatla
40419c3f90 msm: msm_bus: Add mutex lock for floor vote data
Floor vote data needs to be protected with mutex lock to
avoid double free of memory due to race condtion.

Change-Id: Ifaa01a14d273ccba6b9463aff3a41c0038b05f06
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2017-11-23 22:32:18 -08:00
Linux Build Service Account
07f371daed Merge "icnss: Send early modem crash notification to wlan driver" 2017-11-22 19:51:13 -08:00
Linux Build Service Account
e4401d0ea1 Merge "audio: ion: switch to msm ion on gvm." 2017-11-21 06:44:54 -08:00
Yuanyuan Liu
935a684aa6 icnss: Remove MSA0 permission only when modem is crashed
For modem restart and device power off cases, there's no
need to remove MSA0 permission and collect ramdump as these
are normal behavior. Hence only collecting ramdump when
modem is crashed.

CRs-Fixed: 2141678
Change-Id: I42b44da3f08e62c8e375ae1749563d918e68be9d
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-11-20 14:33:10 -08:00
Yuanyuan Liu
f5b51b1f49 icnss: Send early modem crash notification to wlan driver
When SSR happending during WLAN interface up, a deadlock will happen
in many places where it waits for FW response. When wlan module starts,
it will hold a rtnl_lock and wait for FW response. If SSR happened at
this point, it will send ssr notification to all the registed modules
one by one. It will send notification to IPA first, which will also
tried to get a hold of rtnl_lock. Since ssr notification is synchronized,
IPA won't be able to return because of failing to acquire the lock and
wlan driver won't release the rtnl_lock until it timeout and crash.
Only graceful to avoid this deadlock is to get early modem
crash notification from platform via a path which does not acquire
RTNL lock and this way once driver has received early crash
notification it can reject interface up.

Modem notification comes to icnss before IPA, hence send
early crash notification in modem SSR handler so that wlan driver
can release RTNL lock as soon as possible.

CRs-Fixed: 2141970
Change-Id: If77c54a2a39ce5cf0e129eb5c6599cd3fd722886
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-11-20 14:25:20 -08:00
Linux Build Service Account
ae2f6cb5ad Merge "soc: qcom: service-locator: Update incorrect usage of qmi_send_req_wait" 2017-11-14 09:45:24 -08:00
Kyle Yan
191e097508 soc: qcom: service-locator: Update incorrect usage of qmi_send_req_wait
qmi_send_req_wait expects timeout argument to be passed in ms and not
in jiffies. Update the call in service-locator to pass in the correct
argument.

Change-Id: Ib2f8deedf2fb2a561c30b0c8511bb1edd5a37361
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-11-13 23:01:20 -08:00
Kyle Yan
6c06d8ddf7 soc: qcom: service-locator: Fix error message prints for receiving messages
ENOMSG is not a real failure return code for qmi_recv_msg. Instead ENOMSG
signifies that we have finished reading the entirety of the message buffer.
Update the error condition to print errors only when any error message
other than ENOMSG is returned.

Change-Id: Id6b42df182cb02f2cbffaae9698363b7dafce4e4
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-11-13 22:56:58 -08:00
Linux Build Service Account
d36a884a1e Merge "soc: qcom: msm_bus: Add debug logging for max bandwidth votes" 2017-11-09 09:58:56 -08:00
Linux Build Service Account
997088afbf Merge "soc: qcom: scm: Remap scm busy error codes to -EBUSY" 2017-11-08 02:31:22 -08:00
Odelu Kukatla
16d78cda70 soc: qcom: msm_bus: Add debug logging for max bandwidth votes
Max bandwidth vote on each bus device is required to be
printed when the device panics, so add a panic notifier
to print the max BW votes on each bus device.

Change-Id: I2256407638fe5085cb4b0f4d5a594dd00f4f3bce
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2017-11-08 10:58:19 +05:30
Linux Build Service Account
69b148a089 Merge "soc: qcom: pil: Fix error handling during PIL driver probe" 2017-11-06 11:49:30 -08:00
Linux Build Service Account
59e7cfaf52 Merge "soc: qcom: Add support for QDSS bridge driver" 2017-11-05 22:33:09 -08:00
Linux Build Service Account
a1b1b96ce3 Merge "soc: qcom: glink_smem_native_xport: Add readback to write index" 2017-11-05 22:33:06 -08:00
Linux Build Service Account
551738a812 Merge "soc: qcom: glink_ssr: Use do_cleanup_data from pkt_priv" 2017-11-05 22:33:04 -08:00
Linux Build Service Account
da82750992 Merge "ARM: dts: msm: Add base register property for lpass and turing for sdm660" 2017-11-05 22:32:55 -08:00
Dhoat Harpal
091090e84f soc: qcom: glink_smem_native_xport: Add readback to write index
Writing data to DDR is not ensured to be completed even with addition
of data memory barrier. It is possible that CPU receive that write
instruction is completed but in reality data can be stuck in intermediate
buffer.

Readback of write index is added to ensure that remote side is sent
interrupt only after data is written on DDR.

CRs-Fixed: 2136645
Change-Id: I32c4967daf71991621b57421167e0ac8d38ce065
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-11-03 21:48:35 +05:30
Dhoat Harpal
e237404021 soc: qcom: glink_ssr: Use do_cleanup_data from pkt_priv
do_cleanup_data pointer is created for every SSR notification and
stored in cb_data. It is possible that the stored pointer can be
overwritten if two peripherals SSR happens at the same time.

Use do_cleanup_data pointer directly in pkt_priv, instead of
dereferencing from cb_data.

CRs-Fixed: 2121529
Change-Id: Ife68cdc460c0628623dea6827632b8acd8d1d955
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-11-03 16:46:18 +05:30
Satyajit Desai
d0f8d1f850 soc: qcom: Add support for QDSS bridge driver
Add support to route QDSS data received from MDM via MHI
to USB. The driver will help route diag traffic over the
QDSS sub-system to USB on APPS side. It acts as a bridge
between PCIE MHI and USB interface.

Change-Id: I98bea976638ce3f80785d8f40e2a936fc62397eb
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
2017-11-02 15:30:59 -07:00
Yimin Peng
b8a78b95ae audio: ion: switch to msm ion on gvm.
Fix build error if msm ion is enabled.

Change-Id: Ica2af79b0ac344f663bbbbf3495a14e2ca947e59
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2017-11-02 18:52:27 +08:00
Anurag Chouhan
fd554860f0 icnss: Check for FW_READY state before sending uevent in PD notifier
The existing state check will create a corner case that when FW
crashed during driver probe, platform driver won't send early
uevent notification to host driver, which create a small window where
host can communicate with FW when FW is crashed. This case can be
covered by checking FW_READY state instead.

CRs-Fixed: 2122702
Change-Id: I0bde9cb5a526ccd9fe81cd38bd4c27cf2e95042b
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2017-11-01 23:50:26 -07:00
Avaneesh Kumar Dwivedi
d438970a05 soc: qcom: pil: Log the TZ NMI caused subsystem crash on err fatal
Check NMI STATUS register and dump the log if the err fatal caused
on subsystem is due to TZ NMI.

Change-Id: I8ac4190aca60aeedcd41fd06e2f7dd053edd0f30
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
2017-11-02 11:39:55 +05:30
Sameer Thalappil
9fccd743a2 icnss: Do not assert if reboot requested during PDR
When icnss driver sees a PD down, and if the recovery is already in
progress, it forces an assert in debug builds. That is to detect any
Modem failures during PDR or to catch any instance of recursive PDRs.
When system goes thru a reboot or shutdown, and if the recovery is in
progress then avoid calling this assert.

CRs-Fixed: 2135071
Change-Id: I28f5c79a4cd8b83f60a62111535b11c2fba6000b
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2017-10-31 10:19:55 -07:00
Jitendra Sharma
4441ee0843 soc: qcom: pil: Fix error handling during PIL driver probe
During probe function of the Linux PIL kernel driver
Initialization of various resources are done.
This fix is for acquired resource cleanup, in case of error.

Change-Id: I0b3511cff7e2917fe83bddfc15086e939f5c2abc
Signed-off-by: Jitendra Sharma <shajit@codeaurora.org>
2017-10-27 12:46:50 +05:30
Linux Build Service Account
f5caf269cd Merge "soc: qcom: glink: Add downvote of transport during SSR" 2017-10-26 14:47:33 -07:00
Dhoat Harpal
9ed4818826 soc: qcom: glink: Add downvote of transport during SSR
During SSR, down vote transport of xprt is not called.
This leads to transport not being able to go to idle state.

Downvote of transport is called in SSR path.

CRs-Fixed: 2131780
Change-Id: Ic374073187aab95b700aa3f795787819f34d3c3c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-10-26 19:21:44 +05:30
Linux Build Service Account
9765263bbe Merge "soc: qcom: ipc_router_glink_xprt: Change wake source name" 2017-10-24 20:02:56 -07:00
Dhoat Harpal
253635c10f soc: qcom: ipc_router_glink_xprt: Change wake source name
Name added for wake source is stored in stack memory. It does
not exist after the stack is gone, this leads to use after free
case.

Added name from Glink xprt struct which persists until
IPCRTR is not removed.

CRs-Fixed: 2124767
Change-Id: I580cf6d6d12682f1f3f25c2506c2b1a969ee89b8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-10-23 20:50:14 +05:30
Honghao Liu
a71c664a97 soc: qcom: add SMMU support for virtualized audio ION driver
Update the virtualized audio ION driver to add SMMU support.
The virtualized audio ION driver will provide the ION memory
allocated from the guest VM to the physical VM to perform SMMU
mapping.

The virtualized audio ION driver will receive SMMU mapped
device address from physical VM and provide the device address
to its clients. Upon its client frees the memory, the virtualized
audio ION driver will request the physical VM to perform SMMU
un-mapping.

CRs-fixed: 2099245
Change-Id: Idca4ecda65910308d7f7af288381866ab4ce4a7a
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2017-10-18 12:10:55 -07:00
Derek Chen
1bc3c0f656 soc: qcom: add audio apr and ion virtualization support
Add support for virtualized APR and ION frontend driver
for audio.
Virtualized APR frontend driver resides in guest VM and
supports all legacy APR APIs. It will rely on MSM_HAB
to communicate with APR backend driver, which resides in
physical VM, where legacy SMD is utilized for communication
between APPS and ADSP.
Virtualized ION driver currently is designed to extract
physical memory through hypervisor abstracted ion layer,
which can be shared between APPS and ADSP directly.

CRs-fixed: 2047379
Change-Id: I7dad5aebfd1db00cd32807dc1219818a7a4e62c5
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-10-18 11:28:36 -07:00
Linux Build Service Account
fa53f7f14b Merge "soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink" 2017-10-17 14:20:44 -07:00
Dhoat Harpal
c66fd8c4d3 soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink
RX intent no timeout value when waiting for response. This can result
in calling function to wait indefinitely.

Set max waiting time to 500 ms.

CRs-Fixed: 2127311
Change-Id: I30475ca49f107e62bed41d3d26287562574d988c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-10-16 18:45:47 +05:30
Linux Build Service Account
c4d72c5677 Merge "soc: qcom: Create additional ramdump device node for SSR minidump" 2017-10-13 12:12:15 -07:00
Linux Build Service Account
38c318f33b Merge "soc: qcom: Optimize minidump collection check and add debug log" 2017-10-13 12:12:14 -07:00
Yuanyuan Liu
818cdc63ce icnss: Re-probe if driver probe returns error of defer
If wlan driver probe returns error of defer, platform driver will
try to recover by calling probe again. The maximun probe count
is 2.

CRs-Fixed: 2124152
Change-Id: Ic973d0f1d76fc59ce5950397d42a9e778cacaa5a
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-10-12 11:12:45 -07:00
Neeraj Upadhyay
52dfa8f9dd soc: qcom: scm: Remap scm busy error codes to -EBUSY
Current code do not remap SCM busy error codes and return
the same code to the client. This causes confusion as
client drivers check the return value against linux
error codes for other failure cases and also can't
access the internal SCM busy error code definitions.
Fix this by remapping SCM busy error codes to -EBUSY.

Change-Id: Ic3dcdf415b2edc85714fcb0c821ec302fcd967d3
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-10-06 23:00:43 +05:30
Linux Build Service Account
54a4a46266 Merge "soc: qcom: fix out of bounds read issue" 2017-10-05 16:10:19 -07:00
Linux Build Service Account
5ef257fe14 Merge "soc: qcom: glink: Free if_ptr before freeing dummy transport" 2017-10-05 16:09:55 -07:00
Linux Build Service Account
6f710cc042 Merge "spcom: spcom_get_next_request_size() unlock while waiting for rx data" 2017-10-05 16:09:54 -07:00
Linux Build Service Account
f8bec54357 Merge "spcom: avoid using stale glink handle" 2017-10-05 16:09:52 -07:00