sched: Provide stub definitions for WALT

When WALT and CFI are enabled, weak symbols which points to NULL
are causing issues like global structures becoming NULL due to
compiler/linker treatment of these symbols.

Provide proper stub definition for all such weak symbols to avoid
issues until compiler/linker gets fixed.

Change-Id: I3dce047393521681e663a0ad254b07e9769e0265
Signed-off-by: Satya Durga Srinivasu Prabhala <[email protected]>
This commit is contained in:
Satya Durga Srinivasu Prabhala 2020-02-13 12:33:54 -08:00
commit f1214c569a
9 changed files with 292 additions and 78 deletions

View file

@ -1464,12 +1464,6 @@ static const struct file_operations proc_pid_sched_operations = {
*/
#ifdef CONFIG_SCHED_WALT
extern int __weak sched_wake_up_idle_show(struct seq_file *m, void *v);
extern ssize_t __weak sched_wake_up_idle_write(struct file *file,
const char __user *buf, size_t count, loff_t *offset);
extern int __weak sched_wake_up_idle_open(struct inode *inode,
struct file *filp);
static const struct file_operations proc_pid_sched_wake_up_idle_operations = {
.open = sched_wake_up_idle_open,
.read = seq_read,
@ -1478,13 +1472,6 @@ static const struct file_operations proc_pid_sched_wake_up_idle_operations = {
.release = single_release,
};
extern int __weak sched_init_task_load_show(struct seq_file *m, void *v);
extern ssize_t __weak
sched_init_task_load_write(struct file *file, const char __user *buf,
size_t count, loff_t *offset);
extern int __weak
sched_init_task_load_open(struct inode *inode, struct file *filp);
static const struct file_operations proc_pid_sched_init_task_load_operations = {
.open = sched_init_task_load_open,
.read = seq_read,
@ -1493,12 +1480,6 @@ static const struct file_operations proc_pid_sched_init_task_load_operations = {
.release = single_release,
};
extern int __weak sched_group_id_show(struct seq_file *m, void *v);
extern ssize_t __weak
sched_group_id_write(struct file *file, const char __user *buf,
size_t count, loff_t *offset);
extern int __weak sched_group_id_open(struct inode *inode, struct file *filp);
static const struct file_operations proc_pid_sched_group_id_operations = {
.open = sched_group_id_open,
.read = seq_read,