Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 830) sorted by relevance

12345678910>>...34

/linux/scripts/gdb/linux/
H A Dmm.py24 def __init__(self): argument
28 self.ops = aarch64_page_ops()
30 self.ops = x86_page_ops()
35 def __init__(self): argument
36 self.struct_page_size = utils.get_page_type().sizeof
37 self.PAGE_SHIFT = constants.LX_CONFIG_PAGE_SHIFT
38 self.PAGE_SIZE = 1 << self.PAGE_SHIFT
39 self.PAGE_MASK = (~(self.PAGE_SIZE - 1)) & ((1 << 64) - 1)
41 self.PAGE_OFFSET = int(gdb.parse_and_eval("page_offset_base"))
42 self.VMEMMAP_START = int(gdb.parse_and_eval("vmemmap_base"))
[all …]
/linux/tools/perf/scripts/python/
H A Dexported-sql-viewer.py194 def __init__(self, task, param=None, parent=None): argument
195 super(Thread, self).__init__(parent)
196 self.task = task
197 self.param = param
199 def run(self): argument
201 if self.param is None:
202 done, result = self.task()
204 done, result = self.task(self.param)
205 self.done.emit(result)
213 def __init__(self, glb, params, parent=None): argument
[all …]
/linux/tools/testing/selftests/drivers/net/lib/py/
H A Denv.py21 def __init__(self, src_path): argument
22 self.src_path = Path(src_path)
23 self.test_dir = self.src_path.parent.resolve()
24 self.net_lib_dir = (Path(__file__).parent / "../../../../net/lib").resolve()
26 self.env = self._load_env_file()
29 self.dev = None
31 def _load_env_file(self):
34 src_dir = Path(self
28 _load_env_file(self) global() argument
56 __init__(self, src_path, nsim_test=None, **kwargs) global() argument
75 __enter__(self) global() argument
80 __exit__(self, ex_type, ex_value, ex_tb) global() argument
86 __del__(self) global() argument
105 __init__(self, src_path, nsim_test=None) global() argument
166 create_local(self) global() argument
186 _check_env(self) global() argument
210 resolve_remote_ifc(self) global() argument
222 __enter__(self) global() argument
225 __exit__(self, ex_type, ex_value, ex_tb) global() argument
231 __del__(self) global() argument
245 require_ipver(self, ipver) global() argument
249 _require_cmd(self, comm, key, host=None) global() argument
257 require_cmd(self, comm, local=True, remote=False) global() argument
265 wait_hw_stats_settle(self) global() argument
[all...]
/linux/tools/verification/rvgen/rvgen/
H A Dgenerator.py15 def __init__(self, extra_params={}): argument
16 self.name = extra_params.get("model_name")
17 self.parent = extra_params.get("parent")
18 self.abs_template_dir = \
19 os.path.join(os.path.dirname(__file__), "templates", self.template_dir)
20 self.main_c = self._read_template_file("main.c")
21 self.kconfig = self._read_template_file("Kconfig")
22 self.description = extra_params.get("description", self.name) or "auto-generated"
23 self.auto_patch = extra_params.get("auto_patch")
24 if self.auto_patch:
[all …]
H A Ddot2c.py25 def __init__(self, file_path, model_name=None): argument
27 self.line_length = 100
29 def __get_enum_states_content(self) -> list[str]: argument
31 buff.append("\t%s%s," % (self.initial_state, self.enum_suffix))
32 for state in self.states:
33 if state != self.initial_state:
34 buff.append("\t%s%s," % (state, self.enum_suffix))
35 buff.append("\tstate_max%s," % (self.enum_suffix))
39 def format_states_enum(self)
38 __get_enum_states_content(self) global() argument
48 get_enum_states_string(self) global() argument
52 format_states_enum(self) global() argument
60 __get_enum_events_content(self) global() argument
74 get_enum_events_string(self) global() argument
78 format_events_enum(self) global() argument
86 get_minimun_type(self) global() argument
100 format_automaton_definition(self) global() argument
112 format_aut_init_header(self) global() argument
117 __get_string_vector_per_line_content(self, buff) global() argument
130 get_aut_init_events_string(self) global() argument
133 get_aut_init_states_string(self) global() argument
136 format_aut_init_events_string(self) global() argument
143 format_aut_init_states_string(self) global() argument
151 __get_max_strlen_of_states(self) global() argument
155 get_aut_init_function(self) global() argument
183 format_aut_init_function(self) global() argument
191 get_aut_init_initial_state(self) global() argument
194 format_aut_init_initial_state(self) global() argument
201 get_aut_init_final_states(self) global() argument
216 format_aut_init_final_states(self) global() argument
222 __get_automaton_initialization_footer_string(self) global() argument
226 format_aut_init_footer(self) global() argument
232 format_invalid_state(self) global() argument
238 format_model(self) global() argument
254 print_model_classic(self) global() argument
[all...]
H A Dltl2ba.py72 def __init__(self, incoming: set['GraphNode'], new, old, _next): argument
73 self.init = False
74 self.outgoing = set()
75 self.labels = set()
76 self.incoming = incoming.copy()
77 self.new = new.copy()
78 self.old = old.copy()
79 self.next = _next.copy()
80 self.id = GraphNode.uid
83 def expand(self, node_set): argument
[all …]
/linux/tools/docs/
H A Dsphinx-pre-install78 def __init__(self, pdf): argument
90 self.missing = {}
91 self.missing_pkg = {}
92 self.need = 0
93 self.optional = 0
94 self.pdf = pdf
127 def add_package(self, package, dtype): argument
133 self.missing[package] = dtype
135 self.optional += 1
137 self.need += 1
[all …]
/linux/tools/lib/python/kdoc/
H A Dkdoc_output.py70 def __init__(self):
73 self.out_mode = self.OUTPUT_ALL
74 self.enable_lineno = None
75 self.nosymbol = {}
76 self.symbol = None
77 self.function_table = None
78 self.config = None argument
79 self.no_doc_sections = False
81 self
65 __init__(self) global() argument
85 set_filter(self, export, internal, symbol, nosymbol, function_table, enable_lineno, no_doc_sections) global() argument
112 highlight_block(self, block) global() argument
122 out_warnings(self, args) global() argument
130 check_doc(self, name, args) global() argument
150 check_declaration(self, dtype, name, args) global() argument
178 msg(self, fname, name, args) global() argument
218 set_symbols(self, symbols) global() argument
221 out_doc(self, fname, name, args) global() argument
224 out_function(self, fname, name, args) global() argument
227 out_enum(self, fname, name, args) global() argument
230 out_typedef(self, fname, name, args) global() argument
233 out_struct(self, fname, name, args) global() argument
264 __init__(self) global() argument
275 print_lineno(self, ln) global() argument
282 output_highlight(self, args) global() argument
334 out_section(self, args, out_docblock=False) global() argument
359 out_doc(self, fname, name, args) global() argument
364 out_function(self, fname, name, args) global() argument
446 out_enum(self, fname, name, args) global() argument
475 out_typedef(self, fname, name, args) global() argument
492 out_struct(self, fname, name, args) global() argument
573 __init__(self, modulename) global() argument
600 arg_name(self, args, name) global() argument
620 set_symbols(self, symbols) global() argument
629 out_tail(self, fname, name, args) global() argument
652 msg(self, fname, name, args) global() argument
663 output_highlight(self, block) global() argument
684 out_doc(self, fname, name, args) global() argument
696 out_function(self, fname, name, args) global() argument
744 out_enum(self, fname, name, args) global() argument
776 out_typedef(self, fname, name, args) global() argument
790 out_struct(self, fname, name, args) global() argument
[all...]
/linux/tools/crypto/ccp/
H A Dtest_dbc.py34 def __init__(self, data) -> None: argument
35 self.d = None
36 self.signature = b"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
37 self.uid = b"1111111111111111"
40 def setUp(self) -> None: argument
41 self.d = open(DEVICE_NODE)
44 def tearDown(self) -> None: argument
45 if self.d:
46 self.d.close()
51 def setUp(self) -> None: argument
[all …]
/linux/tools/lib/python/feat/
H A Dparse_features.py52 def __init__(self, prefix, debug=0, enable_fname=False):
57 self.prefix = prefix
58 self.debug = debug
59 self.enable_fname = enable_fname
61 self.data = {}
64 self.max_size_name = len(self.h_name)
65 self.max_size_kconfig = len(self.h_kconfig) argument
66 self
41 __init__(self, prefix, debug=0, enable_fname=False) global() argument
68 parse_error(self, fname, ln, msg, data=None) global() argument
84 parse_feat_file(self, fname) global() argument
206 parse(self) global() argument
222 output_arch_table(self, arch, feat=None) global() argument
282 output_feature(self, feat) global() argument
332 matrix_lines(self, desc_size, max_size_status, header) global() argument
346 output_matrix(self) global() argument
466 list_arch_features(self, arch, feat) global() argument
[all...]
/linux/tools/testing/selftests/bpf/
H A Djson_writer.c29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument
32 for (i = 0; i < self->depth; ++i) in jsonw_indent()
33 fputs(" ", self->out); in jsonw_indent()
37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument
39 if (!self->pretty) in jsonw_eol()
42 putc('\n', self->out); in jsonw_eol()
43 jsonw_indent(self); in jsonw_eol()
47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument
49 if (self->sep != '\0') in jsonw_eor()
50 putc(self->sep, self->out); in jsonw_eor()
[all …]
/linux/tools/bpf/bpftool/
H A Djson_writer.c29 static void jsonw_indent(json_writer_t *self) in jsonw_indent() argument
32 for (i = 0; i < self->depth; ++i) in jsonw_indent()
33 fputs(" ", self->out); in jsonw_indent()
37 static void jsonw_eol(json_writer_t *self) in jsonw_eol() argument
39 if (!self->pretty) in jsonw_eol()
42 putc('\n', self->out); in jsonw_eol()
43 jsonw_indent(self); in jsonw_eol()
47 static void jsonw_eor(json_writer_t *self) in jsonw_eor() argument
49 if (self->sep != '\0') in jsonw_eor()
50 putc(self->sep, self->out); in jsonw_eor()
[all …]
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DSchedGui.py23 def __init__(self, sched_tracer, title, parent = None, id = -1): argument
24 wx.Frame.__init__(self, parent, id, title)
26 (self.screen_width, self.screen_height) = wx.GetDisplaySize()
27 self.screen_width -= 10
28 self.screen_height -= 10
29 self.zoom = 0.5
30 self.scroll_scale = 20
31 self.sched_tracer = sched_tracer
32 self.sched_tracer.set_root_win(self)
33 (self.ts_start, self.ts_end) = sched_tracer.interval()
[all …]
/linux/tools/testing/selftests/damon/
H A D_damon_sysfs.py47 def __init__(self, size=None, nr_accesses=None, age=None): argument
48 self.size = size
49 self.nr_accesses = nr_accesses
50 self.age = age
52 if self.size is None:
53 self.size = [0, 2**64 - 1]
54 if self.nr_accesses is None:
55 self.nr_accesses = [0, 2**32 - 1]
56 if self.age is None:
57 self.age = [0, 2**32 - 1]
[all …]
/linux/drivers/gpu/drm/msm/registers/
H A Dgen_header.py16 def __init__(self, message): argument
17 self.message = message
20 def __init__(self, name): argument
21 self.name = name
22 self.values = []
24 def has_name(self, name): argument
25 for (n, value) in self.values:
30 def names(self): argument
31 return [n for (n, value) in self.values]
33 def dump(self, is_deprecated): argument
[all …]
/linux/tools/testing/selftests/hid/tests/
H A Dbase_device.py46 def __init__(self, path): argument
47 self.path = path
49 def __set_value(self, value): argument
50 with open(self.path, "w") as f:
53 def __get_value(self): argument
54 with open(self.path) as f:
58 def int_value(self) -> int: argument
59 return int(self.__get_value())
62 def int_value(self, v: int) -> None: argument
63 self.__set_value(v)
[all …]
/linux/tools/testing/kunit/
H A Dkunit_tool_test.py46 def test_is_subset_of(self): argument
48 self.assertTrue(kconfig0.is_subset_of(kconfig0))
52 self.assertTrue(kconfig1.is_subset_of(kconfig1))
53 self.assertTrue(kconfig0.is_subset_of(kconfig1))
54 self.assertFalse(kconfig1.is_subset_of(kconfig0))
56 def test_read_from_file(self): argument
68 self.assertEqual(kconfig, expected_kconfig)
70 def test_write_to_file(self): argument
83 self.assertEqual(actual_kconfig, expected_kconfig)
86 def setUp(self): argument
[all …]
/linux/tools/testing/selftests/vfio/
H A Dvfio_pci_driver_test.c76 self->iommu = iommu_init(variant->iommu_mode); in FIXTURE_SETUP()
77 self->device = vfio_pci_device_init(device_bdf, self->iommu); in FIXTURE_SETUP()
78 self->iova_allocator = iova_allocator_init(self->iommu); in FIXTURE_SETUP()
80 driver = &self->device->driver; in FIXTURE_SETUP()
82 region_setup(self->iommu, self->iova_allocator, &self->memcpy_region, SZ_1G); in FIXTURE_SETUP()
83 region_setup(self->iommu, self->iova_allocator, &driver->region, SZ_2M); in FIXTURE_SETUP()
86 self->unmapped_iova = iova_allocator_alloc(self->iova_allocator, SZ_1G); in FIXTURE_SETUP()
88 vfio_pci_driver_init(self->device); in FIXTURE_SETUP()
89 self->msi_fd = self->device->msi_eventfds[driver->msi]; in FIXTURE_SETUP()
96 self->size = self->device->driver.max_memcpy_size; in FIXTURE_SETUP()
[all …]
/linux/tools/kvm/kvm_stat/
H A Dkvm_stat336 def tracepoint_is_child(self, field): argument
343 def __init__(self, exit_reasons): argument
344 self.sc_perf_evt_open = 298
345 self.ioctl_numbers = IOCTL_NUMBERS
346 self.exit_reason_field = 'exit_reason'
347 self.exit_reasons = exit_reasons
349 def debugfs_is_child(self, field): argument
355 def __init__(self): argument
356 self.sc_perf_evt_open = 319
357 self.ioctl_numbers = IOCTL_NUMBERS
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/
H A Dhw_atl_b0.c115 static int hw_atl_b0_hw_reset(struct aq_hw_s *self) in hw_atl_b0_hw_reset() argument
119 err = hw_atl_utils_soft_reset(self); in hw_atl_b0_hw_reset()
123 self->aq_fw_ops->set_state(self, MPI_RESET); in hw_atl_b0_hw_reset()
125 err = aq_hw_err_from_flags(self); in hw_atl_b0_hw_reset()
130 int hw_atl_b0_set_fc(struct aq_hw_s *self, u32 fc, u32 tc) in hw_atl_b0_set_fc() argument
132 hw_atl_rpb_rx_xoff_en_per_tc_set(self, !!(fc & AQ_NIC_FC_RX), tc); in hw_atl_b0_set_fc()
137 static int hw_atl_b0_tc_ptp_set(struct aq_hw_s *self) in hw_atl_b0_tc_ptp_set() argument
140 hw_atl_tpb_tx_pkt_buff_size_per_tc_set(self, HW_ATL_B0_PTP_TXBUF_SIZE, in hw_atl_b0_tc_ptp_set()
144 hw_atl_rpb_rx_pkt_buff_size_per_tc_set(self, HW_ATL_B0_PTP_RXBUF_SIZE, in hw_atl_b0_tc_ptp_set()
147 hw_atl_rpb_rx_xoff_en_per_tc_set(self, 0U, AQ_HW_PTP_TC); in hw_atl_b0_tc_ptp_set()
[all …]
H A Dhw_atl_utils.c58 static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
60 static u32 hw_atl_utils_get_mpi_mbox_tid(struct aq_hw_s *self);
61 static u32 hw_atl_utils_mpi_get_state(struct aq_hw_s *self);
62 static u32 hw_atl_utils_mif_cmd_get(struct aq_hw_s *self);
63 static u32 hw_atl_utils_mif_addr_get(struct aq_hw_s *self);
64 static u32 hw_atl_utils_rpc_state_get(struct aq_hw_s *self);
65 static u32 aq_fw1x_rpc_get(struct aq_hw_s *self);
67 int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops) in hw_atl_utils_initfw() argument
71 hw_atl_utils_hw_chip_features_init(self, in hw_atl_utils_initfw()
72 &self->chip_features); in hw_atl_utils_initfw()
[all …]
/linux/tools/testing/selftests/pidfd/
H A Dpidfd_setns_test.c98 self->nsfds[i] = -EBADF; in FIXTURE_SETUP()
99 self->child_nsfds1[i] = -EBADF; in FIXTURE_SETUP()
100 self->child_nsfds2[i] = -EBADF; in FIXTURE_SETUP()
101 self->child_pidfd_derived_nsfds[i] = -EBADF; in FIXTURE_SETUP()
102 self->child_pidfd_derived_nsfds1[i] = -EBADF; in FIXTURE_SETUP()
103 self->child_pidfd_derived_nsfds2[i] = -EBADF; in FIXTURE_SETUP()
111 self->pid = getpid(); in FIXTURE_SETUP()
112 self->pidfd = sys_pidfd_open(self->pid, 0); in FIXTURE_SETUP()
113 EXPECT_GT(self->pidfd, 0) { in FIXTURE_SETUP()
114 TH_LOG("%m - Failed to open pidfd for process %d", self->pid); in FIXTURE_SETUP()
[all …]
/linux/tools/perf/pmu-events/
H A Dmetric.py124 def ToPerfJson(self) -> str: argument
128 def ToPython(self) -> str: argument
132 def Simplify(self): argument
136 def HasExperimentalEvents(self) -> bool: argument
140 def Equals(self, other) -> bool: argument
144 def Substitute(self, name: str, expression: 'Expression') -> 'Expression': argument
147 def __str__(self) -> str: argument
148 return self.ToPerfJson()
150 def __or__(self, other: Union[int, float, 'Expression']) -> 'Operator': argument
151 return Operator('|', self, other)
[all …]
/linux/scripts/
H A Dbpf_doc.py25 def __init__(self, line='<line not provided>', reader=None): argument
27 BaseException.__init__(self,
31 BaseException.__init__(self, 'Error parsing line: %s' % line)
41 def __init__(self, proto='', desc='', ret=''): argument
42 self.proto = proto
43 self.desc = desc
44 self.ret = ret
46 def to_dict(self): argument
48 'proto': self.proto,
49 'desc': self.desc,
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl2/
H A Dhw_atl2.c19 static int hw_atl2_act_rslvr_table_set(struct aq_hw_s *self, u8 location,
89 static u32 hw_atl2_sem_act_rslvr_get(struct aq_hw_s *self) in hw_atl2_sem_act_rslvr_get() argument
91 return hw_atl_reg_glb_cpu_sem_get(self, HW_ATL2_FW_SM_ACT_RSLVR); in hw_atl2_sem_act_rslvr_get()
94 static int hw_atl2_hw_reset(struct aq_hw_s *self) in hw_atl2_hw_reset() argument
96 struct hw_atl2_priv *priv = self->priv; in hw_atl2_hw_reset()
99 err = hw_atl2_utils_soft_reset(self); in hw_atl2_hw_reset()
105 self->aq_fw_ops->set_state(self, MPI_RESET); in hw_atl2_hw_reset()
107 err = aq_hw_err_from_flags(self); in hw_atl2_hw_reset()
112 static int hw_atl2_hw_queue_to_tc_map_set(struct aq_hw_s *self) in hw_atl2_hw_queue_to_tc_map_set() argument
114 struct aq_nic_cfg_s *cfg = self->aq_nic_cfg; in hw_atl2_hw_queue_to_tc_map_set()
[all …]

12345678910>>...34