Home
last modified time | relevance | path

Searched full:cg (Results 1 – 25 of 89) sorted by relevance

1234

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_mprog_opts.c7 static void assert_mprog_count(int cg, int atype, int expected) in assert_mprog_count() argument
12 err = bpf_prog_query(cg, atype, 0, &attach_flags, in assert_mprog_count()
26 int cg, err; in test_prog_attach_detach() local
28 cg = test__join_cgroup("/prog_attach_detach"); in test_prog_attach_detach()
29 if (!ASSERT_GE(cg, 0, "join_cgroup /prog_attach_detach")) in test_prog_attach_detach()
46 assert_mprog_count(cg, atype, 0); in test_prog_attach_detach()
54 err = bpf_prog_attach_opts(fd1, cg, atype, &opta); in test_prog_attach_detach()
58 assert_mprog_count(cg, atype, 1); in test_prog_attach_detach()
66 err = bpf_prog_attach_opts(fd2, cg, atype, &opta); in test_prog_attach_detach()
70 assert_mprog_count(cg, atype, 2); in test_prog_attach_detach()
[all …]
H A Dcgroup_attach_autodetach.c30 int cg = 0, i; in serial_test_cgroup_attach_autodetach() local
44 cg = create_and_get_cgroup("/cg_autodetach"); in serial_test_cgroup_attach_autodetach()
45 if (CHECK_FAIL(cg < 0)) in serial_test_cgroup_attach_autodetach()
52 if (CHECK(bpf_prog_attach(allow_prog[i], cg, in serial_test_cgroup_attach_autodetach()
59 if (CHECK(bpf_prog_query(cg, BPF_CGROUP_INET_EGRESS, 0, &attach_flags, in serial_test_cgroup_attach_autodetach()
77 close(cg); in serial_test_cgroup_attach_autodetach()
78 cg = 0; in serial_test_cgroup_attach_autodetach()
107 if (cg) in serial_test_cgroup_attach_autodetach()
108 close(cg); in serial_test_cgroup_attach_autodetach()
H A Dcgroup_getset_retval.c35 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_set()
71 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_set_and_get()
75 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_set_and_get()
114 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_default_zero()
151 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_default_zero_and_set()
155 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_default_zero_and_set()
196 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_override()
200 if (!ASSERT_OK_PTR(link_set_eisconn, "cg-attach-set_eisconn")) in test_setsockopt_override()
204 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_override()
246 if (!ASSERT_OK_PTR(link_legacy_eperm, "cg-attach-legacy_eperm")) in test_setsockopt_legacy_eperm()
[all …]
H A Dcg_storage_multi.c109 if (!ASSERT_OK_PTR(parent_link, "parent-cg-attach")) in test_egress_only()
132 if (!ASSERT_OK_PTR(child_link, "child-cg-attach")) in test_egress_only()
179 if (!ASSERT_OK_PTR(parent_egress1_link, "parent-egress1-cg-attach")) in test_isolated()
183 if (!ASSERT_OK_PTR(parent_egress2_link, "parent-egress2-cg-attach")) in test_isolated()
187 if (!ASSERT_OK_PTR(parent_ingress_link, "parent-ingress-cg-attach")) in test_isolated()
221 if (!ASSERT_OK_PTR(child_egress1_link, "child-egress1-cg-attach")) in test_isolated()
225 if (!ASSERT_OK_PTR(child_egress2_link, "child-egress2-cg-attach")) in test_isolated()
229 if (!ASSERT_OK_PTR(child_ingress_link, "child-ingress-cg-attach")) in test_isolated()
292 if (!ASSERT_OK_PTR(parent_egress1_link, "parent-egress1-cg-attach")) in test_shared()
296 if (!ASSERT_OK_PTR(parent_egress2_link, "parent-egress2-cg-attach")) in test_shared()
[all …]
H A Dsockopt_multi.c46 if (!ASSERT_OK_PTR(link_child, "cg-attach-getsockopt_child")) in run_getsockopt_test()
71 if (!ASSERT_OK_PTR(link_parent, "cg-attach-getsockopt_parent")) in run_getsockopt_test()
194 if (!ASSERT_OK_PTR(link_child, "cg-attach-setsockopt_child")) in run_setsockopt_test()
222 if (!ASSERT_OK_PTR(link_parent, "cg-attach-setsockopt_parent")) in run_setsockopt_test()
H A Dconnect_ping.c127 if (!ASSERT_GE(cgroup_fd, 0, "cg-create")) in test_connect_ping()
135 if (!ASSERT_OK_PTR(skel->links.connect_v4_prog, "cg-attach-v4")) in test_connect_ping()
139 if (!ASSERT_OK_PTR(skel->links.connect_v6_prog, "cg-attach-v6")) in test_connect_ping()
H A Dcgroup_link.c74 /* query the number of attached progs and attach flags in root cg */ in serial_test_cgroup_link()
82 /* query the number of effective progs in last cg */ in serial_test_cgroup_link()
91 /* query the effective prog IDs in last cg */ in serial_test_cgroup_link()
H A Dsockopt_inherit.c116 if (!ASSERT_OK_PTR(link_getsockopt, "cg-attach-getsockopt")) in run_test()
121 if (!ASSERT_OK_PTR(link_setsockopt, "cg-attach-setsockopt")) in run_test()
/linux/drivers/gpio/
H A Dgpio-crystalcove.c115 static void crystalcove_update_irq_mask(struct crystalcove_gpio *cg, int gpio) in crystalcove_update_irq_mask() argument
120 if (cg->set_irq_mask) in crystalcove_update_irq_mask()
121 regmap_update_bits(cg->regmap, mirqs0, mask, mask); in crystalcove_update_irq_mask()
123 regmap_update_bits(cg->regmap, mirqs0, mask, 0); in crystalcove_update_irq_mask()
126 static void crystalcove_update_irq_ctrl(struct crystalcove_gpio *cg, int gpio) in crystalcove_update_irq_ctrl() argument
130 regmap_update_bits(cg->regmap, reg, CTLI_INTCNT_BE, cg->intcnt_value); in crystalcove_update_irq_ctrl()
135 struct crystalcove_gpio *cg = gpiochip_get_data(chip); in crystalcove_gpio_dir_in() local
141 return regmap_write(cg->regmap, reg, CTLO_INPUT_SET); in crystalcove_gpio_dir_in()
146 struct crystalcove_gpio *cg = gpiochip_get_data(chip); in crystalcove_gpio_dir_out() local
152 return regmap_write(cg->regmap, reg, CTLO_OUTPUT_SET | value); in crystalcove_gpio_dir_out()
[all …]
/linux/drivers/power/supply/
H A Dchagall-battery.c52 struct chagall_battery_data *cg = in chagall_led_set_brightness_amber() local
55 regmap_write(cg->regmap, CHAGALL_REG_LED_AMBER, brightness); in chagall_led_set_brightness_amber()
61 struct chagall_battery_data *cg = in chagall_led_set_brightness_white() local
64 regmap_write(cg->regmap, CHAGALL_REG_LED_WHITE, brightness); in chagall_led_set_brightness_white()
92 static int chagall_battery_get_value(struct chagall_battery_data *cg, in chagall_battery_get_value() argument
101 return regmap_bulk_read(cg->regmap, chagall_battery_prop_offs[psp], val, 2); in chagall_battery_get_value()
118 struct chagall_battery_data *cg = power_supply_get_drvdata(psy); in chagall_battery_get_property() local
127 ret = chagall_battery_get_value(cg, psp, &val->intval); in chagall_battery_get_property()
161 struct chagall_battery_data *cg = in chagall_battery_poll_work() local
166 ret = chagall_battery_get_value(cg, POWER_SUPPLY_PROP_STATUS, &state); in chagall_battery_poll_work()
[all …]
/linux/drivers/clk/mediatek/
H A Dclk-gate.c33 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); in mtk_get_clockgating() local
36 regmap_read(cg->regmap, cg->gate->regs->sta_ofs, &val); in mtk_get_clockgating()
38 return val & BIT(cg->gate->shift); in mtk_get_clockgating()
53 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); in mtk_cg_set_bit() local
55 regmap_write(cg->regmap, cg->gate->regs->set_ofs, BIT(cg->gate->shift)); in mtk_cg_set_bit()
60 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); in mtk_cg_clr_bit() local
62 regmap_write(cg->regmap, cg->gate->regs->clr_ofs, BIT(cg->gate->shift)); in mtk_cg_clr_bit()
67 struct mtk_clk_gate *cg = to_mtk_clk_gate(hw); in mtk_cg_set_bit_no_setclr() local
69 regmap_set_bits(cg->regmap, cg->gate->regs->sta_ofs, in mtk_cg_set_bit_no_setclr()
70 BIT(cg->gate->shift)); in mtk_cg_set_bit_no_setclr()
[all …]
/linux/kernel/cgroup/
H A Dmisc.c98 * @type: Misc res type in misc cg to cancel the charge from.
99 * @cg: Misc cgroup to cancel charge from.
104 static void misc_cg_cancel_charge(enum misc_res_type type, struct misc_cg *cg, in misc_cg_cancel_charge() argument
107 WARN_ONCE(atomic64_add_negative(-amount, &cg->res[type].usage), in misc_cg_cancel_charge()
125 static void misc_cg_event(enum misc_res_type type, struct misc_cg *cg) in misc_cg_event() argument
127 atomic64_inc(&cg->res[type].events_local); in misc_cg_event()
128 cgroup_file_notify(&cg->events_local_file); in misc_cg_event()
130 for (; parent_misc(cg); cg = parent_misc(cg)) { in misc_cg_event()
131 atomic64_inc(&cg->res[type].events); in misc_cg_event()
132 cgroup_file_notify(&cg->events_file); in misc_cg_event()
[all …]
/linux/include/linux/
H A Dmisc_cgroup.h68 int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount);
69 void misc_cg_uncharge(enum misc_res_type type, struct misc_cg *cg, u64 amount);
100 * @cg - cgroup to put.
102 static inline void put_misc_cg(struct misc_cg *cg) in put_misc_cg() argument
104 if (cg) in put_misc_cg()
105 css_put(&cg->css); in put_misc_cg()
116 struct misc_cg *cg, in misc_cg_try_charge() argument
123 struct misc_cg *cg, in misc_cg_uncharge() argument
133 static inline void put_misc_cg(struct misc_cg *cg) in put_misc_cg() argument
/linux/tools/testing/selftests/cgroup/
H A Dtest_kmem.c56 char *cg = NULL; in test_kmem_basic() local
59 cg = cg_name(root, "kmem_basic_test"); in test_kmem_basic()
60 if (!cg) in test_kmem_basic()
63 if (cg_create(cg)) in test_kmem_basic()
66 if (cg_run(cg, alloc_dcache, (void *)100000)) in test_kmem_basic()
69 slab0 = cg_read_key_long(cg, "memory.stat", "slab "); in test_kmem_basic()
73 cg_write(cg, "memory.high", "1M"); in test_kmem_basic()
78 slab1 = cg_read_key_long(cg, "memory.stat", "slab "); in test_kmem_basic()
82 current = cg_read_long(cg, "memory.current"); in test_kmem_basic()
89 cg_destroy(cg); in test_kmem_basic()
[all …]
H A Dtest_zswap.c62 static long get_cg_wb_count(const char *cg) in get_cg_wb_count() argument
64 return cg_read_key_long(cg, "memory.stat", "zswpwb"); in get_cg_wb_count()
126 * been recorded for @cg, or until @timeout_ms has elapsed.
128 static long wait_for_writeback(const char *cg, int timeout_ms) in wait_for_writeback() argument
132 count = get_cg_wb_count(cg); in wait_for_writeback()
/linux/tools/power/pm-graph/
H A Dbootgraph.py254 def deviceMatch(self, pid, cg): argument
255 if cg.end - cg.start == 0:
263 if cg.name == 'do_one_initcall':
264 if(cg.start <= dev['start'] and cg.end >= dev['end'] and dev['length'] > 0):
265 dev['ftrace'] = cg
269 if(cg.start > dev['start'] and cg.end < dev['end']):
272 dev['ftraces'].append(cg)
425 cg = ftemp[key][-1]
426 res = cg.addLine(t)
437 for cg in ftemp[key]:
[all …]
H A Dsleepgraph.py1825 cg = d['ftrace']
1826 cg.start = self.trimTimeVal(cg.start, t0, dT, left)
1827 cg.end = self.trimTimeVal(cg.end, t0, dT, left)
1828 for line in cg.list:
2692 cg = self.slice(dev)
2693 if cg:
2694 dev['ftrace'] = cg
3354 cg
4237 callgraphHTML(sv, hf, num, cg, title, color, devid) global() argument
[all...]
/linux/drivers/clk/
H A Dclk-en7523.c548 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_is_enabled() local
550 return !!(readl(cg->base + REG_PCI_CONTROL) & REG_PCI_CONTROL_REFCLK_EN1); in en7523_pci_is_enabled()
555 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_prepare() local
556 void __iomem *np_base = cg->base; in en7523_pci_prepare()
594 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_unprepare() local
595 void __iomem *np_base = cg->base; in en7523_pci_unprepare()
611 struct en_clk_gate *cg; in en7523_register_pcie_clk() local
613 cg = devm_kzalloc(dev, sizeof(*cg), GFP_KERNEL); in en7523_register_pcie_clk()
614 if (!cg) in en7523_register_pcie_clk()
617 cg->base = np_base; in en7523_register_pcie_clk()
[all …]
/linux/tools/cgroup/
H A Dmemcg_shrinker.py55 cg = "/"
58 cg = cgroups[ino]
60 cg = "unknown (%d)" % ino
62 print("%-8s %-20s %s" % (count, name, cg))
/linux/tools/testing/selftests/bpf/progs/
H A Dcgrp_kfunc_success.c67 struct cgroup *kptr, *cg; in BPF_PROG() local
92 cg = bpf_cgroup_ancestor(kptr, 1); in BPF_PROG()
93 if (cg) /* verifier only check */ in BPF_PROG()
94 bpf_cgroup_release(cg); in BPF_PROG()
228 struct cgroup *cg;
230 cg = bpf_cgroup_from_id(1);
231 if (!cg)
233 bpf_cgroup_release(cg);
/linux/drivers/gpu/drm/amd/pm/powerplay/inc/
H A Dsmu72.h587 #define CG_SYS_BITMASK_FIRST_BIT 0 /* First bit of Sys CG bitmask */
588 #define CG_SYS_BITMASK_LAST_BIT 9 /* Last bit of Sys CG bitmask */
612 #define CG_GFX_BITMASK_FIRST_BIT 16 /* First bit of Gfx CG bitmask */
613 #define CG_GFX_BITMASK_LAST_BIT 20 /* Last bit of Gfx CG bitmask */
H A Dsmu74.h642 #define CG_SYS_BITMASK_FIRST_BIT 0 /* First bit of Sys CG bitmask */
643 #define CG_SYS_BITMASK_LAST_BIT 9 /* Last bit of Sys CG bitmask */
669 #define CG_GFX_BITMASK_FIRST_BIT 16 /* First bit of Gfx CG bitmask */
670 #define CG_GFX_BITMASK_LAST_BIT 24 /* Last bit of Gfx CG bitmask */
H A Dsmu73.h569 #define CG_SYS_BITMASK_FIRST_BIT 0 // First bit of Sys CG bitmask
570 #define CG_SYS_BITMASK_LAST_BIT 9 // Last bit of Sys CG bitmask
594 #define CG_GFX_BITMASK_FIRST_BIT 16 // First bit of Gfx CG bitmask
595 #define CG_GFX_BITMASK_LAST_BIT 20 // Last bit of Gfx CG bitmask
/linux/samples/vfio-mdev/
H A Dmdpy-fb.c63 u32 cg = green >> (16 - info->var.green.length); in mdpy_fb_setcolreg() local
71 (cg << info->var.green.offset) | in mdpy_fb_setcolreg()
/linux/tools/lib/bpf/
H A Dbpf_helpers.h356 * struct cgroup *cg, *parent_cg = <...>;
358 * bpf_for_each(cgroup, cg, parent_cg, CG_ITER_CHILDREN) {
359 * bpf_printk("Child cgroup id = %d", cg->cgroup_id);
360 * if (cg->cgroup_id == 123)

1234