Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 1827ee5

Browse files
Sai Harshini Nimmalatoddkjos
authored andcommitted
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 <[email protected]> Change-Id: I737f951d57a5c19ff6474d4243a22f5f9cfbfa8b
1 parent db56ca3 commit 1827ee5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/linux/sched/task.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ extern spinlock_t mmlist_lock;
5656

5757
extern union thread_union init_thread_union;
5858
extern struct task_struct init_task;
59+
extern u64 vendor_data_pad[CONFIG_GKI_TASK_STRUCT_VENDOR_SIZE_MAX / sizeof(u64)];
5960

6061
extern int lockdep_tasklist_lock_is_held(void);
6162

init/init_task.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
226226
};
227227
EXPORT_SYMBOL(init_task);
228228

229+
u64 vendor_data_pad[CONFIG_GKI_TASK_STRUCT_VENDOR_SIZE_MAX / sizeof(u64)];
230+
EXPORT_SYMBOL_GPL(vendor_data_pad);
231+
229232
/*
230233
* Initial thread structure. Alignment of this is handled by a special
231234
* linker map entry.

0 commit comments

Comments
 (0)