Commit graph

855748 commits

Author SHA1 Message Date
qctecmdr
191df0c7bb Merge "defconfig: Enable ADC thermal and SPMI configs for SPF targets" 2021-10-10 22:50:30 -07:00
Archana Sriram
17ab1175a2 defconfig: Enable ADC thermal and SPMI configs for SPF targets
Enable configs for ADC_TM and SPMI VADC, ADC5 drivers for
SPF targets for 32, 32Go and 64 bit variants.

Change-Id: Ic75dbe6fcafb1e4d2a49bbe87439fde4351b1218
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
Signed-off-by: Manjunatha Madana <mamanj@codeaurora.org>
2021-10-08 19:30:42 -07:00
Archana Sriram
c57142fede thermal: Modify qpnp_adc_tm driver for IIO framework
Make changes to use IIO framework APIs for reading
ADC channel information instead of VADC APIs.

Change-Id: I70ab09905d0f4a23fb5d0617ba6d031ecc7fb8bc
Signed-off-by: Manjunatha Madana <mamanj@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2021-10-09 07:41:39 +05:30
qctecmdr
952ccdab4d Merge "msm: ipa3: Queue nop desc again if it fails" 2021-10-08 07:17:25 -07:00
Manjunatha Madana
14595b56e3 thermal: qpnp-adc: Add snapshot of qpnp-adc-tm driver
This is snapshot of qpnp-adc-tm  driver as of
msm-4.9 'commit 7e65e03259909 (Merge "msm: kgsl:
Deregister gpu address on memdesc_sg_virt failure")'.

Removed support for adc_tm_hc and hkadc_ldo as they
are not used for SPF targets. Removed IADC, VADC APIS,
structs and enums not needed for ADC_TM. VADC functions
required for sake of compilation have been retained,
which will be subsequently replaced with IIO functions
to suit msm-4.19.

Change-Id: If8e4fb03471ec045293659b2404f8be95684f8be
Signed-off-by: Manjunatha Madana <mamanj@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
2021-10-08 07:02:23 -07:00
qctecmdr
5bf744ccb5 Merge "msm: kgsl: Add timeline traces" 2021-10-08 04:09:03 -07:00
Piyush Dhyani
4c94b16ae1 msm: ipa3: Queue nop desc again if it fails
Currently during nop desc send, we are setting
nop pending flag to false before queing desc,
due to which we are not able to queue nop desc
again if it fails for first time. Now setting
nop pending flag to false only if we successfully
queued nop desc.

Change-Id: Ice0b3726f2ff0e81c0e5b041346e0ba06619ef62
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
2021-10-08 02:31:06 -07:00
Vivek Golani
7f766a685e diag: Drop packets to avoid memory exhaustion
Added support to drop packets if more than 10
packets have accumulated in the rx list since usb
is not sending write done for previous packets sent
to usb to avoid memory exhaustion.

Change-Id: I44fe814abc5b199e1d1b86dcc6d0e2f043d15c49
Signed-off-by: Vivek Golani <vgolani@codeaurora.org>
2021-10-07 22:02:59 -07:00
qctecmdr
468bb1a57f Merge "msm-ipa: fix use-after-free of rt_tbl" 2021-10-07 16:57:12 -07:00
qctecmdr
3536e7af00 Merge "serial: msm_geni_serial: Avoid port pointer access for earlyconsole case" 2021-10-07 09:50:37 -07:00
Muralidharan M
3152811105 msm-ipa: fix use-after-free of rt_tbl
Fix use-after-free of rt_tbl in __ipa_del_flt_rule
by checking if the rt_tbl is already freed.

Change-Id: I09541f65f474dc42f262c603d99f6bbcbb0ce8ec
Signed-off-by: Muralidharan M <murm@codeaurora.org>
2021-10-07 18:05:15 +05:30
Sharath Chandra Vurukala
d33df102ac net: qualcomm: rmnet: enable support for cksumv3
Enables support for cksumv3 calculation.

