Commit graph

599867 commits

Author SHA1 Message Date
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
Linux Build Service Account
c7a3fb0e9b Merge "adv7481: Fix a possibility of missing interrupts" 2018-06-25 07:36:51 -07:00
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
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
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
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
Linux Build Service Account
a1b136f1e0 Merge "defconfig: MSM8998: enable F2FS configs" 2018-06-20 16:52:39 -07:00
Atul Raut
cdf56b7d01 power:hibernate: KPI marker for Hibernation Success
Add KPI Marker for hibernation failure and success
needed for perf image.

Change-Id: I90a4e503c75ccb1d0edb3d26f7f8d5f08dafe95e
Signed-off-by: Atul Raut <araut@codeaurora.org>
2018-06-20 12:27:10 -07:00
Manoj Prabhu B
ecb6422b59 diag: Enhance IPC logging for diag CNTL channel
The patch enables to track the control channel buffer
status, reception of feature mask and error case of
not queueing a read on socket by use of debug logs.

Change-Id: Ibd9bd9a09f6519e31874f8794df3df875e931d25
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2018-06-20 21:06:11 +05:30
Mohammed Javid
7770ea4a7c msm: ipa: Fix unlock spinlock in failed condition
'Commit id I427374ef44 ("msm: ipa: Fix race condition
head_desc_list variable access")' broke unlock spinlock
in failed scenarios. Added changes to fix the issue.

Change-Id: I0f7dddfa7a583a8ebd8c1e6a610ab204726d5bc1
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-06-20 11:37:31 +05:30
Linux Build Service Account
2386158c7b Merge "soc: qcom: hab: clean the compilation issues" 2018-06-19 22:04:18 -07:00
Linux Build Service Account
9cc0ccd7af Merge "soc: qcom: hab: return -EINTR if woken up by a signal" 2018-06-19 22:04:16 -07:00
Yunyun Cao
8ddec64b62 msm: sde: Add mutex unlock for debug buffer access in rotator
mutex lock should be unlocked before returning if the offset is not right.

Change-Id: I11945696d2c4078c28266312915837a812fedcc8
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2018-06-19 20:35:00 -07:00
Linux Build Service Account
467469229d Merge "ion: invalidate the pool pointers after free" 2018-06-19 08:12:58 -07:00
Linux Build Service Account
93285f1e8f Merge "devfreq: suppress platform driver bind / unbind feature" 2018-06-19 08:12:57 -07:00
Linux Build Service Account
73596ff804 Merge "asoc: codecs: sdm660_cdc: Fix LPASS register access during SSR" 2018-06-19 08:12:55 -07:00
Linux Build Service Account
cd77641c8d Merge "ais: support frame drop configuration for auto" 2018-06-19 08:12:53 -07:00
Aditya Bavanari
e4f474eb8e ASoC: msm: qdsp6v2: Fix AFE RTC set parameter
Fix offset address to use set parameter structure while
copying data from user instead of get parameter structure
for AFE_PORT_CMD_SET_PARAM_V3 case.

CRs-Fixed: 2256728
Change-Id: I61e41f366f365734a47080b79179fbe3021ee8a7
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-06-19 19:01:12 +05:30
Aditya Bavanari
04708e34ee ASoC: msm: qdsp6v2: Fix rtac memory unmap issue in ASM driver
During unmap of rtac block in ASM, mem_map_handle
address is set to zero instead of the value. Set the
map handle value to zero to avoid issue in freeing the
ion memory.

CRs-Fixed: 2254339
Change-Id: I6584be029d4c8dde235e722149c758df0db9916e
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-06-19 17:50:52 +05:30