mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 14:01:20 +00:00 
			
		
		
		
	module/sched: Expose a classmethod variant of SchedModule.has_debug
A later change needs to access this outside of a SchedModule instance, so make the information available as a classmethod.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							ada318f27b
						
					
				
				
					commit
					2d86474682
				
			| @@ -313,12 +313,16 @@ class SchedModule(Module): | ||||
|         path = '/proc/sys/kernel/sched_' + attr | ||||
|         self.target.write_value(path, value, verify) | ||||
|  | ||||
|     @classmethod | ||||
|     def target_has_debug(cls, target): | ||||
|         if target.config.get('SCHED_DEBUG') != 'y': | ||||
|             return False | ||||
|         return target.file_exists('/sys/kernel/debug/sched_features') | ||||
|  | ||||
|     @property | ||||
|     @memoized | ||||
|     def has_debug(self): | ||||
|         if self.target.config.get('SCHED_DEBUG') != 'y': | ||||
|             return False; | ||||
|         return self.target.file_exists('/sys/kernel/debug/sched_features') | ||||
|         return self.target_has_debug(self.target) | ||||
|  | ||||
|     def get_features(self): | ||||
|         """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user