Change-Id: Iccf092459cc23a2ed493c914e2d4089fabbc332a
Acked-by: Divyarajsinh Jhala <djhala@qti.qualcomm.com>
Signed-off-by: Sharath Chandra Vurukala <sharathv@codeaurora.org>
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2021-10-07 05:00:51 -07:00
qctecmdr
c3a5f5cfcc Merge "rpmsg: glink: Change error logging to avoid throttling" 2021-10-06 08:06:56 -07:00
Chandana Kishori Chiluveru
b3613d5d93 serial: msm_geni_serial: Avoid port pointer access for earlyconsole case
Add defensive check in msm_geni_serial_enable_interrupts to avoid
null pointer dereference issues with earlyconsole usecase.

Change-Id: I7a82a4a387583425c1926a59f7181d39889cba75
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2021-10-06 04:36:27 -07:00
Sarannya S
061f52b739 rpmsg: glink: Change error logging to avoid throttling
Avoid printing error when ENODEV is returned from glink callback
and use dev_err_ratelimited so that throttling will not happen
due to excessive logging.

Change-Id: I9369046c2f907ecd38416c8927764c7a8b7c1ca4
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
2021-10-06 15:14:59 +05:30
Vijayavardhan Vennapusa
daeafdcabe USB: gadget: f_uvc: Enable more controls for CT and PU
Enable more basic controls for Camera Terminal and Processing Unit

Change-Id: Ia3627731e05afa57c770439b958c9af51e42c630
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2021-10-05 21:12:48 -07:00
qctecmdr
8eaf52d7f0 Merge "USB: gadget: f_uvc: Enable required controls for CT and PU" 2021-10-05 08:28:22 -07:00
qctecmdr
e1eda9a5c9 Merge "wait: add wake_up_sync()" 2021-10-05 05:24:13 -07:00
qctecmdr
8c5c8420b0 Merge "fuse: give wakeup hints to the scheduler" 2021-10-05 05:24:05 -07:00
Yatish Kumar Singh
d89ef97fa7 serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer
Currently driver calculating stale delay based on baud rate during
stop_rx sequencer. When BT started with lower baud rate like 2400
this logic will add around 130msecs of extra delay during BT INIT.

This change will remove logic for stale delay calculation
based on baud rate and add constant delay of 10msec to
wait for stale interrupt during stop_rx_sequencer.

Change-Id: I566d79145ba887de71482642655b63c5bd640fc8
Signed-off-by: Yatish Kumar Singh <yatishku@codeaurora.org>
2021-10-05 03:44:54 -07:00
Rohan Sethi
3a9c5960d9 msm: kgsl: Add timeline traces
Add some traces to make it easier to debug and track timeline behavior.

Change-Id: Ic0dedbadbfe623c675616a0d2fdd800b49f14705
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
2021-10-04 12:49:33 +05:30
Jordan Crouse
d01a2bda03 msm: kgsl: Add software timelines
Some graphics APIs want the ability to create and use timelines
with 64 bit sequence numbers to synchronize between threads.

Add support for timelines that can be created, signaled and managed from
user space. Timelines can also be signaled from a draw context command
stream via an auxiliary command and a wait can be added as a sync object
to any GPU command.

Change-Id: Ic0dedbad0ffc99cc309951369eaf85b56727802c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
2021-10-04 12:48:09 +05:30
Linux Build Service Account
64b09e43c3 Merge 2d773a4e21 on remote branch
Change-Id: Ib9b3e0b249ea023e36a1db996bb57a9758673cdc
2021-09-30 10:48:22 -07:00
qctecmdr
7a50a7a361 Merge "serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer" 2021-09-29 08:37:33 -07:00
Yatish Kumar Singh
e374091555 serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer
Currently driver calculating stale delay based on baud rate during
stop_rx sequencer. When BT started with lower baud rate like 2400
this logic will add around 130msecs of extra delay during BT INIT.

