Commit Graph

1058097 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
7e09e2d196 ANDROID: GKI: scsi.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct scsi_disk.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1191c786cb341df43a40fa1a82789759b0f431cf
2022-07-19 12:47:32 +00:00
Greg Kroah-Hartman
71a01a0739 ANDROID: GKI: pci: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct pci_sriov, struct pci_dev, struct pci_bus, and struct
pci_driver.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I236df60165b25a33b06fc81f76014162401ba742
2022-07-19 12:47:32 +00:00
Greg Kroah-Hartman
e65f0ea5b7 ANDROID: GKI: add Android ABI padding to struct nf_conn
Try to mitigate potential future driver core api changes by adding
padding to struct nf_conn;

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib18a9a929d351c66556f1f27b217cbf22b733a10
2022-07-19 12:47:32 +00:00
Chris Lew
a16c2ea0df ANDROID: abi_gki_aarch64_qcom: Add rproc and rpmsg helpers
Add symbols to use added features to rproc and rpmsg:
 - Introduction of the rpmsg ctrl interface from upstream
 - Introduction of rpmsg_rx_done
 - Helpers to remove rproc_mem_entries from an rproc

Bug: 235577039
Change-Id: Ic04c7f911b88a58d44622ccacd4115541da7c17f
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-07-19 12:47:32 +00:00
Chris Lew
b382390be7 FROMLIST: rpmsg: core: Introduce rproc_mem_entry_free
Introduce a helper to free the rproc_mem_entry allocated by
rproc_mem_entry_init(). This helper is to help manage rproc carveouts
added to an rproc outside of remoteproc.

Bug: 235577039
Link: https://lore.kernel.org/lkml/1654888985-3846-3-git-send-email-quic_clew@quicinc.com/
Change-Id: I70ea0e6455b9b050a73a73b0fb43fd7b67adb294
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-07-19 12:47:32 +00:00
Chris Lew
db8e036eef FROMLIST: remoteproc: core: Add helper to remove carveouts
To mirror the exported rproc_add_carveout(), add a rproc_del_carveout()
so carveout lifetime can be managed more accurately.

Bug: 235577039
Link: https://lore.kernel.org/lkml/1654888985-3846-2-git-send-email-quic_clew@quicinc.com/
Change-Id: Ia562829f26a007aef3101f2e51f87b30b43addf7
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-07-19 12:47:31 +00:00
Suman Anna
e50b8cefab UPSTREAM: remoteproc: move rproc_da_to_va declaration to remoteproc.h
The rproc_da_to_va() API is an exported function, so move its
declaration from the remoteproc local remoteproc_internal.h
to the public remoteproc.h file.

This will allow drivers outside of the remoteproc folder to be
able to use this API.

Bug: 235577039
Change-Id: Id0d79c782c240c83416009fa822b8872473fb580
(cherry picked from commit b65700d046)
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
[adjusted line numbers to apply]
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220308172515.29556-1-dfustini@baylibre.com
2022-07-19 12:47:31 +00:00
Chris Lew
e5bfc829cf FROMLIST: rpmsg: char: Add support to use rpmsg_rx_done
Add support into the rpmsg char driver to skip copying the data into an
skb if the endpoint supports rpmsg_rx_done. If the endpoint supports
the rx_done operation, allocate a zero sized skb and set the data to
the buffer returned in the rx callback. When the packet is read from
the character device, release the memory by calling rpmsg_rx_done().

Bug: 235577039
Link: https://lore.kernel.org/lkml/1654651005-15475-3-git-send-email-quic_clew@quicinc.com/
Change-Id: I5c94c560daebc4a48cee2ecfb6a44ea6c3087e8d
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-07-19 12:47:31 +00:00
Chris Lew
756d76ac7b FROMLIST: rpmsg: core: Add rx done hooks
In order to reduce the amount of copies in the rpmsg framework, it is
necessary for clients to take brief ownership of the receive buffer.

Add the capability for clients to notify the rpmsg framework and the
underlying transports when it is going to hold onto a buffer and also
notify when the client is done with the buffer.

