Commit Graph

1058111 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
075f69c5bb ANDROID: GKI: quota.h: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct quota_format_ops, struct dquot_operations, and struct
quotactl_ops.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia957d2f8d9b1a6939cddedc16a7481e9de1a8866
2022-07-19 12:47:34 +00:00
Greg Kroah-Hartman
451a87818d ANDROID: GKI: mmu_notifier.h: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct mmu_notifier_ops and struct mmu_notifier.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If631445abf20c22830a1c764ff2ccd662a7bd204
2022-07-19 12:47:34 +00:00
Greg Kroah-Hartman
ae3c0ab383 ANDROID: GKI: mm.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct vm_operations_struct.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I78f84148ef4d3524bd6c5b78e53e06503a4ac3ae
2022-07-19 12:47:34 +00:00
Greg Kroah-Hartman
f3fb488d59 ANDROID: GKI: kobject.h: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct kobject, struct kobj_type, and struct kset.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3c28826dc314c7f1b5c9bb167be82089d53768bb
2022-07-19 12:47:34 +00:00
Greg Kroah-Hartman
3ae94b1d60 ANDROID: GKI: kernfs.h: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct kernfs_syscall_ops and struct kernfs_ops.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1fcb0b81c3ea7d5300da283b275391f95d6d4ec8
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
60b228eece ANDROID: GKI: irqdomain.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct irq_domain.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8ff0c2162ca5f7f0b6c7a51bf341c6b1b1c856e8
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
6085db79f1 ANDROID: GKI: ioport.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct resource.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5ff4401c540be7d095f1db27370281b7220af030
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
10757a98c3 ANDROID: GKI: iomap.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct iomap_ops.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1803d5163f7a1d0320f567b983a8241777284c5e
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
6e65645918 ANDROID: GKI: hrtimer.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct hrtimer.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5432e05386265281d993199599c6f9dcd17a9daf
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
4e25025fff ANDROID: GKI: genhd.h: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding a
padding to struct blk_integrity, and struct gendisk.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d19bf942fbedc64f705f5d27ae629c57209df27
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
4c407fb2d3 ANDROID: GKI: ethtool.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct ethtool_ops.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If9f449cb74e81d048a1c41b33c6b7c5b564ecaf3
2022-07-19 12:47:33 +00:00
Greg Kroah-Hartman
b9010edeca ANDROID: GKI: dma-mapping.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct dma_map_ops.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icbec584dee3716f341a7831a4810025f690eab4a
2022-07-19 12:47:32 +00:00
Greg Kroah-Hartman
e2e99104b3 ANDROID: GKI: networking: add Android ABI padding to a lot of networking structures
Try to mitigate potential future driver core api changes by adding a
padding to a lot of different networking structures:
	struct ipv6_devconf
	struct proto_ops
	struct header_ops
	struct napi_struct
	struct netdev_queue
	struct netdev_rx_queue
	struct xfrmdev_ops
	struct net_device_ops
	struct net_device
	struct packet_type
	struct sk_buff
	struct tlsdev_ops

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I590f004754dbc8beafa40e71cac70a0938c38b4a
2022-07-19 12:47:32 +00:00
Greg Kroah-Hartman
8ffe686f83 ANDROID: GKI: blk_types.h: add Android ABI padding to a structure
Try to mitigate potential future driver core api changes by adding a
padding to struct bio.

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

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib69c7bb8b553cacb9cb7bc020d8ac2bbc75621ba
2022-07-19 12:47:32 +00:00
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