/linux/tools/perf/util/ |
H A D | mmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2011-2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> 5 * Parts came from evlist.c builtin-{top,stat,record}.c, see those files for further 29 void mmap_cpu_mask__scnprintf(struct mmap_cpu_mask *mask, const char *tag) in mmap_cpu_mask__scnprintf() argument 34 len = bitmap_scnprintf(mask->bits, mask->nbits, buf, MASK_SIZE); in mmap_cpu_mask__scnprintf() 36 pr_debug("%p: %s mask[%zd]: %s\n", mask, tag, mask->nbits, buf); in mmap_cpu_mask__scnprintf() 39 size_t mmap__mmap_len(struct mmap *map) in mmap__mmap_len() argument 41 return perf_mmap__mmap_len(&map->core); in mmap__mmap_len() 44 int __weak auxtrace_mmap__mmap(struct auxtrace_mmap *mm __maybe_unused, in auxtrace_mmap__mmap() 47 int fd __maybe_unused) in auxtrace_mmap__mmap() [all …]
|
H A D | cpumap.c | 1 // SPDX-License-Identifier: GPL-2.0 19 static int max_node_num; 24 static int *cpunode_map; 26 bool perf_record_cpu_map_data__test_bit(int i, in perf_record_cpu_map_data__test_bit() 29 int bit_word32 = i / 32; in perf_record_cpu_map_data__test_bit() 31 int bit_word64 = i / 64; in perf_record_cpu_map_data__test_bit() 34 return (data->mask32_data.long_size == 4) in perf_record_cpu_map_data__test_bit() 35 ? (bit_word32 < data->mask32_dat in perf_record_cpu_map_data__test_bit() 67 struct perf_cpu_map *map; cpu_map__from_entries() local 93 struct perf_cpu_map *map; cpu_map__from_mask() local 118 struct perf_cpu_map *map; cpu_map__from_range() local 151 cpu_map__fprintf(struct perf_cpu_map * map,FILE * fp) cpu_map__fprintf() argument 602 cpu_map__snprint(struct perf_cpu_map * map,char * buf,size_t size) cpu_map__snprint() argument 656 cpu_map__snprint_mask(struct perf_cpu_map * map,char * buf,size_t size) cpu_map__snprint_mask() argument [all...] |
/linux/tools/lib/perf/ |
H A D | mmap.c | 1 // SPDX-License-Identifier: GPL-2.0 19 void perf_mmap__init(struct perf_mmap *map, struct perf_mmap *prev, in perf_mmap__init() argument 23 map->fd = -1; in perf_mmap__init() 24 map->overwrite = overwrite; in perf_mmap__init() 25 map in perf_mmap__init() 31 perf_mmap__mmap_len(struct perf_mmap * map) perf_mmap__mmap_len() argument 36 perf_mmap__mmap(struct perf_mmap * map,struct perf_mmap_param * mp,int fd,struct perf_cpu cpu) perf_mmap__mmap() argument 53 perf_mmap__munmap(struct perf_mmap * map) perf_mmap__munmap() argument 70 perf_mmap__get(struct perf_mmap * map) perf_mmap__get() argument 75 perf_mmap__put(struct perf_mmap * map) perf_mmap__put() argument 88 perf_mmap__read_head(struct perf_mmap * map) perf_mmap__read_head() argument 93 perf_mmap__empty(struct perf_mmap * map) perf_mmap__empty() argument 100 perf_mmap__consume(struct perf_mmap * map) perf_mmap__consume() argument 112 overwrite_rb_find_range(void * buf,int mask,u64 * start,u64 * end) overwrite_rb_find_range() argument 181 perf_mmap__read_init(struct perf_mmap * map) perf_mmap__read_init() argument 198 perf_mmap__read_done(struct perf_mmap * map) perf_mmap__read_done() argument 210 perf_mmap__read(struct perf_mmap * map,u64 * startp,u64 end) perf_mmap__read() argument 272 perf_mmap__read_event(struct perf_mmap * map) perf_mmap__read_event() argument 480 perf_mmap__read_self(struct perf_mmap * map,struct perf_counts_values * count) perf_mmap__read_self() argument [all...] |
/linux/include/linux/ |
H A D | regmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 6 * Register map access API 54 #define REGMAP_UPSHIFT(s) (-(s)) 66 * struct reg_default - Default value for a register. 75 unsigned int reg; 76 unsigned int def; 80 * struct reg_sequence - An individual write from a sequence of writes. 90 unsigned int reg; 91 unsigned int def; 92 unsigned int delay_us; [all …]
|
/linux/drivers/pinctrl/ |
H A D | pinctrl-stmfx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for STMicroelectronics Multi-Function eXpander (STMFX) GPIO expander 20 #include "pinctrl-utils.h" 54 * Pins availability is managed thanks to gpio-ranges property. 105 static int stmfx_gpio_get(struct gpio_chip *gc, unsigned int offset) in stmfx_gpio_get() 109 u32 mask = get_mask(offset); in stmfx_gpio_get() local 111 int ret; in stmfx_gpio_get() 113 ret = regmap_read(pctl->stmfx->map, reg, &value); in stmfx_gpio_get() 115 return ret ? ret : !!(value & mask); in stmfx_gpio_get() 118 static void stmfx_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) in stmfx_gpio_set() [all …]
|
/linux/drivers/irqchip/ |
H A D | irq-ingenic-tcu.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/mfd/ingenic-tcu.h> 17 struct regmap *map; member 20 unsigned int nb_parent_irqs; 26 struct irq_chip *irq_chip = irq_data_get_irq_chip(&desc->irq_data); in ingenic_tcu_intc_cascade() 29 struct regmap *map = gc->private; in ingenic_tcu_intc_cascade() local 32 unsigned int i; in ingenic_tcu_intc_cascade() 34 regmap_read(map, TCU_REG_TFR, &irq_reg); in ingenic_tcu_intc_cascade() 35 regmap_read(map, TCU_REG_TMR, &irq_mask); in ingenic_tcu_intc_cascade() 52 struct regmap *map = gc->private; in ingenic_tcu_gc_unmask_enable_reg() local [all …]
|
H A D | irq-ls-extirq.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #define pr_fmt(fmt) "irq-ls-extirq: " fmt 12 #include <dt-bindings/interrupt-controller/arm-gic.h> 23 struct irq_fwspec map[MAXIRQ]; member 26 static void ls_extirq_intpcr_rmw(struct ls_extirq_data *priv, u32 mask, in ls_extirq_intpcr_rmw() argument 33 * IRQ descriptors, making sure the read-modify-write is atomic. in ls_extirq_intpcr_rmw() 35 raw_spin_lock(&priv->lock); in ls_extirq_intpcr_rmw() 37 if (priv->big_endian) in ls_extirq_intpcr_rmw() 38 intpcr = ioread32be(priv->intpcr); in ls_extirq_intpcr_rmw() 40 intpcr = ioread32(priv->intpcr); in ls_extirq_intpcr_rmw() [all …]
|
H A D | irq-hip04.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2002-2014 ARM Limited. 6 * Copyright (c) 2013-2014 HiSilicon Ltd. 7 * Copyright (c) 2013-2014 Linaro Ltd. 20 * Note that IRQs 0-31 are special - they are local to each CPU. 22 * registers are banked per-cpu for these sources. 42 #include <linux/irqchip/arm-gic.h> 48 #include "irq-gic-common.h" 56 unsigned int nr_irqs; 74 return hip04_data->dist_base; in hip04_dist_base() [all …]
|
/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | rtw8723x.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 5 * Copyright(c) 2018-2019 Realtek Corporation 16 [DESC_RATE1M] = { .addr = 0xe08, .mask = 0x0000ff00 }, 17 [DESC_RATE2M] = { .addr = 0x86c, .mask = 0x0000ff00 }, 18 [DESC_RATE5_5M] = { .addr = 0x86c, .mask = 0x00ff0000 }, 19 [DESC_RATE11M] = { .addr = 0x86c, .mask = 0xff000000 }, 20 [DESC_RATE6M] = { .addr = 0xe00, .mask = 0x000000ff }, 21 [DESC_RATE9M] = { .addr = 0xe00, .mask = 0x0000ff00 }, 22 [DESC_RATE12M] = { .addr = 0xe00, .mask = 0x00ff0000 }, 23 [DESC_RATE18M] = { .addr = 0xe00, .mask = 0xff000000 }, [all …]
|
/linux/drivers/leds/ |
H A D | leds-syscon.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 * struct syscon_led - state container for syscon based LEDs 21 * @map: regmap to access the syscon device backing this LED 23 * @mask: the bit in the register corresponding to the LED 28 struct regmap *map; member 30 u32 mask; member 40 int ret; in syscon_led_set() 44 sled->state = false; in syscon_led_set() 46 val = sled->mask; in syscon_led_set() 47 sled->state = true; in syscon_led_set() [all …]
|
/linux/drivers/power/reset/ |
H A D | syscon-reboot.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 struct regmap *map; member 21 u32 mask; member 25 static int syscon_restart_handle(struct notifier_block *this, in syscon_restart_handle() 33 regmap_update_bits(ctx->map, ctx->offset, ctx->mask, ctx->value); in syscon_restart_handle() 41 static int syscon_reboot_probe(struct platform_device *pdev) in syscon_reboot_probe() 44 struct device *dev = &pdev->dev; in syscon_reboot_probe() 45 int mask_err, value_err; in syscon_reboot_probe() 46 int priority; in syscon_reboot_probe() 47 int err; in syscon_reboot_probe() [all …]
|
H A D | syscon-poweroff.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 struct regmap *map; member 23 u32 mask; member 26 static int syscon_poweroff(struct sys_off_data *off_data) in syscon_poweroff() 28 struct syscon_poweroff_data *data = off_data->cb_data; in syscon_poweroff() 31 regmap_update_bits(data->map, data->offset, data->mask, data->value); in syscon_poweroff() 40 static int syscon_poweroff_probe(struct platform_device *pdev) in syscon_poweroff_probe() 42 struct device *dev = &pdev->dev; in syscon_poweroff_probe() 44 int mask_err, value_err; in syscon_poweroff_probe() 48 return -ENOMEM; in syscon_poweroff_probe() [all …]
|
/linux/sound/soc/codecs/ |
H A D | hdmi-codec.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/ 16 #include <sound/hdmi-codec.h> 22 #define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 53 const int ca_id; 54 unsigned int n_ch; 55 unsigned long mask; member 61 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 65 /* Channel maps for multi-channel playbacks, up to 8 n_ch */ 68 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, [all …]
|
/linux/drivers/iio/imu/inv_mpu6050/ |
H A D | inv_mpu_trigger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 static unsigned int inv_scan_query_mpu6050(struct iio_dev *indio_dev) in inv_scan_query_mpu6050() 16 unsigned int mask; in inv_scan_query_mpu6050() local 19 * If the MPU6050 is just used as a trigger, then the scan mask in inv_scan_query_mpu6050() 23 if (!indio_dev->active_scan_mask) { in inv_scan_query_mpu6050() 24 st->chip_config.temp_fifo_enable = true; in inv_scan_query_mpu6050() 28 st->chip_config.gyro_fifo_enable = in inv_scan_query_mpu6050() 30 indio_dev->active_scan_mask) || in inv_scan_query_mpu6050() 32 indio_dev->active_scan_mask) || in inv_scan_query_mpu6050() 34 indio_dev->active_scan_mask); in inv_scan_query_mpu6050() [all …]
|
/linux/drivers/rtc/ |
H A D | rtc-88pm80x.c | 1 // SPDX-License-Identifier: GPL-2.0 40 struct regmap *map; member 44 int irq; 47 static irqreturn_t rtc_update_handler(int irq, void *data) in rtc_update_handler() 50 int mask; in rtc_update_handler() local 52 mask = PM800_ALARM | PM800_ALARM_WAKEUP; in rtc_update_handler() 53 regmap_update_bits(info->map, PM800_RTC_CONTROL, mask | PM800_ALARM1_EN, in rtc_update_handler() 54 mask); in rtc_update_handler() 55 rtc_update_irq(info->rtc_dev, 1, RTC_AF); in rtc_update_handler() 59 static int pm80x_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) in pm80x_rtc_alarm_irq_enable() [all …]
|
H A D | rtc-max77686.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 // based on rtc-max8997.c 16 #include <linux/mfd/max77686-private.h> 23 #define MAX77686_INVALID_I2C_ADDR (-1) 26 #define MAX77686_INVALID_REG (-1) 63 * struct max77686_rtc_driver_data - model-specific configuration 65 * @mask: Mask used to read RTC registers value 66 * @map: Registers offset to I2C addresses map 76 u8 mask; member 77 const unsigned int *map; member [all …]
|
/linux/drivers/mfd/ |
H A D | stmfx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for STMicroelectronics Multi-Function eXpander (STMFX) core 17 static bool stmfx_reg_volatile(struct device *dev, unsigned int reg) in stmfx_reg_volatile() 44 static bool stmfx_reg_writeable(struct device *dev, unsigned int reg) in stmfx_reg_writeable() 78 .of_compatible = "st,stmfx-0300-pinctrl", 79 .name = "stmfx-pinctrl", 84 .of_compatible = "st,stmfx-0300-idd", 85 .name = "stmfx-idd", 90 .of_compatible = "st,stmfx-0300-ts", 91 .name = "stmfx-ts", [all …]
|
/linux/net/netfilter/ipset/ |
H A D | ip_set_bitmap_ip.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> 4 * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org> 61 return ((ip & ip_set_hostmask(m->netmask)) - m->first_ip) / m->hosts; in ip_to_id() 66 static int 68 struct bitmap_ip *map, size_t dsize) in bitmap_ip_do_test() argument 70 return !!test_bit(e->id, map->members); in bitmap_ip_do_test() 73 static int 74 bitmap_ip_gc_test(u16 id, const struct bitmap_ip *map, size_t dsize) in bitmap_ip_gc_test() argument 76 return !!test_bit(id, map->members); in bitmap_ip_gc_test() [all …]
|
/linux/drivers/clk/qcom/ |
H A D | reset.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/reset-controller.h> 14 static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id) in qcom_reset() 18 rcdev->ops->assert(rcdev, id); in qcom_reset() 19 fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */ in qcom_reset() 21 rcdev->ops->deassert(rcdev, id); in qcom_reset() 25 static int qcom_reset_set_assert(struct reset_controller_dev *rcdev, in qcom_reset_set_assert() 29 const struct qcom_reset_map *map; in qcom_reset_set_assert() local 30 u32 mask; in qcom_reset_set_assert() local 33 map = &rst->reset_map[id]; in qcom_reset_set_assert() [all …]
|
/linux/drivers/thermal/qcom/ |
H A D | tsens-8960.c | 1 // SPDX-License-Identifier: GPL-2.0 41 #define S5_STATUS_OFF 0x3664 /* Sensors 5-10 found on apq8064/msm8960 */ 48 /* Original slope - 350 to compensate mC to C inaccuracy */ 55 static int suspend_8960(struct tsens_priv *priv) in suspend_8960() 57 int ret; in suspend_8960() 58 unsigned int mask; in suspend_8960() local 59 struct regmap *map = priv->tm_map; in suspend_8960() local 61 ret = regmap_read(map, THRESHOLD_ADDR, &priv->ctx.threshold); in suspend_8960() 65 ret = regmap_read(map, CNTL_ADDR, &priv->ctx.control); in suspend_8960() 69 if (priv->num_sensors > 1) in suspend_8960() [all …]
|
/linux/drivers/net/dsa/microchip/ |
H A D | ksz_dcb.c | 1 // SPDX-License-Identifier: GPL-2.0 54 /* ksz_supported_apptrust[] - Supported apptrust selectors and Priority Order 55 * of Internal Priority Map (IPM) sources. 58 * the index within the array indicates the priority of the selector - lower 65 * non-configurable precedence where certain types of priority information 68 * 1. Tail Tag - Highest priority, overrides ACL, VLAN PCP, and DSCP priorities. 69 * 2. ACL - Overrides VLAN PCP and DSCP priorities. 70 * 3. VLAN PCP - Overrides DSCP priority. 71 * 4. DSCP - Lowest priority, does not override any other priority source. 77 * DCB_APP_SEL_PCP - Priority Code Point selector [all …]
|
/linux/drivers/base/regmap/ |
H A D | regmap-irq.c | 1 // SPDX-License-Identifier: GPL-2.0 24 struct regmap *map; member 27 int irq_base; 30 int irq; 31 int wake_count; 34 unsigned int *main_status_buf; 35 unsigned int *status_buf; 36 unsigned int *mask_buf; 37 unsigned int *mask_buf_def; 38 unsigned int *wake_buf; [all …]
|
/linux/drivers/gpio/ |
H A D | gpio-pcie-idio-24.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * GPIO driver for the ACCES PCIe-IDIO-24 family 6 * This driver supports the following ACCES devices: PCIe-IDIO-24, 7 * PCIe-IDI-24, PCIe-IDO-24, and PCIe-IDIO-12. 48 * 23: Built-In Self-Test (BIST) Interrupt Active 126 .mask = BIT((_id) % IDIO_24_NGPIO_PER_REG), \ 133 IDIO_24_IIN_IRQ(0), IDIO_24_IIN_IRQ(1), IDIO_24_IIN_IRQ(2), /* IIN 0-2 */ 134 IDIO_24_IIN_IRQ(3), IDIO_24_IIN_IRQ(4), IDIO_24_IIN_IRQ(5), /* IIN 3-5 */ 135 IDIO_24_IIN_IRQ(6), IDIO_24_IIN_IRQ(7), IDIO_24_IIN_IRQ(8), /* IIN 6-8 */ 136 IDIO_24_IIN_IRQ(9), IDIO_24_IIN_IRQ(10), IDIO_24_IIN_IRQ(11), /* IIN 9-11 */ [all …]
|
H A D | gpio-idio-16.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * GPIO library for the ACCES IDIO-16 family 15 #include "gpio-idio-16.h" 33 struct regmap *map; member 34 unsigned int irq_mask; 37 static int idio_16_handle_mask_sync(const int index, const unsigned int mask_buf_def, in idio_16_handle_mask_sync() 38 const unsigned int mask_buf, void *const irq_drv_data) in idio_16_handle_mask_sync() 41 const unsigned int prev_mask = data->irq_mask; in idio_16_handle_mask_sync() 42 int err; in idio_16_handle_mask_sync() 43 unsigned int val; in idio_16_handle_mask_sync() [all …]
|
H A D | gpio-mvebu.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 15 * non-SMP platforms (Orion, Dove, Kirkwood, Armada 370) and the SMP 19 * - the basic variant, called "orion-gpio", with the simplest 21 * non-SMP Discovery systems 22 * - the mv78200 variant for MV78200 Discovery systems. This variant 23 * turns the edge mask and level mask registers into CPU0 edge 24 * mask/level mask registers, and adds CPU1 edge mask/level mask 26 * - the armadaxp variant for Armada XP systems. This variant keeps 27 * the normal cause/edge mask/level mask registers when the global [all …]
|