| /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()
|
| /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 | 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() 152 int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount) in misc_cg_try_charge() argument 159 if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type]))) in misc_cg_try_charge() [all …]
|
| H A D | rdma.c | 72 static struct rdma_cgroup *parent_rdmacg(struct rdma_cgroup *cg) in parent_rdmacg() argument 74 return css_rdmacg(cg->css.parent); in parent_rdmacg() 113 find_cg_rpool_locked(struct rdma_cgroup *cg, in find_cg_rpool_locked() argument 121 list_for_each_entry(pool, &cg->rpools, cg_node) in find_cg_rpool_locked() 129 get_cg_rpool_locked(struct rdma_cgroup *cg, struct rdmacg_device *device) in get_cg_rpool_locked() argument 133 rpool = find_cg_rpool_locked(cg, device); in get_cg_rpool_locked() 146 list_add_tail(&rpool->cg_node, &cg->rpools); in get_cg_rpool_locked() 162 uncharge_cg_locked(struct rdma_cgroup *cg, in uncharge_cg_locked() argument 168 rpool = find_cg_rpool_locked(cg, device); in uncharge_cg_locked() 176 pr_warn("Invalid device %p or rdma cgroup %p\n", cg, device); in uncharge_cg_locked() [all …]
|
| /linux/drivers/clk/ |
| H A D | clk-qoriq.c | 82 void (*init_periph)(struct clockgen *cg); 103 static void cg_out(struct clockgen *cg, u32 val, u32 __iomem *reg) in cg_out() argument 105 if (cg->info.flags & CG_LITTLE_ENDIAN) in cg_out() 111 static u32 cg_in(struct clockgen *cg, u32 __iomem *reg) in cg_in() argument 115 if (cg->info.flags & CG_LITTLE_ENDIAN) in cg_in() 470 static void __init p2041_init_periph(struct clockgen *cg) in p2041_init_periph() argument 474 reg = ioread32be(&cg->guts->rcwsr[7]); in p2041_init_periph() 477 cg->fman[0] = cg->pll[CGA_PLL2].div[PLL_DIV2].clk; in p2041_init_periph() 479 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk; in p2041_init_periph() 482 static void __init p4080_init_periph(struct clockgen *cg) in p4080_init_periph() argument [all …]
|
| H A D | clk-en7523.c | 441 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_is_enabled() local 443 return !!(readl(cg->base + REG_PCI_CONTROL) & REG_PCI_CONTROL_REFCLK_EN1); in en7523_pci_is_enabled() 448 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_prepare() local 449 void __iomem *np_base = cg->base; in en7523_pci_prepare() 487 struct en_clk_gate *cg = container_of(hw, struct en_clk_gate, hw); in en7523_pci_unprepare() local 488 void __iomem *np_base = cg->base; in en7523_pci_unprepare() 504 struct en_clk_gate *cg; in en7523_register_pcie_clk() local 506 cg = devm_kzalloc(dev, sizeof(*cg), GFP_KERNEL); in en7523_register_pcie_clk() 507 if (!cg) in en7523_register_pcie_clk() 510 cg->base = np_base; in en7523_register_pcie_clk() [all …]
|
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_kmem.c | 55 char *cg = NULL; in test_kmem_basic() local 58 cg = cg_name(root, "kmem_basic_test"); in test_kmem_basic() 59 if (!cg) in test_kmem_basic() 62 if (cg_create(cg)) in test_kmem_basic() 65 if (cg_run(cg, alloc_dcache, (void *)100000)) in test_kmem_basic() 68 slab0 = cg_read_key_long(cg, "memory.stat", "slab "); in test_kmem_basic() 72 cg_write(cg, "memory.high", "1M"); in test_kmem_basic() 77 slab1 = cg_read_key_long(cg, "memory.stat", "slab "); in test_kmem_basic() 81 current = cg_read_long(cg, "memory.current"); in test_kmem_basic() 88 cg_destroy(cg); in test_kmem_basic() [all …]
|
| H A D | test_zswap.c | 53 static long get_cg_wb_count(const char *cg) in get_cg_wb_count() argument 55 return cg_read_key_long(cg, "memory.stat", "zswpwb"); in get_cg_wb_count()
|
| /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); 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
|
| H A D | cgroup_rdma.h | 46 void rdmacg_uncharge(struct rdma_cgroup *cg,
|
| /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 | ialloc.c | 64 unsigned ino, cg, bit; in ufs_free_inode() local 81 cg = ufs_inotocg (ino); in ufs_free_inode() 83 ucpi = ufs_load_cylinder (sb, cg); in ufs_free_inode() 104 fs32_add(sb, &UFS_SB(sb)->fs_cs(cg).cs_nifree, 1); in ufs_free_inode() 109 fs32_sub(sb, &UFS_SB(sb)->fs_cs(cg).cs_ndir, 1); in ufs_free_inode() 181 unsigned cg, bit, i, j, start; in ufs_new_inode() local 205 cg = i; in ufs_new_inode() 217 cg = i; in ufs_new_inode() 231 cg = i; in ufs_new_inode() 239 ucpi = ufs_load_cylinder (sb, cg); in ufs_new_inode() [all …]
|
| 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/Documentation/devicetree/bindings/clock/ |
| H A D | nvidia,tegra124-dfll.txt | 44 - nvidia,cg: Numeric value, see the field DFLL_PARAMS_CG_PARAM in the TRM. 47 - nvidia,cg-scale: Boolean value, see the field DFLL_PARAMS_CG_SCALE in the TRM. 97 nvidia,cg = <2>; 125 nvidia,cg = <2>;
|
| /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()
|
| /linux/drivers/clk/thead/ |
| H A D | clk-th1520-ap.c | 1249 struct ccu_gate *cg = plat_data->th1520_gate_clks[i]; in th1520_clk_probe() local 1251 cg->gate.reg = base + cg->reg; in th1520_clk_probe() 1253 ret = devm_clk_hw_register(dev, &cg->gate.hw); in th1520_clk_probe() 1257 priv->hws[cg->clkid] = &cg->gate.hw; in th1520_clk_probe()
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | access_tracking_perf_test.c | 516 void destroy_cgroup(char *cg) in destroy_cgroup() 518 printf("Destroying cgroup: %s\n", cg); in destroy_cgroup() 515 destroy_cgroup(char * cg) destroy_cgroup() argument
|
| /linux/drivers/gpu/drm/ttm/ |
| H A D | ttm_resource.c | 386 if (man->cg) { in ttm_resource_alloc() 387 ret = dmem_cgroup_try_charge(man->cg, bo->base.size, &pool, ret_limit_pool); in ttm_resource_alloc() 424 if (man->cg) in ttm_resource_free()
|