Commit graph

600508 commits

Author SHA1 Message Date
Linux Build Service Account
f9d7e36b73 Merge "arm64: hibernate: handle allocation failures" 2018-06-26 04:31:21 -07:00
Yiming Cao
cc6897b4ca msm: vidc: Fix accessing invalid instance
The instance got from the list may possibly be closed before
printing its info.

Change-Id: I7fdad3025cebace951a073cb52153d032533bd73
Signed-off-by: Yiming Cao <cyiming@codeaurora.org>
2018-06-25 23:52:38 -07:00
Yong Ding
ad106a695e soc: qcom: hab: increase the maximum size of message
Previously, the supported maximum size of message sent
over hab was 4K bytes. Now, it is increased to 0xFFFF
bytes.

Change-Id: I3b539e42df2f5c5d3be4bbac7084adeb198c9a0b
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-06-26 14:49:59 +08:00
Guchun Chen
e7d1051101 drm: msm: sde: move S1 smmu enablement earlier
Stage 1 translation enablement should be called after
user has finished early mapping for splash buffer.
Origianl sequence will bring potential race competition.
This change can avoid race condition happens.

CRs-Fixed: 2247983
Change-Id: I00ce034c5c54e06a2c1514faca22f9d65aca727f
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2018-06-26 13:47:46 +08:00
Mark Rutland
5ac0bb2fff arm64: hibernate: handle allocation failures
In create_safe_exec_page(), we create a copy of the hibernate exit text,
along with some page tables to map this via TTBR0. We then install the
new tables in TTBR0.

In swsusp_arch_resume() we call create_safe_exec_page() before trying a
number of operations which may fail (e.g. copying the linear map page
tables). If these fail, we bail out of swsusp_arch_resume() and return
an error code, but leave TTBR0 as-is. Subsequently, the core hibernate
code will call free_basic_memory_bitmaps(), which will free all of the
memory allocations we made, including the page tables installed in
TTBR0.

Thus, we may have TTBR0 pointing at dangling freed memory for some
period of time. If the hibernate attempt was triggered by a user
requesting a hibernate test via the reboot syscall, we may return to
userspace with the clobbered TTBR0 value.

Avoid these issues by reorganising swsusp_arch_resume() such that we
have no failure paths after create_safe_exec_page(). We also add a check
that the zero page allocation succeeded, matching what we have for other
allocations.

Fixes: 82869ac57b5d ("arm64: kernel: Add support for hibernate/suspend-to-disk")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: James Morse <james.morse@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org> # 4.7+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>

Change-Id: Icaa1aa246cebdbbc4f65d6024deb7f38c981a38d
Git-commit: dfbca61af0b654990b9af8297ac574a9986d8275
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Anant Goel <anantg@codeaurora.org>
Signed-off-by: Atul Raut <araut@codeaurora.org>
2018-06-25 17:48:55 -07:00
Mark Rutland
3ae9cf1b8c arm64: hibernate: avoid potential TLB conflict
In create_safe_exec_page we install a set of global mappings in TTBR0,
then subsequently invalidate TLBs. While TTBR0 points at the zero page,
and the TLBs should be free of stale global entries, we may have stale
ASID-tagged entries (e.g. from the EFI runtime services mappings) for
the same VAs. Per the ARM ARM these ASID-tagged entries may conflict
with newly-allocated global entries, and we must follow a
Break-Before-Make approach to avoid issues resulting from this.

This patch reworks create_safe_exec_page to invalidate TLBs while the
zero page is still in place, ensuring that there are no potential
conflicts when the new TTBR0 value is installed. As a single CPU is
online while this code executes, we do not need to perform broadcast TLB
maintenance, and can call local_flush_tlb_all(), which also subsumes
some barriers. The remaining assembly is converted to use write_sysreg()
and isb().

