Commit graph

884,719 commits

Author SHA1 Message Date
Bhaumik Bhatt
5e803bd9f5 mhi: cntrl: qcom: Add support for fatal error processing
MHI controller needs to handle the fatal error callback issued by the
bus in case reset separation needs to be supported. This state will
occur as a SYS ERROR state with the device being in PBL. Perform a
full power cycle and issue an MHI RESET during power down.

Change-Id: I467943924302ba773c8f6d0c4ad09b51faaeb490
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-09 15:53:48 -07:00
Bhaumik Bhatt
b101ff3a36 mhi: core: block unbind from userspace till channel reset
MHI clients can unbind driver from userspace while a channel
is active with ongoing transfers. As we can only do host side
clean-up of the channel without sending a reset channel command
to the device, a kernel panic could occur due to incoming
packets if we proceed. Wait until the client unprepares the
channel or device goes to an error state.

Change-Id: I400cbf799d96fb7bc05df4c568593e12e9dc41f1
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-09 15:53:34 -07:00
Bhaumik Bhatt
41ded75b51 mhi: core: Add extra checks for RDDM event handling
If the device enters RDDM when the host is in a fast/DRV suspended
state, MHI host may end up skipping the check from BHI interrupt
handling as a host resume may remain pending for a while. Once the
host resume is triggered by the controller, MHI host can either
walk the primary event ring to discover the RDDM EE event or check
the execution environment post the DRV resume and notify the
controller of the error condition as fallbacks to the original
method of using the BHI interrupt.

Change-Id: I93b678981a5ffd640c1dce15b90bf7bcd2e24971
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-09 15:53:16 -07:00
Bhaumik Bhatt
c0eefd8b51 mhi: core: move PM state to SYS_ERROR if the event arrives before RDDM
Allow a move to SYS_ERROR if its arrival precedes that of an
RDDM entry notification so that the core driver remains inactive
for that period in its anticipation.

Change-Id: I6222430f34528f8b5f4c3d3d544ebc359ed05708
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-09 15:52:55 -07:00
Bhaumik Bhatt
cc96a97351 cnss2: set rddm support boolean for MHI
Set the RDDM support boolean at power up for MHI to know that the
device can enter RDDM execution environment. It can decide to skip
SYS_ERROR handling based on the boolean whereas allow other aspects
such as collection ramdumps if sufficient support is present.

Change-Id: Iee74b6ae61166ea48617e1b75f05841079e1b83b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:31:25 -07:00
Bhaumik Bhatt
e2bb50da93 mhi: core: Move power down check within the RDDM image support
If a controller supports RDDM, there is no need to process a SYS_ERROR.
Hence, we can safely move the power down state check to reside within an
RDDM supported controller as it allows for other controllers to handle
scenarios such as receiving an early SYS_ERROR when in the PBL execution
environment.

Change-Id: I5c63a861b9dd178f5c967bdf252da9c47d3a2b56
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:31:08 -07:00
Bhaumik Bhatt
20aba7d1d7 mhi: core: Separate rddm support and dump collection
As of now, there is no way for MHI to know if device supports RDDM
and host controller wishes to skip ramdump collection. Allow for
that by letting the controller set the rddm support boolean which
indicates device side support. If rddm_size is set to zero while
the support for RDDM is present, that indicates disinterest in
ramdump collection if RDDM execution environment is entered.

Change-Id: I0a36219fc7782951aa1b81b9ec0d182ecfb3a916
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:30:39 -07:00
Bhaumik Bhatt
7eee98e175 mhi: cntrl: qcom: expand debug modes for new device bringup
When bringing up a new device attach to the host driver, MHI
controller can have more than one debug mode to allow for
configurable versions and make it easier to choose firmware
images and allow/disallow forced suspend/resume done to choose
new PHY settings.

Change-Id: Id2ecd98cfbaba40aca96bd167c34bfa5fd03818e
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:56 -07:00
Bhaumik Bhatt
7973005538 mhi: core: move certain logs to controller log buffer
Certain important and less frequently occurring logs can be
moved to controller log buffer to monitor bootup and shutdown.

Change-Id: I602d99adcdf8415e29930867cbcaa62d043deff0
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:41 -07:00
Bhaumik Bhatt
ef5838d49b mhi: cntrl: qcom: move certain logs to controller log buffer
Certain important and less frequently occurring logs can be
moved to controller log buffer to monitor bootup and shutdown.

