Commit graph

884,342 commits

Author SHA1 Message Date
Murali Nalajala
32637a594d haven: add stubs to haven client exposed APIs
There are Non-VM (Virtual Machine) supported target drivers which
may refer some of the APIs defined for VMs. But those drivers are
compiled irrespective of VM or non-VM configurations. Add stubs to
support to compile drivers for non vm supported targets.

Change-Id: Ibc0c2c55b3b264c43c4793f153e723f8d344423a
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2020-04-09 14:22:12 -07:00
Yue Ma
688818c547 cnss2: Handle race between register driver and reboot properly
Register driver should be skipped if reboot is already in progress.
Also firmware boot timer should be stopped if register driver work
has been scheduled but gets killed later to avoid timing out because
of the reboot.

Change-Id: Iae4de860329a82416bfa58967095a4de7b509813
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-04-09 12:00:20 -07:00
Elliot Berman
21a9eb8e4b haven: rm: Remove pr_err on get_vmid
If RM is not set up, drivers such as ion may be frequently calling
hh_rm_get_vmid and causing a console message that a VMID could not be
found. Drivers should be correctly handling the error case, so remove
the pr_err here to not fill console messages.

Change-Id: I2026d9481b6d58a89fb2f546bf76b29566e5f3d7
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:20 -07:00
Elliot Berman
18175354e0 haven: rm: Add haven vIRQ lending library
Add library for client drivers to lend interrupts to each other.

Change-Id: I4c60e0443d178e83c0bb4ec824915e4bdadb9c39
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:19 -07:00
Elliot Berman
479830ad51 haven: rm: Add calls to relase/reclaim IRQs
A VM may release a lent IRQ back to its lender. The lendee VM notifies
the resource manager that it may give the interrupt back to the lender
via its interrupt handle. The lender then must notify the lender VM that
it has released the interrupt. The lender VM must then reclaim the
interrupt via the handle.

Change-Id: Ic76f5a3692b4041bc3f260b4add06da11746f19e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:19 -07:00
Elliot Berman
068a9a830d haven: rm: Allow IRQ lender to learn about the IRQ handle
An IRQ lender driver will likely ought to need to use the IRQ handle to
reclaim the interrupt when the lendee is done with the interrupt.

Change-Id: I0b791ecfb7b169d5cf2677d324e9aceea51feb5d
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:18 -07:00
Elliot Berman
205f53fbba haven: rm: Update IRQ notify to expect standard reply
IRQ notify sends only a standard response without any client data to
parse. Update irq_notify to expect to not receive any client data.

Change-Id: Ie5db403a84a0b237ca34a2b06c8a1b76ec92cf79
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:18 -07:00
Elliot Berman
0db6d0eafa haven: Clean up payload sizes
VMID is represented inconsistently in payload structs. Consistently use
hh_vmid_t to reduce mistakes around sizing of vmid. IRQ notify request
payload was also incorrectly formatted according to specification.

Change-Id: I0875655f69946eb0af609c67bdfdfa0dab5c7acc
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:17 -07:00
Elliot Berman
78c7d9e598 haven: rm: Send requests atomically to RM
RM core driver can send out multiple requests in parallel to RM, e.g.
00111002302222113456111 (numbers indicate seq-id, and the recursion of a
number indicates fragments). RM can only process one request at a time
and would reject any messages unrelated to the request it was first
receiving. Thus, add a lock to enforce requests are sent sequentially.

Change-Id: I1e75dd40d7b8bf47ca4120f33c70f1ee452ba7b1
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:17 -07:00
Elliot Berman
f1e03abade haven: rm: Do not allow concurrent stream from RM
RM will only ever send one stream of fragmented messages to a VM.
Additionally, sequence number should not be used to track notification
fragments. We cannot use IDR sequence pool to associate fragments
with a particular connection. Thus, maintain a current connection to
directly append to when receiving continuation fragments.

