ptrace.h 591 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2006 Atmark Techno, Inc.
  4. */
  5. #ifndef _ASM_MICROBLAZE_PTRACE_H
  6. #define _ASM_MICROBLAZE_PTRACE_H
  7. #include <uapi/asm/ptrace.h>
  8. #ifndef __ASSEMBLY__
  9. #define kernel_mode(regs) ((regs)->pt_mode)
  10. #define user_mode(regs) (!kernel_mode(regs))
  11. #define instruction_pointer(regs) ((regs)->pc)
  12. #define profile_pc(regs) instruction_pointer(regs)
  13. #define user_stack_pointer(regs) ((regs)->r1)
  14. static inline long regs_return_value(struct pt_regs *regs)
  15. {
  16. return regs->r3;
  17. }
  18. #endif /* __ASSEMBLY__ */
  19. #endif /* _ASM_MICROBLAZE_PTRACE_H */