In the .rx_cb of the rpmsg drivers, if they wish to use the received
buffer at a later point, they should return RPMSG_DEFER. Otherwise
returning RPMSG_HANDLED (0) will signal the framework that the client
is done with the resources and can continue with cleanup.

The clients should check if their rpmsg endpoint supports the rx_done
operation with the new state variable in the rpmsg_endpoint since not
all endpoints will have the ability to support this operation.

Bug: 235577039
Link: https://lore.kernel.org/lkml/1654651005-15475-2-git-send-email-quic_clew@quicinc.com/
Change-Id: I008ae73d54f9d8319e9dbcafd7d9c7007fa4f234
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-07-19 12:47:31 +00:00
Sarthak Garg
146f96d825 FROMLIST: mmc: sdhci-msm: Enable force hw reset during cqe recovery
Enable force hw reset during cqe recovery to make recovery more robust.

Bug: 231672697
Link: https://lore.kernel.org/lkml/20220603051534.22672-3-quic_sartgarg@quicinc.com/

Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
Change-Id: I100c1c8c9a85e7c8306fe3bc8401aab9cab2b34e
2022-07-19 12:47:31 +00:00
Sarthak Garg
c40dacbca2 FROMLIST: mmc: core: Introduce new flag to force hardware reset
Introduce new flag cqe_recovery_reset_always to allow vendors to force
hardware reset during cqe recovery.

Bug: 231672697
Link: https://lore.kernel.org/lkml/20220603051534.22672-2-quic_sartgarg@quicinc.com/

Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Change-Id: I929bc634a1712c18f26652ae3d7166b7c8b7f7a9
2022-07-19 12:47:31 +00:00
Chao Yu
febc14cca2 ANDROID: GKI: Add ANDROID_OEM_DATA in struct ufs_dev_info
Add ANDROID_OEM_DATA(1) in struct ufs_dev_info to support more
feature status.

Bug: 235673196

Signed-off-by: Chao Yu <chao@kernel.org>
Change-Id: I0d0264a2434a4cc645a065cf861055f22cc41c3b
Signed-off-by: Steve Muckle <smuckle@google.com>
2022-07-19 12:47:31 +00:00
Liangliang Li
8fdd8e4bb5 ANDROID: sched: Add oem data in struct rq
Add ANDROID_OEM_DATA to struct rq, which is used to implement oem's
scheduler tuning.

Bug: 188899490
Change-Id: I1904b4fd83effc4b309bfb98811e9718398504f4
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
2022-07-19 12:47:31 +00:00
Manaf Meethalavalappu Pallikunhi
8e44c4b7cb FROMLIST: drivers/thermal/thermal_of: Add critical/hot ops support for thermal_of sensor
The sensor driver which register through thermal_of interface doesn't
have an option to get thermal zone critical, hot trip violation
notification from thermal core.

Add support for these ops in thermal_of interface so that sensor
driver can use these ops.

Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>

Bug: 226570053
Change-Id: I5e3d5a4b360d134ae70e9fcdb88ca2b4de0b79b2
Link: https://lore.kernel.org/all/20220601131400.24627-2-quic_manafm@quicinc.com/
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
2022-07-19 12:47:30 +00:00
Todd Kjos
f7ec558e65 Revert "Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_tags""
This reverts commit b982f17e13124214c38e9b3295d8180a152e85fe.

Reinstate patch for June 17 KMI update

Bug: 233781098
Change-Id: I46ebf0f8598acbc6976380b71f7a26812478bdf7
2022-07-19 12:47:30 +00:00
Todd Kjos
0a673759df Revert "Revert "ANDROID: GKI: Add ANDROID_OEM_DATA in struct blk_mq_ctx""
This reverts commit 443c11e0b16bb99f9f59e563184c86d9e7f10974.

Reinstate patch for June 17 KMI update

Bug: 233781098
Change-Id: I47ebbc6a1cecc363b97e35c10a5e44d7221caa01
2022-07-19 12:47:30 +00:00
Aking Chen
b5db5ef6b9 ANDROID: mmc: Add vendor hooks
Add vendor hooks to support vendor-specific exception handling features.