Change-Id: I26d0ade3562c925ac533c51c6d5613c40a836813
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:23 -07:00
Bhaumik Bhatt
ecac4a2d50 mhi: cntrl: qcom: reduce timesync and bootlogger log buffer size
Much of the IPC log buffer size allocated to the sparsely
used time synchronization is unused and bootlogger is allocated
more than it needs. Reduce the sizes for the same.

Change-Id: I342cd077d00d38a0fb737605e6e43577edc05396
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:06 -07:00
Bhaumik Bhatt
938de35a9d mhi: cntrl: qcom: add support for controller ipc logs
Enable support for dedicated bootup and shutdown controller
IPC logs.

Change-Id: I569691d718caa6847bbd992b4d169da569c1d12b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:28:49 -07:00
Bhaumik Bhatt
7b037a401a cnss2: add support for controller IPC logs
Controller IPC logs support bootup and shutdown logs which can
help in easier debug.

Change-Id: I10e37641559473a14a7ebab65562ffcfb9d95ab6
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:28:30 -07:00
Bhaumik Bhatt
aa75fcc7cf mhi: core: add log buffer for controller bootup and shutdown
Add support in the MHI controller for a dedicated bootup and
shutdown log buffer and fix log message macros.

Change-Id: I6425107b9e2a048b44d8912051486d3aaa2abdac
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:27:57 -07:00
qctecmdr
0ea391bae1 Merge "input: qcom-hv-haptics: restore RC calibration mode after FIFO playing" 2020-06-26 19:54:05 -07:00
qctecmdr
3dd4d83071 Merge "msm: adsprpc: limit number of cached buffers" 2020-06-26 19:54:05 -07:00
qctecmdr
ff524f07c1 Merge "msm: cvp: add trace utililty for systrace profiling" 2020-06-26 19:54:05 -07:00
qctecmdr
de04ebc9bc Merge "dt-bindings: clock: Add support for clock ids for SDXLEMUR" 2020-06-26 19:54:04 -07:00
qctecmdr
0cce5e66e8 Merge "defconfig: Enable MPM driver for Holi" 2020-06-26 19:54:04 -07:00
qctecmdr
8f161b7b67 Merge "power: smb1355: Add snapshot of SMB1355 charger driver" 2020-06-26 17:34:07 -07:00
qctecmdr
ee8ac78d1c Merge "config: Enable module signature in generic defconfig" 2020-06-26 17:34:07 -07:00
qctecmdr
79e3420f98 Merge "defconfig: msm: Disable CONFIG_MSM_TZ_LOG from perf builds" 2020-06-26 17:34:06 -07:00
qctecmdr
95d17c2e1d Merge "scsi: ufshcd: Properly set the device Icc Level" 2020-06-26 17:34:06 -07:00
qctecmdr
8119c34119 Merge "soc: qcom: hwkm: Re-format cmd packet for system kdf" 2020-06-26 17:34:05 -07:00
Raghavendra Kakarla
7ad3e81608 defconfig: Enable MPM driver for Holi
Enable MPM interrupt controller driver to program
the APSS wakeup capable interrupts to RPM MSG RAM.

Change-Id: Ic62b0f82cc4c6172924625ee6e5eda3e6358c613
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-06-26 03:09:45 -07:00
Naveen Yadav
9ad0572fd9 dt-bindings: clock: Add support for clock ids for SDXLEMUR
Add clock IDs for GCC and APSSCC clients to be able to request
for clocks from these clock controllers.

Change-Id: Ifc6acdbd05398e2f501cdc2cfb8694b16eb9b866
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-06-26 14:09:32 +05:30
Prerna Kalla
128b900f89 defconfig: msm: Disable CONFIG_MSM_TZ_LOG from perf builds
DEBUGFS will be disabled on android R perf builds. Since tz logs
are dependent on debugfs, CONFIG_MSM_TZ_LOG needs to be removed
as well.

Change-Id: I88211eb98cfbf64b2fe444c8fc0d4e122bebf7cb
Signed-off-by: Prerna Kalla <prernak@codeaurora.org>
2020-06-26 00:17:23 -07:00
Gaurav Kashyap
fd16bf9689 soc: qcom: hwkm: Re-format cmd packet for system kdf
1. Fix to format context correctly as expected by
   hardware for system KDF.
   HWKM reverses bytes at a 8-byte boundary while getting
   the context from cryptolib. Reformat the context in the
   command packet in such a way that HWKM receives it in the
   correct order. Also, pad the context to a 8-byte multiple
   as the way HW would pad it is not expected.
