POWER sys/procfs.h mismatch with kernel 2.6.15

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

POWER sys/procfs.h mismatch with kernel 2.6.15

Thorsten Kukuk

Hi,

kernel 2.6.15 has in asm-power/elf.h (line 110):

# define ELF_NVRREG     34      /* includes vscr & vrsave in split vectors */


But sysdeps/unix/sysv/linux/powerpc/sys/procfs.h has:

#define ELF_NVRREG      33      /* includes vscr */


Can somebody of the POWER developers please check what the correct
value is and fix that?

  Thanks,
    Thorsten

--
Thorsten Kukuk         http://www.suse.de/~kukuk/      [hidden email]
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B
Reply | Threaded
Open this post in threaded view
|

Re: POWER sys/procfs.h mismatch with kernel 2.6.15

Paul Mackerras
Thorsten Kukuk writes:

> kernel 2.6.15 has in asm-power/elf.h (line 110):
>
> # define ELF_NVRREG     34      /* includes vscr & vrsave in split vectors */
>
>
> But sysdeps/unix/sysv/linux/powerpc/sys/procfs.h has:
>
> #define ELF_NVRREG      33      /* includes vscr */
>
>
> Can somebody of the POWER developers please check what the correct
> value is and fix that?

It's 34 for 64-bit processes, but 33 for 32-bit processes.  The kernel
include/asm-powerpc/elf.h file is correct.

Paul.
Reply | Threaded
Open this post in threaded view
|

Re: POWER sys/procfs.h mismatch with kernel 2.6.15

Andreas Jaeger
Paul Mackerras <[hidden email]> writes:

> Thorsten Kukuk writes:
>
>> kernel 2.6.15 has in asm-power/elf.h (line 110):
>>
>> # define ELF_NVRREG     34      /* includes vscr & vrsave in split vectors */
>>
>>
>> But sysdeps/unix/sysv/linux/powerpc/sys/procfs.h has:
>>
>> #define ELF_NVRREG      33      /* includes vscr */
>>
>>
>> Can somebody of the POWER developers please check what the correct
>> value is and fix that?
>
> It's 34 for 64-bit processes, but 33 for 32-bit processes.  The kernel
> include/asm-powerpc/elf.h file is correct.
>
> Paul.
I propose the appended patch.  

Ok to commit?

Andreas

2006-01-13  Andreas Jaeger  <[hidden email]>

        * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (ELF_NVRREG): Fix
         value for PowerPC64.

============================================================
Index: sysdeps/unix/sysv/linux/powerpc/sys/procfs.h
--- sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 2 Mar 2005 20:11:38 -0000 1.12
+++ sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 13 Jan 2006 07:44:25 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2002, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,11 @@ __BEGIN_DECLS
 #ifndef __PPC64_ELF_H
 #define ELF_NGREG       48      /* includes nip, msr, lr, etc. */
 #define ELF_NFPREG      33      /* includes fpscr */
-#define ELF_NVRREG      33      /* includes vscr */
+#if __WORDSIZE == 32
+# define ELF_NVRREG      33      /* includes vscr */
+#else
+# define ELF_NVRREG      34      /* includes vscr */
+#endif
 
 typedef unsigned long elf_greg_t;
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];

--
 Andreas Jaeger, [hidden email], http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: POWER sys/procfs.h mismatch with kernel 2.6.15

Ulrich Drepper
Andreas Jaeger wrote:
> I propose the appended patch.  

OK.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


signature.asc (259 bytes) Download Attachment