android_kernel_xiaomi_sm8350/arch/sh
Christoph Hellwig dacbe41f77 ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h
While in theory user_enable_single_step/user_disable_single_step/
user_enable_blockstep could also be provided as an inline or macro there's
no good reason to do so, and having the prototype in one places keeps code
size and confusion down.

Roland said:

  The original thought there was that user_enable_single_step() et al
  might well be only an instruction or three on a sane machine (as if we
  have any of those!), and since there is only one call site inlining
  would be beneficial.  But I agree that there is no strong reason to care
  about inlining it.

  As to the arch changes, there is only one thought I'd add to the
  record.  It was always my thinking that for an arch where
  PTRACE_SINGLESTEP does text-modifying breakpoint insertion,
  user_enable_single_step() should not be provided.  That is,
  arch_has_single_step()=>true means that there is an arch facility with
  "pure" semantics that does not have any unexpected side effects.
  Inserting a breakpoint might do very unexpected strange things in
  multi-threaded situations.  Aside from that, it is a peculiar side
  effect that user_{enable,disable}_single_step() should cause COW
  de-sharing of text pages and so forth.  For PTRACE_SINGLESTEP, all these
  peculiarities are the status quo ante for that arch, so having
  arch_ptrace() itself do those is one thing.  But for building other
  things in the future, it is nicer to have a uniform "pure" semantics
  that arch-independent code can expect.

  OTOH, all such arch issues are really up to the arch maintainer.  As
  of today, there is nothing but ptrace using user_enable_single_step() et
  al so it's a distinction without a practical difference.  If/when there
  are other facilities that use user_enable_single_step() and might care,
  the affected arch's can revisit the question when someone cares about
  the quality of the arch support for said new facility.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:38 -08:00
..
boards sh: Fix up ctrl_read/write stragglers in migor setup. 2010-03-02 11:52:28 +09:00
boot arch/sh/boot/compressed/cache.c: Checkpatch cleanup 2010-03-01 11:57:31 +09:00
cchips sh: Fix up hp6xx build. 2010-02-05 17:45:14 +09:00
configs sh: update sdk7786 defconfig. 2010-02-10 16:06:42 +09:00
drivers Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-02-26 16:54:27 -08:00
include ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h 2010-03-12 15:52:38 -08:00
kernel Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
lib arch/sh/lib/libgcc.h: Checkpatch cleanup 2010-03-01 11:57:29 +09:00
lib64
math-emu
mm sh: Move PMB debugfs entry initialization to later stage 2010-03-05 01:11:31 +09:00
oprofile
tools Merge branch 'sh/stable-updates' 2010-01-18 20:47:37 +09:00
Kconfig sh: Disable generic IRQ probing. 2010-02-02 19:17:42 +09:00
Kconfig.cpu sh: Turn on speculative return for SH7785 and SH7786 2010-02-18 18:54:18 +09:00
Kconfig.debug
Makefile sh: mach-titan: Kill off unused PIO port mangling. 2010-01-28 15:08:21 +09:00