Bug: 185083720

Change-Id: I30381ed9835338308f2b03856f510a2982db6e6a
Signed-off-by: Mingli Feng <mingli.feng@vivo.com>
Signed-off-by: Aking Chen <akingchen@vivo.com>
(cherry picked from commit e80bcd4627)
Signed-off-by: Aking Chen <akingchen@vivo.corp-partner.google.com>
2022-07-19 12:47:30 +00:00
Bart Van Assche
5b2030ed91 ANDROID: scsi: ufs: Enable CONFIG_SCSI_UFS_HPB
Enable CONFIG_SCSI_UFS_HPB such that the UFS HPB (Host Performance
Booster) feature can be used.

Bug: 235167182
Change-Id: I1aab63c83445e243be190396c452a4203e93dbc1
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-07-19 12:47:30 +00:00
Manaf Meethalavalappu Pallikunhi
bf01ce9a3c FROMGIT: drivers/thermal/thermal_of: Add change_mode ops support for thermal_of sensor
The sensor driver which register through thermal_of interface doesn't
have an option to get thermal zone mode change notification from
thermal core.

Add support for change_mode ops in thermal_of interface so that sensor
driver can use this ops for mode change notification.

Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
Link: https://lore.kernel.org/r/1646767586-31908-1-git-send-email-quic_manafm@quicinc.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Bug: 234115106
(cherry picked from commit bf70c57751
https: //git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git
thermal-v5.19-rc1)
Change-Id: I24bafb16ebc1d33c7ca71aa88bd964eb71973b4d
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
2022-07-19 12:47:30 +00:00
Shaik Sajida Bhanu
97816e2c14 FROMGIT: mmc: cqhci: Capture eMMC and SD card errors
Add changes to capture eMMC and SD card errors.
This is useful for debug and testing.

