sparc: unify ptrace.h
Subsystems (2)
PATCH 11/11 sparc: unify ptrace.h
The two ptrace.h implementations are very alike but
the small differences required two set of ifdef/else/endif pairs.
The definition of reg_window32 could have been shared but that would have required several updates in sparc32 code as all printk formatting for example assume it is longs.
sparc_stackf looked like anohter candidate to share if the 32 bit was renamed to sparc_stackf32.
But it contains two pointers in the sparc32 version which would have been 64 bit in the saprc64 version so it was non-trivial. Using a set of accessor macros could do the trick if pursued later.
The sparc64 specific definitions are not protected by ifdef - as it should not be required to do so.
--- arch/sparc/include/asm/Kbuild | 2 - arch/sparc/include/asm/ptrace.h | 446 +++++++++++++++++++++++++++++++++++- arch/sparc/include/asm/ptrace_32.h | 186 --------------- arch/sparc/include/asm/ptrace_64.h | 356 ---------------------------- 4 files changed, 442 insertions(+), 548 deletions(-) delete mode 100644 arch/sparc/include/asm/ptrace_32.h delete mode 100644 arch/sparc/include/asm/ptrace_64.h
arch/sparc/include/asm/Kbuild +0 -2
@@ -1,8 +1,6 @@ # User exported sparc header files include include/asm-generic/Kbuild.asm -header-y += ptrace_32.h -header-y += ptrace_64.h header-y += siginfo_32.h header-y += siginfo_64.h
arch/sparc/include/asm/ptrace.h +442 -4
450 lines not on this page · raw message
arch/sparc/include/asm/ptrace_32.h deleted +0 -186
186 lines not on this page · raw message
arch/sparc/include/asm/ptrace_64.h deleted +0 -356
356 lines not on this page · raw message
Signature · 1 line
1.6.0.2.GIT
Quoted 2 lines
The two
ptrace.himplementations are very alike but
the small differences required two set of ifdef/else/endif pairs.
This patch is bogus. It missed to include psr.h for the sparc 32 bits. Will send an updated patch soon.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Tue, 30 Dec 2008 00:58:10 +0100
Quoted 13 lines
The two
ptrace.himplementations are very alike but
the small differences required two set of ifdef/else/endif pairs.The definition of
reg_window32could have been shared but that would have required several updates in sparc32 code as all printk formatting for example assume it is longs.
sparc_stackflooked like anohter candidate to share if the 32 bit was renamed tosparc_stackf32.
But it contains two pointers in the sparc32 version which would have been 64 bit in the saprc64 version so it was non-trivial. Using a set of accessor macros could do the trick if pursued later.
Quoted 4 lines
The sparc64 specific definitions are not protected by ifdef - as it should not be required to do so.
Signed-off-by Sam Ravnborg <[email protected]>
Also applied.
FWIW, I think fixing up the printf format strings for the sake of reg_window32 sharing is worth pusruing.
Thanks!