Commit Graph

799547 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
0588986863 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
2020-05-03 08:45:29 +02:00
Greg Kroah-Hartman
f74abd1902 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
2020-05-03 08:45:29 +02:00
Greg Kroah-Hartman
86fe2f158e 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
2020-05-03 08:45:29 +02:00
Greg Kroah-Hartman
a74c0e4e91 ANDROID: GKI: timer.h: add Android ABI padding to a structure
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
2020-05-03 08:45:29 +02:00
Greg Kroah-Hartman
f81709621e ANDROID: GKI: user_namespace.h: add Android ABI padding to a structure
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
2020-05-03 08:45:29 +02:00
Jaegeuk Kim
752f543977 FROMGIT: f2fs: fix missing check for f2fs_unlock_op
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>
2020-05-03 00:10:55 +00:00
Saravana Kannan
a2038b4794 FROMLIST: PM / devfreq: Restart previous governor if new governor fails to start
If the new governor fails to start, switch back to old governor so that the
devfreq state is not left in some weird limbo.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Bug: 155527102
Link: https://lore.kernel.org/lkml/1477360800-11509-1-git-send-email-skannan@codeaurora.org/
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: If853c7d03b6ce6767047f17d747f62d850a7b3b4
2020-05-02 00:07:05 -07:00
Mark Salyzyn
12c94f71d4 ANDROID: GKI: arm64: Enable GZIP and LZ4 kernel compression modes
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
2020-05-01 21:57:17 -07:00
Mark Salyzyn
5fb634a3ea ANDROID: GKI: arm64: gki_defconfig: Set arm_smmu configuration
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>
2020-05-01 21:57:17 -07:00
Mark Salyzyn
276170b9f1 ANDROID: GKI: iommu/arm-smmu: Modularize ARM SMMU driver
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>
2020-05-01 21:57:17 -07:00
Swathi Sridhar
e24979f0e7 ANDROID: GKI: iommu: Snapshot of vendor changes
Snapshot of IOMMU changes as of commit 79efc458af96.

Following files copied verbatim:
  arch/arm64/mm/dma-mapping.c
  drivers/iommu/dma-iommu.c
  drivers/iommu/io-pgtable.c
  drivers/iommu/iova.c
  include/linux/iova.h
  include/linux/dma-iommu.h
  include/linux/io-pgtable.h
  include/linux/iommu.h
  include/trace/events/iommu.h

Remainder contain targetted merged content:
  drivers/iommu/iommu.c
  include/linux/dma-mapping.h

Preserving Signed-off-bys from all the commits that touch these files.
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>

Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: I8dcfb6b857547c512c56549085769eee59cabefb
[saravanak Deleted some dead code and split out some changes into
smaller commits]
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-05-01 21:57:17 -07:00
Swathi Sridhar
e2a2eeef90 ANDROID: GKI: Additions to ARM SMMU register definitions
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>
2020-05-01 21:57:17 -07:00
Swathi Sridhar
27de1978c3 ANDROID: GKI: iommu/io-pgtable-arm: LPAE related updates by vendor
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
2020-05-01 21:57:17 -07:00
Liam Mark
dfc0e46bcf ANDROID: GKI: common: dma-mapping: make dma_common_contiguous_remap more robust
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>
2020-05-01 21:57:17 -07:00
Liam Mark
a3c0807605 ANDROID: GKI: dma-coherent: Expose device base address and size
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>
2020-05-01 21:57:17 -07:00
Laura Abbott
4ac42c4404 ANDROID: GKI: arm64: add support for NO_KERNEL_MAPPING and STRONGLY_ORDERED
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>
2020-05-01 21:57:16 -07:00
Liam Mark
9257548d3c ANDROID: GKI: dma-mapping: Add dma_remap functions
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>
2020-05-01 21:57:16 -07:00
Laura Abbott
0a85ff1b79 ANDROID: GKI: arm64: Support early fixup for CMA
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>
2020-05-01 21:57:16 -07:00
Swathi Sridhar
9b76f03f94 ANDROID: GKI: iommu: dma-mapping-fast: Fast ARMv7/v8 Long Descriptor Format
Snapshot of vendor added support for Fast ARMv7/v8 Long Descriptor
Format.

Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Bug: 155522481
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
[saravanak snapshot from commit 79efc458af96 and disabled for ARM]
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ifae8f889737f25cd8a9729101cd8251974109842
2020-05-01 21:56:54 -07:00
Patrick Daly
0f671ed83a ANDROID: GKI: arm64: dma-mapping: add support for IOMMU mapper
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>
2020-05-01 20:42:11 -07:00
Mark Salyzyn
f7853bfd22 ANDROID: GKI: add ARCH_NR_GPIO for ABI match
By setting ARCH_NR_GPIO to 1280 default preserve structure sizes.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 141888626
Change-Id: I7c4d300796be9245338c02e280639a5a5c98a38a
2020-05-01 17:05:12 -07:00
lucaswei
3a0f54df65 ANDROID: GKI: kernel: Export symbol of cpu_do_idle
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
2020-05-01 22:22:36 +00:00
Saravana Kannan
80566d3295 ANDROID: GKI: kernel: Export symbols needed by msm_minidump.ko and minidump_log.ko (again)
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>
2020-05-01 15:18:54 -07:00
Mark Salyzyn
2300618213 ANDROID: GKI: add missing exports for __flush_dcache_area
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
2020-05-01 15:18:54 -07:00
Laura Abbott
d2cbaad13a ANDROID: GKI: arm64: Export caching APIs
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
2020-05-01 15:18:53 -07:00
Larry Bassel
e2066c1c20 ANDROID: GKI: arm64: provide dma cache routines with same API as 32 bit
Add defines for dmac_*_range for compatibility with arm32