(cherry picked from commit 38def9680980e9d1eeeb4ca37937101201b6c5d7
 https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 233007144
Link: https://lore.kernel.org/lkml/1652857340-6040-6-git-send-email-quic_c_sbhanu@quicinc.com/
Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Change-Id: Ie2bfa597623523dbce17623f7ced13b8bd699e76
2022-07-19 12:47:30 +00:00
Shaik Sajida Bhanu
3154d4a30d FROMGIT: mmc: debugfs: Add debug fs error state entry for mmc driver
Add debug fs entry error state to query eMMC and SD card errors statistics.
If any errors occurred in eMMC and SD card driver level then
err_state value will be set to 1.

(cherry picked from commit 6ecf831d2cea999c2cc881b39b147cf8ee9e43ae
 https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 233007144
Link: https://lore.kernel.org/lkml/1652857340-6040-5-git-send-email-quic_c_sbhanu@quicinc.com/

Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Change-Id: Ie4cf876dc02fb719d91a7d37c8c5ec3aa2df54ab
2022-07-19 12:47:30 +00:00
Shaik Sajida Bhanu
ac8ceccf71 FROMGIT: mmc: debugfs: Add debug fs entry for mmc driver
Add debug fs entry to query eMMC and SD card errors statistics

(cherry picked from commit 1cb1c0757911aa2ca35593e319dc06daa7395c2d
 https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 233007144
Link: https://lore.kernel.org/lkml/1652857340-6040-4-git-send-email-quic_c_sbhanu@quicinc.com/

Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Change-Id: I38d33b9faa868ef7d9bc32d0d91cda8d2dd0cca6
2022-07-19 12:47:29 +00:00
Shaik Sajida Bhanu
cdb40ce672 FROMGIT: mmc: sdhci: Capture eMMC and SD card errors
Add changes to capture eMMC and SD card errors.
This is useful for debug and testing.

(cherry picked from commit 794203d953c723e27cfa9b2beb747fa65cad3607
 https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 233007144
Link: https://lore.kernel.org/lkml/1652857340-6040-3-git-send-email-quic_c_sbhanu@quicinc.com/

Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Change-Id: I1bd90fb1f5e5d295167b5ac20003a76a0d4317de
2022-07-19 12:47:29 +00:00
Shaik Sajida Bhanu
e1e25b9632 FROMGIT: mmc: core: Capture eMMC and SD card errors
Add changes to capture eMMC and SD card errors.
This is useful for debug and testing.

(cherry picked from commit 932809b0d0ae882c7e33ec89d24d1dc55f6d81ac
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 233007144
Link: https://lore.kernel.org/lkml/1652857340-6040-2-git-send-email-quic_c_sbhanu@quicinc.com/

Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Change-Id: I31c306769f1d08417c06744088c1d13ed2342b1f
2022-07-19 12:47:29 +00:00
Liangliang Li
97f7f2ebf3 ANDROID: GKI: Add OEM data to mutex/rwsem
Reserve ANDROID_OEM_DATA in struct mutex/rw_semaphore for recoreding
informaition about the lock, which helps to do oem specific lock
optimization.

Bug: 188869548
Change-Id: I33f767a1823f854a8deb8ba9078079aa6a9d76ea
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 372b24bad2)
2022-07-19 12:47:29 +00:00
Vignesh Saravanaperumal
b6a991b531 ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
Some vendors want to add a field when a 'sruct sock' is added so give a
hook to handle this.  Any memory allocated when
trace_android_rvh_sk_alloc() is called needs to be freed when
trace_android_rvh_sk_free() is called.

Note, if trace_android_rvh_sk_alloc() fails, be sure to be able to
handle this in trace_android_rvh_sk_free(), but that should not be an
issue as that needs to be addressed in vendor code that runs for 'struct
sock' objects that have been created before the vendor code is loaded no
matter what.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I108a2f31d2dcc228f46159816deee6235afafbbd
2022-07-19 12:47:29 +00:00
Vignesh Saravanaperumal
88ca8a6cd6 ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
Some vendors want to add a field when a 'sruct nf_conn' is added so give a
hook to handle this.  Any memory allocated when
trace_android_rvh_nf_conn_alloc() is called needs to be freed when
trace_android_rvh_nf_conn_free() is called.

Note, if trace_android_rvh_nf_conn_alloc() fails, be sure to be able to
handle this in trace_android_rvh_nf_conn_free(), but that should not be
an issue as that needs to be addressed in vendor code that runs for
'struct nf_conn' objects that have been created before the vendor code
is loaded no matter what.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I4d2b025196a3df7ba4adec313c90483811cac728
2022-07-19 12:47:29 +00:00
Vignesh Saravanaperumal
fb3ac17a12 ANDROID: GKI: add vendor padding variable in struct sock
Some vendors want to add things to 'struct sock', so give them a u64
where they can then have a pointer off to their private data and they
can do whatever they want to do without breaking or changing any abi for
anyone else.

Note, usually an android trace hook is also needed to use this properly,
so be aware that this will be required as well.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: Iab0b5570753d4a9722ecf9ca9eeb9b9887e2a9d9
2022-07-19 12:47:29 +00:00
Vignesh Saravanaperumal
604c42522d ANDROID: GKI: add vendor padding variable in struct nf_conn
Some vendors want to add things to 'struct nf_conn', so give them a u64
where they can then have a pointer off to their private data and they
can do whatever they want to do without breaking or changing any abi for
anyone else.

Note, usually an android trace hook is also needed to use this properly,
so be aware that this will be required as well.

Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I245c162ee3fb083e3f39cf7bec3bd78cb624e005
2022-07-19 12:47:28 +00:00
T.J. Mercier
cf175a59ef FROMLIST: dma-buf: Move sysfs work out of DMA-BUF export path
Recently, we noticed an issue where a process went into direct reclaim
while holding the kernfs rw semaphore for sysfs in write (exclusive)
mode. This caused processes who were doing DMA-BUF exports and releases
to go into uninterruptible sleep since they needed to acquire the same
semaphore for the DMA-BUF sysfs entry creation/deletion. In order to avoid
blocking DMA-BUF export for an indeterminate amount of time while
another process is holding the sysfs rw semaphore in exclusive mode,
this patch moves the per-buffer sysfs file creation to the default work
queue. Note that this can lead to a short-term inaccuracy in the dmabuf
sysfs statistics, but this is a tradeoff to prevent the hot path from
being blocked. A work_struct is added to dma_buf to achieve this, but as
it is unioned with the kobject in the sysfs_entry, dma_buf does not
increase in size.

Fixes: bdb8d06dfe ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
Originally-by: Hridya Valsaraju <hridya@google.com>
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Bug: 206979019
Link: https://lore.kernel.org/lkml/CABdmKX2dNYhgOYdrrJU6-jt6F=LjCidbKhR6t4F7yaa0SPr+-A@mail.gmail.com/T/
Change-Id: Ic0386849b6b248b0a72215633fc1a50782455bac
2022-07-19 12:47:28 +00:00
zhaoyang.huang
109097ed1c ANDROID: Add vendor hook for MemcgV2 optimization
The associated vendor hooks/data are used for implementing dynamic memory.low protection based on memcgv2.

Bug: 232723420
Test: build pass
Change-Id: I2e92bdc2840af1eaaa08ee6427d2a82d78390005
Signed-off-by: zhaoyang.huang <zhaoyang.huang@unisoc.com>
2022-07-19 12:47:28 +00:00
Wenbin Mei
228e9c8134 UPSTREAM: mmc: core: Add host specific tuning support for eMMC HS400 mode
This adds a ->execute_hs400_tuning() host callback to enable optional
support for host specific tuning for eMMC HS400 mode. Additionally, share
mmc_get_ext_csd() through the public host headerfile, to allow it to be
used by the host drivers, which is needed to support the HS400 tuning.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
Link: https://lore.kernel.org/r/20210917124803.22871-3-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Bug: 234554003
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Change-Id: Idf4f95d2505ef68bb444e3c46c2f2e1e0924140e
(cherry picked from commit f614fb60a1)
2022-07-19 12:47:28 +00:00
Wenbin Mei
ff43136711 UPSTREAM: mmc: mtk-sd: Add HS400 online tuning support
According to JEDEC Spec, there is no need to do tuning under HS400 mode
since the Rx signal is aligned with the DS signal. However, MediaTek's IC
need set its "DS delay" internally to ensure it can latch Rx signal
correctly.

In previous version, We provide an "hs400-ds-delay" in device tree to cover
different chipset/PCB design, and it works fine in most cases.  But, with
the development of process technology and the big VCore voltage scale
range(may have 0.7V/0.6V/0.55V), it is difficult to find a suitable
"hs400-ds-delay" to cover all of IC corner cases(SSSS/TTTT/FFFF). So that
We must have the ability to do hs400 online tuning.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com>
Link: https://lore.kernel.org/r/20210917124803.22871-4-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Bug: 234554003
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Change-Id: I02670c5e3277b4095a4f3fd89ea6724f8416601d
(cherry picked from commit c4ac38c653)
2022-07-19 12:47:28 +00:00
Wenbin Mei
8144640150 UPSTREAM: dt-bindings: mmc: mtk-sd: Add hs400 dly3 setting
Add hs400 dly3 setting for mtk-sd yaml

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210917124803.22871-2-wenbin.mei@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Bug: 234554003
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Change-Id: I2738b6774108d3dc8a12291f879744fb92c2d25b
(cherry picked from commit fb4708e6cb)
2022-07-19 12:47:28 +00:00
Suren Baghdasaryan
eb998c1ff2 ANDROID: powerpc/mm: protect vm_file during speculative page fault handling
Use vma->file_ref_count to protect vma->vm_file from destruction during
speculative page fault handling.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0ebebcafe5f50444e582ec5835eb6005fa85f5b1
2022-07-19 12:47:28 +00:00
Suren Baghdasaryan
510f79ba77 ANDROID: x86/mm: protect vm_file during speculative page fault handling
Use vma->file_ref_count to protect vma->vm_file from destruction during
speculative page fault handling.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icdd558532872095869f9106cc7e4b7e07dc46748
2022-07-19 12:47:28 +00:00
Suren Baghdasaryan
c9acd461a2 ANDROID: arm64/mm: protect vm_file during speculative page fault handling
Use vma->file_ref_count to protect vma->vm_file from destruction during
speculative page fault handling.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I4c826fd5ef45576566e1eb8f8f23d17e620e7fc9
2022-07-19 12:47:27 +00:00
Suren Baghdasaryan
4daa3c254e ANDROID: add vma->file_ref_count to synchronize vma->vm_file destruction
In order to prevent destruction of vma->vm_file while it's being used
during speculative page fault handling, introduce an atomic refcounter.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0e971156f3e76feb45136bac1582a7eaab8c75df
2022-07-19 12:47:27 +00:00
Suren Baghdasaryan
0864756fb0 Revert "ANDROID: Use the notifier lock to perform file-backed vma teardown"
This reverts commit dc8ac508afd3b105978fd3dd98462950daa5b297.
Reason for revert: performance regression.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I5811c7ee2feac7f9057ed0ccd848e5de71f79354
2022-07-19 12:47:27 +00:00
Suren Baghdasaryan
6338289f96 Revert "ANDROID: Fix build errors caused by missing mmu_notifier_lock definition"
This reverts commit dbc5eb8e31f70b6a559da56a93668d90ed38a5c0.
Reason for revert: performance regression.

Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I685f09cfe4d2b3fef9e88953f794186c0e790657
2022-07-19 12:47:27 +00:00
Capone Huang
c1a58dad6d ANDROID: Update symbol list for mtk
Leaf changes summary: 1 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added functions:

  [A] 'function int iterate_dir(file*, dir_context*)'

Bug: 236208914
Signed-off-by: Capone Huang <capone.huang@mediatek.corp-partner.google.com>
Change-Id: Ibea71fa232eb8d149b83bd8d2fdcb4e46c63f8b8
2022-07-19 12:47:27 +00:00
huang dezhi
ea1c621b81 ANDROID: GKI: add symbol list file for honor
add abi_gki_aarch64_honor

Leaf changes summary: 10 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 5 Added variables

5 Added functions:

  [A] 'function int __traceiter_android_vh_alter_mutex_list_add(void*, mutex*, mutex_waiter*, list_head*, bool*)'
  [A] 'function int __traceiter_android_vh_mutex_init(void*, mutex*)'
  [A] 'function int __traceiter_android_vh_mutex_unlock_slowpath(void*, mutex*)'
  [A] 'function int __traceiter_android_vh_mutex_wait_finish(void*, mutex*)'
  [A] 'function int __traceiter_android_vh_mutex_wait_start(void*, mutex*)'

5 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_alter_mutex_list_add'
  [A] 'tracepoint __tracepoint_android_vh_mutex_init'
  [A] 'tracepoint __tracepoint_android_vh_mutex_unlock_slowpath'
  [A] 'tracepoint __tracepoint_android_vh_mutex_wait_finish'
  [A] 'tracepoint __tracepoint_android_vh_mutex_wait_start'

Bug: 231527236
Change-Id: Id3125e93696d91b3daed2ff74c17edb0235c3aa2
Signed-off-by: huang dezhi <huangdezhi@hihonor.com>
2022-07-19 12:47:27 +00:00
Quentin Perret
8ee914a539 ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
We've recently added a .data section for the hypervisor, which kmemleak
is eager to parse. This clearly doesn't go well, so add the section to
kmemleak's block list.

Bug: 232768943
Bug: 235903024
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I29d81cb1246c590bd5203d560ea369e5f29d59b0
2022-07-19 12:47:27 +00:00
Xuewen Yan
aad764985c ANDROID: ABI: Update symbols to unisoc whitelist for the scheduler 4st
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function int __traceiter_android_rvh_account_irq_end(void*, task_struct*, int, s64)'
  [A] 'function int __traceiter_android_rvh_account_irq_start(void*, task_struct*, int, s64)'

Bug: 235909063
Change-Id: Idfce8f81fbe6ed11d974dbcf6f04e768af54d0ca
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
2022-07-19 12:47:27 +00:00
Peifeng Li
28f031bf96 ANDROID: GKI: Update symbols to symbol list
Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added variables

5 Added functions:

  [A] 'function int __traceiter_android_vh_cma_drain_all_pages_bypass(void*, unsigned int, bool*)'
  [A] 'function int __traceiter_android_vh_drain_all_pages_bypass(void*, gfp_t, unsigned int, unsigned long int, int, unsigned long int, bool*)'
  [A] 'function int __traceiter_android_vh_page_referenced_check_bypass(void*, page*, unsigned long int, int, bool*)'
  [A] 'function int __traceiter_android_vh_pcplist_add_cma_pages_bypass(void*, int, bool*)'
  [A] 'function unsigned long int shrink_slab(gfp_t, int, mem_cgroup*, int)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_cma_drain_all_pages_bypass'
  [A] 'tracepoint __tracepoint_android_vh_drain_all_pages_bypass'
  [A] 'tracepoint __tracepoint_android_vh_page_referenced_check_bypass'
  [A] 'tracepoint __tracepoint_android_vh_pcplist_add_cma_pages_bypass'

Bug: 234405962
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ie38bd63282c8ab0ec8f837e06bd5e9e6ab272ba6
2022-07-19 12:47:26 +00:00
Yunfei Wang
98496efc97 FROMLIST: iommu/mediatek: Allow page table PA up to 35bit
Single memory zone feature will remove ZONE_DMA32 and ZONE_DMA. So add
the quirk IO_PGTABLE_QUIRK_ARM_MTK_TTBR_EXT to let level 1 and level 2
pgtable support at most 35bit PA.

Signed-off-by: Ning Li <ning.li@mediatek.com>
Link: https://lore.kernel.org/linux-mediatek/20220616120713.12728-3-yf.wang@mediatek.com/
Bug: 235767992
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: Iaf93281e99985403d92157aee13e2e449b876545
2022-07-19 12:47:26 +00:00
Yunfei Wang
293ec0920f FROMLIST: iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
Single memory zone feature will remove ZONE_DMA32 and ZONE_DMA and
cause pgtable PA size larger than 32bit.

Since Mediatek IOMMU hardware support at most 35bit PA in pgtable,
so add a quirk to allow the PA of pgtables support up to bit35.

Signed-off-by: Ning Li <ning.li@mediatek.com>
Link: https://lore.kernel.org/linux-mediatek/20220616120713.12728-2-yf.wang@mediatek.com/
Bug: 235767992
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I5dd226507bfbbbe85cb00aa27d03cd3592740055
2022-07-19 12:47:26 +00:00
Zhuguangqing
58e3f869fc ANDROID: Add vendor hooks to signal.
Add vendor hook to get signal for vendor-specific tuning.

Conflicts:
    drivers/android/vendor_hooks.c

Bug: 184898838

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d
(cherry picked from commit d623f1ff72)
2022-07-19 12:47:26 +00:00
Liujie Xie
77064627fb ANDROID: ashmem: Export is_ashmem_file
Export is_ashmem_file function which will be used
by the minidump module to get ashmem info.

Bug: 193397560
Change-Id: I5b7816ad4775e5cf2c4f41c28b1c8dacc2c85b7e
Signed-off-by: liuhailong <liuhailong@oppo.com>
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 7bcfde2601)
2022-07-19 12:47:26 +00:00
wudean
842c68a977 ANDROID: vendor_hooks: bypass shrink slab
Add hooks for bypass shrink slab.

Bug: 185951972
(cherry picked from commit 396a6adfd3)

Change-Id: I343e02ae5cd6d076d525d0e4bfc09ecdfeda1d7b
Signed-off-by: wudean <dean.wu@vivo.com>
2022-07-19 12:47:26 +00:00