mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	cpu/hotplug: Split do_cpu_down()
Split out the inner workings of do_cpu_down() to allow reuse of that function for the upcoming SMT disabling mechanism. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
		
							parent
							
								
									c4de65696d
								
							
						
					
					
						commit
						cc1fe215e1
					
				
					 1 changed files with 8 additions and 9 deletions
				
			
		
							
								
								
									
										17
									
								
								kernel/cpu.c
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								kernel/cpu.c
									
										
									
									
									
								
							|  | @ -906,20 +906,19 @@ out: | |||
| 	return ret; | ||||
| } | ||||
| 
 | ||||
| static int cpu_down_maps_locked(unsigned int cpu, enum cpuhp_state target) | ||||
| { | ||||
| 	if (cpu_hotplug_disabled) | ||||
| 		return -EBUSY; | ||||
| 	return _cpu_down(cpu, 0, target); | ||||
| } | ||||
| 
 | ||||
| static int do_cpu_down(unsigned int cpu, enum cpuhp_state target) | ||||
| { | ||||
| 	int err; | ||||
| 
 | ||||
| 	cpu_maps_update_begin(); | ||||
| 
 | ||||
| 	if (cpu_hotplug_disabled) { | ||||
| 		err = -EBUSY; | ||||
| 		goto out; | ||||
| 	} | ||||
| 
 | ||||
| 	err = _cpu_down(cpu, 0, target); | ||||
| 
 | ||||
| out: | ||||
| 	err = cpu_down_maps_locked(cpu, target); | ||||
| 	cpu_maps_update_done(); | ||||
| 	return err; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Thomas Gleixner
						Thomas Gleixner