This change will remove logic for stale delay calculation
based on baud rate and add constant delay of 10msec to
wait for stale interrupt during stop_rx_sequencer.

Change-Id: I566d79145ba887de71482642655b63c5bd640fc8
Signed-off-by: Yatish Kumar Singh <yatishku@codeaurora.org>
2021-09-29 16:19:47 +05:30
qctecmdr
42cae30da8 Merge "usb: f_mtp: Limit MTP Tx req length to 16k for ChipIdea" 2021-09-29 01:59:11 -07:00
qctecmdr
343ff3c9cb Merge "msm: ipa: Fix to free up all pending EOB pages" 2021-09-28 22:37:59 -07:00
Ajay Agarwal
0866f29257 usb: f_mtp: Limit MTP Tx req length to 16k for ChipIdea
Currently, the f_mtp driver marks the mtp_tx_req_len to 1M.
As a result, file transfer from device to host PC fails for
devices using ChipIdea controller since it does not allow request
length greater than 16k for IN Endpoint. Hence, to allow such
file transfers, limit Tx req length to 16k.

Change-Id: Ib9ca95880ca0b1a2f0c66817e54e9a7b2af53fe6
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
[ppratap@codeaurora.org : replace DBG with mtp_log]
Signed-off-by: Pratham Pratap <ppratap@codeaurora.org>
2021-09-29 10:28:25 +05:30
Pradeep P V K
4e2e0b5cf0 fuse: give wakeup hints to the scheduler
Use synchronous wakeup interface to wakeup the userspace daemon.
Scheduler can make use of this hint to find a better CPU for the
waker task.

Change-Id: I7d077235f9b8fe771869dd7e6fccee7d356d858b
Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-09-28 15:43:08 +05:30
Pradeep P V K
7e075c9bbb wait: add wake_up_sync()
The synchronous wakeup interface is available only for the interruptible
wakeup. Add it for normal wakeup.

Change-Id: Ia4460aa55690d14d203cdc843bd600c9e26c53f1
Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-09-28 11:59:05 +05:30
Jagadeesh Ponduru
8a0e38750d msm: ipa: Fix to free up all pending EOB pages
Make changes to free up all pending EOB pages when SKB allocation
used to handle EOT is failed as we could end up in a frag
overflow.

Change-Id: I80ae84d00d1bbf2cf89e97261d2fe8c3742eda04
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
2021-09-28 11:06:24 +05:30
Jordan Crouse
22ba0d986c msm: kgsl: Add the user API definition for timelines
Extend the KGSL uapi for the sempahore timeline APIs,
aux commands and syncobjs.

Change-Id: Ic0dedbadf7338b49da52ab9d0e54d5321217c3fd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
2021-09-27 15:54:11 +05:30
Prateek Raj Singh
85866d270d Add support for new HSP version
This patch contains changes for adding support for new HSP SoC versions.

CRs-Fixed: 2941918
Change-Id: I170bf26458dbeb84182ead97594c3dc605b1a64f
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-09-26 22:35:51 -07:00
qctecmdr
2d773a4e21 Merge "msm: ipa3: increasing the uC interrupt timeout value" 2021-09-25 01:48:43 -07:00
qctecmdr
8ff847b6c8 Merge "msm: synx: acquire ref of synx handle in each function" 2021-09-25 01:48:40 -07:00
Linyu Yuan
3015fd7f89 usb: dwc3: dwc3-msm: optimize perf vote work
static variable for irq_counter/perf_mode fail for multiple controller,
change to allocate them for each controller instance.

irq_cnt will record irq number for each perf work schedule duration,
it will clear when work execution/cancel.

Change-Id: I1e07277fcd609b37728a9a716cdf5f75ccc35d9b
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2021-09-24 02:19:27 -07:00
Mukesh Kumar Savaliya
e4c740102a i2c: i2c-qcom-geni: Change the high and low time for SCL
This change is to meet the spec for i2c at 400KHz. Note that there
is a QUP FW change along with this and then only this will work.
FW change takes care of the duty cycle, clock on/off.

