__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) NXP 2019
import gdb
import sys
from linux.utils import CachedType, gdb_eval_or_none
from linux.lists import list_for_each_entry
generic_pm_domain_type = CachedType('struct generic_pm_domain')
pm_domain_data_type = CachedType('struct pm_domain_data')
device_link_type = CachedType('struct device_link')
def kobject_get_path(kobj):
path = kobj['name'].string()
parent = kobj['parent']
if parent:
path = kobject_get_path(parent) + '/' + path
return path
def rtpm_status_str(dev):
if dev['power']['runtime_error']:
return 'error'
if dev['power']['disable_depth']:
return 'unsupported'
_RPM_STATUS_LOOKUP = [
"active",
"resuming",
"suspended",
"suspending"
]
return _RPM_STATUS_LOOKUP[dev['power']['runtime_status']]
class LxGenPDSummary(gdb.Command):
'''Print genpd summary
Output is similar to /sys/kernel/debug/pm_genpd/pm_genpd_summary'''
def __init__(self):
super(LxGenPDSummary, self).__init__('lx-genpd-summary', gdb.COMMAND_DATA)
def summary_one(self, genpd):
if genpd['status'] == 0:
status_string = 'on'
else:
status_string = 'off-{}'.format(genpd['state_idx'])
child_names = []
for link in list_for_each_entry(
genpd['parent_links'],
device_link_type.get_type().pointer(),
'parent_node'):
child_names.append(link['child']['name'])
gdb.write('%-30s %-15s %s\n' % (
genpd['name'].string(),
status_string,
', '.join(child_names)))
# Print devices in domain
for pm_data in list_for_each_entry(genpd['dev_list'],
pm_domain_data_type.get_type().pointer(),
'list_node'):
dev = pm_data['dev']
kobj_path = kobject_get_path(dev['kobj'])
gdb.write(' %-50s %s\n' % (kobj_path, rtpm_status_str(dev)))
def invoke(self, arg, from_tty):
if gdb_eval_or_none("&gpd_list") is None:
raise gdb.GdbError("No power domain(s) registered")
gdb.write('domain status children\n');
gdb.write(' /device runtime status\n');
gdb.write('----------------------------------------------------------------------\n');
for genpd in list_for_each_entry(
gdb.parse_and_eval('&gpd_list'),
generic_pm_domain_type.get_type().pointer(),
'gpd_list_node'):
self.summary_one(genpd)
LxGenPDSummary()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| .gitignore | File | 65 B | 0644 |
|
| Makefile | File | 634 B | 0644 |
|
| __init__.py | File | 55 B | 0644 |
|
| clk.py | File | 2.57 KB | 0644 |
|
| config.py | File | 1.3 KB | 0644 |
|
| constants.py.in | File | 4.39 KB | 0644 |
|
| cpus.py | File | 6.05 KB | 0644 |
|
| device.py | File | 5.66 KB | 0644 |
|
| dmesg.py | File | 5.69 KB | 0644 |
|
| genpd.py | File | 2.65 KB | 0644 |
|
| interrupts.py | File | 7.67 KB | 0644 |
|
| kasan.py | File | 1.38 KB | 0644 |
|
| lists.py | File | 4.16 KB | 0644 |
|
| mapletree.py | File | 7.17 KB | 0644 |
|
| mm.py | File | 13.98 KB | 0644 |
|
| modules.py | File | 3.92 KB | 0644 |
|
| page_owner.py | File | 6.83 KB | 0644 |
|
| pgtable.py | File | 10.08 KB | 0644 |
|
| proc.py | File | 8.58 KB | 0644 |
|
| radixtree.py | File | 2.46 KB | 0644 |
|
| rbtree.py | File | 4.62 KB | 0644 |
|
| slab.py | File | 11.27 KB | 0644 |
|
| stackdepot.py | File | 2.62 KB | 0644 |
|
| symbols.py | File | 7.32 KB | 0644 |
|
| tasks.py | File | 3.17 KB | 0644 |
|
| timerlist.py | File | 7.86 KB | 0644 |
|
| utils.py | File | 5.87 KB | 0644 |
|
| vfs.py | File | 1.42 KB | 0644 |
|
| vmalloc.py | File | 2.33 KB | 0644 |
|
| xarray.py | File | 636 B | 0644 |
|