/linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | rx_res.c | 36 static u32 *get_vhca_ids(struct mlx5e_rx_res *res, int offset) in get_vhca_ids() argument 38 bool multi_vhca = res->features & MLX5E_RX_RES_FEATURE_MULTI_VHCA; in get_vhca_ids() 40 return multi_vhca ? res->rss_vhca_ids + offset : NULL; in get_vhca_ids() 43 void mlx5e_rx_res_rss_update_num_channels(struct mlx5e_rx_res *res, u32 nch) in mlx5e_rx_res_rss_update_num_channels() argument 48 if (res->rss[i]) in mlx5e_rx_res_rss_update_num_channels() 49 mlx5e_rss_params_indir_modify_actual_size(res->rss[i], nch); in mlx5e_rx_res_rss_update_num_channels() 53 static int mlx5e_rx_res_rss_init_def(struct mlx5e_rx_res *res, in mlx5e_rx_res_rss_init_def() argument 56 bool inner_ft_support = res->features & MLX5E_RX_RES_FEATURE_INNER_FT; in mlx5e_rx_res_rss_init_def() 59 if (WARN_ON(res->rss[0])) in mlx5e_rx_res_rss_init_def() 62 rss = mlx5e_rss_init(res->mdev, inner_ft_support, res->drop_rqn, in mlx5e_rx_res_rss_init_def() [all …]
|
/linux/tools/lib/ |
H A D | hweight.c | 20 unsigned int res = w - ((w >> 1) & 0x55555555); in __sw_hweight32() 21 res = (res & 0x33333333) + ((res >> 2) & 0x33333333); in __sw_hweight32() 22 res = (res + (res >> 4)) & 0x0F0F0F0F; in __sw_hweight32() 23 res = res + (res >> 8); in __sw_hweight32() 24 return (res + (res >> 16)) & 0x000000FF; in __sw_hweight32() 30 unsigned int res = w - ((w >> 1) & 0x5555); in __sw_hweight16() local 31 res = (res & 0x3333) + ((res >> 2) & 0x3333); in __sw_hweight16() 32 res = (res + (res >> 4)) & 0x0F0F; in __sw_hweight16() 33 return (res + (res >> 8)) & 0x00FF; in __sw_hweight16() 38 unsigned int res = w - ((w >> 1) & 0x55); in __sw_hweight8() local [all …]
|
/linux/lib/ |
H A D | hweight.c | 21 unsigned int res = w - ((w >> 1) & 0x55555555); in __sw_hweight32() 22 res = (res & 0x33333333) + ((res >> 2) & 0x33333333); in __sw_hweight32() 23 res = (res + (res >> 4)) & 0x0F0F0F0F; in __sw_hweight32() 24 res = res + (res >> 8); in __sw_hweight32() 25 return (res + (res >> 16)) & 0x000000FF; in __sw_hweight32() 32 unsigned int res = w - ((w >> 1) & 0x5555); in __sw_hweight16() local 33 res = (res & 0x3333) + ((res >> 2) & 0x3333); in __sw_hweight16() 34 res = (res + (res >> 4)) & 0x0F0F; in __sw_hweight16() 35 return (res + (res >> 8)) & 0x00FF; in __sw_hweight16() 41 unsigned int res = w - ((w >> 1) & 0x55); in __sw_hweight8() local [all …]
|
/linux/fs/ocfs2/dlm/ |
H A D | dlmthread.c | 42 void __dlm_wait_on_lockres_flags(struct dlm_lock_resource *res, int flags) in __dlm_wait_on_lockres_flags() argument 46 assert_spin_locked(&res->spinlock); in __dlm_wait_on_lockres_flags() 48 add_wait_queue(&res->wq, &wait); in __dlm_wait_on_lockres_flags() 51 if (res->state & flags) { in __dlm_wait_on_lockres_flags() 52 spin_unlock(&res->spinlock); in __dlm_wait_on_lockres_flags() 54 spin_lock(&res->spinlock); in __dlm_wait_on_lockres_flags() 57 remove_wait_queue(&res->wq, &wait); in __dlm_wait_on_lockres_flags() 61 int __dlm_lockres_has_locks(struct dlm_lock_resource *res) in __dlm_lockres_has_locks() argument 63 if (list_empty(&res->granted) && in __dlm_lockres_has_locks() 64 list_empty(&res->converting) && in __dlm_lockres_has_locks() [all …]
|
H A D | dlmconvert.c | 42 struct dlm_lock_resource *res, 47 struct dlm_lock_resource *res, 60 struct dlm_lock_resource *res, in dlmconvert_master() argument 66 spin_lock(&res->spinlock); in dlmconvert_master() 68 __dlm_wait_on_lockres(res); in dlmconvert_master() 69 __dlm_lockres_reserve_ast(res); in dlmconvert_master() 70 res->state |= DLM_LOCK_RES_IN_PROGRESS; in dlmconvert_master() 72 status = __dlmconvert_master(dlm, res, lock, flags, type, in dlmconvert_master() 75 res->state &= ~DLM_LOCK_RES_IN_PROGRESS; in dlmconvert_master() 76 spin_unlock(&res->spinlock); in dlmconvert_master() [all …]
|
H A D | dlmlock.c | 44 struct dlm_lock_resource *res, 73 static int dlm_can_grant_new_lock(struct dlm_lock_resource *res, in dlm_can_grant_new_lock() argument 78 list_for_each_entry(tmplock, &res->granted, list) { in dlm_can_grant_new_lock() 83 list_for_each_entry(tmplock, &res->converting, list) { in dlm_can_grant_new_lock() 102 struct dlm_lock_resource *res, in dlmlock_master() argument 110 spin_lock(&res->spinlock); in dlmlock_master() 113 status = __dlm_lockres_state_to_status(res); in dlmlock_master() 117 spin_unlock(&res->spinlock); in dlmlock_master() 121 __dlm_wait_on_lockres(res); in dlmlock_master() 122 __dlm_lockres_reserve_ast(res); in dlmlock_master() [all …]
|
H A D | dlmunlock.c | 42 struct dlm_lock_resource *res, 47 struct dlm_lock_resource *res, 53 struct dlm_lock_resource *res, 82 struct dlm_lock_resource *res, in dlmunlock_common() argument 98 BUG_ON(res->owner != dlm->node_num); in dlmunlock_common() 100 BUG_ON(res->owner == dlm->node_num); in dlmunlock_common() 109 "while waiting for an ast!", res->lockname.len, in dlmunlock_common() 110 res->lockname.name); in dlmunlock_common() 114 spin_lock(&res->spinlock); in dlmunlock_common() 115 if (res->state & DLM_LOCK_RES_IN_PROGRESS) { in dlmunlock_common() [all …]
|
/linux/drivers/pnp/ |
H A D | manager.c | 27 struct resource *res = pnp_get_resource(dev, type, bar); in pnp_find_resource() local 30 if (res) { in pnp_find_resource() 31 res->flags &= ~IORESOURCE_BITS; in pnp_find_resource() 32 res->flags |= rule & IORESOURCE_BITS; in pnp_find_resource() 35 return res; in pnp_find_resource() 40 struct resource *res, local_res; in pnp_assign_port() local 42 res = pnp_find_resource(dev, rule->flags, IORESOURCE_IO, idx); in pnp_assign_port() 43 if (res) { in pnp_assign_port() 45 "flags %#lx\n", idx, (unsigned long long) res->start, in pnp_assign_port() 46 (unsigned long long) res->end, res->flags); in pnp_assign_port() [all …]
|
/linux/drivers/media/platform/ti/omap3isp/ |
H A D | ispresizer.c | 117 __resizer_get_format(struct isp_res_device *res, in __resizer_get_format() argument 124 return &res->formats[pad]; in __resizer_get_format() 134 __resizer_get_crop(struct isp_res_device *res, in __resizer_get_crop() argument 141 return &res->crop.request; in __resizer_get_crop() 151 static void resizer_set_filters(struct isp_res_device *res, const u16 *h_coeff, in resizer_set_filters() argument 154 struct isp_device *isp = to_isp_device(res); in resizer_set_filters() 182 static void resizer_set_bilinear(struct isp_res_device *res, in resizer_set_bilinear() argument 185 struct isp_device *isp = to_isp_device(res); in resizer_set_bilinear() 200 static void resizer_set_ycpos(struct isp_res_device *res, u32 pixelcode) in resizer_set_ycpos() argument 202 struct isp_device *isp = to_isp_device(res); in resizer_set_ycpos() [all …]
|
/linux/arch/mips/include/asm/ |
H A D | unaligned-emul.h | 8 #define _LoadHW(addr, value, res, type) \ argument 26 : "=&r" (value), "=r" (res) \ 31 #define _LoadW(addr, value, res, type) \ argument 47 : "=&r" (value), "=r" (res) \ 53 #define _LoadW(addr, value, res, type) \ argument 82 : "=&r" (value), "=r" (res) \ 88 #define _LoadHWU(addr, value, res, type) \ argument 108 : "=&r" (value), "=r" (res) \ 113 #define _LoadWU(addr, value, res, type) \ argument 131 : "=&r" (value), "=r" (res) \ [all …]
|
/linux/drivers/ps3/ |
H A D | ps3av_cmd.c | 145 int res; in ps3av_cmd_init() local 153 res = ps3av_do_pkt(PS3AV_CID_VIDEO_INIT, sizeof(video_init.send_hdr), in ps3av_cmd_init() 155 if (res < 0) in ps3av_cmd_init() 156 return res; in ps3av_cmd_init() 158 res = get_status(&video_init); in ps3av_cmd_init() 159 if (res) { in ps3av_cmd_init() 160 printk(KERN_ERR "PS3AV_CID_VIDEO_INIT: failed %x\n", res); in ps3av_cmd_init() 161 return res; in ps3av_cmd_init() 167 res = ps3av_do_pkt(PS3AV_CID_AUDIO_INIT, sizeof(audio_init.send_hdr), in ps3av_cmd_init() 169 if (res < 0) in ps3av_cmd_init() [all …]
|
/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_context.c | 37 struct vmw_resource res; member 45 static void vmw_user_context_free(struct vmw_resource *res); 49 static int vmw_gb_context_create(struct vmw_resource *res); 50 static int vmw_gb_context_bind(struct vmw_resource *res, 52 static int vmw_gb_context_unbind(struct vmw_resource *res, 55 static int vmw_gb_context_destroy(struct vmw_resource *res); 56 static int vmw_dx_context_create(struct vmw_resource *res); 57 static int vmw_dx_context_bind(struct vmw_resource *res, 59 static int vmw_dx_context_unbind(struct vmw_resource *res, 62 static int vmw_dx_context_destroy(struct vmw_resource *res); [all …]
|
H A D | vmwgfx_streamoutput.c | 47 struct vmw_resource res; member 56 static int vmw_dx_streamoutput_create(struct vmw_resource *res); 57 static int vmw_dx_streamoutput_bind(struct vmw_resource *res, 59 static int vmw_dx_streamoutput_unbind(struct vmw_resource *res, bool readback, 61 static void vmw_dx_streamoutput_commit_notify(struct vmw_resource *res, 79 vmw_res_to_dx_streamoutput(struct vmw_resource *res) in vmw_res_to_dx_streamoutput() argument 81 return container_of(res, struct vmw_dx_streamoutput, res); in vmw_res_to_dx_streamoutput() 90 static int vmw_dx_streamoutput_unscrub(struct vmw_resource *res) in vmw_dx_streamoutput_unscrub() argument 92 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_unscrub() 93 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_unscrub() [all …]
|
/linux/drivers/pci/ |
H A D | setup-res.c | 32 struct resource *res = pci_resource_n(dev, resno); in pci_std_update_resource() local 43 if (!res->flags) in pci_std_update_resource() 46 if (res->flags & IORESOURCE_UNSET) in pci_std_update_resource() 54 if (res->flags & IORESOURCE_PCI_FIXED) in pci_std_update_resource() 57 pcibios_resource_to_bus(dev->bus, ®ion, res); in pci_std_update_resource() 60 if (res->flags & IORESOURCE_IO) { in pci_std_update_resource() 62 new |= res->flags & ~PCI_BASE_ADDRESS_IO_MASK; in pci_std_update_resource() 67 new |= res->flags & ~PCI_BASE_ADDRESS_MEM_MASK; in pci_std_update_resource() 82 if (!(res->flags & IORESOURCE_ROM_ENABLE) && in pci_std_update_resource() 87 if (res->flags & IORESOURCE_ROM_ENABLE) in pci_std_update_resource() [all …]
|
H A D | devres.c | 67 static inline void pcim_addr_devres_clear(struct pcim_addr_devres *res) in pcim_addr_devres_clear() argument 69 memset(res, 0, sizeof(*res)); in pcim_addr_devres_clear() 70 res->bar = -1; in pcim_addr_devres_clear() 76 struct pcim_addr_devres *res = resource_raw; in pcim_addr_resource_release() local 78 switch (res->type) { in pcim_addr_resource_release() 80 pci_release_region(pdev, res->bar); in pcim_addr_resource_release() 83 pci_iounmap(pdev, res->baseaddr); in pcim_addr_resource_release() 84 pci_release_region(pdev, res->bar); in pcim_addr_resource_release() 87 pci_iounmap(pdev, res->baseaddr); in pcim_addr_resource_release() 96 struct pcim_addr_devres *res; in pcim_addr_devres_alloc() local [all …]
|
/linux/include/kunit/ |
H A D | resource.h | 100 static inline void kunit_get_resource(struct kunit_resource *res) in kunit_get_resource() argument 102 kref_get(&res->refcount); in kunit_get_resource() 111 struct kunit_resource *res = container_of(kref, struct kunit_resource, in kunit_release_resource() local 114 if (res->free) in kunit_release_resource() 115 res->free(res); in kunit_release_resource() 120 if (res->should_kfree) in kunit_release_resource() 121 kfree(res); in kunit_release_resource() 136 static inline void kunit_put_resource(struct kunit_resource *res) in kunit_put_resource() argument 138 kref_put(&res->refcount, kunit_release_resource); in kunit_put_resource() 156 struct kunit_resource *res, [all …]
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
H A D | ffa.c | 74 static void ffa_to_smccc_error(struct arm_smccc_res *res, u64 ffa_errno) in ffa_to_smccc_error() argument 76 *res = (struct arm_smccc_res) { in ffa_to_smccc_error() 82 static void ffa_to_smccc_res_prop(struct arm_smccc_res *res, int ret, u64 prop) in ffa_to_smccc_res_prop() argument 85 *res = (struct arm_smccc_res) { .a0 = FFA_SUCCESS, in ffa_to_smccc_res_prop() 88 ffa_to_smccc_error(res, ret); in ffa_to_smccc_res_prop() 92 static void ffa_to_smccc_res(struct arm_smccc_res *res, int ret) in ffa_to_smccc_res() argument 94 ffa_to_smccc_res_prop(res, ret, 0); in ffa_to_smccc_res() 98 struct arm_smccc_res *res) in ffa_set_retval() argument 100 cpu_reg(ctxt, 0) = res->a0; in ffa_set_retval() 101 cpu_reg(ctxt, 1) = res->a1; in ffa_set_retval() [all …]
|
/linux/lib/kunit/ |
H A D | resource.c | 22 struct kunit_resource *res, in __kunit_add_resource() argument 28 res->free = free; in __kunit_add_resource() 29 kref_init(&res->refcount); in __kunit_add_resource() 32 ret = init(res, data); in __kunit_add_resource() 36 res->data = data; in __kunit_add_resource() 40 list_add_tail(&res->node, &test->resources); in __kunit_add_resource() 48 void kunit_remove_resource(struct kunit *test, struct kunit_resource *res) in kunit_remove_resource() argument 54 was_linked = !list_empty(&res->node); in kunit_remove_resource() 55 list_del_init(&res->node); in kunit_remove_resource() 59 kunit_put_resource(res); in kunit_remove_resource() [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | local_kptr_stash.c | 93 struct node_data *res; in create_and_stash() local 103 res = bpf_obj_new(typeof(*res)); in create_and_stash() 104 if (!res) { in create_and_stash() 108 res->key = val; in create_and_stash() 110 inner_local_kptr = bpf_kptr_xchg(&res->stashed_in_local_kptr, inner_local_kptr); in create_and_stash() 114 bpf_obj_drop(res); in create_and_stash() 118 res = bpf_kptr_xchg(&mapval->node, res); in create_and_stash() 119 if (res) in create_and_stash() 120 bpf_obj_drop(res); in create_and_stash() 134 struct plain_local *res; in stash_plain() local [all …]
|
/linux/drivers/pcmcia/ |
H A D | rsrc_iodyn.c | 27 const struct resource *res, in pcmcia_align() argument 33 start = (res->start & ~data->mask) + data->offset; in pcmcia_align() 34 if (start < res->start) in pcmcia_align() 38 if (res->flags & IORESOURCE_IO) { in pcmcia_align() 45 if (res->flags & IORESOURCE_IO) { in pcmcia_align() 46 if ((res->start + size - 1) >= 1024) in pcmcia_align() 47 start = res->end; in pcmcia_align() 59 struct resource *res = pcmcia_make_resource(0, num, IORESOURCE_IO, in __iodyn_find_io_region() local 70 ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1, in __iodyn_find_io_region() 74 ret = allocate_resource(&ioport_resource, res, num, min, ~0UL, in __iodyn_find_io_region() [all …]
|
/linux/tools/testing/selftests/futex/functional/ |
H A D | futex_waitv.c | 40 int res; in waiterfn() local 48 res = futex_waitv(waitv, NR_FUTEXES, 0, &to, CLOCK_MONOTONIC); in waiterfn() 49 if (res < 0) { in waiterfn() 52 } else if (res != NR_FUTEXES - 1) { in waiterfn() 54 res, NR_FUTEXES - 1); in waiterfn() 63 int res, ret = RET_PASS; in main() local 102 res = futex_wake(u64_to_ptr(waitv[NR_FUTEXES - 1].uaddr), 1, FUTEX_PRIVATE_FLAG); in main() 103 if (res != 1) { in main() 105 res ? errno : res, in main() 106 res ? strerror(errno) : ""); in main() [all …]
|
/linux/drivers/pci/hotplug/ |
H A D | ibmphp_res.c | 445 struct resource_node *res = NULL; in update_resources() local 451 res = bus_cur->firstMem; in update_resources() 455 res = bus_cur->firstPFMem; in update_resources() 459 res = bus_cur->firstIO; in update_resources() 463 if (res) { in update_resources() 464 while (res) { in update_resources() 465 if (res->rangeno == rangeno) in update_resources() 467 if (res->next) in update_resources() 468 res = res->next; in update_resources() 469 else if (res->nextRange) in update_resources() [all …]
|
/linux/arch/sparc/kernel/ |
H A D | ioport.c | 55 static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); 58 static void _sparc_free_io(struct resource *res); 128 struct resource *res; in iounmap() local 134 if ((res = lookup_resource(&sparc_iomap, vaddr)) == NULL) { in iounmap() 138 _sparc_free_io(res); in iounmap() 140 if ((char *)res >= (char*)xresv && (char *)res < (char *)&xresv[XNRES]) { in iounmap() 141 xres_free((struct xresource *)res); in iounmap() 143 kfree(res); in iounmap() 148 void __iomem *of_ioremap(struct resource *res, unsigned long offset, in of_ioremap() argument 151 return _sparc_alloc_io(res->flags & 0xF, in of_ioremap() [all …]
|
/linux/arch/mips/n64/ |
H A D | init.c | 87 struct resource res[3]; in n64_platform_init() local 92 memset(res, 0, sizeof(struct resource) * 3); in n64_platform_init() 93 res[0].flags = IORESOURCE_MEM; in n64_platform_init() 94 res[0].start = MI_REG_BASE; in n64_platform_init() 95 res[0].end = MI_REG_BASE + NUM_MI_REGS * 4 - 1; in n64_platform_init() 97 res[1].flags = IORESOURCE_MEM; in n64_platform_init() 98 res[1].start = AI_REG_BASE; in n64_platform_init() 99 res[1].end = AI_REG_BASE + NUM_AI_REGS * 4 - 1; in n64_platform_init() 101 res[2].flags = IORESOURCE_IRQ; in n64_platform_init() 102 res[2].start = RCP_IRQ; in n64_platform_init() [all …]
|
/linux/arch/mips/kernel/ |
H A D | unaligned.c | 117 unsigned int res; in emulate_load_store_insn() local 173 LoadW(addr, value, res); in emulate_load_store_insn() 174 if (res) in emulate_load_store_insn() 182 LoadHW(addr, value, res); in emulate_load_store_insn() 183 if (res) in emulate_load_store_insn() 191 LoadHWU(addr, value, res); in emulate_load_store_insn() 192 if (res) in emulate_load_store_insn() 211 LoadW(addr, value, res); in emulate_load_store_insn() 212 if (res) in emulate_load_store_insn() 220 LoadHW(addr, value, res); in emulate_load_store_insn() [all …]
|