1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 3 * Copyright IBM Corp. 1999, 2024 4 */ 5 6 #ifndef __ASM_S390_ACCESS_REGS_H 7 #define __ASM_S390_ACCESS_REGS_H 8 9 #include <linux/instrumented.h> 10 #include <asm/sigcontext.h> 11 12 struct access_regs { 13 unsigned int regs[NUM_ACRS]; 14 }; 15 16 static inline void save_access_regs(unsigned i 17 { 18 struct access_regs *regs = (struct acc 19 20 instrument_write(regs, sizeof(*regs)); 21 asm volatile("stamy 0,15,%[regs]" 22 : [regs] "=QS" (*regs) 23 : 24 : "memory"); 25 } 26 27 static inline void restore_access_regs(unsigne 28 { 29 struct access_regs *regs = (struct acc 30 31 instrument_read(regs, sizeof(*regs)); 32 asm volatile("lamy 0,15,%[regs]" 33 : 34 : [regs] "QS" (*regs) 35 : "memory"); 36 } 37 38 #endif /* __ASM_S390_ACCESS_REGS_H */ 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.