Commit Graph

7 Commits

Author SHA1 Message Date
Todd Kjos
b3efd2ad71 ANDROID: remove inclusions from hook definition headers
To avoid changing the visibiliy of data types when including
hook definition headers remove header file inclusions from
the hook definition header files.

Instead, the hook definition headers should just have forward
declarations that don't require full definition.

To provide full definitions of the types for the KMI, the
headers that define the types should be included by the
source file that instantiates the hooks - normally
vendor_hooks.c.

Bug: 233047575
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iaaa1a6f45a356569c04ad2fea0b1514e0454f041
2022-09-08 23:24:37 +00:00
Giuliano Procida
45d3ead9a8 ANDROID: GKI: use public type definitions in vendor hooks
This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.

The following type is now fully defined in ABI XML.

* `struct timekeeper`

symbol '__traceiter_android_rvh_account_irq' changed
  CRC changed from 0x18e0dccf to 0x4e82c102

symbol '__traceiter_android_rvh_after_dequeue_task' changed
  CRC changed from 0x7efc419b to 0x1c0066e1

symbol '__traceiter_android_rvh_after_enqueue_task' changed
  CRC changed from 0xd6f0f603 to 0xf7eaafb8

... 75 omitted; 78 symbols have only CRC changes

Bug: 233047575
Change-Id: I8c04eede1b9d9e788abce95cb31dbd19916774ef
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-07-19 12:47:36 +00:00
Saravana Kannan
0ef21e1c1a ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
When vendor hooks are added to a file that previously didn't have any
vendor hooks, we end up indirectly including linux/tracepoint.h.  This
causes some data types that used to be opaque (forward declared) to the
code to become visible to the code.

Modversions correctly catches this change in visibility, but we don't
really care about the data types made visible when linux/tracepoint.h is
included. So, hide this from modversions in the central vendor_hooks.h file
instead of having to fix this on a case by case basis.

This change itself will cause a one time CRC breakage/churn because it's
fixing the existing vendor hook headers, but should reduce unnecessary CRC
churns in the future.

To avoid future pointless CRC churn, vendor hook header files that include
vendor_hooks.h should not include linux/tracepoint.h directly.

Bug: 227513263
Bug: 226140073
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b
2022-04-06 08:31:36 -07:00
Georgi Djakov
2ab4227174 ANDROID: qcom: iommu: Use restricted vendor hook for dma ops
Use rvh instead of vh for the iommu_setup_dma_ops to prevent
sleeping while atomic bugs as mutexes are used to serialize
access to iova regions.

Bug: 216657571
Change-Id: If90d0714576ed6ca4b014b1447a1518f05a7ed0b
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
2022-02-01 17:44:12 +00:00
Guangming Cao
f21e6e9178 ANDROID: iommu: Add vendor hook for iova allocation and free tracking
Add vendor hook for iommu_dma_alloc_iova and iommu_dma_free_iova
to allow vendor enhancement.

Bug: 187861158

Change-Id: I2ebe8b24318bd5292edc66a94d7109332d478212
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
(cherry picked from commit 15acc8fac6)
2021-10-12 02:45:53 +00:00
Isaac J. Manjarres
d74067d69e ANDROID: arm64: dma-mapping: Update iommu dma-ops setup hook parameters
Commit ac6d704679 ("iommu/dma: Pass address limit rather than size to
iommu_setup_dma_ops()") makes it so that the DMA limit is passed
to iommu_setup_dma_ops() for a device. Align
android_vh_iommu_setup_dma_ops() to also expect the DMA limit for the
sake of consistency.

Bug: 195574584
Change-Id: Ic2a3a72442111db3d6ebff75bcf0f5d787d806a0
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-08-04 13:39:50 -07:00
Patrick Daly
8d56356b4f ANDROID: iommu: Add vendor hook for setting up DMA ops for IOMMU clients
Add vendor hook for arch_setup_dma_ops to allow vendor enhancement. This
hook can be used to setup vendor-specific DMA ops for certain IOMMU
clients based on their IOMMU configuration.

Bug: 179291683

Change-Id: Ie847a14d6536eb151cbd0a93452f6895ee451930
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
(cherry picked from commit 575ad9a263)
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-06-03 13:46:10 -07:00