/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | nexthop.sh | 2 # SPDX-License-Identifier: GPL-2.0 58 local nharg="$1"; shift 59 local expected="$1"; shift 61 out=$($IP nexthop show ${nharg} | sed -e 's/ *$//') 71 local group_id=$1; shift 78 nhid=$1; shift 79 expected=$1; shift 82 grep "trap" | wc -l) 93 local expected_occ=$1; shift 95 occ=$($DEVLINK -jp resource show $DEVLINK_DEV \ [all …]
|
/linux/drivers/pinctrl/mediatek/ |
H A D | pinctrl-mtmips.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/pinctrl/pinconf-generic.h> 19 #include <asm/mach-ralink/ralink_regs.h> 20 #include <asm/mach-ralink/mt7620.h> 22 #include "pinctrl-mtmips.h" 24 #include "../pinctrl-utils.h" 50 return p->group_count; in mtmips_get_group_count() 54 unsigned int group) in mtmips_get_group_name() argument 58 return (group >= p->group_count) ? NULL : p->group_names[group]; in mtmips_get_group_name() 62 unsigned int group, in mtmips_get_group_pins() argument [all …]
|
/linux/drivers/accessibility/speakup/ |
H A D | i18n.c | 1 // SPDX-License-Identifier: GPL-2.0 57 [MSG_CTRL] = "control-", 73 [MSG_CTL_SHIFT] = "shift", 77 [MSG_CTL_LSHIFT] = "l shift", 81 [MSG_CTL_CAPSSHIFT] = "caps shift", 107 [MSG_STATE_SHIFT] = "shift", 151 [MSG_KEYNAME_LEFTSHFT] = "left shift", 163 [MSG_KEYNAME_RIGHTSHFT] = "right shift", 402 char *spk_msg_get(enum msg_index_t index) in spk_msg_get() argument 404 return speakup_msgs[index]; in spk_msg_get() [all …]
|
H A D | kobjects.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * This code is based on kobject-example.c, which came with linux 2.6.x. 9 * Copyright (C) 2004-2007 Greg Kroah-Hartman <greg@kroah.com> 44 if (strcmp("characters", attr->attr.name) == 0) { in chars_chartab_show() 71 bufsize -= len; in chars_chartab_show() 75 return buf_pointer - buf; in chars_chartab_show() 99 snprintf(buf + (len - 1), sizeof(buf) - (len - 1), in report_char_chartab_status() 122 unsigned long index = 0; in chars_chartab_store() local 128 int do_characters = !strcmp(attr->attr.name, "characters"); in chars_chartab_store() 161 index = simple_strtoul(cp, &temp, 10); in chars_chartab_store() [all …]
|
/linux/drivers/pinctrl/samsung/ |
H A D | pinctrl-s3c64xx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // S3C64xx specific support for pinctrl-samsung driver. 7 // Based on pinctrl-exynos.c, please see the file for original copyrights. 24 #include "pinctrl-samsung.h" 116 .eint_mask = (1 << (pins)) - 1, \ 140 .eint_mask = (1 << (pins)) - 1, \ 194 .eint_mask = (1 << (pins)) - 1, \ 200 * struct s3c64xx_eint0_data - EINT0 common data 212 * struct s3c64xx_eint0_domain_data - EINT0 per-domain data 222 * struct s3c64xx_eint_gpio_data - GPIO EINT data [all …]
|
/linux/net/sched/ |
H A D | sch_qfq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 "Reducing the Execution Time of Fair-Queueing Schedulers." 27 http://algo.ing.unimo.it/people/paolo/agg-sched/agg-sched.pdf 48 number of groups. Which group a class belongs to depends on the 59 QFQ_MAX_INDEX is the maximum index allowed for a group. We need 60 one bit per index. 67 ^.__grp->index = 0 68 *.__grp->slot_shift 72 The max group index corresponds to Lmax/w_min, where 75 we can derive the shift corresponding to each group. [all …]
|
/linux/drivers/platform/mellanox/ |
H A D | mlxreg-io.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/hwmon-sysfs.h> 23 * struct mlxreg_io_priv_data - driver's private data: 30 * @group: sysfs attribute group; 31 * @groups: list of sysfs attribute group for hwmon registration; 41 struct attribute_group group; member 53 ret = regmap_read(regmap, data->reg, regval); in mlxreg_io_get_reg() 62 * with all bits one. No special handling for such kind of attributes - in mlxreg_io_get_reg() 65 * (from 1 to 32) is the bit sequence. For the fourth kind - the number in mlxreg_io_get_reg() 67 * specified through 'data->regnum' field. in mlxreg_io_get_reg() [all …]
|
/linux/drivers/irqchip/ |
H A D | irq-riscv-aplic-msi.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/irqchip/riscv-aplic.h> 13 #include <linux/irqchip/riscv-imsic.h> 21 #include "irq-riscv-aplic-main.h" 43 * The section "4.9.2 Special consideration for level-sensitive interrupt in aplic_msi_irq_retrigger_level() 44 * sources" of the RISC-V AIA specification says: in aplic_msi_irq_retrigger_level() 52 writel(d->hwirq, priv->regs + APLIC_SETIPNUM_LE); in aplic_msi_irq_retrigger_level() 60 * EOI handling is required only for level-triggered interrupts in aplic_msi_irq_eoi() 73 * Updating sourcecfg register for level-triggered interrupts in aplic_msi_irq_set_type() 84 struct aplic_msicfg *mc = &priv->msicfg; in aplic_msi_write_msg() [all …]
|
H A D | irq-riscv-imsic-state.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #define pr_fmt(fmt) "riscv-imsic: " fmt 22 #include "irq-riscv-imsic-state.h" 63 return imsic ? &imsic->global : NULL; in imsic_get_global_config() 74 imask = BIT(id & (__riscv_xlen - 1)); in __imsic_eix_read_clear() 102 * are XLEN-wide and we must not touch IDs which in __imsic_eix_update() 106 for (i = id & (__riscv_xlen - 1); id < last_id && i < __riscv_xlen; i++) { in __imsic_eix_update() 134 lockdep_assert_held(&lpriv->lock); in __imsic_local_sync() 136 for_each_set_bit(i, lpriv->dirty_bitmap, imsic->global.nr_ids + 1) { in __imsic_local_sync() 139 vec = &lpriv->vectors[i]; in __imsic_local_sync() [all …]
|
H A D | irq-sp7021-intc.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 17 #define SP_INTC_NR_IRQS (SP_INTC_HWIRQ_MAX - SP_INTC_HWIRQ_MIN + 1) 33 #define GROUP_MASK (BIT(SP_INTC_NR_GROUPS) - 1) 50 /* index of states */ 57 #define STATE_BIT(irq, idx) (((irq) - GPIO_INT0_HWIRQ) * 3 + (idx)) 64 * REG_GROUP_1: include clear/masked_ext0/masked_ext1/group regs. 76 DECLARE_BITMAP(states, (GPIO_INT7_HWIRQ - GPIO_INT0_HWIRQ + 1) * 3); 102 u32 hwirq = d->hwirq; in sp_intc_ack_irq() 114 sp_intc_assign_bit(d->hwirq, REG_INTR_MASK, 0); in sp_intc_mask_irq() 119 sp_intc_assign_bit(d->hwirq, REG_INTR_MASK, 1); in sp_intc_unmask_irq() [all …]
|
/linux/arch/powerpc/include/asm/nohash/32/ |
H A D | mmu-8xx.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 * During software tablewalk, the registers used perform mask/shift-add 21 #define MI_IDXMASK 0x00001f00 /* TLB index to be loaded */ 43 * 4-15 => Not Used 62 #define MI_APG 0x000001e0 /* Access protection group (0) */ 93 #define MD_IDXMASK 0x00001f00 /* TLB index to be loaded */ 126 #define M_L1INDX 0x00000ffc /* Level 1 index, when read */ 136 #define MD_L2INDX 0xfffffe00 /* Level 2 index (*pte), when read */ 137 #define MD_APG 0x000001e0 /* Access protection group (0) */ 175 #define MODULES_VADDR (MODULES_END - MODULES_SIZE) [all …]
|
/linux/drivers/pinctrl/sunxi/ |
H A D | pinctrl-sunxi.c | 6 * Maxime Ripard <maxime.ripard@free-electrons.com> 28 #include <linux/pinctrl/pinconf-generic.h> 33 #include <dt-bindings/pinctrl/sun4i-a10.h> 36 #include "pinctrl-sunxi.h" 51 * - Mux config 52 * - Data value 53 * - Drive level 54 * - Pull direction 71 pin -= PK_BASE; in sunxi_bank_offset() 75 return offset + (pin / PINS_PER_BANK) * pctl->bank_mem_size; in sunxi_bank_offset() [all …]
|
/linux/arch/powerpc/mm/book3s64/ |
H A D | hash_64k.c | 31 * index from 0 - 15 33 bool __rpte_sub_valid(real_pte_t rpte, unsigned long index) in __rpte_sub_valid() argument 35 return !(hpte_soft_invalid(__rpte_to_hidx(rpte, index))); in __rpte_sub_valid() 48 unsigned long shift = mmu_psize_defs[MMU_PAGE_4K].shift; in __hash_page_4K() local 89 subpg_index = (ea & (PAGE_SIZE - 1)) >> shift; in __hash_page_4K() 118 gslot = pte_get_hash_gslot(vpn, shift, ssize, rpte, in __hash_page_4K() 128 if (ret == -1) in __hash_page_4K() 155 pa += (subpg_index << shift); in __hash_page_4K() 157 hash = hpt_hash(vpn, shift, ssize); in __hash_page_4K() 167 if (unlikely(slot == -1)) { in __hash_page_4K() [all …]
|
/linux/drivers/pinctrl/freescale/ |
H A D | pinctrl-imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 30 #include "pinctrl-imx.h" 43 for (i = 0; i < pctldev->num_groups; i++) { in imx_pinctrl_find_group_by_name() 45 if (grp && !strcmp(grp->grp.name, name)) in imx_pinctrl_find_group_by_name() 55 seq_printf(s, "%s", dev_name(pctldev->dev)); in imx_pin_dbg_show() 63 const struct imx_pinctrl_soc_info *info = ipctl->info; in imx_dt_node_to_map() 72 * first find the group of this node and check if we need create in imx_dt_node_to_map() 75 grp = imx_pinctrl_find_group_by_name(pctldev, np->name); in imx_dt_node_to_map() 77 dev_err(ipctl->dev, "unable to find group for node %pOFn\n", np); in imx_dt_node_to_map() 78 return -EINVAL; in imx_dt_node_to_map() [all …]
|
/linux/drivers/comedi/drivers/ |
H A D | s626.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * COMEDI - Linux Control and Measurement Device Interface 10 * Copyright (C) 2002-2004 Sensoray Co., Inc. 68 * struct s626_private - Working data for s626 driver. 69 * @ai_cmd_running: non-zero if ai_cmd is running. 97 /* Counter overflow/index event flag masks for RDMISC2. */ 98 #define S626_INDXMASK(C) (1 << (((C) > 2) ? ((C) * 2 - 1) : ((C) * 2 + 4))) 110 writel(val, dev->mmio + reg); in s626_mc_enable() 116 writel(cmd << 16, dev->mmio + reg); in s626_mc_disable() 124 val = readl(dev->mmio + reg); in s626_mc_test() [all …]
|
/linux/drivers/pinctrl/tegra/ |
H A D | pinctrl-tegra-xusb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> 23 #include "../pinctrl-utils.h" 72 unsigned int shift; member 99 writel(value, padctl->regs + offset); in padctl_writel() 105 return readl(padctl->regs + offset); in padctl_readl() 112 return padctl->soc->num_pins; in tegra_xusb_padctl_get_groups_count() 116 unsigned int group) in tegra_xusb_padctl_get_group_name() argument 120 return padctl->soc->pins[group].name; in tegra_xusb_padctl_get_group_name() 124 unsigned group, in tegra_xusb_padctl_get_group_pins() argument [all …]
|
/linux/arch/powerpc/platforms/powernv/ |
H A D | pci-ioda-tce.c | 1 // SPDX-License-Identifier: GPL-2.0+ 22 struct pci_controller *hose = phb->hose; in pnv_ioda_parse_tce_sizes() 23 struct device_node *dn = hose->dn; in pnv_ioda_parse_tce_sizes() 28 count = of_property_count_u32_elems(dn, "ibm,supported-tce-sizes"); in pnv_ioda_parse_tce_sizes() 39 rc = of_property_read_u32_index(dn, "ibm,supported-tce-sizes", in pnv_ioda_parse_tce_sizes() 52 tbl->it_blocksize = 16; in pnv_pci_setup_iommu_table() 53 tbl->it_base = (unsigned long)tce_mem; in pnv_pci_setup_iommu_table() 54 tbl->it_page_shift = page_shift; in pnv_pci_setup_iommu_table() 55 tbl->it_offset = dma_offset >> tbl->it_page_shift; in pnv_pci_setup_iommu_table() 56 tbl->it_index = 0; in pnv_pci_setup_iommu_table() [all …]
|
/linux/net/mac80211/ |
H A D | rc80211_minstrel_ht.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 27 * a1 = exp(-pi * sqrt(2) / period) 29 * coeff3 = -sqr(a1) 30 * coeff1 = 1 - coeff2 - coeff3 32 #define MINSTREL_AVG_COEFF1 (MINSTREL_FRAC(1, 1) - \ 33 MINSTREL_AVG_COEFF2 - \ 36 #define MINSTREL_AVG_COEFF3 -0x0000092e 89 * - write static index to debugfs:ieee80211/phyX/rc/fixed_rate_idx 90 * - write -1 to enable RC processing again 91 * - setting will be applied on next update [all …]
|
/linux/drivers/net/ethernet/freescale/ |
H A D | ucc_geth.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright (C) Freescale Semicondutor, Inc. 2006-2009. All rights reserved. 12 * - Rearrange code and style fixes 41 u8 res0[0x100 - sizeof(struct ucc_fast)]; 46 u32 hafdup; /* half-duplex reg. */ 57 u8 res3[0x180 - 0x15A]; 86 successfully with the group address bit set 98 successfully with the group address bit set 105 u8 res5[0x200 - 0x1c4]; 119 #define TEMODER_NUM_OF_QUEUES_SHIFT (15-15) /* Number of queues << [all …]
|
/linux/tools/testing/selftests/net/forwarding/ |
H A D | router_mpath_seed.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +-------------------------+ +-------------------------+ 9 # +-------------------|-----+ +-|-----------------------+ 11 # +-------------------|-----+ +-|-----------------------+ 20 # +-------------------|-----+ +-|-----------------------+ 22 # `----------' 39 ip -4 route add 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 40 ip -6 route add 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 45 ip -6 route del 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 46 ip -4 route del 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 [all …]
|
/linux/fs/btrfs/ |
H A D | zoned.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include "rcu-string.h" 13 #include "disk-io.h" 14 #include "block-group.h" 15 #include "dev-replace.h" 16 #include "space-info.h" 24 #define WP_MISSING_DEV ((u64)-1) 26 #define WP_CONVENTIONAL ((u64)-2) 31 * - primary superblock: 0B (zone 0) 32 * - first copy: 512G (zone starting at that offset) [all …]
|
/linux/sound/usb/caiaq/ |
H A D | control.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); in control_info() 25 int pos = kcontrol->private_value; in control_info() 29 uinfo->count = 1; in control_info() 32 switch (cdev->chip.usb_id) { in control_info() 37 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in control_info() 38 uinfo->value.integer.min = 0; in control_info() 39 uinfo->value.integer.max = 2; in control_info() 54 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in control_info() 55 uinfo->value.integer.min = 0; in control_info() [all …]
|
/linux/tools/testing/selftests/net/ |
H A D | fib_nexthops.sh | 2 # SPDX-License-Identifier: GPL-2.0 7 # veth1 <---|---> veth2 | 8 # | veth5 <--|--> veth6 172.16.101.1 9 # veth3 <---|---> veth4 | 2001:db8:101::1 19 # Kselftest framework requirement - SKIP code is 4. 22 # all tests in this script. Can be overridden with -t option 75 if [ ${rc} -eq ${expected} ]; then 76 printf "TEST: %-60s [ OK ]\n" "${msg}" 79 if [[ $rc -eq $ksft_skip ]]; then 80 [[ $ret -eq 0 ]] && ret=$ksft_skip [all …]
|
/linux/fs/ocfs2/ |
H A D | journal.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 45 * running on -- not 71 old_id = j->j_trans_id++; in ocfs2_inc_trans_id() 72 if (unlikely(!j->j_trans_id)) in ocfs2_inc_trans_id() 73 j->j_trans_id = 1; in ocfs2_inc_trans_id() 82 ci->ci_last_trans = journal->j_trans_id; in ocfs2_set_ci_lock_trans() 95 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_fully_checkpointed() 98 ret = time_after(journal->j_trans_id, ci->ci_last_trans); in ocfs2_ci_fully_checkpointed() 111 OCFS2_SB(ocfs2_metadata_cache_get_super(ci))->journal; in ocfs2_ci_is_new() 114 ret = !(time_after(journal->j_trans_id, ci->ci_created_trans)); in ocfs2_ci_is_new() [all …]
|
/linux/drivers/ptp/ |
H A D | ptp_ocp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 #include <linux/clk-provider.h> 15 #include <linux/platform_data/i2c-xiic.h> 16 #include <linux/platform_data/i2c-ocores.h> 24 #include <linux/nvmem-consumer.h> 257 int index; member 293 const struct attribute_group *group; member 441 (void *)((uintptr_t)(bp) + (map)->bp_offset); \ 457 uintptr_t addr = (uintptr_t)(bp) + (res)->bp_offset; \ 497 -- [all …]
|