Commit graph

894,770 commits

Author SHA1 Message Date
Shreyas K K
bd8c08cabf drivers: pinctrl: qcom: Add SM6150 pinctrl driver
Add initial pinctrl driver to support pin configuration with
pinctrl framework for SM6150. This driver is a snapshot of
pinctrl-sm6150.c from msm-4.14 at commit-id "69d710e4".

Change-Id: I208418d59378550f049fb905151939fc4b73480e
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-01-15 11:48:38 +05:30
Jeya R
1613295638 adsprpc: Pass virtual address during ram dump collection
If virtual address is not passed during ramdump collection,
the CMA region gets remapped during ioremap call. By passing
the virtual address in the do_ramdump_elf call, the CMA
doesn't get remapped.

Change-Id: Ice98e7947b977c5edffcbf9f3c5b0d3c6a34ef52
Acked-by: Vishnu Karthik D <vikarthi@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2021-01-15 11:35:29 +05:30
Chandrasekhar Mattaparthy
1407bf2ffc defconfig: monaco_go: Resolve bootup issue
added SELINUX/DM verify missing configs.

Change-Id: Ic25da0315220faad47ce9c158c0ff7aff476e523
Signed-off-by: Chandrasekhar Mattaparthy <cmatta@codeaurora.org>
2021-01-14 21:32:12 -08:00
Archit Saxena
f1609ace18 defconfig: Add initial defconfig fragments for monaco
Add initial debug and perf defconfig fragments for monaco.

Change-Id: Ia9c8c9bb0baeec49654f7f1fec7c0302a3fc583f
Signed-off-by: Archit Saxena <archsaxe@codeaurora.org>
Signed-off-by: Nagireddy Annem <nannem@codeaurora.org>
2021-01-14 21:29:24 -08:00
priyankar
1d2a517eb7 Add support for Moselle SoC (WCN6750)
This patch contain changes for supporting new
BT chip moselle.

Change-Id: Ib5aaa4b7dde7accf186593df93bf65e475177f1f
Signed-off-by: priyankar <prigup@codeaurora.org>
2021-01-15 10:38:55 +05:30
qctecmdr
4b36c63809 Merge "defconfig: gen3auto: Enable cpufreq governors" 2021-01-14 15:49:40 -08:00
qctecmdr
75d39d367e Merge "power: smb1351-charger: Add support for OTG IRQ" 2021-01-14 15:49:39 -08:00
qctecmdr
3ce3cb417d Merge "defconfig: Add initial defconfig fragments for Quin virtual machine" 2021-01-14 15:49:39 -08:00
qctecmdr
dd229f78fa Merge "virtio_mmio: add support to set a virtio device as wakeup source" 2021-01-14 15:49:38 -08:00
qctecmdr
d44a2bd999 Merge "icnss2: Add support for WPSS SSR" 2021-01-14 15:49:37 -08:00
qctecmdr
850659894f Merge "drivers: char: msm_smd_pkt: Return error in case driver is not ready" 2021-01-14 15:49:37 -08:00
qctecmdr
d85421988c Merge "firmware: qcom_scm: Add calls to support MSS restart" 2021-01-14 15:49:36 -08:00
qctecmdr
612dc0a6f2 Merge "defconfig: enable memory dump on sdxnightjar" 2021-01-14 15:49:36 -08:00
qctecmdr
13277e5bcf Merge "usb: misc: Add support for test modes via external hub" 2021-01-14 15:49:35 -08:00
Jack Pham
8644c9630e usb: f_gsi: Increase ADPL buffer depth to 30
During high embedded throughput workloads having ADPL enabled
may impact performance as it becomes a bottleneck for IPA if
log packets are not drained quickly enough. To alleviate this,
increase the number of buffers allocated for the ADPL GSI pipe
to 30 allow for the USB host to consume log packets from the
ADPL endpoint as fast as possible.

Change-Id: I33102608367e71a4e75837f8d2a396f20f386b7a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2021-01-14 14:40:30 -08:00
Peter Collingbourne
fd0edef76b BACKPORT: FROMGIT: mm: improve mprotect(R|W) efficiency on pages referenced once
In the Scudo memory allocator [1] we would like to be able to detect
use-after-free vulnerabilities involving large allocations by issuing
mprotect(PROT_NONE) on the memory region used for the allocation when it
is deallocated.  Later on, after the memory region has been "quarantined"
for a sufficient period of time we would like to be able to use it for
another allocation by issuing mprotect(PROT_READ|PROT_WRITE).

