Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/external/cddl/osnet/dist/tools/ctf/cvt Pull up following ...



details:   https://anonhg.NetBSD.org/src/rev/de5d993207a4
branches:  netbsd-9
changeset: 1001755:de5d993207a4
user:      martin <martin%NetBSD.org@localhost>
date:      Wed May 13 18:04:03 2020 +0000

description:
Pull up following revision(s) (requested by chs in ticket #905):

        external/cddl/osnet/dist/tools/ctf/cvt/fixup_tdescs.c: revision 1.6

Revert "Add fixup operation to remove private mutex types for x86."

The x86 (and arm) definitions of struct kmutex are no longer defined
differently depending on __MUTEX_PRIVATE.

diffstat:

 external/cddl/osnet/dist/tools/ctf/cvt/fixup_tdescs.c |  43 -------------------
 1 files changed, 0 insertions(+), 43 deletions(-)

diffs (60 lines):

diff -r cd6a66d91da0 -r de5d993207a4 external/cddl/osnet/dist/tools/ctf/cvt/fixup_tdescs.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/fixup_tdescs.c     Wed May 13 18:01:49 2020 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/fixup_tdescs.c     Wed May 13 18:04:03 2020 +0000
@@ -280,48 +280,6 @@
 #ifdef __NetBSD__
 
 /*
- * The kmutex structure comes in two flavours, with or without __MUTEX_PRIVATE
- * defined.  Since many structures include kmutexes this causes massive amounts
- * of duplication on merge (~ 40% for a GENERIC kernel).  Remove the private
- * fields if we see them.
- */
-static void
-fix_kmutex_private(tdata_t *td, size_t ptrsize)
-{
-       tdesc_t *desc;
-       mlist_t *ml;
-
-       /*
-        * X86 kmutex is either
-        *      union {
-        *              volatile uintptr_t mtxa_owner;
-        *      } u
-        * or
-        *      union {
-        *              volatile uintptr_t mtxa_owner;
-        *              struct {
-        *                      ...
-        *              } s;
-        *      } u
-        * so we remove "struct s" if we find it.
-        */
-       if ((desc = lookup_tdesc(td, "kmutex")) != NULL &&
-           desc->t_type == STRUCT &&
-           (ml = desc->t_members) != NULL &&
-           streq(ml->ml_name, "u") &&
-           (desc = ml->ml_type) != NULL &&
-           desc->t_type == UNION &&
-           (ml = desc->t_members) != NULL &&
-           streq(ml->ml_name, "mtxa_owner") &&
-           (ml = ml->ml_next) != NULL &&
-           streq(ml->ml_name, "s") &&
-           ml->ml_next == NULL) {
-               /* Found, delete member "s". */
-               desc->t_members->ml_next = NULL;
-       }
-}
-
-/*
  * XXX: A crude hack to bring down the number of types for a
  * GENRIC kernel below 2**15-1 (from ~34000 to ~29800).
  *
@@ -377,7 +335,6 @@
 {
        fix_small_cpu_struct(td, ptrsize);
 #ifdef __NetBSD__
-       fix_kmutex_private(td, ptrsize);
        fix_kill_attr(td, ptrsize);
 #endif
 }



Home | Main Index | Thread Index | Old Index