Commit graph

879,789 commits

Author SHA1 Message Date
qctecmdr
e3355ff92a Merge "cnss2: Handle race between register driver and reboot properly" 2020-04-11 13:28:34 -07:00
qctecmdr
44abeafb57 Merge "soc: qcom: pmic_glink: Verify the message length" 2020-04-11 13:28:34 -07:00
qctecmdr
61ade967b7 Merge "power: supply: qti-battery-charger: Handle incorrect thermal levels" 2020-04-11 13:28:33 -07:00
qctecmdr
e814c38deb Merge "mm: correct ALLOC_WMARK_MIN flag check for atomic allocations" 2020-04-11 13:28:33 -07:00
qctecmdr
8be639b1d4 Merge "mm: reap tasks only killed by low memory killer" 2020-04-11 13:28:33 -07:00
qctecmdr
000cfc1ef2 Merge "power: supply: qti_battery_charger: add support to set fake SOC for battery" 2020-04-11 13:28:33 -07:00
qctecmdr
2087769c27 Merge "interconnect: qcom: Fix BW requests to L3_SHARED returning -EINVAL" 2020-04-11 13:28:32 -07:00
qctecmdr
ee26b2fc8a Merge "soc: qcom: add CDSP request manager" 2020-04-11 13:28:32 -07:00
qctecmdr
eef803ab52 Merge "msm: cvp: Avoid releasing buffers during boot" 2020-04-11 13:28:32 -07:00
qctecmdr
31ef58ab90 Merge "haven: add stubs to haven client exposed APIs" 2020-04-10 15:56:33 -07:00
Bavyasritha Alahari
07b0a87f34 soc: qcom: add CDSP request manager
CDSPRM module implements a RPMSG interface to communicate with CDSP
while providing a way for CDSP to vote for CPU L3 clock, CPU QoS to
benefit CDSP applications performance. The module also implements
an interface with NPU for Cx i-peak limit management and registers
cooling devices for CDSP and HVX thermal mitigation.

Change-Id: I5aa592cb8de19367f7361e1f31d1077ceba386df
Acked-by: Sreekanth Gande <sgande@qti.qualcomm.com>
Signed-off-by: Bavyasritha Alahari <alahari@codeaurora.org>
2020-04-09 22:16:58 -07:00
Subbaraman Narayanamurthy
2a9286f089 power: supply: qti_battery_charger: add support to set fake SOC for battery
Setting a fake battery SOC (state of charge) is useful to test
different mitigation levels. Add support for it by exposing
fake_soc under qcom-battery class which can be set only when
CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG is enabled.

To set fake_soc of 50%,

 echo 50 > /sys/class/qcom-battery/fake_soc

To clear fake_soc so that actual battery SOC can be displayed,
any value other than 0-100 can be set to fake_soc.

 echo -1 > /sys/class/qcom-battery/fake_soc

Change-Id: Ibff337fb4da9d4e9aadbe148f3eecca9e2d69604
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-04-09 17:10:48 -07:00
Subbaraman Narayanamurthy
a91100b971 soc: qcom: pmic_glink: Verify the message length
Currently, data received from the remote subsystem is delivered
to the clients as-is if they've registered for receiving it. This
can cause unintended extraneous buffer reads if the length of the
received message is too small. Verify that the message length is
at least the PMIC Glink header size.

Change-Id: I3774d9d5331794c509bda89f40f4ead2e0ed3843
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-04-09 15:26:20 -07:00
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
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
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
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