Skip to contentSkip to conversation

Export reg.h to userspace

DISCUSSION Sam Ravnborg 3 participants 6 messages Jan 3, 2009 – Jan 5, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

Hi David et al.

I raised this question in another mail - but as it may have been overlooked I raise it again.

There is no users of arch/sparc/include/asm/reg.h and the _32, _64 variants.
Do we really have to export this file to userspace from the kernel?

I did a grep over the whole kernel and there were two drivers that used <asm/reg.h> but these were both powerpc specific drivers and cannot be configured for a sparc system.

I also checked and only some architectures do provide a reg.h file - not all of them. So it is not like it is a mandatory file per see.

I did not check glibc/gdb if they use ths file - I did not feel brave enough to dive into these as it is new territory for me.

I could unify tham anyway but they are so different that I had to have two separate chunks for sparc and sparc64 anyway and thats not nice.

Sam

maintainer
#1 lore raw

From: Sam Ravnborg <[email protected]>
Date: Sat, 3 Jan 2009 13:33:41 +0100

Quoted 3 lines

I did not check glibc/gdb if they use ths file - I did not feel brave enough to dive into these as it is new territory for me.

GDB used to, a long long time ago, but that didn't turn out to be tenable so gdb does things by hand these days to get the ptrace layouts it wants to grok.

There might be some stray userland references still, I'll try to do some research on this.

#2 lore raw
In reply to Sam Ravnborg
Quoted 10 lines · David Miller

From: Sam Ravnborg <[email protected]>
Date: Sat, 3 Jan 2009 13:33:41 +0100

Quoted 3 lines

I did not check glibc/gdb if they use ths file - I did not feel brave enough to dive into these as it is new territory for me.

GDB used to, a long long time ago, but that didn't turn out to be tenable so gdb does things by hand these days to get the ptrace layouts it wants to grok.

Not that gdb works sanely on sparc or anything. It really could use a lot of love, if you're looking to add things to your todo list. :)

~spot

maintainer
#3 lore raw
In reply to Sam Ravnborg

From: "Tom \"spot\" Callaway" <[email protected]>
Date: Sat, 03 Jan 2009 16:56:50 -0500

Quoted 2 lines

Not that gdb works sanely on sparc or anything. It really could use a lot of love, if you're looking to add things to your todo list. :)

What do you mean it doesn't work well? Current CVS only fails ~80 out of 15,000 or so tests in it's testsuite. I ran the testsuite just the other night. Many of those failures are because GDB can't resolve versioned symbols in shared libraries cleanly, it just takes the first one it finds in the shared object, versioned of not, when doing a symbol lookup.

That was 32-bit, and for 64-bit you have to make sure you have set CXX and CXX_FLAGS correctly so that the C++ tests build 64-bit binaries.

#4 lore raw
In reply to Sam Ravnborg
Quoted 13 lines · David Miller

From: "Tom \"spot\" Callaway" <[email protected]>
Date: Sat, 03 Jan 2009 16:56:50 -0500

Quoted 2 lines

Not that gdb works sanely on sparc or anything. It really could use a lot of love, if you're looking to add things to your todo list. :)

What do you mean it doesn't work well? Current CVS only fails ~80 out of 15,000 or so tests in it's testsuite. I ran the testsuite just the other night. Many of those failures are because GDB can't resolve versioned symbols in shared libraries cleanly, it just takes the first one it finds in the shared object, versioned of not, when doing a symbol lookup.

Quoted 3 lines

That was 32-bit, and for 64-bit you have to make sure you have set CXX and CXX_FLAGS correctly so that the C++ tests build 64-bit binaries.

I'll give current CVS a try, but in the latest stable, breakpoints don't work predictably.

~spot

maintainer
#5 lore raw
In reply to Sam Ravnborg

From: David Miller <[email protected]>
Date: Sat, 03 Jan 2009 13:13:17 -0800 (PST)

Quoted 7 lines

From: Sam Ravnborg <[email protected]>
Date: Sat, 3 Jan 2009 13:33:41 +0100

Quoted 3 lines

I did not check glibc/gdb if they use ths file - I did not feel brave enough to dive into these as it is new territory for me.

Quoted 6 lines

GDB used to, a long long time ago, but that didn't turn out to be tenable so gdb does things by hand these days to get the ptrace layouts it wants to grok.

There might be some stray userland references still, I'll try to do some research on this.

Ok, I did some checking, nothing uses this stuff.

I've killed it off as follows:

sparc: Kill asm/reg*.h

As noticed by Sam Ravnborg, these aren't use for anything. Neither the kernel nor userland make a reference to this family of header files.

So just get rid of them.

---
 arch/sparc/include/asm/reg.h    |    8 ----
 arch/sparc/include/asm/reg_32.h |   79 ---------------------------------------
 arch/sparc/include/asm/reg_64.h |   56 ---------------------------
 3 files changed, 0 insertions(+), 143 deletions(-)
 delete mode 100644 arch/sparc/include/asm/reg.h
 delete mode 100644 arch/sparc/include/asm/reg_32.h
 delete mode 100644 arch/sparc/include/asm/reg_64.h
arch/sparc/include/asm/reg.h deleted +0 -8
deleted file mode 100644
index 0c16e19..0000000
@@ -1,8 +0,0 @@
-#ifndef ___ASM_SPARC_REG_H
-#define ___ASM_SPARC_REG_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/reg_64.h>
-#else
-#include <asm/reg_32.h>
-#endif
-#endif
arch/sparc/include/asm/reg_32.h deleted +0 -79

79 lines not on this page · raw message

arch/sparc/include/asm/reg_64.h deleted +0 -56

56 lines not on this page · raw message

Signature · 1 line
1.6.1.15.g159c88