2. Use context for FBE to match with the one
   for VTS test cases.

Change-Id: I3c13c91b0dfc85aef406b05694dbd22afb0b2e0b
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
2020-06-25 20:47:05 -07:00
qctecmdr
6e625d330f Merge "mm: Fix sleeping while atomic during speculative page fault" 2020-06-25 19:09:40 -07:00
qctecmdr
1f2a0ad6f9 Merge "Merge android-5.4-stable.32 (724ffa0) into msm-5.4" 2020-06-25 14:38:28 -07:00
qctecmdr
7727556160 Merge "ufs: sysfs: Use snprintf instead of sprintf" 2020-06-25 04:55:02 -07:00
qctecmdr
a8c8cc0763 Merge "msm: cvp: Increase delay during AXI reset pulse" 2020-06-25 04:55:01 -07:00
qctecmdr
bba2f13464 Merge "power: smb1398: Add snapshot of driver" 2020-06-25 04:55:01 -07:00
qctecmdr
5027ca7013 Merge "memshare: Add debug logs to track subsystem notification" 2020-06-25 04:55:01 -07:00
qctecmdr
29909395db Merge "msm: kgsl: Add support to toggle GPU GX CPR loop enable" 2020-06-25 04:55:00 -07:00
qctecmdr
080901e562 Merge "cpufreq: qcom: cpufreq-hw: Remove enable of GT_IRQ for EPSS" 2020-06-25 04:55:00 -07:00
qctecmdr
cac85f094b Merge "scsi: Block reset attempts to UFS through scsi ioctl" 2020-06-25 01:48:41 -07:00
qctecmdr
524546f263 Merge "scsi: ufs: Record last intr status and its timestamp" 2020-06-24 22:34:01 -07:00
qctecmdr
adc8e47e36 Merge "mmc: Kconfig: Change MMC_SDHCI_MSM to be static module" 2020-06-24 22:34:01 -07:00
qctecmdr
fac58968a5 Merge "soc: qcom: hwkm: check key size before unwrap" 2020-06-24 22:34:01 -07:00
Shyam Kumar Thella
17d59b158f power: smb1355: Add snapshot of SMB1355 charger driver
Add snapshot of smb1355 charger driver as of msm-4.19
'commit 9f2b8d8b1a ("trace: increase caller depth for preempt/irqs
disable events")'.

