OSDN Git Service

Merge tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jul 2019 22:41:33 +0000 (15:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jul 2019 22:41:33 +0000 (15:41 -0700)
Pull asm-generic updates from Arnd Bergmann:
 "The asm-generic changes for 5.3 consist of a cleanup series to remove
  ptrace.h from Christoph Hellwig, who explains:

    'asm-generic/ptrace.h is a little weird in that it doesn't actually
     implement any functionality, but it provided multiple layers of
     macros that just implement trivial inline functions. We implement
     those directly in the few architectures and be off with a much
     simpler design.'

  at https://lore.kernel.org/lkml/20190624054728.30966-1-hch@lst.de/"

* tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  asm-generic: remove ptrace.h
  x86: don't use asm-generic/ptrace.h
  sh: don't use asm-generic/ptrace.h
  powerpc: don't use asm-generic/ptrace.h
  arm64: don't use asm-generic/ptrace.h

1  2 
MAINTAINERS
arch/arm64/include/asm/ptrace.h
arch/x86/include/asm/ptrace.h

diff --cc MAINTAINERS
Simple merge
Simple merge
@@@ -169,12 -172,34 +168,33 @@@ static inline unsigned long kernel_stac
  {
        return regs->sp;
  }
 -#endif
  
- #define GET_IP(regs) ((regs)->ip)
- #define GET_FP(regs) ((regs)->bp)
- #define GET_USP(regs) ((regs)->sp)
+ static inline unsigned long instruction_pointer(struct pt_regs *regs)
+ {
+       return regs->ip;
+ }
+ static inline void instruction_pointer_set(struct pt_regs *regs,
+               unsigned long val)
+ {
+       regs->ip = val;
+ }
+ static inline unsigned long frame_pointer(struct pt_regs *regs)
+ {
+       return regs->bp;
+ }
  
- #include <asm-generic/ptrace.h>
+ static inline unsigned long user_stack_pointer(struct pt_regs *regs)
+ {
+       return regs->sp;
+ }
+ static inline void user_stack_pointer_set(struct pt_regs *regs,
+               unsigned long val)
+ {
+       regs->sp = val;
+ }
  
  /* Query offset/name of register from its name/offset */
  extern int regs_query_register_offset(const char *name);