LCOV - code coverage report
Current view: top level - arch/x86/include/asm - edac.h (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 3 0.0 %
Date: 2022-04-01 14:17:54 Functions: 0 0 -
Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: GPL-2.0 */
       2                 :            : #ifndef _ASM_X86_EDAC_H
       3                 :            : #define _ASM_X86_EDAC_H
       4                 :            : 
       5                 :            : /* ECC atomic, DMA, SMP and interrupt safe scrub function */
       6                 :            : 
       7                 :          0 : static inline void edac_atomic_scrub(void *va, u32 size)
       8                 :            : {
       9                 :            :         u32 i, *virt_addr = va;
      10                 :            : 
      11                 :            :         /*
      12                 :            :          * Very carefully read and write to memory atomically so we
      13                 :            :          * are interrupt, DMA and SMP safe.
      14                 :            :          */
      15         [ #  # ]:          0 :         for (i = 0; i < size / 4; i++, virt_addr++)
      16                 :          0 :                 asm volatile("lock; addl $0, %0"::"m" (*virt_addr));
      17                 :            : }
      18                 :            : 
      19                 :            : #endif /* _ASM_X86_EDAC_H */

Generated by: LCOV version 1.14