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
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
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
Try to mitigate potential future driver core api changes by adding a
padding to struct timer_list.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I74673e2271cd757c4871c9bcb69fd73bb22a722b
Try to mitigate potential future driver core api changes by adding a
padding to struct user_namespace.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2c41281b191cd252db2ddc792699d869ce8d7a4d
This fixes what Chao pointed. Upstream patch should be fine.
Fixes: 8c77bd62d6e4 ("f2fs: fix quota_sync failure due to f2fs_lock_op")
Change-Id: Ia697c8cf3897895392bbc0364d7d76f16ec9049e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This brings arm64 in line with arm and x86.
Bug: 149430094
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I55d9cfae21463639251b3336d6d7cf9893a20bcd
Set CONFIG_ARM_SMMU=m to allow vendor implementations.
Set CONFIG_IOMMU_IO_PGTABLE_FAST=y since it's used by vendors.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: compile
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: I257897275fbfe34ca74534551050b73010068115
Signed-off-by: Saravana Kannan <saravanak@google.com>
Allow ARM SMMU driver to be compiled as a module to allow vendors to use
their own implementations.
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: I80d54a1ead843aab860410a32221fbf02aa703c8
Signed-off-by: Saravana Kannan <saravanak@google.com>
Define more bits and fields used by vendor IOMMU implementations.
This is a snapshot of this file as of commit 79efc458af96. All
Signed-off-bys from the commits have been preserved.
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Change-Id: I3cbe456457290f99b5099472e9012b411c4f4212
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
This is a snapshot of iommu/io-pgtable-arm as of commit 79efc458af96.
Most of the changes are related to LPAE. The Signed-off-bys of all the
commits has been copied over.
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: I375f3c4d43c23818ae2e2c1963cda474328e677f
Large allocations can result in the dma_common_contiguous_remap
call not being able to succeed because it can't find enough
contiguous memory to setup the mapping.
Make dma_common_contiguous_remap more robust by using vmalloc
as a fallback.
Change-Id: I12ca710b4c24f4ef24bc33a0d1d4922196fb7492
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
(cherry picked from commit b4c505ac103c032e8ff567c085f0bced4a9bf43c)
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak rolled in int to unsigned long conversion from another patch]
Signed-off-by: Saravana Kannan <saravanak@google.com>
Allow clients to be able to determine the device base address and
size of a dma coherent memory region.
This is required for clients that want to explicitly manage that memory.
Change-Id: I3e5b721d9d318526422ec26995cc1af7b7f04077
Signed-off-by: Liam Mark <lmark@codeaurora.org>
(cherry picked from commit 63585739d1881d987c0c0f06199cf749ad62c6d1)
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak conflict resolution due to file move and Change EXPORT_SYMBOL
to EXPORT_SYMBOL_GPL]
Signed-off-by: Saravana Kannan <saravanak@google.com>
arm64 needs support for both DMA_ATTR_NO_KERNEL_MAPPING and
DMA_ATTR_STRONGLY_ORDERD. Add support for both of them.
Change-Id: I35d670b8639fed465d2adbe8972ded40bd9f1d1c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak snapshot from commit 79efc458af96 that approximately matches
commit 28a88c9d84abb3180bc651a29074f79ef0474b48]
Signed-off-by: Saravana Kannan <saravanak@google.com>
After getting an allocation from dma_alloc_coherent, there
may be cases where it is necessary to remap the handle
into the CPU's address space (e.g. no CPU side mapping was
requested at allocation time but now one is needed). Add
APIs to bring a handle into the CPU address space again.
Change-Id: Ieb9231c5f24d45aeb7436f643c9b87b93871f85d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[lmark@codeaurora.org: fix additional call to dma_common_free_remap]
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Bug: 155522481
(cherry picked from commit 36e68e773c134cffe047cb1d95ebebeb91f6fbfb)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak minor conflict fixes]
Signed-off-by: Saravana Kannan <saravanak@google.com>
Although it isn't architecturally required, CMA regions may need
to have attributes changed at runtime. Remap the CMA regions as
pages to allow this to happen.
Change-Id: I7dd7fa150ce69fdf05f8bf6f76a5ae26dd67ff1b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak snapshot from commit 79efc458af96 that approximately matches
commit 509553a5afc4c3b554f539a3a6b5fa60bfdce259]
Signed-off-by: Saravana Kannan <saravanak@google.com>
On systems with IOMMUs, it's useful to handle IOMMU mappings in the
dma-mapping layer. This is currently supported on arm but not arm64. Add
support in arm64 by gratuitously lifting most of the IOMMU-related stuff
from dma-mapping.c in arm.
The original arm work was done by Marek Szyprowski in [4ce63fcd91:
"ARM: dma-mapping: add support for IOMMU mapper"].
Change-Id: I1c3c8fe15049fe456751074398fd179ebd2ec64e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak snapshot from commit 79efc458af96 that approximately matches
commit f0dbb6af93e971a24e272267dc6d22676900873d]
Signed-off-by: Saravana Kannan <saravanak@google.com>
lpm-levels module call this function which is located in
`arch/arm64/mm/proc.S`.
Export function so the module can be built.
Bug: 150365591
Bug: 149799837
Change-Id: Iff72ecbef7ac43a13909eaef896b5c50ce433650
Signed-off-by: lucaswei <lucaswei@google.com>
(cherry picked from commit d965ac77cb6e800d866dbf4f9be90d16a6b8f1e0)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 141888626
These symbols are used by these modules. Export them so that these
modules can be loaded.
Bug: 149258398
Tested: Booted and made sure same devices probe
Tested: Unlock the phone and play with home screen
Change-Id: Ie29c2811c07944b5a01dbc47b7a60dd56fe2aa5c
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from 6e9974ac97756b877c6858bedc216fea56fbbb38)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Export __flush_dcache_area to allow various modules to function.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: compile
Bug: 141888626
Change-Id: I36666622a54aac44eb4dec3001062ac78f949d12
External modules may need to use caching APIs. Export the symbols
to allow their use.
Change-Id: I72a862608d37dedf0980ee2790ffb93a9de82221
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
(cherry picked from commit 791d853afcd53ce62d7042cfad4e105d9404fd16)
[salyzyn squashed in commit e737e6b08e482db8b998a54312d9b1c5e053472e]
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 141888626
Force SPMI_MSM_PMIC_ARB off and enable FORTIFY_SOURCE for GKI
Bug: 142896904
Bug: 134087016
Test: Build/Boot on cuttlefish
Change-Id: Ib6e501f1efee2349d750010a53572dddcb5457c5
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from 6f2fe74a1b)
Signed-off-by: Will McVicker <willmcvicker@google.com>
This reverts commit 3f2debd7f2. This
should instead be just removed using the gki_defconfig.
Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 142896904
Bug: 143712741
Change-Id: Ib32c9b7cee0e62d344d0bfd48064a2578d0251f9
This updates the abi defintions after adding a lot of different padding
fields all over the place.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I55575dec852d46846b18fb09ac8416e88c88784a
Try to mitigate potential future driver core api changes by adding a
padding to struct elevator_mq_ops and struct elevator_type.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia4c2667fd5ca9e6dd2e0d30b95a0f8d5eb7921dc
Try to mitigate potential future driver core api changes by adding a
padding to struct dentry and struct dentry_operations.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idde3c6e99bd4af3a91ba115b8ec148e3e1cdd4a9
Try to mitigate potential future driver core api changes by adding a
padding to struct bio_integrity_payload and struct bio_set.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0397ede2e11560ad9422cd7765434fcd4f7a6dd8
Try to mitigate potential future driver core api changes by adding a
padding to struct scsi_cmnd, struct scsi_device, and struct
scsi_host_template.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie6a2b91970e8f9063bf00e96a0dff661f77b8e8d
Try to mitigate potential future driver core api changes by adding a
padding to struct work_struct and struct delayed_work
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5492a13e2430c1a5775aec52518144b7aa4f3268
Try to mitigate potential future driver core api changes by adding a
padding to a bunch of filesystem structures.
Based on a change made to the RHEL/CENTOS 8 kernel.
Bug: 151154716
Change-Id: Ida6d98d30f292c980ab07e0250fec5268c4c87ed
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
To try to mitigate potential future USB api changes, add some padding to
the following structures:
struct usb_interface
struct usb_host_bos
struct usb_bus
struct usb_device
struct usb_driver
struct urb
struct usb_hcd
struct hc_driver
struct usb_tt
struct usbnet
struct driver_info (for usbnet driver)
Based on a patch from Oliver Neukum <oneukum@suse.de> from the SLES
kernel.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie9e246d9333ac70fc9cc2b0bf7cb466a8ffdb6de
Try to mitigate potential future driver core api changes by adding a
padding to stuct vm_area_struct and struct zone.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I81702aa833f419928e0e32e9609722b98592c171
Try to mitigate potential future driver core api changes by adding a
padding to struct vfsmount.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9ce1b63f05c90af168eeea1312ac88d3cc5cfdf3
Try to mitigate potential future driver core api changes by adding a
pointer to struct signal_struct, struct sched_entity, struct
sched_rt_entity, and struct task_struct.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1449735b836399e9b356608727092334daf5c36b
Try to mitigate potential future driver core api changes by adding a
padding to struct sock.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I61c3d6cf12c087345db71fc6d93ee6bd58969003
Try to mitigate potential future driver core api changes by adding a
padding to struct module.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2a764e9eac88f20e50d192112235da6d2f0f83bc
Try to mitigate potential future driver core api changes by padding to
struct bus_type, struct device_driver, struct class, and struct device.
Based on a patch from Michal Marek <mmarek@suse.cz> from the SLES kernel
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6892cde6481ba775789f0c02239dcfde3a26b56e
Try to mitigate potential future driver core api changes by adding a
padding to stuct phy_device and struct phy_driver
Inspired by the upstream changes in 5.4.26 and 4.19.111
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dbc5f76e9eddfc5741f944168222aedacd0a8bb
This header file is to be used for various macros to help make keeping
the kernel ABI "stable" during an "ABI Freeze" period.
They are to be used both before the freeze (to anticipate places where
there will be changes), and after the freeze (to keep the abi stable for
structures where there were changes due to LTS or other changes to the
kernel tree.)
Strongly based on rh_kabi.h from Red Hat's RHEL kernel tree.
This adds support for "real" padding and the ability to replace fields
with other fields.
But, note that ABI changes will still be caught by libabigail at this
point in time, work on that is still ongoing. When that is completed,
all that will be needed is to modify the _ANDROID_KABI_RESERVE() macro
in this file. No other file changes should be needed.
Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I77038cc251c819c3ed22a9cb8843b185416b6727
uclamp_fork() resets the uclamp values to their default when the
reset-on-fork flag is set. It also checks whether the task has a RT
policy, and sets its uclamp.min to 1024 accordingly. However, during
reset-on-fork, the task's policy is lowered to SCHED_NORMAL right after,
hence leading to an erroneous uclamp.min setting for the new task if it
was forked from RT.
Fix this by removing the unnecessary check on rt_task() in
uclamp_fork() as this doesn't make sense if the reset-on-fork flag is
set.
[ qperret: BACKPORT because of a conflict with the Android-specific
SUGOV_RT_MAX_FREQ sched_feat, which is equally unnecessary in this
path ]
Bug: 120440300
Fixes: 1a00d99997 ("sched/uclamp: Set default clamps for RT tasks")
Reported-by: Chitti Babu Theegala <ctheegal@codeaurora.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Patrick Bellasi <patrick.bellasi@matbug.net>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lkml.kernel.org/r/20200416085956.217587-1-qperret@google.com
(cherry picked from commit eaf5a92ebd)
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I9a19ac5474d0508b8437e4a1d859573b4106ed08
Adds support for the below #defines to fix some warnings:
V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010_VENUS
V4L2_PIX_FMT_NV12_512
V4L2_PIX_FMT_NV12_UBWC
V4L2_PIX_FMT_NV12_TP10_UBWC
Bug: 155434217
[elavila snapshot of required #defines from e8507af28b12f]
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Icba92ff8dfad59a9d84d2fa676dffbca1f56053d
Existing PSCI implementation supports platform coordinated means of low
power modes where cluster low power modes are aggregated at the platform
level. Adding support for OS initiated scheme, where the OS is
responsible for selecting cluster low power modes based on last man
determination. With OS initiated scheme, the OS can make better cluster
decisions based on wakeup times of CPUs within a cluster.
To this effect, in OS initiated schemes, the composite state ID is computed
by the idle driver before calling into the cpu_suspend API. The PSCI driver
is modified to use the composite ID to distinguish between retention and
non-retention states.
Change-Id: Iee5533676a28a8f6beb7942dcb908f2fa3518d78
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
(cherry picked from commit ea2c39aefb5418869d81f96304b5cfddc76c4c11)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154642337