LCOV - code coverage report
Current view: top level - arch/arm/kernel - jump_label.c (source / functions) Hit Total Coverage
Test: Real Lines: 13 13 100.0 %
Date: 2020-10-17 15:46:43 Functions: 0 3 0.0 %
Legend: Neither, QEMU, Real, Both Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: GPL-2.0
       2                 :            : #include <linux/kernel.h>
       3                 :            : #include <linux/jump_label.h>
       4                 :            : #include <asm/patch.h>
       5                 :            : #include <asm/insn.h>
       6                 :            : 
       7                 :          3 : static void __arch_jump_label_transform(struct jump_entry *entry,
       8                 :            :                                         enum jump_label_type type,
       9                 :            :                                         bool is_static)
      10                 :            : {
      11                 :          3 :         void *addr = (void *)entry->code;
      12                 :            :         unsigned int insn;
      13                 :            : 
      14                 :          3 :         if (type == JUMP_LABEL_JMP)
      15                 :          3 :                 insn = arm_gen_branch(entry->code, entry->target);
      16                 :            :         else
      17                 :            :                 insn = arm_gen_nop();
      18                 :            : 
      19                 :          3 :         if (is_static)
      20                 :            :                 __patch_text_early(addr, insn);
      21                 :            :         else
      22                 :          3 :                 patch_text(addr, insn);
      23                 :          3 : }
      24                 :            : 
      25                 :          3 : void arch_jump_label_transform(struct jump_entry *entry,
      26                 :            :                                enum jump_label_type type)
      27                 :            : {
      28                 :          3 :         __arch_jump_label_transform(entry, type, false);
      29                 :          3 : }
      30                 :            : 
      31                 :          3 : void arch_jump_label_transform_static(struct jump_entry *entry,
      32                 :            :                                       enum jump_label_type type)
      33                 :            : {
      34                 :          3 :         __arch_jump_label_transform(entry, type, true);
      35                 :          3 : }
    

Generated by: LCOV version 1.14