/Linux-v6.6/tools/perf/util/ |
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 …]
|
/Linux-v6.6/arch/x86/include/asm/ |
D | mpspec.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 extern int pic_mode; 35 extern int mp_bus_id_to_type[MAX_MP_BUSSES]; 40 extern unsigned int boot_cpu_physical_apicid; 44 extern int smp_found_config; 66 extern int enable_update_mptable; 68 extern void default_get_smp_config(unsigned int early); 76 int generic_processor_info(int apicid); 81 unsigned long mask[PHYSID_ARRAY_SIZE]; member 86 #define physid_set(physid, map) set_bit(physid, (map).mask) argument [all …]
|
/Linux-v6.6/tools/lib/perf/ |
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 22 map->fd = -1; in perf_mmap__init() 23 map->overwrite = overwrite; in perf_mmap__init() 24 map->unmap_cb = unmap_cb; in perf_mmap__init() 25 refcount_set(&map->refcnt, 0); in perf_mmap__init() 27 prev->next = map; in perf_mmap__init() 30 size_t perf_mmap__mmap_len(struct perf_mmap *map) in perf_mmap__mmap_len() argument 32 return map->mask + 1 + page_size; in perf_mmap__mmap_len() 35 int perf_mmap__mmap(struct perf_mmap *map, struct perf_mmap_param *mp, in perf_mmap__mmap() argument [all …]
|
/Linux-v6.6/drivers/pinctrl/ |
D | pinctrl-stmfx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for STMicroelectronics Multi-Function eXpander (STMFX) GPIO expander 19 #include "pinctrl-utils.h" 53 * Pins availability is managed thanks to gpio-ranges property. 104 static int stmfx_gpio_get(struct gpio_chip *gc, unsigned int offset) in stmfx_gpio_get() 108 u32 mask = get_mask(offset); in stmfx_gpio_get() local 110 int ret; in stmfx_gpio_get() 112 ret = regmap_read(pctl->stmfx->map, reg, &value); in stmfx_gpio_get() 114 return ret ? ret : !!(value & mask); in stmfx_gpio_get() 117 static void stmfx_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) in stmfx_gpio_set() [all …]
|
/Linux-v6.6/include/linux/ |
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 …]
|
D | bitmap.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 23 * specific are in various include/asm-<arch>/bitops.h headers 36 * compile-time and at most BITS_PER_LONG. 57 * bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area 58 * bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off) as above 62 * bitmap_replace(dst, old, new, mask, nbits) *dst = (*old & ~(*mask)) | (*new & *mask) 63 * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) 64 * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) 78 * bitmap_get_value8(map, start) Get 8bit value from map at start 79 * bitmap_set_value8(map, value, start) Set 8bit value to map at start [all …]
|
/Linux-v6.6/drivers/irqchip/ |
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 …]
|
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 …]
|
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-v6.6/drivers/clk/qcom/ |
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 29 const struct qcom_reset_map *map; in qcom_reset_assert() local 30 u32 mask; in qcom_reset_assert() local 33 map = &rst->reset_map[id]; in qcom_reset_assert() [all …]
|
/Linux-v6.6/sound/soc/codecs/ |
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> 21 #define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 52 const int ca_id; 53 unsigned int n_ch; 54 unsigned long mask; member 60 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 64 /* Channel maps for multi-channel playbacks, up to 8 n_ch */ 67 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, [all …]
|
/Linux-v6.6/drivers/leds/ |
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-v6.6/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_trigger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 static unsigned int inv_scan_query_mpu6050(struct iio_dev *indio_dev) in inv_scan_query_mpu6050() 15 unsigned int mask; in inv_scan_query_mpu6050() local 18 * If the MPU6050 is just used as a trigger, then the scan mask in inv_scan_query_mpu6050() 22 if (!indio_dev->active_scan_mask) { in inv_scan_query_mpu6050() 23 st->chip_config.temp_fifo_enable = true; in inv_scan_query_mpu6050() 27 st->chip_config.gyro_fifo_enable = in inv_scan_query_mpu6050() 29 indio_dev->active_scan_mask) || in inv_scan_query_mpu6050() 31 indio_dev->active_scan_mask) || in inv_scan_query_mpu6050() 33 indio_dev->active_scan_mask); in inv_scan_query_mpu6050() [all …]
|
/Linux-v6.6/drivers/power/reset/ |
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 …]
|
D | syscon-poweroff.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 static struct regmap *map; variable 21 static u32 mask; variable 26 regmap_update_bits(map, offset, mask, value); in syscon_poweroff() 33 static int syscon_poweroff_probe(struct platform_device *pdev) in syscon_poweroff_probe() 35 int mask_err, value_err; in syscon_poweroff_probe() 37 map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "regmap"); in syscon_poweroff_probe() 38 if (IS_ERR(map)) { in syscon_poweroff_probe() 39 dev_err(&pdev->dev, "unable to get syscon"); in syscon_poweroff_probe() 40 return PTR_ERR(map); in syscon_poweroff_probe() [all …]
|
/Linux-v6.6/drivers/rtc/ |
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 …]
|
/Linux-v6.6/drivers/mfd/ |
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-v6.6/net/netfilter/ipset/ |
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-v6.6/drivers/thermal/qcom/ |
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-v6.6/drivers/net/ethernet/mellanox/mlx5/core/ |
D | pci_irq.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 30 cpumask_var_t mask; member 33 int refcount; 34 struct msi_map map; member 44 static int mlx5_core_func_to_vport(const struct mlx5_core_dev *dev, in mlx5_core_func_to_vport() 45 int func, in mlx5_core_func_to_vport() 50 return mlx5_core_ec_vf_vport_base(dev) + func - 1; in mlx5_core_func_to_vport() 54 * mlx5_get_default_msix_vec_count - Get the default number of MSI-X vectors 59 int mlx5_get_default_msix_vec_count(struct mlx5_core_dev *dev, int num_vfs) in mlx5_get_default_msix_vec_count() 61 int num_vf_msix, min_msix, max_msix; in mlx5_get_default_msix_vec_count() [all …]
|
/Linux-v6.6/lib/ |
D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 21 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() 62 * devm_ioremap - Managed ioremap() 64 * @offset: Resource address to map 65 * @size: Size of map 67 * Managed ioremap(). Map is automatically unmapped on driver detach. 77 * devm_ioremap_uc - Managed ioremap_uc() 79 * @offset: Resource address to map 80 * @size: Size of map 82 * Managed ioremap_uc(). Map is automatically unmapped on driver detach. [all …]
|
/Linux-v6.6/drivers/base/regmap/ |
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-v6.6/drivers/gpio/ |
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 …]
|
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 …]
|
/Linux-v6.6/drivers/char/ipmi/ |
D | kcs_bmc_aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2015-2018, Intel Corporation. 6 #define pr_fmt(fmt) "aspeed-kcs-bmc: " fmt 27 #define DEVICE_NAME "ast-kcs-bmc" 37 * IDyIRQX Use the specified 4-bit SerIRQ for LPC channel y 116 struct regmap *map; member 120 int id; 139 int rc; in aspeed_kcs_inb() 141 rc = regmap_read(priv->map, reg, &val); in aspeed_kcs_inb() 150 int rc; in aspeed_kcs_outb() [all …]
|