Before this patch, after removing the write protection, any writes to the
memory region would result in page faults and entering the copy-on-write
code path, even in the usual case where the pages are only referenced by a
single PTE, harming performance unnecessarily.  Make it so that any pages
in anonymous mappings that are only referenced by a single PTE are
immediately made writable during the mprotect so that we can avoid the
page faults.

This program shows the critical syscall sequence that we intend to use in
the allocator:

  #include <string.h>
  #include <sys/mman.h>

  enum { kSize = 131072 };

  int main(int argc, char **argv) {
    char *addr = (char *)mmap(0, kSize, PROT_READ | PROT_WRITE,
                              MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
    for (int i = 0; i != 100000; ++i) {
      memset(addr, i, kSize);
      mprotect((void *)addr, kSize, PROT_NONE);
      mprotect((void *)addr, kSize, PROT_READ | PROT_WRITE);
    }
  }

The effect of this patch on the above program was measured on a
DragonBoard 845c by taking the median real time execution time of 10 runs.

Before: 3.19s
After:  0.79s

The effect was also measured using one of the microbenchmarks that
we normally use to benchmark the allocator [2], after modifying it
to make the appropriate mprotect calls [3]. With an allocation size
of 131072 bytes to trigger the allocator's "large allocation" code
path the per-iteration time was measured as follows:

Before: 33364ns
After:   6886ns

This patch means that we do more work during the mprotect call itself
in exchange for less work when the pages are accessed. In the worst
case, the pages are not accessed at all. The effect of this patch in
such cases was measured using the following program:

  #include <string.h>
  #include <sys/mman.h>

  enum { kSize = 131072 };

  int main(int argc, char **argv) {
    char *addr = (char *)mmap(0, kSize, PROT_READ | PROT_WRITE,
                              MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
    memset(addr, 1, kSize);
    for (int i = 0; i != 100000; ++i) {
  #ifdef PAGE_FAULT
      memset(addr + (i * 4096) % kSize, i, 4096);
  #endif
      mprotect((void *)addr, kSize, PROT_NONE);
      mprotect((void *)addr, kSize, PROT_READ | PROT_WRITE);
    }
  }

With PAGE_FAULT undefined (0 pages touched after removing write
protection) the median real time execution time of 100 runs was measured
as follows:

Before: 0.325928s
After:  0.365493s

With PAGE_FAULT defined (1 page touched) the measurements were
as follows:

Before: 0.441516s
After:  0.380251s

So it seems that even with a single page fault the new approach is faster.

I saw similar results if I adjusted the programs to use a larger mapping
size.  With kSize = 1048576 I get these numbers with PAGE_FAULT undefined:

Before: 1.563078s
After:  1.607476s

i.e. around 3%.

And these with PAGE_FAULT defined:

Before: 1.684663s
After:  1.683272s

i.e. about the same.

What I think we may conclude from these results is that for smaller
mappings the advantage of the previous approach, although measurable, is
wiped out by a single page fault.  I think we may expect that there should
be at least one access resulting in a page fault (under the previous
approach) after making the pages writable, since the program presumably
made the pages writable for a reason.

For larger mappings we may guesstimate that the new approach wins if the
density of future page faults is > 0.4%.  But for the mappings that are
large enough for density to matter (not just the absolute number of page
faults) it doesn't seem like the increase in mprotect latency would be
very large relative to the total mprotect execution time.

Link: https://lkml.kernel.org/r/20201230004134.1185017-1-pcc@google.com
Link: https://linux-review.googlesource.com/id/I98d75ef90e20330c578871c87494d64b1df3f1b8
Link: [1] https://source.android.com/devices/tech/debug/scudo
Link: [2] https://cs.android.com/android/platform/superproject/+/master:bionic/benchmarks/stdlib_benchmark.cpp;l=53;drc=e8693e78711e8f45ccd2b610e4dbe0b94d551cc9
Link: [3] https://github.com/pcc/llvm-project/commit/scudo-mprotect-secondary
Signed-off-by: Peter Collingbourne <pcc@google.com>
[pcc: resolved minor conflict]
Cc: Kostya Kortchinsky <kostyak@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
(cherry picked from commit 2a9e75c907fa2de626d77dd4051fc038f0dbaf52
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Bug: 135772972
Change-Id: I98d75ef90e20330c578871c87494d64b1df3f1b8
2021-01-14 22:08:03 +00:00
Guru Das Srinagesh
084fe9ff3c power: smb1398: Handle USB power path suspension appropriately
Unsuspend USB power path (turn off USB-path front-porch FET) before
enabling, and suspend it upon disabling SMB1398.

Change-Id: I319c215861f82cb2fb96504c38993c6eb03c38a7
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2021-01-14 12:44:15 -08:00
Todd Kjos
fec1dfacf2 ANDROID: simplify vendor hooks for non-GKI builds
Vendor hooks required explicitly defining macros or inline functions
to handle the non-GKI build case (!CONFIG_ANDROID_VENDOR_HOOKS). Added
support for generating them automatically so the macros are no longer
required.

Both models are now supported so we can transition.

Bug: 177416721
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I01acc389d315a5d509b0c48116854342a42e1058
2021-01-14 11:05:22 -08:00
Lakshit Tyagi
e69ab13f6c defconfig: sdxlemur: Enable AQC IPA offload feature
Enable AQC IPA offload feature.

Change-Id: I0e77717dd1635071261435e0c093f89e709a2944
Signed-off-by: Lakshit Tyagi <ltyagi@codeaurora.org>
2021-01-14 11:09:38 -05:00
qctecmdr
e53264fa85 Merge "scsi: ufs: Disable interrupt in reset path" 2021-01-14 07:42:51 -08:00
qctecmdr
83b9923573 Merge "defconfig: Disable bluetooth config for sdxnightjar" 2021-01-14 07:42:50 -08:00
qctecmdr
52b474920b Merge "Bluetooth: Add support for QCA61X4/QCA937x series BT SoC" 2021-01-14 07:42:50 -08:00
qctecmdr
6208600e96 Merge "slim-msm-ngd: Disable core irq in SSR/PDR Down notification" 2021-01-14 07:42:50 -08:00
qctecmdr
9e542aad4f Merge "cnss2: Avoid to reject suspend pci for non DRV connected platform" 2021-01-14 07:42:49 -08:00
qctecmdr
3aacc1d72e Merge "msm: adsprpc: null pointer check for sctx" 2021-01-14 07:42:49 -08:00
qctecmdr
14f60362de Merge "defconfig: gen3auto: Enable service locator and notifier" 2021-01-14 07:42:49 -08:00
qctecmdr
3a016ea4fe Merge "backlight: qcom-spmi-wled: Add support for PM7325B WLED" 2021-01-14 07:42:48 -08:00
qctecmdr
0a38c43775 Merge "phy: ufs: Add UFS PHY support for yupik" 2021-01-14 06:21:57 -08:00
qctecmdr
31d628e3fd Merge "msm: ipa: enable more SIDs" 2021-01-14 06:21:56 -08:00
qctecmdr
fee290643a Merge "msm-cpufreq: fix cpufreq compile error problem" 2021-01-14 06:21:56 -08:00
qctecmdr
3ff8775b55 Merge "net: aquantia: Adding IPA glue layer" 2021-01-14 06:21:55 -08:00
qctecmdr
bba59bd13c Merge "defconfig: sdxlemur: Enable IOSS" 2021-01-14 06:21:55 -08:00
qctecmdr
dbb084194a Merge "clk: qcom: debugcc-yupik: Update all PCIE clocks to measure only" 2021-01-14 06:21:54 -08:00
qctecmdr
fde383ce77 Merge "msm: ipa: IPA offload subsystem for ethernet devices" 2021-01-14 06:21:53 -08:00
qctecmdr
2cf3ec57be Merge "msm: kgsl: Vote for l3 via icc_set_bw" 2021-01-14 06:21:52 -08:00
Mohammed Siddiq
9399e4a15a cnss2: Add code to do PCIe L2 suspend/resume during link recovery
Add code to do PCIe L2 suspend/resume during link down recovery.

Change-Id: I495d63b6cd7d826e7fbff627b3fe74af51c56099
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-01-14 19:22:04 +05:30
Kai Liu
70d7837d2d cnss2: retry mhi suspend in case packets are pending in MHI layer
Platform driver sends QMI message to get device status,
after it receives response, it will suspend device,
but at that time QRTR might been sending some flow control packets,
so mhi layer will reject suspend because packets are still pending,
platform driver retry suspend to cover this corner case.

Change-Id: I1c2e4a490e525199929095579cc6c6e975f88736
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
2021-01-14 15:35:03 +08:00
Fenglin Wu
999e081a26 input: qcom-hv-haptics: ensure HBoost is ready before the play
HBoost is required to be in disabled state before triggering the play.
Check this through DTEST1 signal and ensure the HBoost is ready before
serving a new vibration request.

Change-Id: I0d4b73fef39aa6da15abbb832369579221665d07
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-01-14 12:05:18 +08:00
Mike Tipton
c008036f9d defconfig: sdxlemur: Enable clock debug features
Enable QCOM-specific clock debug features required for testing on both
perf and debug builds.

Change-Id: Ib13e4003e8a80ed00973095c65dacf9bb169e19d
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2021-01-13 10:34:12 -08:00
Wu Gao
fa96928b6a defconfig: sdxlemur: Enable CONFIG_QCOM_MEMORY_DUMP_V2
Enable CONFIG_QCOM_MEMORY_DUMP_V2 to colloect wlan fw dump.

Change-Id: I83a4c90dd7596c036c11a2cce35a13484f790d26
Signed-off-by: Wu Gao <wugao@codeaurora.org>
2021-01-13 22:56:14 +08:00
Rohan Sethi
6a62cbaada msm: kgsl: Add GPU snapshot to minidump
Add support for dumping GPU snapshot in minidump. Register
snapshot region with minidump table.

Change-Id: I1ccf0a0b7f6f8f57b3e4b034f28ce3575b63001c
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
2021-01-13 05:19:03 -08:00
Akash Asthana
846289482b tty: serial: msm_geni_serial: Fix timeout for Rx abort
Fix false warning for RX abort command. Abort command sets abort
interrupt bit in s_irq_status register. Separate it from dma_rx_stat
block to handle it independently.

Interrupts generated for RX abort:
sirq:0x21 mirq:0x80000000 dma_txirq:0x0 dma_rxirq:0x0.

Change-Id: I927de3924f7527068807fadcd4f83742638ae802
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
2021-01-13 15:24:20 +05:30
Akash Asthana
6318d62c82 serial: msm_geni_serial: Fix false warning for reset failure
Set command completion after receiving reset interrupt.

Change-Id: I5a19fbc055eaa73d5a724144e65b276886a97d6b
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
2021-01-13 15:16:51 +05:30
Naman Padhiar
85d5319625 icnss2: Increase filename array size
Increase filename array size to accommodate qdss config
file name.

Change-Id: Ifa7d93dff86f78efd264403eaf285bb90bd79764
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-01-13 14:25:41 +05:30
Rohith Kollalsi
22ab398eaa usb: dwc3: gadget: Replace dev with its parent sysdev in ep_disable
Currently when device enters lpm, runtime resume is called on dev
instead of its parent sys dev in ep_disable. Since dev is in
suspended state during ep_disable it is leading to a warning
from runtime.c when trying to perform a runtime resume. Also it
is not correct to resume dev in ep_disable as sys dev which is
associated with dwc3_msm is responsible to bring the clocks into
active state and perform a runtime resume. Hence replace dev here
with sys dev.

Change-Id: If9515e73129f4607adb8fa7d41ce7165efca3782
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-01-13 14:14:08 +05:30
Paul Zhang
7a94005308 defconfig: Enable cnss for sdxnightjar
Enable cnss for sdxnightjar.

CRs-Fixed: 2854168
Change-Id: I5edce0f34290c27c69dc57eff80c22c1ec6eac11
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
2021-01-13 15:50:40 +08:00
Yuanfang Zhang
16aa569c55 defconfig: enable memory dump on sdxnightjar
Enable memory dump V2 on sdxnightjar.

Change-Id: I5320654a79cf4e9e5b8051130b16ea4ad8472d9f
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2021-01-12 23:13:18 -08:00
Paras Sharma
0df046ba49 serial: msm_geni_serial: Vote for shutdown pinctrl during BT off
Currently driver is voting for active/sleep state configuration
during BT disconnect. Since this state contains UART functionality,
GPIO pins remains high which consumes power. This change is added
to vote for the shutdown pinctrl state during BT disconnect and
configure GPIO's in gpio functionality. This is a requirement
from BT SOC team.

Change-Id: I09f7a4a1dbc197c2bfd443a0b546a1ff283134ed
Signed-off-by: Paras Sharma <parashar@codeaurora.org>
2021-01-13 11:04:27 +05:30
Prakash Gupta
127056a03a ion: msm: dump invalid heap id
When invalid heap id is passed through DT, ion probe fails for all ion
heaps. Dumping heap id will help identify the erroneous heap.
Trigger panic in case of ion dt parse failure.

Change-Id: I60a84e23b415c464b16af25072638a7efd7ffeae
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2021-01-13 10:58:32 +05:30
Kamal Agrawal
a6185ebfcb msm: kgsl: Remove debugfs directory inside lock
In kgsl_process_private_close, debugfs directory is removed after mutex
is unlocked. Considering this, a race can be created between
kgsl_process_private_close and kgsl_process_init_debugfs. Fix it by
moving debugfs directory removal inside lock.

Change-Id: Ida65ab8a3825d8c695c56556860495cce853117c
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-01-13 09:14:19 +05:30