| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | cgroup_mprog_opts.c | 7 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 D | cgroup_attach_autodetach.c | 30 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 D | cgroup_getset_retval.c | 35 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 D | cg_storage_multi.c | 109 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 D | sockopt_multi.c | 46 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 D | connect_ping.c | 127 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 D | cgroup_link.c | 74 /* 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 D | sockopt_inherit.c | 116 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 D | gpio-crystalcove.c | 115 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 D | chagall-battery.c | 53 struct chagall_battery_data *cg = in chagall_led_set_brightness_amber() local 56 regmap_write(cg->regmap, CHAGALL_REG_LED_AMBER, brightness); in chagall_led_set_brightness_amber() 62 struct chagall_battery_data *cg = in chagall_led_set_brightness_white() local 65 regmap_write(cg->regmap, CHAGALL_REG_LED_WHITE, brightness); in chagall_led_set_brightness_white() 93 static int chagall_battery_get_value(struct chagall_battery_data *cg, in chagall_battery_get_value() argument 102 return regmap_bulk_read(cg->regmap, chagall_battery_prop_offs[psp], val, 2); in chagall_battery_get_value() 119 struct chagall_battery_data *cg = power_supply_get_drvdata(psy); in chagall_battery_get_property() local 128 ret = chagall_battery_get_value(cg, psp, &val->intval); in chagall_battery_get_property() 162 struct chagall_battery_data *cg = in chagall_battery_poll_work() local 167 ret = chagall_battery_get_value(cg, POWER_SUPPLY_PROP_STATUS, &state); in chagall_battery_poll_work() [all …]
|
| /linux/drivers/clk/mediatek/ |
| H A D | clk-gate.c | 33 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 D | misc.c | 98 * @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 D | misc_cgroup.h | 68 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 D | test_kmem.c | 56 char *cg = NULL; in test_kmem_basic() 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() 55 char *cg = NULL; test_kmem_basic() local 280 char *cg = NULL; test_kmem_kernel_stacks() local [all...] |
| /linux/tools/power/pm-graph/ |
| H A D | bootgraph.py | 254 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 D | sleepgraph.py | 1825 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 = testrun[testidx].ftemp[pid][-1] 3355 res = cg.addLine(t) 3365 for cg in test.ftemp[pid]: [all …]
|
| /linux/fs/ufs/ |
| H A D | super.c | 230 struct ufs_cylinder_group *cg) in ufs_print_cylinder_stuff() argument 234 pr_debug(" magic: %x\n", fs32_to_cpu(sb, cg->cg_magic)); in ufs_print_cylinder_stuff() 235 pr_debug(" time: %u\n", fs32_to_cpu(sb, cg->cg_time)); in ufs_print_cylinder_stuff() 236 pr_debug(" cgx: %u\n", fs32_to_cpu(sb, cg->cg_cgx)); in ufs_print_cylinder_stuff() 237 pr_debug(" ncyl: %u\n", fs16_to_cpu(sb, cg->cg_ncyl)); in ufs_print_cylinder_stuff() 238 pr_debug(" niblk: %u\n", fs16_to_cpu(sb, cg->cg_niblk)); in ufs_print_cylinder_stuff() 239 pr_debug(" ndblk: %u\n", fs32_to_cpu(sb, cg->cg_ndblk)); in ufs_print_cylinder_stuff() 240 pr_debug(" cs_ndir: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_ndir)); in ufs_print_cylinder_stuff() 241 pr_debug(" cs_nbfree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nbfree)); in ufs_print_cylinder_stuff() 242 pr_debug(" cs_nifree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nifree)); in ufs_print_cylinder_stuff() [all …]
|
| /linux/tools/cgroup/ |
| H A D | memcg_shrinker.py | 55 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 D | cgrp_kfunc_success.c | 67 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/infiniband/core/ |
| H A D | cgroup.c | 41 return rdmacg_try_charge(&cg_obj->cg, &device->cg_device, in ib_rdmacg_try_charge() 50 rdmacg_uncharge(cg_obj->cg, &device->cg_device, in ib_rdmacg_uncharge()
|
| /linux/drivers/gpu/drm/amd/pm/powerplay/inc/ |
| H A D | smu72.h | 587 #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 D | smu74.h | 642 #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 D | smu73.h | 569 #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/kernel/bpf/ |
| H A D | cgroup.c | 933 struct cgroup *cg; in replace_effective_prog() local 943 for (pos = 0, cg = desc; cg; cg = cgroup_parent(cg)) { in replace_effective_prog() 944 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in replace_effective_prog() 947 head = &cg->bpf.progs[atype]; in replace_effective_prog() 957 BUG_ON(!cg); in replace_effective_prog() 1085 struct cgroup *cg; in purge_effective_progs() local 1096 for (pos = 0, cg = desc; cg; cg = cgroup_parent(cg)) { in purge_effective_progs() 1097 if (pos && !(cg->bpf.flags[atype] & BPF_F_ALLOW_MULTI)) in purge_effective_progs() 1100 head = &cg->bpf.progs[atype]; in purge_effective_progs() 1381 struct cgroup *cg; in bpf_cgroup_link_release() local [all …]
|
| /linux/samples/vfio-mdev/ |
| H A D | mdpy-fb.c | 63 u32 cg = green >> (16 - info->var.green.length); in mdpy_fb_setcolreg() local 71 (cg << info->var.green.offset) | in mdpy_fb_setcolreg()
|