CRs-Fixed: 1053067
Change-Id: I6456c02bad73fb54a874dc9925d3d43d9b8be2f2
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit 0930bab0db67cc0d91e52e385e3e061871c6be05)
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit a313e54567627a1fd96cd267e2c6c358d14e468c)
[salyzyn squashed in commit 4008eb493aa2f95094511125f136eb6ffbfa33b8]
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 141888626
2020-05-01 15:18:49 -07:00
Todd Kjos
7bd9061f15 ANDROID: gki_defconfig: add FORTIFY_SOURCE, remove SPMI_MSM_PMIC_ARB
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>
2020-05-01 19:41:59 +00:00
Will McVicker
3e86e81fec Revert "ANDROID: GKI: spmi: pmic-arb: don't enable SPMI_MSM_PMIC_ARB by default"
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
2020-05-01 19:41:44 +00:00
Greg Kroah-Hartman
f42c1e2ceb ANDROID: GKI: update abi definitions after adding padding
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
2020-05-01 16:20:58 +02:00
Greg Kroah-Hartman
b78c6ba59d ANDROID: GKI: elevator: add Android ABI padding to some structures
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
2020-05-01 15:18:13 +02:00
Greg Kroah-Hartman
a4e5b525e2 ANDROID: GKI: dentry: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
de9d4f1b67 ANDROID: GKI: bio: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
fa1f82f61b ANDROID: GKI: scsi: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
7285789223 ANDROID: GKI: ufs: add Android ABI padding to some structures
Try to mitigate potential future driver core api changes by adding
padding to struct ufs_hba_variant_ops, struct
ufs_hba_crypto_variant_ops, and struct ufs_hba.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib881e531d87eae1f7a5ca312bd36086d62ccaf94
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
b8539473ea ANDROID: GKI: workqueue.h: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
89cded3aeb ANDROID: GKI: fs.h: add Android ABI padding to some structures
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>
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
ca46612871 ANDROID: GKI: USB: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
9dc35e84f8 ANDROID: GKI: mm: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
5a7d5998b9 ANDROID: GKI: mount.h: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
b14ffb0250 ANDROID: GKI: sched.h: add Android ABI padding to some structures
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
2020-05-01 15:18:12 +02:00
Greg Kroah-Hartman
071fbc0683 ANDROID: GKI: sock.h: add Android ABI padding to some structures
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
2020-05-01 15:18:11 +02:00
Greg Kroah-Hartman
b0c456e92b ANDROID: GKI: module.h: add Android ABI padding to some structures
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
2020-05-01 15:18:11 +02:00
Greg Kroah-Hartman
b80b149ef7 ANDROID: GKI: device.h: add Android ABI padding to some structures
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
2020-05-01 15:18:11 +02:00
Greg Kroah-Hartman
52f916bdb6 ANDROID: GKI: phy: add Android ABI padding to some structures
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
2020-05-01 15:18:11 +02:00
Greg Kroah-Hartman
f8b82ebf83 ANDROID: GKI: add android_kabi.h
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
2020-05-01 15:18:11 +02:00
Greg Kroah-Hartman
27f5180593 ANDROID: ABI: update due to previous changes in the tree
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct cfg80211_gtk_rekey_data at cfg80211.h:2678:1' changed:
  type size changed from 192 to 256 (in bits)
  1 data member insertion:
    'size_t cfg80211_gtk_rekey_data::kek_len', at offset 192 (in bits) at cfg80211.h:2684:1
  one impacted interface:
    function wiphy* wiphy_new_nm(const cfg80211_ops*, int, const char*)

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2aca052a357e573f1f62fb5e3e7567523fe80105
2020-05-01 13:03:38 +02:00
Quentin Perret
1cdc6a7088 BACKPORT: sched/core: Fix reset-on-fork from RT with uclamp
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
2020-05-01 07:34:40 +00:00
J. Avila
269ba02f63 ANDROID: GKI: Add support for missing V4L2 symbols
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
2020-04-30 23:55:25 +00:00
Hridya Valsaraju
93790bc14d ANDROID: GKI: Bulk update ABI XML representation
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some sub-type change:

  [C] 'function dst_entry* ip6_dst_lookup_flow(const sock*, flowi6*, const in6_addr*)' at ipv6.h:962:1 has some sub-type changes:
    parameter 4 of type 'const in6_addr*' was added
    parameter 1 of type 'const sock*' changed:
      pointer type changed from: 'const sock*' to: 'net*'
    parameter 2 of type 'flowi6*' changed:
      pointer type changed from: 'flowi6*' to: 'const sock*'
    parameter 3 of type 'const in6_addr*' changed:
      pointer type changed from: 'const in6_addr*' to: 'flowi6*'

Test: Build
Bug: 150901210
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I4595c55841499d3890808310257d1601f6b7c9b9
2020-04-30 23:36:20 +00:00
Mahesh Sivasubramanian
fd2e0c7338 ANDROID: GKI: arm64: psci: Support for OS initiated scheme
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
2020-04-30 23:36:00 +00:00