Associated FW change is good to have for this SW change.
FW change CR :  TBD separately by HW team.
CR fixed : 3017809.

Change-Id: I2446b736ef5f6cfa5310f4a30a717272d433a655
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-09-24 00:36:25 +05:30
Eric Dumazet
bc79b64847 net: qrtr: fix a kernel-infoleak in qrtr_recvmsg()
struct sockaddr_qrtr has a 2-byte hole, and qrtr_recvmsg() currently
does not clear it before copying kernel data to user space.

It might be too late to name the hole since sockaddr_qrtr structure is uapi.

BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
CPU: 0 PID: 29705 Comm: syz-executor.3 Not tainted 5.11.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x21c/0x280 lib/dump_stack.c:120
 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
 kmsan_internal_check_memory+0x202/0x520 mm/kmsan/kmsan.c:402
 kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
 instrument_copy_to_user include/linux/instrumented.h:121 [inline]
 _copy_to_user+0x1ac/0x270 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:209 [inline]
 move_addr_to_user+0x3a2/0x640 net/socket.c:237
 ____sys_recvmsg+0x696/0xd50 net/socket.c:2575
 ___sys_recvmsg net/socket.c:2610 [inline]
 do_recvmmsg+0xa97/0x22d0 net/socket.c:2710
 __sys_recvmmsg net/socket.c:2789 [inline]
 __do_sys_recvmmsg net/socket.c:2812 [inline]
 __se_sys_recvmmsg+0x24a/0x410 net/socket.c:2805
 __x64_sys_recvmmsg+0x62/0x80 net/socket.c:2805
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x465f69
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f43659d6188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69
RDX: 0000000000000008 RSI: 0000000020003e40 RDI: 0000000000000003
RBP: 00000000004bfa8f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010060 R11: 0000000000000246 R12: 000000000056bf60
R13: 0000000000a9fb1f R14: 00007f43659d6300 R15: 0000000000022000

Local variable ----addr@____sys_recvmsg created at:
 ____sys_recvmsg+0x168/0xd50 net/socket.c:2550
 ____sys_recvmsg+0x168/0xd50 net/socket.c:2550

Bytes 2-3 of 12 are uninitialized
Memory access of size 12 starts at ffff88817c627b40
Data copied to user address 0000000020000140


Fixes: bdabad3e36 ("net: Add Qualcomm IPC router")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Courtney Cavin <courtney.cavin@sonymobile.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Change-Id: Ia9a1f07114272dc78a471c3c271358b34ebb3dc3
Git-commit: 50535249f624d0072cd885bcdce4e4b6fb770160
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: PavanKumar S.R. <pavasr@codeaurora.org>
2021-09-23 13:34:45 +05:30
Jann Horn
25cf99c881 tty: Fix ->session locking
commit c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9 upstream.

Currently, locking of ->session is very inconsistent; most places
protect it using the legacy tty mutex, but disassociate_ctty(),
__do_SAK(), tiocspgrp() and tiocgsid() don't.
Two of the writers hold the ctrl_lock (because they already need it for
->pgrp), but __proc_set_tty() doesn't do that yet.

On a PREEMPT=y system, an unprivileged user can theoretically abuse
this broken locking to read 4 bytes of freed memory via TIOCGSID if
tiocgsid() is preempted long enough at the right point. (Other things
might also go wrong, especially if root-only ioctls are involved; I'm
not sure about that.)

