/linux/samples/trace_events/ |
H A D | trace-events-sample.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 * In this case, it would look for sample-trace.h 14 * This file is called trace-events-sample.h but we want the system 15 * to be called "sample-trace". Therefore we must define the name of this 18 * #define TRACE_INCLUDE_FILE trace-events-sample 26 #define TRACE_SYSTEM sample-trac [all...] |
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | cgroup_attach_override.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #define FOO "/foo" macro 8 #define BAR "/foo/bar/" macro 9 #define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null" 28 int drop_prog = -1, allow_prog = -1, foo = -1, bar = -1; in serial_test_cgroup_attach_override() local 33 "verifier output:\n%s\n-------\n", bpf_log_buf)) in serial_test_cgroup_attach_override() 38 "verifier output:\n%s\n-------\n", bpf_log_buf)) in serial_test_cgroup_attach_override() 41 foo = test__join_cgroup(FOO); in serial_test_cgroup_attach_override() 42 if (CHECK(foo < 0, "cgroup_join_foo", "cgroup setup failed\n")) in serial_test_cgroup_attach_override() 45 if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() [all …]
|
H A D | linked_list.c | 1 // SPDX-License-Identifier: GPL-2.0 87 "operation on bpf_list_head expects arg#1 bpf_list_node at offset=48 in struct foo, " 88 "but arg is at offset=0 in struct bar" }, 91 { "incorrect_node_off2", "arg#1 offset=0, but expected bpf_list_node at offset=48 in struct foo" }, 114 prog = bpf_object__find_program_by_name(skel->obj, prog_name); in test_linked_list_fail_prog() 168 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.map_list_push_pop), &opts); in test_linked_list_success() 172 clear_fields(skel->maps.array_map); in test_linked_list_success() 174 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.inner_map_list_push_pop), &opts); in test_linked_list_success() 178 clear_fields(skel->maps.inner_map); in test_linked_list_success() 180 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_push_pop), &opts); in test_linked_list_success() [all …]
|
H A D | struct_ops_autocreate.c | 1 // SPDX-License-Identifier: GPL-2.0 30 ASSERT_EQ(err, -ENOTSUP, "errno should be ENOTSUP"); in cant_load_full_object() 42 link = bpf_map__attach_struct_ops(skel->maps.testmod_1); in check_test_1_link() 44 return -1; in check_test_1_link() 47 err = ASSERT_EQ(skel->bss->test_1_result, 42, "test_1_result"); in check_test_1_link() 61 err = bpf_map__set_autocreate(skel->maps.testmod_2, false); in can_load_partial_object() 65 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 default autoload"); in can_load_partial_object() 66 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_2), "test_2 default autoload"); in can_load_partial_object() 72 ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 actual autoload"); in can_load_partial_object() 73 ASSERT_FALSE(bpf_program__autoload(skel->progs.test_2), "test_2 actual autoload"); in can_load_partial_object() [all …]
|
/linux/drivers/gpu/drm/xe/tests/ |
H A D | xe_args_test.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #define foo X, Y, Z, Q in call_args_example() macro 13 #define bar COUNT_ARGS(foo) in call_args_example() macro 14 #define buz CALL_ARGS(COUNT_ARGS, foo) in call_args_example() 16 KUNIT_EXPECT_EQ(test, bar, 1); in call_args_example() 19 #undef foo in call_args_example() 20 #undef bar in call_args_example() 26 #define foo X, Y, Z, Q in drop_first_arg_example() macro 27 #define bar CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo)) in drop_first_arg_example() macro 29 KUNIT_EXPECT_EQ(test, bar, 3); in drop_first_arg_example() [all …]
|
/linux/Documentation/translations/zh_CN/admin-guide/ |
H A D | bootconfig.rst | 1 .. SPDX-License-Identifier: GPL-2.0 3 .. include:: ../disclaimer-zh_CN.rst 5 :Original: Documentation/admin-guide/bootconfig.rst 32 关键字只允许包含字母、数字、连字符( ``-`` )和下划线( ``_`` )。值可包含 42 -------- 46 foo.bar.baz = value1 47 foo.bar.qux.quux = value2 51 foo.bar { 58 foo.bar { baz = value1; qux.quux = value2 } 64 -------------- [all …]
|
/linux/Documentation/translations/zh_TW/admin-guide/ |
H A D | bootconfig.rst | 1 .. SPDX-License-Identifier: GPL-2.0 3 .. include:: ../disclaimer-zh_TW.rst 5 :Original: Documentation/admin-guide/bootconfig.rst 32 關鍵字只允許包含字母、數字、連字符( ``-`` )和下劃線( ``_`` )。值可包含 42 -------- 46 foo.bar.baz = value1 47 foo.bar.qux.quux = value2 51 foo.bar { 58 foo.bar { baz = value1; qux.quux = value2 } 64 -------------- [all …]
|
/linux/tools/perf/Documentation/ |
H A D | callchain-overhead-calculation.txt | 2 -------------------- 5 adding all period values of the entry - usually a function (symbol). 23 ----------------------- 24 void foo(void) { 28 void bar(void) { 30 foo(); 34 bar() 37 ----------------------- 39 In this case 'foo' is a child of 'bar', and 'bar' is an immediate 40 child of 'main' so 'foo' also is a child of 'main'. In other words, [all …]
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_args.h | 1 /* SPDX-License-Identifier: MIT */ 19 * CALL_ARGS - Invoke a macro, but allow parameters to be expanded beforehand. 28 * #define foo X,Y,Z,Q 29 * #define bar COUNT_ARGS(foo) 30 * #define buz CALL_ARGS(COUNT_ARGS, foo) 32 * With above definitions bar expands to 1 while buz expands to 4. 38 * DROP_FIRST_ARG - Returns all arguments except the first one. 46 * #define foo X,Y,Z,Q 47 * #define bar CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo)) 49 * With above definitions bar expands to 3. [all …]
|
H A D | xe_rtp_helpers.h | 1 /* SPDX-License-Identifier: MIT */ 16 * Helper macros - not to be used outside this header. 28 * XE_RTP_PASTE_FOREACH - Paste XE_RTP_<@prefix_> on each element of the tuple 35 * 1) XE_RTP_PASTE_FOREACH(TEST_, COMMA, (FOO, BAR)) 40 * 2) XE_RTP_PASTE_FOREACH(TEST2_, COMMA, (FOO)) 45 * 3) XE_RTP_PASTE_FOREACH(TEST3, BITWISE_OR, (FOO, BAR)) 51 * XE_RTP_PASTE_FOREACH(TEST_, MY_SEP, (FOO, BAR)) 71 * XE_RTP_DROP_CAST - Drop cast to convert a compound statement to a initializer 75 * #define foo(a_) ((struct foo){ .a = a_ }) 76 * XE_RTP_DROP_CAST(foo(10))
|
/linux/tools/testing/selftests/ftrace/test.d/dynevent/ |
H A D | eprobes_syntax_errors.tc | 2 # SPDX-License-Identifier: GPL-2.0 4 # requires: dynamic_events events/syscalls/sys_enter_openat "<attached-group>.<attached-event> [<ar… 6 check_error() { # command-with-error-pos-by-^ 13 check_error 'e syscalls/sys_enter_openat ^foo' # BAD_ATTACH_ARG 14 check_error 'e:^/bar syscalls/sys_enter_openat' # NO_GROUP_NAME 15 check_error 'e:^12345678901234567890123456789012345678901234567890123456789012345/bar syscalls/sys_… 17 check_error 'e:^foo.1/bar syscalls/sys_enter_openat' # BAD_GROUP_NAME 19 check_error 'e:foo/^12345678901234567890123456789012345678901234567890123456789012345 syscalls/sys_… 20 check_error 'e:foo/^bar.1 syscalls/sys_enter_openat' # BAD_EVENT_NAME 22 check_error 'e:foo/bar syscalls/sys_enter_openat arg=^dfd' # BAD_FETCH_ARG [all …]
|
H A D | fprobe_syntax_errors.tc | 2 # SPDX-License-Identifier: GPL-2.0 4 # requires: dynamic_events "f[:[<group>/][<event>]] <func-name>[%return] [<args>]":README 6 check_error() { # command-with-error-pos-by-^ 10 case `uname -m` in 25 check_error 'f:^/bar vfs_read' # NO_GROUP_NAME 26 check_error 'f:^12345678901234567890123456789012345678901234567890123456789012345/bar vfs_read' # G… 28 check_error 'f:^foo.1/bar vfs_read' # BAD_GROUP_NAME 30 check_error 'f:foo/^12345678901234567890123456789012345678901234567890123456789012345 vfs_read' # E… 31 check_error 'f:foo/^bar.1 vfs_read' # BAD_EVENT_NAME 37 if !grep -q 'kernel return probes support:' README; then [all …]
|
/linux/Documentation/admin-guide/ |
H A D | bootconfig.rst | 1 .. SPDX-License-Identifier: GPL-2.0 15 additional key-value data when booting the kernel in an efficient way. 16 This allows administrators to pass a structured-Key config file. 21 The boot config syntax is a simple structured key-value. Each key consists 22 of dot-connected-words, and key and value are connected by ``=``. The value 23 has to be terminated by semi-colon (``;``) or newline (``\n``). 30 Each key word must contain only alphabets, numbers, dash (``-``) or underscore 32 for delimiters such as semi-colon (``;``), new-line (``\n``), comma (``,``), 35 If you want to use those delimiters in a value, you can use either double- 36 quotes (``"VALUE"``) or single-quotes (``'VALUE'``) to quote it. Note that [all …]
|
/linux/Documentation/devicetree/ |
H A D | overlay-notes.rst | 1 .. SPDX-License-Identifier: GPL-2.0 7 This document describes the implementation of the in-kernel 9 companion document to Documentation/devicetree/dynamic-resolution-notes.rst[1] 12 ----------------- 21 Lets take an example where we have a foo board with the following base tree:: 23 ---- foo.dts --------------------------------------------------------------- 24 /* FOO platform */ 25 /dts-v1/; 27 compatible = "corp,foo"; 39 ---- foo.dts --------------------------------------------------------------- [all …]
|
/linux/samples/kobject/ |
H A D | kset-example.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2004-2007 Greg Kroah-Hartman <greg@kroah.com> 17 * /sys/kernel/kset-example 18 * Then tree kobjects are created and assigned to this kset, "foo", "baz", 19 * and "bar". In those kobjects, attributes of the same name are also 31 int foo; member 33 int bar; member 40 ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf); 41 ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count); 57 struct foo_obj *foo; in foo_attr_show() local [all …]
|
H A D | kobject-example.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2004-2007 Greg Kroah-Hartman <greg@kroah.com> 16 * /sys/kernel/kobject-example In that directory, 3 files are created: 17 * "foo", "baz", and "bar". If an integer is written to these files, it can be 21 static int foo; variable 23 static int bar; variable 26 * The "foo" file where a static variable is read from and written to. 31 return sysfs_emit(buf, "%d\n", foo); in foo_show() 39 ret = kstrtoint(buf, 10, &foo); in foo_store() 46 /* Sysfs attributes cannot be world-writable. */ [all …]
|
/linux/Documentation/translations/zh_CN/devicetree/ |
H A D | overlay-notes.rst | 1 .. SPDX-License-Identifier: GPL-2.0 2 .. include:: ../disclaimer-zh_CN.rst 4 :Original: Documentation/devicetree/overlay-notes.rst 17 Documentation/devicetree/dynamic-resolution-notes.rst[1]的配套文档。 20 ------------ 28 ---- foo.dts --------------------------------------------------------------- 30 /dts-v1/; 32 compatible = "corp,foo"; 44 ---- foo.dts --------------------------------------------------------------- 49 ---- bar.dts - 按标签覆盖目标位置 ---------------------------- [all …]
|
/linux/tools/testing/selftests/net/ |
H A D | unicast_extensions.sh | 2 # SPDX-License-Identifier: GPL-2.0 7 # Self-tests for IPv4 address extensions: the kernel's ability to accept 41 if [ $1 -eq 0 ]; then 42 printf "TEST: %-60s [ OK ]\n" "${2}" 44 printf "TEST: %-60s [FAIL]\n" "${2}" 53 # foo --- bar 57 # containing linked veth devices foo and bar, 60 ip -n $foo_ns address add $1/$3 dev foo || return 1 61 ip -n $foo_ns link set foo up || return 1 62 ip -n $bar_ns address add $2/$3 dev bar || return 1 [all …]
|
/linux/Documentation/doc-guide/ |
H A D | kernel-doc.rst | 1 .. title:: Kernel-doc comments 4 Writing kernel-doc comments 8 comments in the kernel-doc format to describe the functions, types 9 and design of the code. It is easier to keep documentation up-to-date 12 .. note:: The kernel-doc format is deceptively similar to javadoc, 13 gtk-doc or Doxygen, yet distinctively different, for historical 14 reasons. The kernel source contains tens of thousands of kernel-doc 17 .. note:: kernel-doc does not cover Rust code: please see 18 Documentation/rust/general-information.rst instead. 20 The kernel-doc structure is extracted from the comments, and proper [all …]
|
/linux/Documentation/translations/it_IT/doc-guide/ |
H A D | kernel-doc.rst | 1 .. include:: ../disclaimer-ita.rst 4 :ref:`Documentation/doc-guide/index.rst <doc_guide>` 6 .. title:: Commenti in kernel-doc 11 Scrivere i commenti in kernel-doc 15 strutturanti secondo il formato kernel-doc. Essi possono descrivere funzioni, 18 .. note:: Il formato kernel-doc può sembrare simile a gtk-doc o Doxygen ma 20 contengono decine di migliaia di commenti kernel-doc. Siete pregati 23 La struttura kernel-doc è estratta a partire dai commenti; da questi viene 30 .. _`dominio Sphinx per il C`: http://www.sphinx-doc.org/en/stable/domains.html 34 kernel-doc. Quando l'intenzione è di utilizzarle nei moduli, anche le funzioni [all …]
|
/linux/tools/testing/ktest/examples/bootconfigs/ |
H A D | verify-boottrace.sh | 18 content=`cat $file | sed -ne "/^$val/p"` 19 if [ -z "$content" ]; then 30 if ! grep -q "$val" $file ; then 41 content=`cat $file | sed -ne "/^[0 ]*$val/p"` 42 if [ -z "$content" ]; then 61 …all_finish/trigger" 'hist:keys=func:vals=hitcount:lat=common_timestamp.usecs-\$ts0:sort=hitcount:s… 64 compare_file "instances/foo/current_tracer" "function" 65 file_contains "instances/foo/set_ftrace_filter" "^user" 66 compare_file "instances/foo/buffer_size_kb" "512" 67 compare_mask "instances/foo/tracing_cpumask" "1" [all …]
|
/linux/tools/perf/tests/ |
H A D | expr.c | 1 // SPDX-License-Identifier: GPL-2.0 28 /* Union {foo, bar} against {}. */ in test_ids_union() 32 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("foo")), 0); in test_ids_union() 33 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("bar")), 0); in test_ids_union() 38 /* Union {foo, bar} against {foo}. */ in test_ids_union() 41 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids2, strdup("foo")), 0); in test_ids_union() 46 /* Union {foo, bar} against {bar,baz}. */ in test_ids_union() 49 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids2, strdup("bar")), 0); in test_ids_union() 90 expr__add_id_val(ctx, strdup("FOO"), 1); in test__expr() 91 expr__add_id_val(ctx, strdup("BAR"), 2); in test__expr() [all …]
|
/linux/include/kunit/ |
H A D | assert.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 19 * enum kunit_assert_type - Type of expectation/assertion. 32 * struct kunit_loc - Identifies the source location of a line of code. 44 * struct kunit_assert - Data for printing a failed assertion or expectation. 60 * struct kunit_fail_assert - Represents a plain fail expectation/assertion. 74 * struct kunit_unary_assert - Represents a KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE} 94 * struct kunit_ptr_not_err_assert - An expectation/assertion that a pointer is 95 * not NULL and not a -errno. 101 * not contain a -errno. (See IS_ERR_OR_NULL().) 114 * struct kunit_binary_assert_text - holds strings for &struct [all …]
|
/linux/Documentation/kbuild/ |
H A D | kconfig-language.rst | 6 ------------ 11 +- Code maturity level options 12 | +- Prompt for development and/or incomplete code/drivers 13 +- General setup 14 | +- Networking support 15 | +- System V IPC 16 | +- BSD Process Accounting 17 | +- Sysctl support 18 +- Loadable module support 19 | +- Enable loadable module support [all …]
|
/linux/Documentation/translations/zh_CN/doc-guide/ |
H A D | kernel-doc.rst | 1 .. include:: ../disclaimer-zh_CN.rst 3 :Original: Documentation/doc-guide/kernel-doc.rst 7 编写kernel-doc注释 10 Linux内核源文件可以包含kernel-doc格式的结构化文档注释,用以描述代码的函数、 13 .. note:: 内核文档格式与javadoc、gtk-doc或Doxygen看似很相似,但由于历史原因, 14 实际有着明显的不同。内核源包含成千上万个kernel-doc注释。请坚持遵循 17 .. note:: kernel-doc无法包含Rust代码:请参考 Documentation/rust/general-information.rst 。 19 从注释中提取kernel-doc结构,并从中生成适当的 `Sphinx C 域`_ 函数和带有锚点的 20 类型描述。这些注释将被过滤以生成特殊kernel-doc高亮和交叉引用。详见下文。 22 .. _Sphinx C 域: http://www.sphinx-doc.org/en/stable/domains.html [all …]
|