/linux/scripts/kconfig/ |
H A D | conf.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 23 enum input_mode { 41 static enum input_mode input_mode = oldaskconfig; 72 p = str + l - 1; in strip() 74 *p-- = 0; in strip() 118 * randomize_choice_values - randomize choice block 126 int cnt = 0; in randomize_choice_values() local 134 struct symbol *sym = menu->sym; in randomize_choice_values() 137 cnt++; in randomize_choice_values() [all …]
|
/linux/tools/testing/selftests/bpf/ |
H A D | veristat.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 40 enum stat_id { 59 NUM_STATS_CNT = FILE_NAME - VERDICT, 63 * - A side value; 64 * - 171 char *name; global() member 570 append_filter(struct filter ** filters,int * cnt,const char * str) append_filter() argument 823 parse_stat_id_var(const char * name,size_t len,int * id,enum stat_variant * var,bool * is_abs) parse_stat_id_var() argument 941 int err, cnt = 0; parse_stats() local 980 int pos, lines, sub_stack, cnt = 0; parse_verif_log() local 1020 int cnt; global() member 1681 char expr[256], var[256], *name, *saveptr; parse_var_atoms() local 1712 append_var_preset(struct var_preset ** presets,int * cnt,const char * expr) append_var_preset() argument 1822 find_enum_value(const struct btf * btf,const char * name,long long * value) find_enum_value() argument 1825 int cnt, i; find_enum_value() local 1921 const char *name = btf__name_by_offset(btf, member->name_off); adjust_var_secinfo_member() local 2060 int i, j, k, n, cnt, err = 0; set_global_vars() local 2641 int col = 0, cnt = 0; parse_stats_csv() local 2966 int err, i, j, last_idx, cnt; handle_comparison_mode() local 3173 int i, last_stat_idx = 0, cnt = 0; output_prog_stats() local [all...] |
H A D | testing_helpers.c | 1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 17 int i, set_len = 0, new_len, num, start = 0, end = -1; in parse_num_list() 25 return -errno; in parse_num_list() 32 if (!parsing_end && *next == '-') { in parse_num_list() 45 return -EINVAL; in parse_num_list() 49 return -EINVA in parse_num_list() 224 int err = 0, cnt = 0; parse_test_list() local 365 delete_module(const char * name,int flags) delete_module() argument 370 unload_module(const char * name,bool verbose) unload_module() argument 372 int ret, cnt = 0; unload_module() local 444 get_xlated_program(int fd_prog,struct bpf_insn ** buf,__u32 * cnt) get_xlated_program() argument [all...] |
H A D | test_loader.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 (strncmp(str, pfx, __builtin_constant_p(pfx) ? sizeof(pfx) - 1 : strlen(pfx)) == 0) 57 static int sysctl_unpriv_disabled = -1; 59 enum mode { 64 enum load_mode { 70 char *name; 98 if (!tester->log_bu 73 size_t cnt; global() member 77 char *name; global() member 270 parse_int(const char * str,int * val,const char * name) parse_int() argument 288 parse_caps(const char * str,__u64 * val,const char * name) parse_caps() argument 319 parse_retval(const char * str,int * val,const char * name) parse_retval() argument 620 char *name; parse_test_spec() local [all...] |
/linux/drivers/net/dsa/realtek/ |
H A D | rtl8365mb.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Realtek SMI subdriver for the Realtek RTL8365MB-VC ethernet switch. 4 * Copyright (C) 2021 Alvin Šipraga <alsi@bang-olufsen.dk> 5 * Copyright (C) 2021 Michael Rasmussen <mir@bang-olufsen.dk> 7 * The RTL8365MB-VC is a 4+1 port 10/100/1000M switch controller. It includes 4 9 * can be connected to the CPU - or another PHY - via either MII, RMII, or 15 * .-----------------------------------. 17 * UTP <---------------> Giga PHY <-> PCS <-> P0 GMAC | 18 * UTP <---------------> Giga PHY <-> PCS <-> P1 GMAC | 19 * UTP <---------------> Giga PHY <-> PCS <-> P2 GMAC | [all …]
|
/linux/drivers/gpu/drm/msm/disp/mdp5/ |
H A D | mdp5_smp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 34 struct msm_drm_private *priv = smp->dev->dev_private; in get_kms() 36 return to_mdp5_kms(to_mdp_kms(priv->kms)); in get_kms() 39 static inline u32 pipe2client(enum mdp5_pipe pipe, int plane) in pipe2client() 48 * For ViG pipes, fetch Y/Cr/Cb-components clients are always in pipe2client() 52 * if mdp5_cfg->smp.clients[SSPP_VIG0] = N, in pipe2client() 58 return mdp5_cfg->smp.clients[pipe] + plane; in pipe2client() 66 void *cs = state->client_state[cid]; in smp_request_block() 67 int i, avail, cnt = smp->blk_cnt; in smp_request_block() local 70 /* we shouldn't be requesting blocks for an in-use client: */ in smp_request_block() [all …]
|
/linux/drivers/counter/ |
H A D | microchip-tcb-capture.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <uapi/linux/counter/microchip-tcb-capture.h> 38 static const enum counter_function mchp_tc_count_functions[] = { 43 static const enum counter_synapse_action mchp_tc_synapse_actions[] = { 53 .name = "Channel A", 57 .name = "Channel B", 76 enum counter_function *function) in mchp_tc_count_function_read() 80 if (priv->qdec_mode) in mchp_tc_count_function_read() 90 enum counter_function function) in mchp_tc_count_function_write() 95 regmap_read(priv->regmap, ATMEL_TC_BMR, &bmr); in mchp_tc_count_function_write() [all …]
|
/linux/drivers/media/usb/pvrusb2/ |
H A D | pvrusb2-sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include "pvrusb2-sysfs.h" 10 #include "pvrusb2-hdw.h" 11 #include "pvrusb2-debug.h" 13 #include "pvrusb2-debugifc.h" 66 char name[80]; member 74 const char *name; in show_name() local 76 name = pvr2_ctrl_get_desc(cip->cptr); in show_name() 78 cip->chptr, cip->ctl_id, name); in show_name() 79 if (!name) return -EINVAL; in show_name() [all …]
|
H A D | pvrusb2-ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include "pvrusb2-ctrl.h" 8 #include "pvrusb2-hdw-internal.h" 16 if (cptr->info->check_value) { in pvr2_ctrl_range_check() 17 if (!cptr->info->check_value(cptr,val)) return -ERANGE; in pvr2_ctrl_range_check() 18 } else if (cptr->info->type == pvr2_ctl_enum) { in pvr2_ctrl_range_check() 19 if (val < 0) return -ERANGE; in pvr2_ctrl_range_check() 20 if (val >= cptr->info->def.type_enum.count) return -ERANGE; in pvr2_ctrl_range_check() 23 lim = cptr->info->def.type_int.min_value; in pvr2_ctrl_range_check() 24 if (cptr->info->get_min_value) { in pvr2_ctrl_range_check() [all …]
|
/linux/fs/pstore/ |
H A D | zone.c | 1 // SPDX-License-Identifier: GPL-2.0 26 * struct psz_buffer - header of zone to flush to storage 28 * @sig: signature to indicate header (PSZ_SIG xor PSZONE-type value) 42 * struct psz_kmsg_header - kmsg dump-specific header to flush to storage 51 * This is a sub-header for a kmsg dump, trailing after &psz_buffer. 59 enum kmsg_dump_reason reason; 64 * struct pstore_zone - single stored buffer 67 * @type: front-end type for this zone 68 * @name: front-end name for this zone 71 * @buffer_size: bytes in @buffer->data [all …]
|
/linux/drivers/block/aoe/ |
H A D | aoechr.c | 17 enum { 30 char name[32]; member 33 enum { EMFL_VALID = 1 }; 67 .name = "aoe", 84 return -EINVAL; in interfaces() 99 return -EINVAL; in revalidate() 100 buf[sizeof buf - 1] = '\0'; in revalidate() 102 return -EFAULT; in revalidate() 107 return -EINVAL; in revalidate() 111 return -EINVAL; in revalidate() [all …]
|
/linux/kernel/trace/ |
H A D | bpf_trace.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2011-2015 PLUMgrid, http://plumgrid.com 18 #include <linux/error-injection.h> 55 static struct bpf_raw_event_map *bpf_get_raw_tracepoint_module(const char *name) in bpf_get_raw_tracepoint_module() argument 63 for (i = 0; i < btm->module->num_bpf_raw_events; ++i) { in bpf_get_raw_tracepoint_module() 64 btp = &btm->module->bpf_raw_events[i]; in bpf_get_raw_tracepoint_module() 65 if (!strcmp(btp->tp->name, name)) { in bpf_get_raw_tracepoint_module() 66 if (try_module_get(btm->module)) in bpf_get_raw_tracepoint_module() 77 static struct bpf_raw_event_map *bpf_get_raw_tracepoint_module(const char *name) in bpf_get_raw_tracepoint_module() argument 96 * trace_call_bpf - invoke BPF program [all …]
|
/linux/drivers/net/ethernet/microchip/vcap/ |
H A D | vcap_api_debugfs_kunit.c | 1 // SPDX-License-Identifier: BSD-3-Clause 35 static enum vcap_keyfield_set test_val_keyset(struct net_device *ndev, in test_val_keyset() 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/mm/ |
H A D | memblock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 52 * * ``memory`` - describes the physical memory available to the 56 * * ``reserved`` - describes the regions that were allocated 57 * * ``physmem`` - describes the actual physical memory available during 87 * * memblock_phys_alloc*() - these functions return the **physical** 89 * * memblock_alloc*() - these functions return the **virtual** address 131 .memory.name = "memory", 135 .reserved.name = "reserved", 145 .name = "physmem", 158 for (i = 0, rgn = &memblock_type->regions[0]; \ [all …]
|
/linux/drivers/fpga/ |
H A D | intel-m10-bmc-sec-update.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2019-2022 Intel Corporation. All rights reserved. 11 #include <linux/mfd/intel-m10-bmc.h> 43 struct intel_m10bmc *m10bmc = sec->m10bmc; in m10bmc_sec_write() 44 unsigned int stride = regmap_get_reg_stride(m10bmc->regmap); in m10bmc_sec_write() 47 u32 leftover_size = size - leftover_offset; in m10bmc_sec_write() 51 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_write() 52 return sec->m10bmc->flash_bulk_ops->write(m10bmc, buf, offset, size); in m10bmc_sec_write() 55 return -EINVAL; in m10bmc_sec_write() 57 ret = regmap_bulk_write(m10bmc->regmap, M10BMC_STAGING_BASE + offset, in m10bmc_sec_write() [all …]
|
/linux/drivers/net/ethernet/sfc/ |
H A D | tc_counters.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 /* Counter-management hashtables */ 33 struct efx_tc_counter *cnt = ptr; in efx_tc_counter_free() local 35 WARN_ON(!list_empty(&cnt->users)); in efx_tc_counter_free() 39 * threads could still be obtaining new pointers to *cnt if they can in efx_tc_counter_free() 42 flush_work(&cnt->work); in efx_tc_counter_free() 43 EFX_WARN_ON_PARANOID(spin_is_locked(&cnt->lock)); in efx_tc_counter_free() 44 kfree(cnt); in efx_tc_counter_free() 51 WARN_ON(refcount_read(&ctr->ref)); in efx_tc_counter_id_free() 59 rc = rhashtable_init(&efx->tc->counter_id_ht, &efx_tc_counter_id_ht_params); in efx_tc_init_counters() [all …]
|
/linux/kernel/bpf/ |
H A D | btf.c | 1 // SPDX-License-Identifier: GPL-2.0 75 * NOTE that we cannot assume any reference-order. 81 * object describing "void *". This type-reference is done 88 * - Each line started with "[?]" is a btf_type object 89 * - [?] is the type_id of the btf_type object. 90 * - CONST/PTR is the BTF_KIND_XXX 91 * - "(anon)" is the name o 243 u32 cnt; global() member 248 u32 cnt; global() member 276 char name[MODULE_NAME_LEN]; global() member 433 char name[BTF_SHOW_NAME_SIZE]; /* space for member name/type */ global() member 547 btf_find_by_name_kind(const struct btf * btf,const char * name,u8 kind) btf_find_by_name_kind() argument 567 bpf_find_btf_id(const char * name,u32 kind,struct btf ** btf_p) bpf_find_btf_id() argument 834 const char *name; __btf_name_by_offset() local 973 const char *name = NULL, *prefix = "", *parens = ""; btf_show_name() local 3492 const char *name = __btf_name_by_offset(btf, var_type->name_off); btf_get_field_type() local 3967 int ret, i, cnt; btf_parse_fields() local 7569 const char *name; btf_is_dynptr_ptr() local 7587 const char *name; global() member 7590 u16 cnt; global() member 8376 BPF_CALL_4(bpf_btf_find_by_name_kind,char *,name,int,name_sz,u32,kind,int,flags) BPF_CALL_4() argument 8413 BTF_TRACING_TYPE(name,type) BTF_ID_LIST_GLOBAL() argument 8425 const char *name; BTF_ID_LIST_GLOBAL() local 8826 btf_check_dtor_kfuncs(struct btf * btf,const struct btf_id_dtor_kfunc * dtors,u32 cnt) btf_check_dtor_kfuncs() argument 8984 bpf_core_essential_name_len(const char * name) bpf_core_essential_name_len() argument 9065 sizeof_cands(int cnt) sizeof_cands() argument 9197 const char *name; bpf_core_find_cands() local 9504 u32 cnt; bpf_struct_ops_find_value() local 9526 u32 cnt; bpf_struct_ops_find() local [all...] |
/linux/drivers/edac/ |
H A D | dmc520_edac.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * EDAC driver for DMC-520 memory controller. 25 /* DMC-520 registers */ 43 /* DMC-520 types, masks and bitfields */ 78 * The max-length message would be: "rank:7 bank:15 row:262143 col:1023". 79 * Max length is 34. Using a 40-size buffer is enough. 82 #define EDAC_MOD_NAME "dmc520-edac" 86 enum dmc520_mem_width { 92 enum dmc520_mem_type { 98 enum dmc520_dev_width { [all …]
|
/linux/drivers/iio/adc/ |
H A D | ad7280a.c | 1 // SPDX-License-Identifier: GPL-2.0 129 #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6_REG - \ 135 (c) - AD7280A_CELLS_PER_DEV) 143 /* 5-bit device address is sent LSB first */ 203 unsigned char crc = ad7280_calc_crc8(st->crc_tab, val >> 10); in ad7280_check_crc() 206 return -EIO; in ad7280_check_crc() 221 if (st->readback_delay_us < 50) in ad7280_delay() 222 udelay(st->readback_delay_us); in ad7280_delay() 231 .tx_buf = &st->tx, in __ad7280_read32() 232 .rx_buf = &st->rx, in __ad7280_read32() [all …]
|
/linux/drivers/scsi/qedf/ |
H A D | qedf_debugfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2016-2018 QLogic Corporation 19 * qedf_dbg_host_init - setup the debugfs file for the pf 30 sprintf(host_dirname, "host%u", qedf->host_no); in qedf_dbg_host_init() 31 qedf->bdf_dentry = debugfs_create_dir(host_dirname, qedf_dbg_root); in qedf_dbg_host_init() 35 if (!(dops->name)) in qedf_dbg_host_init() 38 debugfs_create_file(dops->name, 0600, qedf->bdf_dentry, qedf, in qedf_dbg_host_init() 46 * qedf_dbg_host_exit - clear out the pf's debugfs entries 54 debugfs_remove_recursive(qedf_dbg->bdf_dentry); in qedf_dbg_host_exit() 55 qedf_dbg->bdf_dentry = NULL; in qedf_dbg_host_exit() [all …]
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_ringbufs.c | 1 // SPDX-License-Identifier: GPL-2.0 19 int ringbuf_sz; /* per-ringbuf, in bytes */ 21 int perfbuf_sz; /* per-CPU size, in pages */ 32 enum { 41 { "rb-b2b", ARG_RB_BACK2BACK, NULL, 0, "Back-to-back mode"}, 42 …{ "rb-use-output", ARG_RB_USE_OUTPUT, NULL, 0, "Use bpf_ringbuf_output() instead of bpf_ringbuf_re… 43 { "rb-batch-cnt", ARG_RB_BATCH_CNT, "CNT", 0, "Set BPF-side record batch count"}, 44 { "rb-sampled", ARG_RB_SAMPLED, NULL, 0, "Notification sampling"}, 45 { "rb-sample-rate", ARG_RB_SAMPLE_RATE, "RATE", 0, "Notification sample rate"}, 87 /* RINGBUF-LIBBPF benchmark */ [all …]
|
/linux/include/linux/ |
H A D | irq.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 * Thanks. --rmk 31 enum irqchip_irq_state; 36 * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h 38 * IRQ_TYPE_NONE - default, unspecified type 39 * IRQ_TYPE_EDGE_RISING - rising edge triggered 40 * IRQ_TYPE_EDGE_FALLING - falling edge triggered 41 * IRQ_TYPE_EDGE_BOTH - rising and falling edge triggered 42 * IRQ_TYPE_LEVEL_HIGH - high level triggered 43 * IRQ_TYPE_LEVEL_LOW - low level triggered [all …]
|
/linux/drivers/hte/ |
H A D | hte-tegra194-test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2021-2022 NVIDIA Corporation 29 * compatible = "nvidia,tegra194-hte-test"; 30 * in-gpio = <&gpio_aon TEGRA194_AON_GPIO(BB, 1)>; 31 * out-gpio = <&gpio_aon TEGRA194_AON_GPIO(BB, 0)>; 34 * timestamp-names = "hte-gpio", "hte-i2c-irq"; 39 * - Load test driver. 40 * - For the GPIO, at regular interval gpio_out pin toggles triggering 43 * - For the LIC IRQ line, it uses 0x19 interrupt which is i2c controller 1. 44 * - Run i2cdetect -y 1 1>/dev/null, this command will generate i2c bus [all …]
|
/linux/drivers/pinctrl/ |
H A D | pinctrl-k230.c | 1 // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 15 #include <linux/pinctrl/pinconf-generic.h> 53 const char *name; member 61 const char *name; member 79 .name = "canaan,pinctrl", 90 return info->ngroups; in k230_get_groups_count() 98 return info->groups[selector].name; in k230_get_group_name() 108 if (selector >= info->ngroups) in k230_get_group_pins() 109 return -EINVAL; in k230_get_group_pins() 111 *pins = info->groups[selector].pins; in k230_get_group_pins() [all …]
|
/linux/kernel/irq/ |
H A D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 23 free_irq(this->irq, this->dev_id); in devm_irq_release() 30 return this->irq == match->irq && this->dev_id == match->dev_id; in devm_irq_match() 56 return -ENOMEM; in __devm_request_threaded_irq() 68 dr->irq = irq; in __devm_request_threaded_irq() 69 dr->dev_id = dev_id; in __devm_request_threaded_irq() 76 * devm_request_threaded_irq - allocate an interrupt line for a managed device with error logging 83 * @devname: An ascii name for the claiming device, dev_name(dev) if NULL 95 * information (device name, interrupt number, handler functions and 123 return -ENOMEM; in __devm_request_any_context_irq() [all …]
|