Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ARM64_ASM_SIGNAL_H
0003 #define __ARM64_ASM_SIGNAL_H
0004 
0005 #include <asm/memory.h>
0006 #include <uapi/asm/signal.h>
0007 #include <uapi/asm/siginfo.h>
0008 
0009 static inline void __user *arch_untagged_si_addr(void __user *addr,
0010                          unsigned long sig,
0011                          unsigned long si_code)
0012 {
0013     /*
0014      * For historical reasons, all bits of the fault address are exposed as
0015      * address bits for watchpoint exceptions. New architectures should
0016      * handle the tag bits consistently.
0017      */
0018     if (sig == SIGTRAP && si_code == TRAP_BRKPT)
0019         return addr;
0020 
0021     return untagged_addr(addr);
0022 }
0023 #define arch_untagged_si_addr arch_untagged_si_addr
0024 
0025 #endif