Connection streams have a consistent num_fragments and message ID which
can be used to do self-sanity checks instead of sequence number. Use
these fields instead.

Change-Id: I18113868b9fd20d3c9f7f66933cdcfb8c0f29362
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:16 -07:00
Murali Nalajala
c177eabc12 haven: rm: Use local dt properites for RM capids
Use local dt properites for RM capability IDs per RM specification.

Change-Id: I4a615194882970c6cfd16af52ba1deeb916ec7cc
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2020-04-09 11:55:16 -07:00
Elliot Berman
58752d5b9d hvc: haven: Update driver initialization to support console
Console initialization may send data to driver during call to
hvc_instantiate. Thus, these data structures must be initialized before
this call. Reorganize driver initialization to meet this requirement and
improve comments and error handling during initialization.

Change-Id: Ia7b9bc9e2244516d86695839830ff4a16863342a
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:16 -07:00
Elliot Berman
061fadf4e5 haven: Improve print statements
Improve print statements around errors to provide more useful
information and add hex dumps of data being sent to RM and over message
queues. Hex dump of the message is invaluable to validating whether
messages are correctly being formatted.

Change-Id: I95dc665ce00795f347d4820178e09bf43b8f31c3
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:15 -07:00
Elliot Berman
aba06b68e5 haven: msgq: Update EMPTY/FULL signals
Update handling of msgq response to send/recv to update internal state of
rx_empty/tx_full.

Change-Id: I8c744b2ed1dafc9b89576eb216a790d4f59530f5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:15 -07:00
Elliot Berman
73eacbb2f3 haven: rm: Add HH_SELF_VM name
RM accepts "VMID 0" as meaning "self." Thus, add a vm_name "HH_SELF_VM"
which means the same. Haven RM console operates on vm_names and can use
HH_SELF_VM to talk to RM about this VM's console.

