diff options
author | Aurora pro automerger <aurora-pro-automerger@google.com> | 2022-04-28 17:59:17 +0800 |
---|---|---|
committer | John Scheible <johnscheible@google.com> | 2022-05-02 22:33:52 +0000 |
commit | 27bed782f3a828674c0f1584cf355bf592c382be (patch) | |
tree | 79f6f3410eece25889b3cfc80dcd156ec5b543c6 /gxp-internal.h | |
parent | a96a198c9328b06866df39ebd420b0f3fd58ce51 (diff) | |
download | gs201-27bed782f3a828674c0f1584cf355bf592c382be.tar.gz |
[Copybara Auto Merge] Merge branch 'gs201-release' into 'android13-gs-pixel-5.10'
gxp: check BLK is on during power state transition
gxp: prepare more worker structures for async jobs
gxp: Cleanup virt<->phys core translation APIs
gxp: switch mux to make sure LPM works
gxp: init has_vd_lock field of gxp_client
gxp: Clean up variable names and update variable type
gxp: remove gxp-tmp.h
gxp: move scratchpad macros from tmp to firmware.h
gxp: remove no-iommu support
gxp: remove SYNC_ macros from tmp.h
gxp: remove DOORBELL macros
gxp: move PSM macros to lpm.h
gxp: Check for valid VD in mb_eventfd IOCTLs
gxp: Firmware startup and Core-On optimizations
gxp: Move ownership of user response queues
gxp: move macros from tmp.h to bpm.c
gxp: remove legacy software mailbox support
gxp: Add gxp-eventfd interface
gxp: remove unused macros from gxp-tmp.h
gxp: bind page tables per virtual device
Bug: 176979630
Bug: 207037425
Bug: 207038856
Bug: 209083969
Bug: 225059930
Bug: 226211187
Bug: 227145352
Bug: 227693917
Bug: 227694164
Bug: 228233514
Bug: 228921329
Bug: 229095276
Bug: 229584236
GitOrigin-RevId: d2c00e3ee2d71e551d41adfa5bcc6bec79379db3
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Change-Id: Ia92e12a2ab46eadc2876bcdb7ed3c04e223b3901
Diffstat (limited to 'gxp-internal.h')
-rw-r--r-- | gxp-internal.h | 69 |
1 files changed, 1 insertions, 68 deletions
diff --git a/gxp-internal.h b/gxp-internal.h index c7b66e7..4b5bb7c 100644 --- a/gxp-internal.h +++ b/gxp-internal.h @@ -20,11 +20,11 @@ #include <linux/spinlock.h> #include "gxp-config.h" -#include "gxp-tmp.h" /* Holds Client's TPU mailboxes info used during mapping */ struct gxp_tpu_mbx_desc { uint phys_core_list; + uint virt_core_list; size_t cmdq_size, respq_size; }; @@ -36,11 +36,6 @@ struct gxp_mapped_resource { resource_size_t size; /* size in bytes */ }; -struct mailbox_resp_list { - struct list_head list; - struct gxp_response *resp; -}; - /* Structure to hold TPU device info */ struct gxp_tpu_dev { struct device *dev; @@ -71,13 +66,6 @@ struct gxp_dev { struct gxp_mapped_resource cmu; /* CMU CSRs */ struct gxp_mailbox_manager *mailbox_mgr; struct gxp_power_manager *power_mgr; - /* - * TODO(b/182416287): This should be a rb_tree of lists keyed by - * virtual device. For now, keep an array of one list per physical core - */ - struct list_head mailbox_resp_queues[GXP_NUM_CORES]; - wait_queue_head_t mailbox_resp_waitqs[GXP_NUM_CORES]; - spinlock_t mailbox_resps_lock; struct gxp_debug_dump_manager *debug_dump_mgr; struct gxp_mapping_root *mappings; /* tree of user mappings */ u32 firmware_running; /* firmware status bitmap */ @@ -142,61 +130,6 @@ static inline void gxp_write_32_core(struct gxp_dev *gxp, uint core, gxp_write_32(gxp, offset, value); } -static inline void gxp_acquire_sync_barrier(struct gxp_dev *gxp, uint index) -{ - uint barrier_reg_offset; - - if (index >= SYNC_BARRIER_COUNT) { - dev_err(gxp->dev, - "Attempt to acquire non-existent sync barrier: %d\n", - index); - return; - } - - barrier_reg_offset = SYNC_BARRIER_BLOCK + SYNC_BARRIER_BASE(index); - while (gxp_read_32(gxp, barrier_reg_offset) != - SYNC_BARRIER_FREE_VALUE) { - /* - * Sleep for the minimum amount. - * msleep(1~20) may not do what the caller intends, and will - * often sleep longer (~20 ms actual sleep for any value given - * in the 1~20ms range). - */ - msleep(20); - } -} - -static inline void gxp_release_sync_barrier(struct gxp_dev *gxp, uint index) -{ - uint barrier_reg_offset; - - if (index >= SYNC_BARRIER_COUNT) { - dev_err(gxp->dev, - "Attempt to acquire non-existent sync barrier: %d\n", - index); - return; - } - - barrier_reg_offset = SYNC_BARRIER_BLOCK + SYNC_BARRIER_BASE(index); - gxp_write_32(gxp, barrier_reg_offset, 1); -} -static inline u32 gxp_read_sync_barrier_shadow(struct gxp_dev *gxp, uint index) -{ - uint barrier_reg_offset; - - if (index >= SYNC_BARRIER_COUNT) { - dev_err(gxp->dev, - "Attempt to read non-existent sync barrier: %0u\n", - index); - return 0; - } - - barrier_reg_offset = SYNC_BARRIER_BLOCK + SYNC_BARRIER_BASE(index) + - SYNC_BARRIER_SHADOW_OFFSET; - - return gxp_read_32(gxp, barrier_reg_offset); -} - static inline int gxp_acquire_rmem_resource(struct gxp_dev *gxp, struct resource *r, char *phandle) { |