Change the locking on ->session such that:

 - tty_lock() is held by all writers: By making disassociate_ctty()
   hold it. This should be fine because the same lock can already be
   taken through the call to tty_vhangup_session().
   The tricky part is that we need to shorten the area covered by
   siglock to be able to take tty_lock() without ugly retry logic; as
   far as I can tell, this should be fine, since nothing in the
   signal_struct is touched in the `if (tty)` branch.
 - ctrl_lock is held by all writers: By changing __proc_set_tty() to
   hold the lock a little longer.
 - All readers that aren't holding tty_lock() hold ctrl_lock: By
   adding locking to tiocgsid() and __do_SAK(), and expanding the area
   covered by ctrl_lock in tiocspgrp().

Cc: stable@kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ie8d8de63b1694803d8650b62993ca86a456831be
Git-commit: 361e822b7d8a9d06d88f7cea0fdb0fb6e41c4d45
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: PavanKumar S.R. <pavasr@codeaurora.org>
2021-09-23 12:36:28 +05:30
Jagadeesh Ponduru
be692ef32e msm: ipa3: increasing the uC interrupt timeout value
Increased the timeout value of ipa3_uc_send_cmd
from 10 to 20 in ipa3_uc_debug_stats_alloc function.

Change-Id: I5be5839c60b84226872a22e8a05bb712e395e62d
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
2021-09-22 21:34:44 +05:30
qctecmdr
c96bcb72d0 Merge "soc: qcom: Set QOS only to silver cluster" 2021-09-22 07:33:29 -07:00
qctecmdr
9d29e4d35a Merge "msm: synx: fix synx_release_core race condition" 2021-09-22 04:27:54 -07:00
Kamal Agrawal
255a99c332 msm: kgsl: Fix out of bound write in adreno_profile_submit_time
Make sure there is enough room in the memory descriptor to store the
entire profiling buffer object.

Change-Id: I1e1c73097bb2bba9645b0a3c66fdbbc71d8ba8fa
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-09-21 07:11:31 -07:00
Vivek Golani
440ae62ce3 diag: Update log and event mask code ranges
Modify log and event mask code ranges to reflect
latest requirements.

Change-Id: I4bf5c2dad7622d9c677805b48e7dd560e0e90d1c
Signed-off-by: Vivek Golani <vgolani@codeaurora.org>
2021-09-21 11:07:35 +05:30
qctecmdr
5157d05415 Merge "soc: qcom: smem: Update size of legacy partition" 2021-09-20 22:26:07 -07:00
Bavyasritha Alahari
197ef58c68 soc: qcom: Set QOS only to silver cluster
CDSPRM module implements a RPMSG interface to communicate with CDSP
while providing a way for CDSP to vote for CPU QoS to benefit CDSP
applications performance.Glink IRQ mostly is taken by the
silver cluster.CDSPRM driver vote for sliver cluster prevents
collapsing gold cluster.This saves significant power.

Change-Id: I6cac71e7ab85d823dfc44b19dd85a0dde62455db
Acked-by: Sreekanth Gande <sgande@qti.qualcomm.com>
Signed-off-by: Bavyasritha Alahari <alahari@codeaurora.org>
2021-09-20 17:29:20 +05:30
Linux Build Service Account
6d8eafcd80 Merge 28ba9d136c on remote branch
Change-Id: Ifaed6711ede356b97f59b72d15eafe5fc8188d40
2021-09-19 21:47:37 -07:00
qctecmdr
a88c3ae441 Merge "dwc3-msm: Move override usb speed functionality outside edev check" 2021-09-17 05:52:38 -07:00
qctecmdr
01bf131abc Merge "usb: f_mtp: Don't handle OS descriptors from MTP driver" 2021-09-17 02:12:12 -07:00
Mayank Rana
2965c6b6d4 dwc3-msm: Move override usb speed functionality outside edev check
Currently usb speed override functionality doesn't work as expected
when usb role switch based notification is used. Hence move usb speed
override functionality out side edev check within dwc3_resume_work()
API. Also update maximum_speed as max hw supported speed out side
edev check.

Change-Id: I69b066721490277b77333d2caf820b6c87703501
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2021-09-17 12:30:15 +05:30