Other than this, we safely manipulate TTBRs in the hibernate dance. The
code we install as part of the new TTBR0 mapping (the hibernated
kernel's swsusp_arch_suspend_exit) installs a zero page into TTBR1,
invalidates TLBs, then installs its preferred value. Upon being restored
to the middle of swsusp_arch_suspend, the new image will call
__cpu_suspend_exit, which will call cpu_uninstall_idmap, installing the
zero page in TTBR0 and invalidating all TLB entries.

Fixes: 82869ac57b5d ("arm64: kernel: Add support for hibernate/suspend-to-disk")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org> # 4.7+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>

Change-Id: I5b852c3e9b3a589377d3197f23522ea8a7a46220
Git-commit: 0194e760f7d2f42adb5e1db31b27a4331dd89c2f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Anant Goel <anantg@codeaurora.org>
Signed-off-by: Atul Raut <araut@codeaurora.org>
2018-06-25 17:48:51 -07:00
Camus Wong
109d7c41a0 drm: sde: Select correct path for split display
When the split display has preferred control path, the preferred
control path ID should be cleared before searching secondary control
path.  Otherwise the search would fail.

Change-Id: Ie2cc1c4d0ec2d162cdcfedbbbef62400e5798bb6
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2018-06-25 12:13:36 -07:00
Linux Build Service Account
c7a3fb0e9b Merge "adv7481: Fix a possibility of missing interrupts" 2018-06-25 07:36:51 -07:00
Veerabhadrarao Badiganti
a4d7728953 mmc: core: Update SD card removal logic based on cd gpio state
Update SD card removal event processing logic. Instead of pinging
the card to know the card presence rely on card-detect gpio state.

On multi-card tray designs, the same card-tray would be used for SD
card and SIM cards. If SD card is placed at the rightmost location
in the tray, then SIM card may come in contact with SD card power-
supply while removing the tray. It may result in SIM damage.

For protecting SIM from this issue, in multi-card tray designs,
a h/w fix done such that pmic gets a notification of SD card
removal event (through hardwiring) and it turns off the SD card
voltage regulators immediately. All this will be done much before SD
card driver starts processing card removal event.

To support this design, SD card driver shouldn't turn-on the
regulator while processing card removal event. But the present mmc
driver turns-on regulator (multiple times if the card was in suspend
state). To avoid turning on SD card regulator in card removal path,
updating the card removal processing logic is based on card detect
gpio state.

Change-Id: I13708a60c9378519713ebec8071ae3b130012a93
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2018-06-25 11:29:52 +05:30
Suprith Malligere Shankaregowda
2035a897c6 adv7481: Fix a possibility of missing interrupts
Modify ADV7481 interrupt signal duration so that the signal
is cleared after 4 clock periods.
This is required to avoid random missing of interrupts.

Change-Id: I78242ce8e4375fde8bf37e6a150ce08ed0f8db3e
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
2018-06-24 21:56:54 -07:00
Linux Build Service Account
ecba76d760 Merge "diag: Update event id for WLAN, RRC" 2018-06-24 20:40:32 -07:00
Linux Build Service Account
657cccf862 Merge "diag: Set new context for peripheral error response" 2018-06-24 20:40:31 -07:00
Guchun Chen
f1e4bd81e0 drm: msm: add dsi swap feature support
This feature only works on top of dsi split mode. When
enabling it, DSI output will be swapped.

CRs-Fixed: 2266483
Change-Id: I84a10814e2bec5e229b2a734153e82cb5fac7e10
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2018-06-25 11:01:23 +08:00
Linux Build Service Account
0f93e2b37c Merge "cnss2: Use version to differentiate RAM dump APIs" 2018-06-23 05:19:52 -07:00
Linux Build Service Account
bc1a163d5d Merge "msm: watchdog: Add hibernation support" 2018-06-23 05:19:52 -07:00
Linux Build Service Account
d00ab8165b Merge "regulator: cpr3-hmss: Modify suspend/resume ops" 2018-06-23 05:19:51 -07:00
Linux Build Service Account
313c0efc10 Merge "usb: gadget: configfs: Correct usb functions order for UDC gadget bind" 2018-06-23 05:19:50 -07:00
Linux Build Service Account
946085b74b Merge "soc: qcom: hab: make LA compilation pass" 2018-06-23 05:19:49 -07:00
Linux Build Service Account
54c090b1ed Merge "ARM: dts: msm: Enable Control Path and mixer preference on msm8996" 2018-06-23 05:19:48 -07:00
Linux Build Service Account
7b1f90835b Merge "drm: msm: sde: remove user commit validity check" 2018-06-23 05:19:46 -07:00
Linux Build Service Account
ae5f5a5335 Merge "msm: sde: Add mutex unlock for debug buffer access in rotator" 2018-06-23 05:19:45 -07:00
Linux Build Service Account
dae9acbb05 Merge "DRM: SDE: Independent control of left/right global PA" 2018-06-23 05:19:43 -07:00
Linux Build Service Account
947f0ec349 Merge "DRM: SDE: Update Color API implementation" 2018-06-23 05:19:42 -07:00
Yue Ma
a86887319e cnss2: Use version to differentiate RAM dump APIs
Currently driver uses device ID to differentiate RAM dump register
and unregister APIs which is not efficient since most resent devices
will use the same RAM dump version. Enhance this by using version to
differentiate RAM dump APIs.

Change-Id: I776a8f2d84eb22cf6f8a51984ba50204ff2573f7
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2018-06-22 17:08:45 -07:00
Venkata Rao Kakani
4b5f10b9f9 msm: watchdog: Add hibernation support
During hibernation, freeze/thaw/restore dev_pm_ops
are called instead of suspend/resume.
Hook up the hibernation ops using macro
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS.

Change-Id: Ic4cb9f5aec1a0a1d66cf2cea9946a4a3aae37671
Signed-off-by: Atul Raut <araut@codeaurora.org>
2018-06-22 10:56:18 -07:00
Atul Raut
1cc3b8b2e5 regulator: cpr3-hmss: Modify suspend/resume ops
Use device suspend/resume ops rather than platform device
suspend/resume ops for cpr3-hmss and cpr3-mmss.

Change-Id: I8e01ac3571760dbaa3b7eb410d7c0753a8217e4f
Signed-off-by: Atul Raut <araut@codeaurora.org>
2018-06-22 10:55:48 -07:00
Vijay Viswanath
4753be8c45 mmc: core: hibernation support for mmc cards
eMMC is the storage device for hibernation image. As such it needs
to be working when hibernation image is created and written. Also for
loading hibernation image after reboot, eMMC driver needs to be
probed and running.

During reboot,  kernel comes up and does its own eMMC probe and sets
speed for eMMC. A late system call then checks for hibernation image.
If there is a hibernation image, the current kernel will stay only
temporarily.
Once the hibernation image is found and loaded, the temporary kernel
suspends the eMMC device and then gives control to kernel in
hibernation image.
The hibernation image then restores the eMMC device based on the eMMC
driver state saved just before creating hibernation image.
This gives rise to a possible missmatch between the HW state of eMMC
(Specifically the bus speed) when temporary kernel suspends it and the
state driver restores after hibernation restore.
So a synchornization has been done by making the eMMC run in max speed
during:
	1. Just before hibernation image is created (So the driver state
	in hibernation image will be for max speed mode).
	2. After reboot, just before temporary kernel loads image and
	suspends (so the mmc driver in temporary kernel will put the
	eMMC in suspend while HW state is in highest speed mode.
This ensures that the HW state, mmc_resume post the hibernation
expects, will be same as the HW state actually present in the eMMC
at the point of hibernation restore.

This also ensures we save the hibernation image in max performance and
we restore the hibernation image also in max performance.

Change-Id: Ia9deceacade97ac89e4f25b40ce074d75bbb2bbc
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2018-06-22 10:55:19 -07:00
Manoj Prabhu B
e3233832d5 diag: Update event id for WLAN, RRC
The patch adds new event ids for RRC events,
WLAN host scan and WLAN PE Diag set antenna.

Change-Id: Ib62e97a903407f0249d2eb40fc5463cc45103873
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-06-22 09:24:30 -07:00
Manoj Prabhu B
cb6de0c08b diag: Set new context for peripheral error response
The patch sets new error context with TYPE_CMD for buf_num
context to add peripheral error responses on apps response
path to respective logging session and prevent buffer corruption.

Change-Id: I02c246d9a68a4f8e912d8693b3e4844c0e0b6885
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-06-22 21:40:44 +05:30
Arun Kumar Neelakantam
44154c0e03 soc: qcom: smem: Add secure device check for smem dump
In peripheral SSR case SMEM dump is collected and stored which
is not expected on secude devices.

Add a check and avoid dumping SMEM on secure device.

CRs-Fixed: 2264360
Change-Id: I2895aeb86d97b45dcb3ea293aa79a06174b8ac0b
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2018-06-22 15:30:26 +05:30
Patrik Torstensson
cf21a9ac5e ANDROID: Add kconfig to make dm-verity check_at_most_once default enabled
This change adds a kernel config for default enable
the check_at_most_once dm-verity option. This is to give us
the ability to enforce the usage of at_most_once
for entry-level phones.

Change-Id: Id40416672c4c2209a9866997d8c164b5de5dc7dc
Signed-off-by: Patrik Torstensson <totte@google.com>
Bug: 72664474
2018-06-21 14:24:57 -07:00
Chao Bi
50c959b25e soc: qcom: hab: make LA compilation pass
Due to GCC problem
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119),
it cause a warning in hab test code, this patch is a workaround
to avoid this warning. This can be reverted once the GCC issue is fixed.

Change-Id: I4d01920ef36cb42bae4dd9f331c518a38dfd9a5a
Signed-off-by: Chao Bi <chaobi@codeaurora.org>
2018-06-21 17:07:05 -04:00
Linux Build Service Account
318dc882ca Merge "diag: Enhance IPC logging for diag CNTL channel" 2018-06-21 13:37:50 -07:00
Linux Build Service Account
dc0fcde6ce Merge "ARM: memory hotplug: stop cpus while memory hotremove" 2018-06-21 13:37:49 -07:00
Linux Build Service Account
3850f31471 Merge "mmc: block: Don't unhalt if switch to CQ mode fails" 2018-06-21 13:37:48 -07:00
Linux Build Service Account
daa592e855 Merge "ASoC: msm: Support different POPPs to single COPP" 2018-06-21 13:37:46 -07:00
Linux Build Service Account
f0cb574d3b Merge "ARM: dts: msm: Untrusted pointer dereference" 2018-06-21 13:37:43 -07:00
Linux Build Service Account
ea54b9e530 Merge "diag: Add NULL pointer check for write buffer of fwd_info" 2018-06-21 13:37:40 -07:00
Linux Build Service Account
71277408de Merge "power:hibernate: KPI marker for Hibernation Success" 2018-06-21 04:04:09 -07:00
Linux Build Service Account
45b407c93a Merge "msm: ipa: Fix unlock spinlock in failed condition" 2018-06-21 04:04:08 -07:00
Linux Build Service Account
b60fb8e724 Merge "ASoC: msm: qdsp6v2: Fix rtac memory unmap issue in ASM driver" 2018-06-21 04:04:07 -07:00
Linux Build Service Account
8164a41508 Merge "ASoC: msm: qdsp6v2: Fix return code check in adm driver" 2018-06-21 04:04:06 -07:00
Linux Build Service Account
9b81f1aebb Merge "ASoC: msm: qdsp6v2: Fix AFE RTC set parameter" 2018-06-21 04:04:05 -07:00
Linux Build Service Account
726eec8d0e Merge "sdm660-internal: Fix DMIC3&4 mute in voice call during APSS sleep" 2018-06-21 04:04:04 -07:00
Linux Build Service Account
08471334bf Merge "msm: msm_bus: Fix error handling in msm_bus_device_init" 2018-06-21 04:03:33 -07:00
Venkata Rao Kakani
ebef173049 ARM: memory hotplug: stop cpus while memory hotremove
Avoid page table corruptions during memory hotremove by
stopping all other cpus.

Change-Id: If4084768044dd95601bdc5993d14bc6b0a5921c3
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
2018-06-21 03:44:06 -07:00
Chandana Kishori Chiluveru
8b8a942bd1 usb: gadget: configfs: Correct usb functions order for UDC gadget bind
During multiple adb reboots test case, adbd is taking time to start
and write the descriptors from the userspace. If adb is their in the
composition and its not ready when bind happens, UDC bind for ffs will
fail and adding the function back to the func_list in failure path and
calling purge_configs_funcs.

In purge_func adb driver unbind the functions from config->functions list
and add back to the tail of the func_list. With this order of the functions
in func_list got changed and next time when bind happens from adbd start
usb does not working.

Fix this issue by changing the order of the functions while adding the
functions back to the list in purge_configs_funcs.

Change-Id: I50c2362062130836d66edfcf8e1f020134248cb4
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2018-06-21 02:08:15 -07:00
Asutosh Das
2daa49b1a8 mmc: block: Don't unhalt if switch to CQ mode fails
There's no reason to unhalt if switching to CQ mode fails.
Since card is not in CQ mode, let the controller be halted.
The caller will handle this error.

CRs-fixed: 2241401
Change-Id: I307753ad66d291168a55f760565cc141d7c83c31
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2018-06-21 01:55:42 -07:00
Derek Chen
a83fb6663f ASoC: msm: qdsp6v2: add routing from MM6 to SEC MI2S RX
Add routing support from multimedia6 frontend
to secondary MI2S RX backend.

Change-Id: I6755fcf2a0fef0407d3492fe66260d22de2a7daf
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-06-21 00:14:48 -07:00
Vatsal Bucha
1ae05057ff sdm660_cdc: Fix NULL pointer dereference in digital suspend
If soundcard registration has failed because of custom
driver probe failure and at the same time
msm_dig_suspend is called, this will lead to
null pointer dereference when component is accessed.
Add NULL check to avoid this.

CRs-Fixed: 2263093
Change-Id: I2d321814a316d9b3af1ff0f8963f2999520e60d2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-06-21 11:36:28 +05:30