LCOV - code coverage report
Current view: top level - arch/arm64/include/asm - current.h (source / functions) Hit Total Coverage
Test: fstests of 6.5.0-rc3-acha @ Mon Jul 31 20:08:06 PDT 2023 Lines: 3 3 100.0 %
Date: 2023-07-31 20:08:07 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #ifndef __ASM_CURRENT_H
       3             : #define __ASM_CURRENT_H
       4             : 
       5             : #include <linux/compiler.h>
       6             : 
       7             : #ifndef __ASSEMBLY__
       8             : 
       9             : struct task_struct;
      10             : 
      11             : /*
      12             :  * We don't use read_sysreg() as we want the compiler to cache the value where
      13             :  * possible.
      14             :  */
      15             : static __always_inline struct task_struct *get_current(void)
      16             : {
      17 >80186*10^7 :         unsigned long sp_el0;
      18             : 
      19 >80186*10^7 :         asm ("mrs %0, sp_el0" : "=r" (sp_el0));
      20             : 
      21 >53810*10^7 :         return (struct task_struct *)sp_el0;
      22             : }
      23             : 
      24             : #define current get_current()
      25             : 
      26             : #endif /* __ASSEMBLY__ */
      27             : 
      28             : #endif /* __ASM_CURRENT_H */
      29             : 

Generated by: LCOV version 1.14