Change-Id: I91f456c8385cb70d6e3dcface4239ea35140c080
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2020-06-25 10:02:21 +05:30
Blagovest Kolenichev
72fdae88b0 Merge android-5.4-stable.32 (724ffa0) into msm-5.4
* refs/heads/tmp-724ffa0:
  Linux 5.4.32
  iommu/vt-d: Allow devices with RMRRs to use identity domain
  drm/i915: Fix ref->mutex deadlock in i915_active_wait()
  fbcon: fix null-ptr-deref in fbcon_switch
  blk-mq: Keep set->nr_hw_queues and set->map[].nr_queues in sync
  RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
  Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
  RDMA/siw: Fix passive connection establishment
  RDMA/cma: Teach lockdep about the order of rtnl and lock
  RDMA/ucma: Put a lock around every call to the rdma_cm layer
  include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap
  ceph: canonicalize server path in place
  ceph: remove the extra slashes in the server path
  ARM: imx: only select ARM_ERRATA_814220 for ARMv7-A
  ARM: imx: Enable ARM_ERRATA_814220 for i.MX6UL and i.MX7D
  IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads
  IB/hfi1: Fix memory leaks in sysfs registration and unregistration
  IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
  ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
  platform/x86: intel_int0002_vgpio: Use acpi_register_wakeup_handler()
  ACPI: PM: Add acpi_[un]register_wakeup_handler()
  hwrng: imx-rngc - fix an error path
  tools/accounting/getdelays.c: fix netlink attribute length
  slub: improve bit diffusion for freelist ptr obfuscation
  uapi: rename ext2_swab() to swab() and share globally in swab.h
  usb: dwc3: gadget: Wrap around when skip TRBs
  random: always use batched entropy for get_random_u{32,64}
  s390: prevent leaking kernel address in BEAR
  r8169: change back SG and TSO to be disabled by default
  mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
  tun: Don't put_page() for all negative return values from XDP program
  slcan: Don't transmit uninitialized stack data in padding
  net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
  net_sched: fix a missing refcnt in tcindex_init()
  net_sched: add a temporary refcnt for struct tcindex_data
  net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
  net: dsa: mt7530: fix null pointer dereferencing in port5 setup
  net: dsa: bcm_sf2: Ensure correct sub-node is parsed
  net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
  ipv6: don't auto-add link-local address to lag ports
  cxgb4: fix MPS index overwrite when setting MAC address
  net: phy: realtek: fix handling of RTL8105e-integrated PHY
  ANDROID: ABI/Whitelist: add display whitelist to unisoc whitelist
  ANDROID: Kconfig.gki Add SND_SOC_TOPOLOGY
  ANDROID: GKI: enable CONFIG_ARM_PSCI_CPUIDLE
  ANDROID: power: wakeup_reason: wake reason enhancements
  UPSTREAM: cpufreq: Make cpufreq_global_kobject static
  ANDROID: staging: ion: implement vmap for built-in heaps
  ANDROID: KABI: Update kABI after dropping CONFIG_PCIEPORTBUS from gki_defconfig
  ANDROID: gki_defconfig: Drop CONFIG_PCIEPORTBUS
  FROMLIST: power_supply: Add additional health properties to the header
  UPSTREAM: power: supply: core: Update sysfs-class-power ABI document
  ANDROID: GKI: update ABI for mmc changes
  UPSTREAM: mmc: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag
  UPSTREAM: mmc: host: hsq: Add missing MODULE_LICENSE() and MODULE_DESCRIPTION()
  UPSTREAM: mmc: host: sdhci-sprd: Add software queue support
  UPSTREAM: mmc: host: sdhci: Add a variable to defer to complete requests if needed
  UPSTREAM: mmc: host: sdhci: Add request_done ops for struct sdhci_ops
  UPSTREAM: mmc: core: Enable the MMC host software queue for the SD card
  UPSTREAM: mmc: Add MMC host software queue support
  FROMGIT: kbuild: mkcompile_h: Include $LD version in /proc/version
  ANDROID: ignore compiler tag __must_check for GENKSYMS
  UPSTREAM: mfd: sc27xx: Add USB charger type detection support
  UPSTREAM: Revert "gpio: eic-sprd: Use devm_platform_ioremap_resource()"
  UPSTREAM: pinctrl: sprd: Add pin high impedance mode support
  UPSTREAM: pinctrl: sprd: Use the correct pin output configuration
  UPSTREAM: nvmem: sprd: Determine double data programming from device data
  UPSTREAM: nvmem: sprd: Optimize the block lock operation
  UPSTREAM: nvmem: sprd: Fix the block lock operation
  UPSTREAM: dmaengine: sprd: Set request pending flag when DMA controller is active
  Linux 5.4.31
  mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
  padata: always acquire cpu_hotplug_lock before pinst->lock
  net: Fix Tx hash bound checking
  i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device
  watchdog: iTCO_wdt: Make ICH_RES_IO_SMI optional
  watchdog: iTCO_wdt: Export vendorsupport
  tcp: fix TFO SYNACK undo to avoid double-timestamp-undo
  IB/hfi1: Ensure pq is not left on waitlist
  rxrpc: Fix sendmsg(MSG_WAITALL) handling
  iwlwifi: dbg: don't abort if sending DBGC_SUSPEND_RESUME fails
  iwlwifi: yoyo: don't add TLV offset when reading FIFOs
  iwlwifi: consider HE capability when setting LDPC
  net/mlx5e: kTLS, Fix wrong value in record tracker enum
  soc: mediatek: knows_txdone needs to be set in Mediatek CMDQ helper
  ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
  Revert "dm: always call blk_queue_split() in dm_process_bio()"
  power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
  extcon: axp288: Add wakeup support
  nvmem: check for NULL reg_read and reg_write before dereferencing
  mei: me: add cedar fork device ids
  coresight: do not use the BIT() macro in the UAPI header
  PCI: sysfs: Revert "rescan" file renames
  misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
  misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
  misc: rtsx: set correct pcr_ops for rts522A
  brcmfmac: abort and release host after error
  padata: fix uninitialized return value in padata_replace()
  XArray: Fix xa_find_next for large multi-index entries
  net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow
  tools/power turbostat: Fix 32-bit capabilities warning
  tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
  tools/power turbostat: Fix gcc build warnings
  drm/amdgpu: fix typo for vcn1 idle check
  initramfs: restore default compression behavior
  drm/bochs: downgrade pci_request_region failure from error to warning
  drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
  kconfig: introduce m32-flag and m64-flag
  nvme-rdma: Avoid double freeing of async event data
  ANDROID: GKI: update ABI for SCHED_AUTOGROUP removal
  ANDROID: GKI: Remove SCHED_AUTOGROUP
  ANDROID: fscrypt: fall back to filesystem-layer crypto when needed
  ANDROID: block: require drivers to declare supported crypto key type(s)
  ANDROID: block: make blk_crypto_start_using_mode() properly check for support
  ANDROID: GKI: defconfig: modify debug configs
  ANDROID: kbuild: ensure __cfi_check is correctly aligned
  FROMLIST: kmod: make request_module() return an error when autoloading is disabled
  UPSTREAM: loop: Only freeze block queue when needed.
  UPSTREAM: loop: Only change blocksize when needed.
  ANDROID: GKI: Fix ABI for CMA page allocation
  ANDROID: GKI: mm: add cma pcp list
  ANDROID: GKI: cma: redirect page allocation to CMA
  ANDROID: Fix wq fp check for CFI builds
  ANDROID: Incremental fs: Fix remount
  ANDROID: Incremental fs: Protect get_fill_block, and add a field
  ANDROID: Incremental fs: Fix crash polling 0 size read_log
  ANDROID: Incremental fs: get_filled_blocks: better index_out
  UPSTREAM: sched/rt: cpupri_find: Trigger a full search as fallback
  UPSTREAM: sched/rt: Remove unnecessary push for unfit tasks
  UPSTREAM: sched/rt: Allow pulling unfitting task
  UPSTREAM: sched/rt: Optimize cpupri_find() on non-heterogenous systems
  UPSTREAM: sched/rt: Re-instate old behavior in select_task_rq_rt()
  UPSTREAM: sched/rt: cpupri_find: Implement fallback mechanism for !fit case
  ANDROID: staging: ion: move definition of attachment
  ANDROID: Incremental fs: Fix four resource bugs
  ANDROID: GKI: Removed cuttlefish configs

