Home
last modified time | relevance | path

Searched +full:if +full:- +full:idx (Results 1 – 25 of 1071) sorted by relevance

12345678910>>...43

/linux/drivers/net/ethernet/microchip/sparx5/
H A Dsparx5_calendar.c1 // SPDX-License-Identifier: GPL-2.0+
39 switch (sparx5->target_ct) { in sparx5_target_bandwidth()
122 if (portno >= sparx5->data->consts->n_ports) { in sparx5_get_port_cal_speed()
124 if (portno == in sparx5_get_port_cal_speed()
130 } else if (portno == in sparx5_get_port_cal_speed()
134 } else if (portno == in sparx5_get_port_cal_speed()
138 } else if (portno == in sparx5_get_port_cal_speed()
146 /* Front ports - may be used */ in sparx5_get_port_cal_speed()
147 port = sparx5->ports[portno]; in sparx5_get_port_cal_speed()
148 if (!port) in sparx5_get_port_cal_speed()
[all …]
H A Dsparx5_mirror.c1 // SPDX-License-Identifier: GPL-2.0+
24 static u64 sparx5_mirror_port_get(struct sparx5 *sparx5, u32 idx) in sparx5_mirror_port_get() argument
28 val = spx5_rd(sparx5, ANA_AC_PROBE_PORT_CFG(idx)); in sparx5_mirror_port_get()
30 if (is_sparx5(sparx5)) in sparx5_mirror_port_get()
31 val |= (u64)spx5_rd(sparx5, ANA_AC_PROBE_PORT_CFG1(idx)) << 32; in sparx5_mirror_port_get()
37 static void sparx5_mirror_port_add(struct sparx5 *sparx5, u32 idx, u32 portno) in sparx5_mirror_port_add() argument
44 if (reg == 0) in sparx5_mirror_port_add()
45 return spx5_rmw(val, val, sparx5, ANA_AC_PROBE_PORT_CFG(idx)); in sparx5_mirror_port_add()
47 return spx5_rmw(val, val, sparx5, ANA_AC_PROBE_PORT_CFG1(idx)); in sparx5_mirror_port_add()
51 static void sparx5_mirror_port_del(struct sparx5 *sparx5, u32 idx, u32 portno) in sparx5_mirror_port_del() argument
[all …]
/linux/drivers/net/can/sja1000/
H A Dsja1000_isa.c1 // SPDX-License-Identifier: GPL-2.0-only
24 MODULE_DESCRIPTION("Socket-CAN driver for SJA1000 on the ISA bus");
35 static unsigned char cdr[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff};
36 static unsigned char ocr[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff};
37 static int indirect[MAXDEV] = {[0 ... (MAXDEV - 1)] = -1};
71 return readb(priv->reg_base + reg); in sja1000_isa_mem_read_reg()
77 writeb(val, priv->reg_base + reg); in sja1000_isa_mem_write_reg()
82 return inb((unsigned long)priv->reg_base + reg); in sja1000_isa_port_read_reg()
88 outb(val, (unsigned long)priv->reg_base + reg); in sja1000_isa_port_write_reg()
94 unsigned long flags, base = (unsigned long)priv->reg_base; in sja1000_isa_port_read_reg_indirect()
[all …]
/linux/drivers/net/can/cc770/
H A Dcc770_isa.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * Bosch CC770 and Intel AN82527 CAN controllers on the ISA or PC-104 bus.
32 * Note: for clk, cir, bcr and cor, the first argument re-defines the
61 MODULE_DESCRIPTION("Socket-CAN driver for CC770 on the ISA bus");
72 static u8 cir[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff};
73 static u8 cor[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff};
74 static u8 bcr[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff};
75 static int indirect[MAXDEV] = {[0 ... (MAXDEV - 1)] = -1};
114 return readb(priv->reg_base + reg); in cc770_isa_mem_read_reg()
120 writeb(val, priv->reg_base + reg); in cc770_isa_mem_write_reg()
[all …]
/linux/tools/testing/selftests/kvm/lib/
H A Dsparsebit.c1 // SPDX-License-Identifier: GPL-2.0-only
30 * ---- Query Operations
31 * sparsebit_is_set(s, idx)
32 * sparsebit_is_clear(s, idx)
37 * ---- Modifying Operations
38 * sparsebit_set(s, idx)
39 * sparsebit_clear(s, idx)
40 * sparsebit_set_num(s, idx, num);
41 * sparsebit_clear_num(s, idx, num);
46 * sparsebit_idx_t idx;
[all …]
/linux/kernel/bpf/
H A Dmprog.c1 // SPDX-License-Identifier: GPL-2.0
11 struct bpf_link *link = ERR_PTR(-EINVAL); in bpf_mprog_link()
14 if (id) in bpf_mprog_link()
16 else if (id_or_fd) in bpf_mprog_link()
18 if (IS_ERR(link)) in bpf_mprog_link()
20 if (type && link->prog->type != type) { in bpf_mprog_link()
22 return -EINVAL; in bpf_mprog_link()
25 tuple->link = link; in bpf_mprog_link()
26 tuple->prog = link->prog; in bpf_mprog_link()
34 struct bpf_prog *prog = ERR_PTR(-EINVAL); in bpf_mprog_prog()
[all …]
/linux/arch/x86/um/
H A Dtls_32.c10 #include <asm/ptrace-abi.h>
15 #include <stub-data.h>
18 * If needed we can detect when it's uninitialized.
22 static int host_supports_tls = -1;
29 if (info->entry_number < host_gdt_entry_tls_min || in do_set_thread_area()
30 info->entry_number >= host_gdt_entry_tls_min + GDT_ENTRY_TLS_ENTRIES) in do_set_thread_area()
31 return -EINVAL; in do_set_thread_area()
33 if (using_seccomp) { in do_set_thread_area()
34 int idx = info->entry_number - host_gdt_entry_tls_min; in do_set_thread_area() local
35 struct stub_data *data = (void *)task->mm->context.id.stack; in do_set_thread_area()
[all …]
/linux/kernel/sched/
H A Dcpudeadline.c1 // SPDX-License-Identifier: GPL-2.0-only
13 return (i - 1) >> 1; in parent()
26 static void cpudl_heapify_down(struct cpudl *cp, int idx) in cpudl_heapify_down() argument
30 int orig_cpu = cp->elements[idx].cpu; in cpudl_heapify_down()
31 u64 orig_dl = cp->elements[idx].dl; in cpudl_heapify_down()
33 if (left_child(idx) >= cp->size) in cpudl_heapify_down()
40 l = left_child(idx); in cpudl_heapify_down()
41 r = right_child(idx); in cpudl_heapify_down()
42 largest = idx; in cpudl_heapify_down()
45 if ((l < cp->size) && dl_time_before(orig_dl, in cpudl_heapify_down()
[all …]
/linux/kernel/events/
H A Dhw_breakpoint_test.c1 // SPDX-License-Identifier: GPL-2.0
17 if ((slots) > get_test_bp_slots()) { \
23 #define TEST_EXPECT_NOSPC(expr) KUNIT_EXPECT_EQ(test, -ENOSPC, PTR_ERR(expr))
31 static struct perf_event *register_test_bp(int cpu, struct task_struct *tsk, int idx) in register_test_bp() argument
35 if (WARN_ON(idx < 0 || idx >= MAX_TEST_BREAKPOINTS)) in register_test_bp()
39 attr.bp_addr = (unsigned long)&break_vars[idx]; in register_test_bp()
47 if (WARN_ON(IS_ERR(*bp))) in unregister_test_bp()
49 if (WARN_ON(!*bp)) in unregister_test_bp()
59 if (!slots) in get_test_bp_slots()
78 * Returns true if this can be called again, continuing at @id.
[all …]
/linux/drivers/net/wireless/mediatek/mt7601u/
H A Dmain.c1 // SPDX-License-Identifier: GPL-2.0-only
13 struct mt7601u_dev *dev = hw->priv; in mt7601u_start()
16 mutex_lock(&dev->mutex); in mt7601u_start()
19 if (ret) in mt7601u_start()
22 ieee80211_queue_delayed_work(dev->hw, &dev->mac_work, in mt7601u_start()
24 ieee80211_queue_delayed_work(dev->hw, &dev->cal_work, in mt7601u_start()
27 mutex_unlock(&dev->mutex); in mt7601u_start()
33 struct mt7601u_dev *dev = hw->priv; in mt7601u_stop()
35 mutex_lock(&dev->mutex); in mt7601u_stop()
37 cancel_delayed_work_sync(&dev->cal_work); in mt7601u_stop()
[all …]
/linux/drivers/net/ethernet/ti/
H A Dcpsw_ale.c1 // SPDX-License-Identifier: GPL-2.0
3 * Texas Instruments N-Port Ethernet Switch Address Lookup Engine
24 #define BITMASK(bits) (BIT(bits) - 1)
75 * struct ale_entry_fld - The ALE tbl entry field description
94 * struct cpsw_ale_dev_id - The ALE version/SoC specific configuration
130 int idx, idx2, index; in cpsw_ale_get_field() local
133 idx = start / 32; in cpsw_ale_get_field()
134 idx2 = (start + bits - 1) / 32; in cpsw_ale_get_field()
135 /* Check if bits to be fetched exceed a word */ in cpsw_ale_get_field()
136 if (idx != idx2) { in cpsw_ale_get_field()
[all …]
/linux/tools/testing/selftests/bpf/
H A Duprobe_multi.c1 // SPDX-License-Identifier: GPL-2.0
27 #define NAME(name, idx) PASTE(name, idx) argument
29 #define DEF(name, idx) int __attribute__((weak)) NAME(name, idx)(void) { return 0; } argument
30 #define CALL(name, idx) NAME(name, idx)(); argument
32 #define F(body, name, idx) body(name, idx) argument
34 #define F10(body, name, idx) \ argument
35 F(body, PASTE(name, idx), 0) F(body, PASTE(name, idx), 1) F(body, PASTE(name, idx), 2) \
36 F(body, PASTE(name, idx), 3) F(body, PASTE(name, idx), 4) F(body, PASTE(name, idx), 5) \
37 F(body, PASTE(name, idx), 6) F(body, PASTE(name, idx), 7) F(body, PASTE(name, idx), 8) \
38 F(body, PASTE(name, idx), 9)
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dgk104.c52 struct nvkm_device *device = clk->base.subdev.device; in read_vco()
54 if (!(ssrc & 0x00000100)) in read_vco()
62 struct nvkm_device *device = clk->base.subdev.device; in read_pll()
71 if (!(ctrl & 0x00000001)) in read_pll()
77 sclk = device->crystal; in read_pll()
98 if (P == 0) in read_pll()
108 struct nvkm_device *device = clk->base.subdev.device; in read_div()
114 if ((ssrc & 0x00030000) != 0x00030000) in read_div()
115 return device->crystal; in read_div()
120 if (sctl & 0x80000000) { in read_div()
[all …]
H A Dgf100.c51 struct nvkm_device *device = clk->base.subdev.device; in read_vco()
53 if (!(ssrc & 0x00000100)) in read_vco()
54 return nvkm_clk_read(&clk->base, nv_clk_src_sppll0); in read_vco()
55 return nvkm_clk_read(&clk->base, nv_clk_src_sppll1); in read_vco()
61 struct nvkm_device *device = clk->base.subdev.device; in read_pll()
69 if (!(ctrl & 0x00000001)) in read_pll()
75 sclk = device->crystal; in read_pll()
79 sclk = nvkm_clk_read(&clk->base, nv_clk_src_mpllsrc); in read_pll()
82 sclk = nvkm_clk_read(&clk->base, nv_clk_src_mpllsrcref); in read_pll()
100 struct nvkm_device *device = clk->base.subdev.device; in read_div()
[all …]
/linux/arch/x86/kernel/
H A Dtls.c1 // SPDX-License-Identifier: GPL-2.0
24 struct thread_struct *t = &current->thread; in get_free_idx()
25 int idx; in get_free_idx() local
27 for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++) in get_free_idx()
28 if (desc_empty(&t->tls_array[idx])) in get_free_idx()
29 return idx + GDT_ENTRY_TLS_MIN; in get_free_idx()
30 return -ESRCH; in get_free_idx()
41 * this would create a 16-bit read-write segment with base and in tls_desc_okay()
45 * hardened this function to disallow 16-bit TLS segments. Fix in tls_desc_okay()
53 * Note that there's a similar kludge in modify_ldt -- look at in tls_desc_okay()
[all …]
/linux/drivers/net/ethernet/microchip/vcap/
H A Dvcap_api_debugfs_kunit.c1 // SPDX-License-Identifier: BSD-3-Clause
41 int idx; in test_val_keyset() local
43 if (kslist->cnt > 0) { in test_val_keyset()
44 switch (admin->vtype) { in test_val_keyset()
46 for (idx = 0; idx < kslist->cnt; idx++) { in test_val_keyset()
47 if (kslist->keysets[idx] == VCAP_KFS_ETAG) in test_val_keyset()
48 return kslist->keysets[idx]; in test_val_keyset()
49 if (kslist->keysets[idx] == in test_val_keyset()
51 return kslist->keysets[idx]; in test_val_keyset()
52 if (kslist->keysets[idx] == in test_val_keyset()
[all …]
/linux/drivers/perf/hisilicon/
H A Dhisi_pcie_pmu.c1 // SPDX-License-Identifier: GPL-2.0-only
90 return FIELD_GET(GENMASK(_hi, _lo), event->attr._config); \
108 return sysfs_emit(buf, "config=0x%llx\n", pmu_attr->id); in hisi_pcie_event_sysfs_show()
124 return cpumap_print_to_pagebuf(true, buf, cpumask_of(pcie_pmu->on_cpu)); in cpumask_show()
132 return sysfs_emit(buf, "%#x\n", pcie_pmu->identifier); in identifier_show()
140 return sysfs_emit(buf, "%#04x\n", PCI_BUS_NUM(pcie_pmu->bdf_min)); in bus_show()
148 return sysfs_emit(buf, "%#04x\n", pcie_pmu->bdf_min); in bdf_min_show()
156 return sysfs_emit(buf, "%#04x\n", pcie_pmu->bdf_max); in bdf_max_show()
163 u32 val = readl_relaxed(pcie_pmu->base + reg_off); in hisi_pcie_parse_reg_value()
180 * number" as another(index = 0x10010). BIT 16 is used to distinguish and 0-15
[all …]
/linux/lib/
H A Dfind_bit.c1 // SPDX-License-Identifier: GPL-2.0-or-later
25 * @FETCH: The expression that fetches and pre-processes each word of bitmap(s)
26 * @MUNGE: The expression that post-processes a word containing found bit (may be empty)
31 unsigned long idx, val, sz = (size); \
33 for (idx = 0; idx * BITS_PER_LON
231 unsigned long idx = (size-1) / BITS_PER_LONG; _find_last_bit() local
[all...]
/linux/drivers/net/netdevsim/
H A Dbpf.c5 * June 1991 as shown in the file COPYING in the top-level directory of this
53 const char **str = file->private; in nsim_bpf_string_show()
55 if (*str) in nsim_bpf_string_show()
68 state = env->prog->aux->offload->dev_priv; in nsim_bpf_verify_insn()
69 if (state->nsim_dev->bpf_bind_verifier_delay && !insn_idx) in nsim_bpf_verify_insn()
70 msleep(state->nsim_dev->bpf_bind_verifier_delay); in nsim_bpf_verify_insn()
72 if (insn_idx == env->prog->len - 1) { in nsim_bpf_verify_insn()
75 if (!state->nsim_dev->bpf_bind_verifier_accept) in nsim_bpf_verify_insn()
76 ret = -EOPNOTSUPP; in nsim_bpf_verify_insn()
89 return ns->xdp_hw.prog; in nsim_xdp_offload_active()
[all …]
/linux/drivers/net/wireless/mediatek/mt76/mt7603/
H A Dmain.c1 // SPDX-License-Identifier: ISC
14 struct mt7603_dev *dev = hw->priv; in mt7603_start()
18 dev->mphy.survey_time = ktime_get_boottime(); in mt7603_start()
19 set_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt7603_start()
20 mt7603_mac_work(&dev->mphy.mac_work.work); in mt7603_start()
28 struct mt7603_dev *dev = hw->priv; in mt7603_stop()
30 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt7603_stop()
31 cancel_delayed_work_sync(&dev->mphy.mac_work); in mt7603_stop()
38 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv; in mt7603_add_interface()
39 struct mt7603_dev *dev = hw->priv; in mt7603_add_interface()
[all …]
/linux/tools/testing/radix-tree/
H A Dmain.c1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/radix-tree.h>
17 long idx; in __gang_check() local
22 for (idx = -down; idx < up; idx++) in __gang_check()
23 item_insert(&tree, middle + idx); in __gang_check()
25 item_check_absent(&tree, middle - down - 1); in __gang_check()
26 for (idx = -down; idx < up; idx++) in __gang_check()
27 item_check_present(&tree, middle + idx); in __gang_check()
30 if (chunk > 0) { in __gang_check()
31 item_gang_check_present(&tree, middle - down, up + down, in __gang_check()
[all …]
/linux/drivers/media/dvb-core/
H A Ddvb_ringbuffer.c9 * Copyright (C) 1999-2003 Ralph Metzler
40 rbuf->pread=rbuf->pwrite=0; in dvb_ringbuffer_init()
41 rbuf->data=data; in dvb_ringbuffer_init()
42 rbuf->size=len; in dvb_ringbuffer_init()
43 rbuf->error=0; in dvb_ringbuffer_init()
45 init_waitqueue_head(&rbuf->queue); in dvb_ringbuffer_init()
47 spin_lock_init(&(rbuf->lock)); in dvb_ringbuffer_init()
58 * for memory barriers also see Documentation/core-api/circular-buffers.rst in dvb_ringbuffer_empty()
60 return (rbuf->pread == smp_load_acquire(&rbuf->pwrite)); in dvb_ringbuffer_empty()
74 free = READ_ONCE(rbuf->pread) - rbuf->pwrite; in dvb_ringbuffer_free()
[all …]
/linux/drivers/perf/
H A Darm_smmuv3_pmu.c1 // SPDX-License-Identifier: GPL-2.0
15 * filter_enable - 0 = no filtering, 1 = filtering enabled
16 * filter_span - 0 = exact match, 1 = pattern match
17 * filter_stream_id - pattern to filter against
19 * To match a partial StreamID where the X most-significant bits must match
20 * but the Y least-significant bits might differ, STREAMID is programmed
22 * STREAMID[Y - 1] == 0.
23 * STREAMID[Y - 2:0] == 1 (where Y > 1).
27 * Example: perf stat -e smmuv3_pmcg_ff88840/transaction,filter_enable=1,
28 * filter_span=1,filter_stream_id=0x42/ -a netperf
[all …]
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DCore.py1 # Core.py - Python extension for perf script, core functions
33 if flag_fields[event_name][field_name]:
35 for idx in sorted(flag_fields[event_name][field_name]['values']):
36 if not value and not idx:
37 string += flag_fields[event_name][field_name]['values'][idx]
39 if idx and (value & idx) == idx:
40 if print_delim and flag_fields[event_name][field_name]['delim']:
42 string += flag_fields[event_name][field_name]['values'][idx]
44 value &= ~idx
51 if symbolic_fields[event_name][field_name]:
[all …]
/linux/tools/lib/perf/
H A Devsel.c1 // SPDX-License-Identifier: GPL-2.0
24 int idx) in perf_evsel__init() argument
26 INIT_LIST_HEAD(&evsel->node); in perf_evsel__init()
27 INIT_LIST_HEAD(&evsel->per_stream_periods); in perf_evsel__init()
28 evsel->attr = *attr; in perf_evsel__init()
29 evsel->idx = idx; in perf_evsel__init()
30 evsel->leader = evsel; in perf_evsel__init()
37 if (evsel != NULL) in perf_evsel__new()
45 assert(evsel->fd == NULL); /* If not fds were not closed. */ in perf_evsel__exit()
46 assert(evsel->mmap == NULL); /* If not munmap wasn't called. */ in perf_evsel__exit()
[all …]

12345678910>>...43