Change-Id: I7663db28497ad86a94d4a8c98f3b7068f5644915
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-04-09 11:55:14 -07:00
Rishabh Bhatnagar
de3ae69c8a irqchip: add snapshot of msm_show_resume_irq
This is a snapshot of drivers/irqchip/msm_show_resume_irq.c as of
msm-4.14 commit <02ff79e55ddc0aa>. (Merge "perf: don't zombie
certain events in perf_event_release_kernel").

Change-Id: I8d33455c9f482b5742023042e947f0af3d3c2335
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[rananta@codeaurora.org: Altered the configuration option]
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2020-04-09 09:53:58 -07:00
Ram Chandrasekar
b541a79e7d defconfig: Enable voltage cooling device for lahaina
Enable voltage cooling device for lahaina. This will enable to build
voltage cooling device using CPUs sharing the same rails.

Change-Id: Ic4df305280006c60bfe3f0287138477a679237c1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2020-04-09 08:13:38 -07:00
Ram Chandrasekar
94c6377776 drivers: thermal: cpu_voltage: Add CPU voltage cooling device support
A single CPU cluster can have CPUs with different frequency plans.
Mitigating individual CPU may or may not bring down the CPU cluster
voltage depending on the operating level of the other CPUs.

CPU voltage cooling device will provide support to apply CPU frequency
mitigation on different CPUs in a cluster to achieve a reduction in
cluster voltage. This is achieved by building a mitigation table mapping
the frequency of different CPUs based on voltage.

Change-Id: Ie09375c6c15a9f81e663fca96c5af87e0b6789c2
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2020-04-09 08:13:33 -07:00
qctecmdr
885277a753 Merge "msm: pcie: remove read to PCIe ELBI_SYS_CTRL reg after PME_TURNOFF" 2020-04-09 04:56:32 -07:00
qctecmdr
4a6da3f096 Merge "Revert "SoC: soc-core: export function to find components"" 2020-04-09 04:56:31 -07:00
qctecmdr
dcd4256817 Merge "usb: gadget: Add super speed plus desc for midi function" 2020-04-09 04:56:31 -07:00
qctecmdr
8fb9f1ddac Merge "msm: cvp: Validate buffer config in HFI packet" 2020-04-09 04:56:31 -07:00
qctecmdr
9d71f78e4e Merge "mm: slub: reinitialize random sequence cache on slab object update" 2020-04-09 04:56:31 -07:00
qctecmdr
7277cd9276 Merge "i2c: i2c-msm-geni: Add support in I2C driver for Trusted VM" 2020-04-09 04:56:30 -07:00
qctecmdr
ecb0e8b8fd Merge "tmc-etr: Remove the duplicated cti map" 2020-04-09 04:56:29 -07:00
Mao Jinlong
d199fb4508 tmc-etr: Remove the duplicated cti map
Remove the duplicated cti map for tmc-etr as only memory mode needs
the cti map.

Change-Id: I5264a41e718924cd2febb8c0e7de03623fbd7c90
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2020-04-09 02:28:50 -07:00
qctecmdr
91553bb268 Merge "coresight: tmc-etr: fix null ptr dereferencing in usb_qdss_close" 2020-04-08 23:18:57 -07:00
qctecmdr
c3d28bf044 Merge "regulator: qpnp-amoled: Add set_load() callback for IBB regulator" 2020-04-08 19:18:58 -07:00
qctecmdr
090d1e5c45 Merge "clk: qcom: rpmh: Add support for RPMH clocks for Shima" 2020-04-08 19:18:57 -07:00
qctecmdr
6d117752a7 Merge "msm: cvp: avoid checking read_idx again" 2020-04-08 19:18:57 -07:00
qctecmdr
43ee6abd3f Merge "msm: adsprpc: Handle hyp assign errors properly for dsp" 2020-04-08 19:18:57 -07:00
qctecmdr
acb07c14f3 Merge "cnss2: Ignore ramdump init failure" 2020-04-08 19:18:56 -07:00
qctecmdr
2f4b3f0cd2 Merge "drivers: llcc: Add LLCC driver for Shima" 2020-04-08 19:18:56 -07:00
David Collins
96edec9b74 regulator: qcom_pm8008: remove explicit parent supply management
Remove explicit parent supply management (i.e. regulator_enable(),
regulator_disable(), and regulator_set_voltage calls) from inside
of the qcom_pm8008-regulator regulator_ops callback functions.
This helps to eliminate a source of mutex deadlock introduced by
commit f8702f9e4a ("regulator: core: Use ww_mutex for regulators
locking").

Change-Id: Ib4d731d1230b3a8cf9e1094d0d63a7c99531fa9d
Signed-off-by: David Collins <collinsd@codeaurora.org>
2020-04-08 16:24:06 -07:00
Pratham Pratap
734f88ba2f usb: xhci: Increase xhci halt timeout
Currently xhci halt timeout is 16ms which sometimes
leads to controller halt failure. This results in
controller accessing addresses which are unmapped
leading to SMMU faults.

This change increases the timeout to 32ms so that
controller has enough time to complete the pending
transactions.

Change-Id: Id3435e8577923536b767da42d24d528ea91e8988
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2020-04-08 12:48:08 -07:00
Prakruthi Deepak Heragu
45dc50ddb7 arm64: defconfig: Enable boot_stats driver for Lahaina
Enable CONFIG_MSM_BOOT_STATS to compile boot_stats driver for Lahaina

Change-Id: Ie9135fd7f6004fdd2d6b0e5b43106796c5279a1b
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-04-08 11:16:24 -07:00
Himateja Reddy
37b78273b3 msm: adsprpc: register wake-source clients during driver init
Currently, wake-source clients are being created during every new
process init with the same device and client name, which is
unnecessary and redundant. Instead, register the secure and
non-secure wake-source clients during driver init and use the same
clients for all processes.

Change-Id: I685fafae74d18e1004c6adbfada436a33a727bef
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
2020-04-08 10:38:26 -07:00
Mike Tipton
894746d0da interconnect: qcom: Fix the commit bit not getting set
Fix the BCM commit bit not getting set for TCS commands that don't wait
for completion. The current code overloads the commit/wait behavior
using the same "commit" argument to tcs_cmd_gen(), which means we'll
only commit commands that wait for completion. The commit bit needs to
be set for the last command in each VCD regardless of the wait behavior.
Add a dedicated "wait" parameter to tcs_cmd_gen() to separate this
behavior.

Change-Id: I8d577f24b07de2f37f13365c43690bae954508f4
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2020-04-08 10:05:41 -07:00
Sumukh Hallymysore Ravindra
b2f0193ac3 msm: synx: change kzalloc to vzalloc
Change the memory allocation function to vzalloc
as there is no need for physically contiguous memory
for the client structure.

Change-Id: Ic6377953c6acc6442eea8fbee2e1798ac32ebebb
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
2020-04-08 21:50:57 +05:30
Naveen Yadav
3cfeff426a clk: qcom: clk-alpha-pll: Add support for Huayra print registers
Huayra PLL print registers are required to get the PLL values from
the debugfs, thus add support for the same.

Change-Id: I439f64646d5995943cf8d0ef94daf3f85cd0ae45
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-04-08 20:59:40 +05:30
Naveen Yadav
f299e23e9a clk: qcom: clk-alpha-pll: Add support for Zonda print registers
Zonda PLL print registers are required to get the PLL values from
the debugfs, thus add support for the same.

Change-Id: Ie8df05a84c972f412ee6d612ef5a6dde2ae98f9b
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-04-08 20:57:50 +05:30
qctecmdr
a31ad760a4 Merge "smcinvoke: Return proper error in process_accept_req" 2020-04-08 03:42:50 -07:00
qctecmdr
adeddcb4f7 Merge "leds: qti-flash: Update camera flash client interface options" 2020-04-08 03:42:49 -07:00
qctecmdr
e58a8227d9 Merge "drm/msm: make msm_drm.h uapi header safe for C++" 2020-04-08 03:42:49 -07:00
qctecmdr
9261aacbb1 Merge "mem-buf: Replace *_TRUSTED_UI with *_TRUSTED_VM" 2020-04-08 03:42:49 -07:00
qctecmdr
c8879e200b Merge "ion: Remove ION_HEAP_FLAG_DEFER_FREE for dynamic carveout heaps" 2020-04-08 03:42:48 -07:00
qctecmdr
b87e49551e Merge "arm64: defconfig: Enable Buses configs for trusted VM" 2020-04-08 03:42:48 -07:00
Taniya Das
3c5b9fce97 clk: qcom: clk-alpha-pll: Add support for Lucid PLL print registers
Lucid/Lucid5LPE PLL print registers are required to get the PLL values
from the debugfs, thus add support for the same.

Change-Id: I3a9eac33c80a98a0e612d9c7f740067aa54bde44
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-04-08 15:53:05 +05:30
Tony Truong
bccdbc1d48 msm: pcie: remove read to PCIe ELBI_SYS_CTRL reg after PME_TURNOFF
After sending PME_TURNOFF message via ELBI_SYS_CTRL register,
remove read back to the register to avoid possible hang.

Change-Id: Ie424006991f10f12127f9b5a07a93c291c7a2f10
Signed-off-by: Tony Truong <truong@codeaurora.org>
2020-04-07 22:14:11 -07:00
Hareesh Gundu
d4aea831d9 msm: kgsl: Query xo resource addr from cmd-db driver
Instead of hardcoding XO resource address in the PDC
initialization sequence, query it from cmd-db driver
to avoid conflict with other resources when it was
hard coded incorrectly.

Change-Id: Icbe903249345f82c8208ce066a22b55a957ee289
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2020-04-07 22:06:22 -07:00