Conflicts:
	drivers/base/power/wakeup.c
	drivers/irqchip/irq-gic-v3.c
	include/linux/gfp.h
	include/linux/highmem.h
	include/linux/mmc/host.h
	include/linux/mmzone.h
	include/uapi/linux/coresight-stm.h
	kernel/sched/cpupri.c
	kernel/sched/rt.c
	mm/page_alloc.c
	scripts/module-lto.lds.S

Change-Id: I1845fe7d1d0cd48d91f689565324a794b1a29f10
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-06-24 11:39:32 -07:00
George Shen
8ff219949a msm: cvp: Increase delay during AXI reset pulse
Per CVP HPG update on May 26th 2020.

Change-Id: I270d73200c77b0d1019b4b1935b2f3b43fac1546
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-06-24 11:01:41 -07:00
Asutosh Das
69ffb0e70b ufs: sysfs: Use snprintf instead of sprintf
Replaces sprintf with snprintf for security.

Change-Id: Ic9a140caabf6c3d4b13103214bfe41f336e2cf29
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2020-06-24 10:25:54 -07:00
qctecmdr
a25b03139e Merge "Revert "ALSA: PCM: volume API implementation"" 2020-06-24 10:04:12 -07:00
qctecmdr
c07da6b737 Merge "clk: qcom: gpucc: Add Support for GPUCC clock driver for SHIMA" 2020-06-24 10:04:12 -07:00
qctecmdr
0c70215a72 Merge "drivers: qcom: add system PM violators debug driver" 2020-06-24 10:04:11 -07:00
Manoj Prabhu B
e7f23f73cb memshare: Add debug logs to track subsystem notification
Enable debug logs to track the subsystem notification for a
peripheral SSR process.

Change-Id: Id8b12fb9b45e07b28a242c47e6c8148fe2154280
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2020-06-24 19:41:24 +05:30
qctecmdr
9faf140cf6 Merge "mm: support vector address ranges for process_madvise" 2020-06-24 06:08:09 -07:00
qctecmdr
e093936a5f Merge "Revert "interconnect: qcom: Build icc-rpmh with qnoc-lahaina"" 2020-06-24 06:08:09 -07:00