diff options
author | 2016-06-02 09:54:12 +0200 | |
---|---|---|
committer | 2016-06-02 09:54:12 +0200 | |
commit | 5599617ec0719dba3b1f85a4abca2a6c93368ae3 (patch) | |
tree | 7d2f9bb6a538ee8ed5cfa391f2cfa72a3e2daa9f /scripts/gdb/linux/cpus.py | |
parent | drm/i915/skl+: Use scaling amount for plane data rate calculation (v4) (diff) | |
parent | Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next (diff) | |
download | linux-dev-5599617ec0719dba3b1f85a4abca2a6c93368ae3.tar.xz linux-dev-5599617ec0719dba3b1f85a4abca2a6c93368ae3.zip |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
Git got absolutely destroyed with all our cherry-picking from
drm-intel-next-queued to various branches. It ended up inserting
intel_crtc_page_flip 2x even in intel_display.c.
Backmerge to get back to sanity.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'scripts/gdb/linux/cpus.py')
-rw-r--r-- | scripts/gdb/linux/cpus.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/gdb/linux/cpus.py b/scripts/gdb/linux/cpus.py index 4297b83fedef..ca11e8df31b6 100644 --- a/scripts/gdb/linux/cpus.py +++ b/scripts/gdb/linux/cpus.py @@ -97,9 +97,47 @@ def cpu_list(mask_name): bits >>= 1 bit += 1 + yield int(cpu) + + +def each_online_cpu(): + for cpu in cpu_list("__cpu_online_mask"): + yield cpu + + +def each_present_cpu(): + for cpu in cpu_list("__cpu_present_mask"): + yield cpu + + +def each_possible_cpu(): + for cpu in cpu_list("__cpu_possible_mask"): + yield cpu + + +def each_active_cpu(): + for cpu in cpu_list("__cpu_active_mask"): yield cpu +class LxCpus(gdb.Command): + """List CPU status arrays + +Displays the known state of each CPU based on the kernel masks +and can help identify the state of hotplugged CPUs""" + + def __init__(self): + super(LxCpus, self).__init__("lx-cpus", gdb.COMMAND_DATA) + + def invoke(self, arg, from_tty): + gdb.write("Possible CPUs : {}\n".format(list(each_possible_cpu()))) + gdb.write("Present CPUs : {}\n".format(list(each_present_cpu()))) + gdb.write("Online CPUs : {}\n".format(list(each_online_cpu()))) + gdb.write("Active CPUs : {}\n".format(list(each_active_cpu()))) + +LxCpus() + + class PerCpu(gdb.Function): """Return per-cpu variable. |