| /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 70 struct device_attribute *attr, in show_name() argument 74 const char *name; in show_name() local 75 cip = container_of(attr, struct pvr2_sysfs_ctl_item, attr_name); in show_name() 76 name = pvr2_ctrl_get_desc(cip->cptr); in show_name() [all …]
|
| /linux/drivers/memstick/core/ |
| H A D | mspro_block.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/blk-mq.h> 27 #define MSPRO_BLOCK_MAX_PAGES ((2 << 16) - 1) 49 char name[32]; member 115 char name[8]; member 117 unsigned char attr; member 182 struct mspro_block_data *msb = disk->private_data; in mspro_block_bd_free_disk() 195 struct mspro_block_data *msb = disk->private_data; in mspro_block_bd_getgeo() 197 geo->heads = msb->heads; in mspro_block_bd_getgeo() 198 geo->sectors = msb->sectors_per_track; in mspro_block_bd_getgeo() [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 */ 47 { "rb-b2b", ARG_RB_BACK2BACK, NULL, 0, "Back-to-back mode"}, 48 { "rb-use-outpu 328 int cnt; ringbuf_custom_consumer() local 396 struct perf_event_attr attr; perfbuf_libbpf_setup() local 486 int i, cnt; perfbuf_custom_consumer() local [all...] |
| /linux/drivers/infiniband/ulp/rtrs/ |
| H A D | rtrs-srv-sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved. 6 * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved. 7 * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved. 12 #include "rtrs-pri.h" 13 #include "rtrs-srv.h" 14 #include "rtrs-log.h" 30 struct kobj_attribute *attr, char *buf) in rtrs_srv_disconnect_show() argument 32 return sysfs_emit(buf, "Usage: echo 1 > %s\n", attr->attr.name); in rtrs_srv_disconnect_show() 36 struct kobj_attribute *attr, in rtrs_srv_disconnect_store() argument [all …]
|
| /linux/drivers/base/ |
| H A D | cpu.c | 1 // SPDX-License-Identifier: GPL-2.0 42 int cpuid = cpu->dev.id; in change_cpu_under_node() 45 cpu->node_id = to_nid; in change_cpu_under_node() 51 int cpuid = dev->id; in cpu_subsys_online() 58 return -ENODEV; in cpu_subsys_online() 64 * If -EBUSY is returned, it is likely that hotplug is temporarily in cpu_subsys_online() 70 if (ret == -EBUSY) { in cpu_subsys_online() 96 int logical_cpu = cpu->dev.id; in unregister_cpu() 101 device_unregister(&cpu->dev); in unregister_cpu() 108 struct device_attribute *attr, in cpu_probe_store() argument [all …]
|
| /linux/Documentation/netlink/specs/ |
| H A D | mptcp_pm.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2 --- 3 name: mptcp_pm 4 protocol: genetlink-legacy 7 c-family-name: mptcp-pm-name 8 c-version-name: mptcp-pm-ver 9 max-by-define: true 10 kernel-policy: per-op 11 cmd-cnt-name: --mptcp-pm-cmd-after-last 14 - [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_event in bpf_get_raw_tracepoint_module() 77 bpf_get_raw_tracepoint_module(const char * name) bpf_get_raw_tracepoint_module() argument 2037 bpf_get_raw_tracepoint(const char * name) bpf_get_raw_tracepoint() argument 2283 u32 cnt; global() member 2313 copy_user_syms(struct user_syms * us,unsigned long __user * usyms,u32 cnt) copy_user_syms() argument 2355 kprobe_multi_put_modules(struct module ** mods,u32 cnt) kprobe_multi_put_modules() argument 2706 addrs_check_error_injection_list(unsigned long * addrs,u32 cnt) addrs_check_error_injection_list() argument 2717 bpf_kprobe_multi_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_kprobe_multi_link_attach() argument 2723 u32 flags, cnt, size; bpf_kprobe_multi_link_attach() local 2869 bpf_kprobe_multi_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_kprobe_multi_link_attach() argument 2899 u32 cnt; global() member 2910 bpf_uprobe_unregister(struct bpf_uprobe * uprobes,u32 cnt) bpf_uprobe_unregister() argument 3152 bpf_uprobe_multi_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_uprobe_multi_link_attach() argument 3162 u32 flags, cnt, i; bpf_uprobe_multi_link_attach() local 3164 char *name; bpf_uprobe_multi_link_attach() local 3303 bpf_uprobe_multi_link_attach(const union bpf_attr * attr,struct bpf_prog * prog) bpf_uprobe_multi_link_attach() argument 3383 int cnt, err; __bpf_dynptr_copy_str() local [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/tools/perf/arch/x86/tests/ |
| H A D | hybrid.c | 1 // SPDX-License-Identifier: GPL-2.0 2 #include "arch-tests.h" 12 return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_config() 17 return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_perf_config() 22 return (evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT) == expected_config; in test_hybrid_type() 29 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_hw_event_with_pmu() 30 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_event_with_pmu() 41 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_group_event() 42 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_group_event() 48 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_group_event() [all …]
|
| /linux/rust/kernel/ |
| H A D | configfs.rs | 1 // SPDX-License-Identifier: GPL-2.0 3 //! configfs interface: Userspace-driven Kernel Object Configuration 5 //! configfs is an in-memory pseudo file system for configuration of kernel 11 //! - Items. All group children are groups. 12 //! - Symlink support. 13 //! - `disconnect_notify` hook. 14 //! - Default groups. 39 //! fn init(_module: &'static ThisModule) -> impl PinInit<Self, Error> { 52 //! config <- configfs::Subsystem::new( 67 //! fn new() -> impl PinInit<Self, Error> { [all …]
|
| /linux/drivers/hwmon/ |
| H A D | npcm750-pwm-fan.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2014-2018 Nuvoton Technology corporation. 146 * Get Fan Tach Timeout (base on clock 214843.75Hz, 1 cnt = 4.654us) 149 * 320RPM/pulse 2, ...-- 10.6Hz) 153 #define NPCM7XX_FAN_TCPA (NPCM7XX_FAN_TCNT - NPCM7XX_FAN_TIMEOUT) 154 #define NPCM7XX_FAN_TCPB (NPCM7XX_FAN_TCNT - NPCM7XX_FAN_TIMEOUT) 185 char name[THERMAL_NAME_LENGT 186 char name[THERMAL_NAME_LENGTH]; global() member 508 npcm7xx_read_pwm(struct device * dev,u32 attr,int channel,long * val) npcm7xx_read_pwm() argument 525 npcm7xx_write_pwm(struct device * dev,u32 attr,int channel,long val) npcm7xx_write_pwm() argument 545 npcm7xx_pwm_is_visible(const void * _data,u32 attr,int channel) npcm7xx_pwm_is_visible() argument 560 npcm7xx_read_fan(struct device * dev,u32 attr,int channel,long * val) npcm7xx_read_fan() argument 583 npcm7xx_fan_is_visible(const void * _data,u32 attr,int channel) npcm7xx_fan_is_visible() argument 599 npcm7xx_read(struct device * dev,enum hwmon_sensor_types type,u32 attr,int channel,long * val) npcm7xx_read() argument 612 npcm7xx_write(struct device * dev,enum hwmon_sensor_types type,u32 attr,int channel,long val) npcm7xx_write() argument 624 npcm7xx_is_visible(const void * data,enum hwmon_sensor_types type,u32 attr,int channel) npcm7xx_is_visible() argument 934 char name[20]; npcm7xx_pwm_fan_probe() local 935 int ret, cnt; npcm7xx_pwm_fan_probe() local [all...] |
| H A D | g760a.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * g760a - Driver for the Global Mixed-mode Technology Inc. G760A 9 * http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf 18 #include <linux/hwmon-sysfs.h> 29 #define G760A_REG_FAN_STA_RPM_OFF 0x1 /* +/-20% off */ 48 u8 act_cnt; /* formula: cnt = (CLK * 30)/(rpm * P) */ 58 #define PWM_FROM_CNT(cnt) (0xff-(cnt)) argument 59 #define PWM_TO_CNT(pwm) (0xff-(pwm)) 85 struct i2c_client *client = data->client; in g760a_update_client() 87 mutex_lock(&data->update_lock); in g760a_update_client() [all …]
|
| H A D | nct7904.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * nct7904.c - driver for Nuvoton NCT7904D. 109 /*The timeout range is 1-255 minutes*/ 147 if (data->bank_sel == bank) in nct7904_bank_lock() 149 ret = i2c_smbus_write_byte_data(data->client, BANK_SEL_REG, bank); in nct7904_bank_lock() 151 data->bank_se in nct7904_bank_lock() 220 nct7904_read_fan(struct device * dev,u32 attr,int channel,long * val) nct7904_read_fan() argument 224 unsigned int cnt, rpm; nct7904_read_fan() local 272 nct7904_fan_is_visible(const void * _data,u32 attr,int channel) nct7904_fan_is_visible() argument 299 nct7904_read_in(struct device * dev,u32 attr,int channel,long * val) nct7904_read_in() argument 364 nct7904_in_is_visible(const void * _data,u32 attr,int channel) nct7904_in_is_visible() argument 387 nct7904_read_temp(struct device * dev,u32 attr,int channel,long * val) nct7904_read_temp() argument 504 nct7904_temp_is_visible(const void * _data,u32 attr,int channel) nct7904_temp_is_visible() argument 539 nct7904_read_pwm(struct device * dev,u32 attr,int channel,long * val) nct7904_read_pwm() argument 564 nct7904_write_temp(struct device * dev,u32 attr,int channel,long val) nct7904_write_temp() argument 609 nct7904_write_fan(struct device * dev,u32 attr,int channel,long val) nct7904_write_fan() argument 636 nct7904_write_in(struct device * dev,u32 attr,int channel,long val) nct7904_write_in() argument 695 nct7904_write_pwm(struct device * dev,u32 attr,int channel,long val) nct7904_write_pwm() argument 720 nct7904_pwm_is_visible(const void * _data,u32 attr,int channel) nct7904_pwm_is_visible() argument 732 nct7904_read(struct device * dev,enum hwmon_sensor_types type,u32 attr,int channel,long * val) nct7904_read() argument 749 nct7904_write(struct device * dev,enum hwmon_sensor_types type,u32 attr,int channel,long val) nct7904_write() argument 767 nct7904_is_visible(const void * data,enum hwmon_sensor_types type,u32 attr,int channel) nct7904_is_visible() argument [all...] |
| /linux/drivers/iio/adc/ |
| H A D | pac1934.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * IIO driver for PAC1934 Multi-Channel DC Power/Energy Monitor 5 * Copyright (C) 2017-2024 Microchip Technology Inc. and its subsidiaries 12 …oads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/PAC1931-Family-Data-Sheet-DS20005850E.… 46 * (2^31 - 1) * 10^8 + 99999999 51 * -(2^31) * 10^8 - 99999999 53 #define PAC_193X_MIN_POWER_ACC -214748364899999999LL 119 * relative offsets when using multi-byte reads/writes even though these 148 /* Scale constant = (10^3 * 3.2 * 10^9 / 2^28) for mili Watt-second */ 154 #define PAC1934_DEV_ATTR(name) (&iio_dev_attr_##name.dev_attr.attr) argument [all …]
|
| /linux/drivers/scsi/ |
| H A D | scsi_transport_fc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2004-2007 James Smart, Emulex Corporation 16 #include <linux/bsg-lib.h> 74 char *name = NULL; \ 78 name = table[i].name; \ 82 return name; \ 92 if (strncmp(table_key, table[i].name, \ 102 /* Convert fc_port_type values to ascii string name */ 105 char *name; member 110 { FC_PORTTYPE_NPORT, "NPort (fabric via point-to-point)" }, [all …]
|
| /linux/tools/perf/util/ |
| H A D | header.c | 1 // SPDX-License-Identifier: GPL-2.0 35 #include "trace-event.h" 44 #include "build-id.h" 50 #include "time-utils.h" 54 #include "bpf-event.h" 55 #include "bpf-utils.h" 62 #include <event-parse.h> 83 struct perf_event_attr attr; member 89 __set_bit(feat, header->adds_features); in perf_header__set_feat() 94 __clear_bit(feat, header->adds_features); in perf_header__clear_feat() [all …]
|
| /linux/drivers/scsi/lpfc/ |
| H A D | lpfc_attr.c | 4 * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * 6 * Copyright (C) 2004-2016 Emulex. All rights reserved. * 9 * Portions Copyright (C) 2004-2005 Christoph Hellwig * 17 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * 72 " trunk - link was \"low\" speed", 74 " existing trunk - link was \"middle\" speed", 76 " trunk - link was \"high\" speed", 77 "Attached to non-trunking port - F_Port", 78 "Attached to non-trunking port - N_Port", 80 "non-FLOGI frame received", [all …]
|
| H A D | lpfc_ct.c | 4 * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * 6 * Copyright (C) 2004-2016 Emulex. All rights reserved. * 16 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * 24 * Fibre Channel SCSI LAN Device Driver CT support: FC Generic Services FC-GS 53 /* FDMI Port Speed definitions - FC-GS-7 */ 121 ndlp = cmdiocb->ndlp; in lpfc_ct_unsol_cmpl() 125 mp = cmdiocb->rsp_dmabuf; in lpfc_ct_unsol_cmpl() 126 bmp = cmdiocb->bpl_dmabuf; in lpfc_ct_unsol_cmpl() 128 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_ct_unsol_cmpl() 130 cmdiocb->rsp_dmabuf = NULL; in lpfc_ct_unsol_cmpl() [all …]
|
| /linux/drivers/net/phy/ |
| H A D | bcm54140.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 #include "bcm-phy-lib.h" 16 /* RDB per-port registers 61 #define BCM54140_RDB_MON_CTRL_SEL_RR 3 /* meassure all round-robin */ 62 #define BCM54140_RDB_MON_CTRL_PWR_DOWN BIT(0) /* power-down monitor */ 81 * T = 413.35 - (0.49055 * bits[9:0]) 83 #define BCM54140_HWMON_TO_TEMP(v) (413350L - (v) * 491) 84 #define BCM54140_HWMON_FROM_TEMP(v) DIV_ROUND_CLOSEST_ULL(413350L - (v), 491) 149 u32 attr, int channel) in bcm54140_hwmon_is_visible() argument 153 switch (attr) { in bcm54140_hwmon_is_visible() [all …]
|
| /linux/drivers/platform/mellanox/ |
| H A D | mlxbf-bootctl.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * software to manage reset-time actions. 12 #include <linux/arm-smccc.h> 19 #include "mlxbf-bootctl.h" 29 "89c036b4-e7d7-11e6-8797-001aca00bfc4"; 33 const char *name; member 54 [MLXBF_BOOTCTL_SB_LIFECYCLE_GA_NON_SECURE] = "GA Non-Secured", 136 ((ETH_ALEN * 2) + (ETH_ALEN - 1)) 154 if (sysfs_streq(boot_names[i].name, action)) in mlxbf_bootctl_reset_action_to_val() 157 return -EINVAL; in mlxbf_bootctl_reset_action_to_val() [all …]
|
| /linux/drivers/net/can/softing/ |
| H A D | softing_main.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2008-2010 5 * - Kurt Van Dijck, EIA Electronics 15 #define TX_ECHO_SKB_MAX (((TXMAX+1)/2)-1) 27 return (can->state <= CAN_STATE_ERROR_PASSIVE); in canif_is_active() 33 if (card->pdat->generatio in softing_set_reset_dpram() 156 int cnt = 0, lost_msg; softing_handle_1() local 551 show_chip(struct device * dev,struct device_attribute * attr,char * buf) show_chip() argument 560 show_output(struct device * dev,struct device_attribute * attr,char * buf) show_output() argument 569 store_output(struct device * dev,struct device_attribute * attr,const char * buf,size_t count) store_output() argument 689 DEV_ATTR_RO(name,member) global() argument 698 DEV_ATTR_RO_STR(name,member) global() argument [all...] |
| /linux/drivers/scsi/qla2xxx/ |
| H A D | qla_attr.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2003-2014 QLogic Corporation 16 /* SYSFS attributes --------------------------------------------------------- */ 25 struct qla_hw_data *ha = vha->hw; in qla2x00_sysfs_read_fw_dump() 28 if (!(ha->fw_dump_reading || ha->mctp_dump_reading || in qla2x00_sysfs_read_fw_dump() 29 ha->mpi_fw_dump_reading)) in qla2x00_sysfs_read_fw_dump() 32 mutex_lock(&ha->optrom_mutex); in qla2x00_sysfs_read_fw_dump() 34 if (off < ha->md_template_size) { in qla2x00_sysfs_read_fw_dump() 36 &off, ha->md_tmplt_hdr, ha->md_template_size); in qla2x00_sysfs_read_fw_dump() 38 off -= ha->md_template_size; in qla2x00_sysfs_read_fw_dump() [all …]
|
| /linux/kernel/bpf/ |
| H A D | syscall.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 6 #include <linux/bpf-cgroup.h> 35 #include <linux/bpf-netns.h> 48 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \ 49 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \ 50 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS) 51 #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY) 52 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) 83 * are 0 - i.e. new user-space does not rely on any kernel feature extensions [all …]
|
| /linux/kernel/ |
| H A D | padata.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * padata.c - generic interface to process data streams in parallel 5 * See Documentation/core-api/padata.rst for more information. 52 refcount_inc(&pd->refcnt); in padata_get_pd() 55 static inline void padata_put_pd_cnt(struct parallel_data *pd, int cnt) in padata_put_pd_cnt() argument 57 if (refcount_sub_and_test(cnt, &pd->refcnt)) in padata_put_pd_cnt() 72 int cpu_index = seq_nr % cpumask_weight(pd->cpumask.pcpu); in padata_cpu_hash() 74 return cpumask_nth(cpu_index, pd->cpumask.pcpu); in padata_cpu_hash() 87 list_del(&pw->pw_list); in padata_work_alloc() 103 INIT_WORK_ONSTACK(&pw->pw_work, work_fn); in padata_work_init() [all …]
|
| /linux/kernel/livepatch/ |
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * core.c - Kernel Live Patching Core 31 * accesses to klp-related variables and structures must have mutex protection, 34 * - klp_ftrace_handler() 35 * - klp_update_patch_state() 36 * - __klp_sched_try_switch() 51 return obj->name; in klp_is_module() 54 /* sets obj->mod if object is not vmlinux and module is found */ 68 mod = find_module(obj->name); in klp_find_object_module() 73 * until mod->exit() finishes. This is especially important for in klp_find_object_module() [all …]
|