ANDROID: GKI: Add padding after init_task structure

To reduce static memory allocated in the task_struct to accommodate
vendor data, the move to a dynamically sized task_struct is being made.
As part of this effort, add padding after the init_task structure.
This has to be done because init_task is statically allocated and hence
will not benefit from the dynamic addition of size to all task_structs.

Bug: 233921394
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
Change-Id: I737f951d57a5c19ff6474d4243a22f5f9cfbfa8b
This commit is contained in:
Sai Harshini Nimmala
2024-10-08 21:08:18 -07:00
committed by Todd Kjos
parent db56ca3b78
commit 1827ee5e5a
2 changed files with 4 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ extern spinlock_t mmlist_lock;
extern union thread_union init_thread_union;
extern struct task_struct init_task;
extern u64 vendor_data_pad[CONFIG_GKI_TASK_STRUCT_VENDOR_SIZE_MAX / sizeof(u64)];
extern int lockdep_tasklist_lock_is_held(void);

View File

@@ -226,6 +226,9 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
};
EXPORT_SYMBOL(init_task);
u64 vendor_data_pad[CONFIG_GKI_TASK_STRUCT_VENDOR_SIZE_MAX / sizeof(u64)];
EXPORT_SYMBOL_GPL(vendor_data_pad);
/*
* Initial thread structure. Alignment of this is handled by a special
* linker map entry.