1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef ASM_EDAC_H 3 #define ASM_EDAC_H 4 5 #include <asm/compiler.h> 6 7 /* ECC atomic, DMA, SMP and interrupt safe scr 8 9 static inline void edac_atomic_scrub(void *va, 10 { 11 unsigned long *virt_addr = va; 12 unsigned long temp; 13 u32 i; 14 15 for (i = 0; i < size / sizeof(unsigned 16 /* 17 * Very carefully read and wri 18 * so we are interrupt, DMA an 19 * 20 * Intel: asm("lock; addl $0, 21 */ 22 23 __asm__ __volatile__ ( 24 " .set push 25 " .set mips2 26 "1: ll %0, %1 27 " addu %0, $0 28 " sc %0, %1 29 " beqz %0, 1b 30 " .set pop 31 : "=&r" (temp), "=" GCC_OFF_SM 32 : GCC_OFF_SMALL_ASM() (*virt_a 33 34 virt_addr++; 35 } 36 } 37 38 #endif 39
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.