Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Remove a few holes from struct amdgpu_ctx

Re-order the struct members a bit to avoid some holes:

/* size: 408, cachelines: 7, members: 15 */
/* sum members: 393, holes: 4, sum holes: 15 */
/* last cacheline: 24 bytes */

/* size: 400, cachelines: 7, members: 15 */
/* sum members: 393, holes: 1, sum holes: 7 */
/* last cacheline: 16 bytes */

While doing so we notice a duplicate but will address than in the
following patch.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tvrtko Ursulin and committed by
Alex Deucher
d5e53ff4 cb9a5ff7

+6 -6
+6 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
··· 44 44 45 45 struct amdgpu_ctx { 46 46 struct kref refcount; 47 - struct amdgpu_ctx_mgr *mgr; 47 + spinlock_t ring_lock; 48 48 unsigned reset_counter; 49 49 unsigned reset_counter_query; 50 - uint64_t generation; 51 - spinlock_t ring_lock; 52 - struct amdgpu_ctx_entity *entities[AMDGPU_HW_IP_NUM][AMDGPU_MAX_ENTITY_NUM]; 53 - bool preamble_presented; 54 50 int32_t init_priority; 55 51 int32_t override_priority; 52 + uint32_t stable_pstate; 56 53 atomic_t guilty; 54 + bool preamble_presented; 55 + uint64_t generation; 57 56 unsigned long ras_counter_ce; 58 57 unsigned long ras_counter_ue; 59 - uint32_t stable_pstate; 58 + struct amdgpu_ctx_mgr *mgr; 60 59 struct amdgpu_ctx_mgr *ctx_mgr; 60 + struct amdgpu_ctx_entity *entities[AMDGPU_HW_IP_NUM][AMDGPU_MAX_ENTITY_NUM]; 61 61 }; 62 62 63 63 struct amdgpu_ctx_mgr {