mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-19 07:39:54 +02:00
ANDROID: scheduler: add vendor-specific wake flag
It comes with the commit efbb82d3b0db ("ANDROID: Add a vendor hook that allow a module to modify the wake flag"). A vendor who want to hook sock_def_readable can set this vendor-specific wake flag. sock_def_readable -> (vendor hook will call __wake_up_sync_key with a custom mode) -> __wake_up_sync_key -> (vendor hook changes wake_flags per the custom mode) -> __wake_up_common -> default_wake_function It is an Android-specific since it works with a vendor hook. Bug: 189858948 Bug: 226256614 Bug: 263838089 Bug: 349225664 Signed-off-by: Namkyu Kim <namkyu78.kim@samsung.com> Change-Id: Idc23c1c47f7d83b298c0b2560859f1ce2761fd85 (cherry picked from commit4c1097df5d
) (cherry picked from commit87b89ce83b
) (cherry picked from commitffb7f4adfc
) Signed-off-by: Dongseok Yi <dseok.yi@samsung.com>
This commit is contained in:
parent
df27fe0be2
commit
ba91ea859e
|
@ -7161,7 +7161,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
|
||||||
int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
|
int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
|
||||||
void *key)
|
void *key)
|
||||||
{
|
{
|
||||||
WARN_ON_ONCE(IS_ENABLED(CONFIG_SCHED_DEBUG) && wake_flags & ~(WF_SYNC|WF_CURRENT_CPU));
|
WARN_ON_ONCE(IS_ENABLED(CONFIG_SCHED_DEBUG) && wake_flags & ~(WF_SYNC|WF_CURRENT_CPU|WF_ANDROID_VENDOR));
|
||||||
return try_to_wake_up(curr->private, mode, wake_flags);
|
return try_to_wake_up(curr->private, mode, wake_flags);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(default_wake_function);
|
EXPORT_SYMBOL(default_wake_function);
|
||||||
|
|
|
@ -2208,6 +2208,8 @@ static inline int task_on_rq_migrating(struct task_struct *p)
|
||||||
#define WF_MIGRATED 0x20 /* Internal use, task got migrated */
|
#define WF_MIGRATED 0x20 /* Internal use, task got migrated */
|
||||||
#define WF_CURRENT_CPU 0x40 /* Prefer to move the wakee to the current CPU. */
|
#define WF_CURRENT_CPU 0x40 /* Prefer to move the wakee to the current CPU. */
|
||||||
|
|
||||||
|
#define WF_ANDROID_VENDOR 0x1000 /* Vendor specific for Android */
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
static_assert(WF_EXEC == SD_BALANCE_EXEC);
|
static_assert(WF_EXEC == SD_BALANCE_EXEC);
|
||||||
static_assert(WF_FORK == SD_BALANCE_FORK);
|
static_assert(WF_FORK == SD_BALANCE_FORK);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user