mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	sched/smp: Always define is_percpu_thread() and scheduler_ipi()
Simplify the scheduler by making the CONFIG_SMP=y primitives of is_percpu_thread() and scheduler_ipi() unconditional. Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Shrikanth Hegde <sshegde@linux.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/r/20250528080924.2273858-22-mingo@kernel.org
This commit is contained in:
		
							parent
							
								
									cac5cefbad
								
							
						
					
					
						commit
						06ddd17521
					
				
					 1 changed files with 0 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -1765,12 +1765,8 @@ extern struct pid *cad_pid;
 | 
			
		|||
 | 
			
		||||
static __always_inline bool is_percpu_thread(void)
 | 
			
		||||
{
 | 
			
		||||
#ifdef CONFIG_SMP
 | 
			
		||||
	return (current->flags & PF_NO_SETAFFINITY) &&
 | 
			
		||||
		(current->nr_cpus_allowed  == 1);
 | 
			
		||||
#else
 | 
			
		||||
	return true;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Per-process atomic flags. */
 | 
			
		||||
| 
						 | 
				
			
			@ -1967,7 +1963,6 @@ extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec
 | 
			
		|||
	buf;						\
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
#ifdef CONFIG_SMP
 | 
			
		||||
static __always_inline void scheduler_ipi(void)
 | 
			
		||||
{
 | 
			
		||||
	/*
 | 
			
		||||
| 
						 | 
				
			
			@ -1977,9 +1972,6 @@ static __always_inline void scheduler_ipi(void)
 | 
			
		|||
	 */
 | 
			
		||||
	preempt_fold_need_resched();
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
static inline void scheduler_ipi(void) { }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
extern unsigned long wait_task_inactive(struct task_struct *, unsigned int match_state);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue