Skip to contentSkip to conversation

sparc: unify ptrace.h

PATCH In review Sam Ravnborg 2 participants 3 messages Dec 29, 2008 – Jan 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index fd925bd..1209485 100644
@@ -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
#1 lore raw
Quoted 2 lines

The two ptrace.h implementations 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

maintainer
#2 lore raw
In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Tue, 30 Dec 2008 00:58:10 +0100

Quoted 13 lines

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.

Quoted 4 lines

The sparc64 specific definitions are not protected by ifdef - as it should not be required to do so.

Also applied.

FWIW, I think fixing up the printf format strings for the sake of reg_window32 sharing is worth pusruing.

Thanks!