This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.11-50-g317d0e6


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".

The branch, master has been updated
       via  317d0e66a01302c98367b8776d5e7936a80f8ffb (commit)
       via  d143075adc1b95a2760fa9d81c9de39b0b803091 (commit)
       via  40215fde031482b484d993a91b9e64c6081c96eb (commit)
      from  ee0c4dd1ccc424d57d97dc078a4aba0c70eeb8a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=317d0e66a01302c98367b8776d5e7936a80f8ffb

commit 317d0e66a01302c98367b8776d5e7936a80f8ffb
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Tue Feb 2 16:50:15 2010 -0500

    Define MADV_MERGEABLE and MADV_UNMERGEABLE.
    
    Add MADV_MERGEABLE and MADV_UNMERGEABLE to bits/mman.h,
    matching HPPA values used in Linux kernel 2.6.32.

diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 4ddd2c3..a74131e 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
 2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
 
+	* sysdeps/unix/sysv/linux/hppa/bits/mman.h: Define
+	MADV_MERGEABLE and MADV_UNMERGEABLE.
+
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
 	* sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber
 	link register r31.
 
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index f065322..780862a 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -86,6 +86,8 @@
 # define MADV_REMOVE	  9	/* Remove these pages and resources.  */
 # define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
 # define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE   65	/* KSM may merge identical pages */
+# define MADV_UNMERGEABLE 66	/* KSM may not merge identical pages */
 #endif
 
 /* The range 12-64 is reserved for page size specification. */

http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=d143075adc1b95a2760fa9d81c9de39b0b803091

commit d143075adc1b95a2760fa9d81c9de39b0b803091
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Tue Feb 2 16:40:28 2010 -0500

    Update __set_cr27() to mark r31 clobbered.
    
    The function __set_cr27() uses the `ble`
    instruction without marking the link register
    r31 as clobbered. This change adds r31 to the
    list of clobbers. The TLS thread register is
    cr27 and is set by calling __set_cr27().

diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index ef38909..4ddd2c3 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
 2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
 
+	* sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber
+	link register r31.
+
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
 	* sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext):
 	Support more than 8 arguments. 
 
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index 2810d71..389cbb9 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -1,5 +1,5 @@
 /* Definition for thread-local data handling.  NPTL/hppa version.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2010 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
@@ -140,11 +140,13 @@ static inline struct pthread *__get_cr27(void)
   return (struct pthread *) cr27;
 }
 
+/* We write to cr27, clobber r26 as the input argument, and clobber
+   r31 as the link register.  */
 static inline void __set_cr27(struct pthread *cr27)
 {
   asm ( "ble	0xe0(%%sr2, %%r0)\n\t"
 	"copy	%0, %%r26"
-	: : "r" (cr27) : "r26" );
+	: : "r" (cr27) : "r26", "r31" );
 }
 
 /* Get and set the global scope generation counter in struct pthread.  */

http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=40215fde031482b484d993a91b9e64c6081c96eb

commit 40215fde031482b484d993a91b9e64c6081c96eb
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Tue Feb 2 16:36:48 2010 -0500

    Add unlimited argument support to makecontext()
    
    The initial implementation of makecontext()
    supported only 8 arguments. This change adds
    support for unlimited argument processing given
    a large enough stack.

diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 28a3c44..ef38909 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2010-02-02  Carlos O'Donell  <carlos@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext):
+	Support more than 8 arguments. 
+
 2010-02-01  Kyle McMartin  <kyle@redhat.com>
 
 	* sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of
diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c
index 69a1813..cb036d0 100644
--- a/sysdeps/unix/sysv/linux/hppa/makecontext.c
+++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Helge Deller <deller@gmx.de>, 2008.
 
@@ -25,24 +25,21 @@
 #include <sysdep.h>
 #include <ucontext.h>
 
-/* XXX: This implementation only handles integer arguments.  */
+/* POSIX only supports integer arguments.  */
+#define STACK_ALIGN 64
+#define FRAME_SIZE 8
 
 void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 {
-  unsigned int *sp;
+  unsigned long *sp;
   va_list ap;
   int i;
 
-  if (argc > 8)
-    {
-      fprintf (stderr, _("\
-makecontext: does not know how to handle more than 8 arguments\n"));
-      exit (-1);
-    }
-
-  /* Get stack pointer.  */
-  sp = (unsigned int *) ucp->uc_stack.ss_sp;
+  /* Get stack pointer (64-byte aligned).  */
+  sp = (unsigned long *)((((unsigned long) ucp->uc_stack.ss_sp) 
+			 + FRAME_SIZE + argc + STACK_ALIGN) 
+		        & ~(STACK_ALIGN - 1));
 
   /* Store address to jump to.  */
   ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
@@ -50,29 +47,27 @@ makecontext: does not know how to handle more than 8 arguments\n"));
   va_start (ap, argc);
   /* Handle arguments.  */
   for (i = 0; i < argc; ++i)
-    switch (i)
-      {
-      case 0:
-      case 1:
-      case 2:
-      case 3:
-      	ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
-	break;
-      case 4:
-      case 5:
-      case 6:
-      case 7:
-	if (sizeof(unsigned long) == 4) {
-		/* 32bit: put arg7-arg4 on stack.  */
-		sp[7-i] = va_arg (ap, int);
-	} else {
-		/* 64bit: r19-r22 are arg7-arg4.  */
-		ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
+    {
+      if (i < 4)
+	{
+	  ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
+	  continue;
 	}
-	break;
-      }
-  va_end (ap);
 
+      if ((i < 8) && (sizeof(unsigned long) == 8))
+	{
+	  /* 64bit: r19-r22 are arg7-arg4.  */
+	  ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
+	  continue;
+	} 
+
+      /* All other arguments go on the stack.  */
+      sp[-1 * (FRAME_SIZE + 1 + i)] = va_arg (ap, int);
+    }
+  va_end (ap); 
+
+  /* Adjust the stack pointer to last used argument.  */
+  ucp->uc_mcontext.sc_gr[30] = (unsigned long) sp;
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.hppa                             |   15 +++++++
 sysdeps/hppa/nptl/tls.h                    |    6 ++-
 sysdeps/unix/sysv/linux/hppa/bits/mman.h   |    2 +
 sysdeps/unix/sysv/linux/hppa/makecontext.c |   61 +++++++++++++---------------
 4 files changed, 49 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
Community source repository for glibc add-on ports


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]