All of lore.kernel.org
 help / color / mirror / Atom feed
* + scripts-gdb-fix-lx-lsmod-refcnt.patch added to -mm tree
@ 2015-05-21 21:15 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2015-05-21 21:15 UTC (permalink / raw)
  To: adrien+dev, jan.kiszka, pktoss, mm-commits


The patch titled
     Subject: scripts/gdb: fix lx-lsmod refcnt
has been added to the -mm tree.  Its filename is
     scripts-gdb-fix-lx-lsmod-refcnt.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/scripts-gdb-fix-lx-lsmod-refcnt.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/scripts-gdb-fix-lx-lsmod-refcnt.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Adrien Schildknecht <adrien+dev@schischi.me>
Subject: scripts/gdb: fix lx-lsmod refcnt

Commit 2f35c41f58a9 ("module: Replace module_ref with atomic_t refcnt")
changes the way refcnt is handled but did not update the gdb script to use
the new variable.

Since refcnt is not per-cpu anymore, we can directly read its value.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Pantelis Koukousoulas <pktoss@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/gdb/linux/modules.py |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff -puN scripts/gdb/linux/modules.py~scripts-gdb-fix-lx-lsmod-refcnt scripts/gdb/linux/modules.py
--- a/scripts/gdb/linux/modules.py~scripts-gdb-fix-lx-lsmod-refcnt
+++ a/scripts/gdb/linux/modules.py
@@ -73,18 +73,11 @@ class LxLsmod(gdb.Command):
                 "        " if utils.get_long_type().sizeof == 8 else ""))
 
         for module in module_list():
-            ref = 0
-            module_refptr = module['refptr']
-            for cpu in cpus.cpu_list("cpu_possible_mask"):
-                refptr = cpus.per_cpu(module_refptr, cpu)
-                ref += refptr['incs']
-                ref -= refptr['decs']

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-21 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 21:15 + scripts-gdb-fix-lx-lsmod-refcnt.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.