Home
last modified time | relevance | path

Searched refs:cap (Results 1 – 25 of 1362) sorted by relevance

12345678910>>...55

/linux-6.6.21/drivers/media/platform/rockchip/rkisp1/ !
Drkisp1-capture.c63 void (*config)(struct rkisp1_capture *cap);
64 void (*stop)(struct rkisp1_capture *cap);
65 void (*enable)(struct rkisp1_capture *cap);
66 void (*disable)(struct rkisp1_capture *cap);
67 void (*set_data_path)(struct rkisp1_capture *cap);
68 bool (*is_stopped)(struct rkisp1_capture *cap);
367 int rkisp1_cap_enum_mbus_codes(struct rkisp1_capture *cap, in rkisp1_cap_enum_mbus_codes() argument
370 const struct rkisp1_capture_fmt_cfg *fmts = cap->config->fmts; in rkisp1_cap_enum_mbus_codes()
378 for (i = 0; i < cap->config->fmt_size; i++) { in rkisp1_cap_enum_mbus_codes()
395 static void rkisp1_mi_config_ctrl(struct rkisp1_capture *cap) in rkisp1_mi_config_ctrl() argument
[all …]
/linux-6.6.21/drivers/staging/greybus/ !
Dauthentication.c47 struct gb_cap *cap = container_of(kref, struct gb_cap, kref); in cap_kref_release() local
49 kfree(cap); in cap_kref_release()
57 static void put_cap(struct gb_cap *cap) in put_cap() argument
59 kref_put(&cap->kref, cap_kref_release); in put_cap()
65 struct gb_cap *cap; in get_cap() local
69 list_for_each_entry(cap, &cap_list, node) { in get_cap()
70 if (&cap->cdev == cdev) { in get_cap()
71 kref_get(&cap->kref); in get_cap()
76 cap = NULL; in get_cap()
81 return cap; in get_cap()
[all …]
/linux-6.6.21/drivers/net/ethernet/samsung/sxgbe/ !
Dsxgbe_reg.h409 #define SXGBE_HW_FEAT_GMII(cap) ((cap & 0x00000002) >> 1) argument
410 #define SXGBE_HW_FEAT_VLAN_HASH_FILTER(cap) ((cap & 0x00000010) >> 4) argument
411 #define SXGBE_HW_FEAT_SMA(cap) ((cap & 0x00000020) >> 5) argument
412 #define SXGBE_HW_FEAT_PMT_TEMOTE_WOP(cap) ((cap & 0x00000040) >> 6) argument
413 #define SXGBE_HW_FEAT_PMT_MAGIC_PKT(cap) ((cap & 0x00000080) >> 7) argument
414 #define SXGBE_HW_FEAT_RMON(cap) ((cap & 0x00000100) >> 8) argument
415 #define SXGBE_HW_FEAT_ARP_OFFLOAD(cap) ((cap & 0x00000200) >> 9) argument
416 #define SXGBE_HW_FEAT_IEEE1500_2008(cap) ((cap & 0x00001000) >> 12) argument
417 #define SXGBE_HW_FEAT_EEE(cap) ((cap & 0x00002000) >> 13) argument
418 #define SXGBE_HW_FEAT_TX_CSUM_OFFLOAD(cap) ((cap & 0x00004000) >> 14) argument
[all …]
/linux-6.6.21/drivers/vfio/pci/ !
Dvfio_pci_zdev.c25 struct vfio_device_info_cap_zpci_base cap = { in zpci_base_cap() local
38 return vfio_info_add_capability(caps, &cap.header, sizeof(cap)); in zpci_base_cap()
46 struct vfio_device_info_cap_zpci_group cap = { in zpci_group_cap() local
60 return vfio_info_add_capability(caps, &cap.header, sizeof(cap)); in zpci_group_cap()
68 struct vfio_device_info_cap_zpci_util *cap; in zpci_util_cap() local
69 int cap_size = sizeof(*cap) + CLP_UTIL_STR_LEN; in zpci_util_cap()
72 cap = kmalloc(cap_size, GFP_KERNEL); in zpci_util_cap()
73 if (!cap) in zpci_util_cap()
76 cap->header.id = VFIO_DEVICE_INFO_CAP_ZPCI_UTIL; in zpci_util_cap()
77 cap->header.version = 1; in zpci_util_cap()
[all …]
/linux-6.6.21/drivers/iommu/intel/ !
Dcap_audit.h67 #define DO_CHECK_FEATURE_MISMATCH(a, b, cap, feature, MASK) \ argument
69 if (cap##_##feature(a) != cap##_##feature(b)) { \
70 intel_iommu_##cap##_sanity &= ~(MASK); \
75 #define CHECK_FEATURE_MISMATCH(a, b, cap, feature, MASK) \ argument
76 DO_CHECK_FEATURE_MISMATCH((a)->cap, (b)->cap, cap, feature, MASK)
78 #define CHECK_FEATURE_MISMATCH_HOTPLUG(b, cap, feature, MASK) \ argument
80 if (cap##_##feature(intel_iommu_##cap##_sanity)) \
81 DO_CHECK_FEATURE_MISMATCH(intel_iommu_##cap##_sanity, \
82 (b)->cap, cap, feature, MASK); \
85 #define MINIMAL_FEATURE_IOMMU(iommu, cap, MASK) \ argument
[all …]
Dcap_audit.c22 CHECK_FEATURE_MISMATCH(a, b, cap, pi_support, CAP_PI_MASK); in check_irq_capabilities()
29 MINIMAL_FEATURE_IOMMU(b, cap, CAP_MAMV_MASK); in check_dmar_capabilities()
30 MINIMAL_FEATURE_IOMMU(b, cap, CAP_NFR_MASK); in check_dmar_capabilities()
31 MINIMAL_FEATURE_IOMMU(b, cap, CAP_SLLPS_MASK); in check_dmar_capabilities()
32 MINIMAL_FEATURE_IOMMU(b, cap, CAP_FRO_MASK); in check_dmar_capabilities()
33 MINIMAL_FEATURE_IOMMU(b, cap, CAP_MGAW_MASK); in check_dmar_capabilities()
34 MINIMAL_FEATURE_IOMMU(b, cap, CAP_SAGAW_MASK); in check_dmar_capabilities()
35 MINIMAL_FEATURE_IOMMU(b, cap, CAP_NDOMS_MASK); in check_dmar_capabilities()
40 CHECK_FEATURE_MISMATCH(a, b, cap, fl5lp_support, CAP_FL5LP_MASK); in check_dmar_capabilities()
41 CHECK_FEATURE_MISMATCH(a, b, cap, fl1gp_support, CAP_FL1GP_MASK); in check_dmar_capabilities()
[all …]
/linux-6.6.21/drivers/pci/pcie/ !
Ddpc.c45 u16 *cap; in pci_save_dpc_state() local
54 cap = (u16 *)&save_state->cap.data[0]; in pci_save_dpc_state()
55 pci_read_config_word(dev, dev->dpc_cap + PCI_EXP_DPC_CTL, cap); in pci_save_dpc_state()
61 u16 *cap; in pci_restore_dpc_state() local
70 cap = (u16 *)&save_state->cap.data[0]; in pci_restore_dpc_state()
71 pci_write_config_word(dev, dev->dpc_cap + PCI_EXP_DPC_CTL, *cap); in pci_restore_dpc_state()
129 u16 cap = pdev->dpc_cap, status; in dpc_wait_rp_inactive() local
131 pci_read_config_word(pdev, cap + PCI_EXP_DPC_STATUS, &status); in dpc_wait_rp_inactive()
135 pci_read_config_word(pdev, cap + PCI_EXP_DPC_STATUS, &status); in dpc_wait_rp_inactive()
147 u16 cap; in dpc_reset_link() local
[all …]
Dptm.c42 u32 cap; in pci_ptm_init() local
55 pci_read_config_dword(dev, ptm + PCI_PTM_CAP, &cap); in pci_ptm_init()
56 dev->ptm_granularity = (cap & PCI_PTM_GRANULARITY_MASK) >> 8; in pci_ptm_init()
70 } else if (cap & PCI_PTM_CAP_ROOT) { in pci_ptm_init()
91 u32 *cap; in pci_save_ptm_state() local
100 cap = (u32 *)&save_state->cap.data[0]; in pci_save_ptm_state()
101 pci_read_config_dword(dev, ptm + PCI_PTM_CTRL, cap); in pci_save_ptm_state()
108 u32 *cap; in pci_restore_ptm_state() local
117 cap = (u32 *)&save_state->cap.data[0]; in pci_restore_ptm_state()
118 pci_write_config_dword(dev, ptm + PCI_PTM_CTRL, *cap); in pci_restore_ptm_state()
/linux-6.6.21/drivers/media/platform/qcom/venus/ !
Dhfi_parser.c14 typedef void (*func)(struct hfi_plat_caps *cap, const void *data,
19 struct hfi_plat_caps *caps = core->caps, *cap; in init_codecs() local
26 cap = &caps[core->codecs_count++]; in init_codecs()
27 cap->codec = BIT(bit); in init_codecs()
28 cap->domain = VIDC_SESSION_TYPE_DEC; in init_codecs()
29 cap->valid = false; in init_codecs()
33 cap = &caps[core->codecs_count++]; in init_codecs()
34 cap->codec = BIT(bit); in init_codecs()
35 cap->domain = VIDC_SESSION_TYPE_ENC; in init_codecs()
36 cap->valid = false; in init_codecs()
[all …]
/linux-6.6.21/drivers/net/wireless/ath/wcn36xx/ !
Dfirmware.c82 enum wcn36xx_firmware_feat_caps cap) in wcn36xx_firmware_set_feat_caps() argument
86 if (cap < 0 || cap > 127) { in wcn36xx_firmware_set_feat_caps()
87 wcn36xx_warn("error cap idx %d\n", cap); in wcn36xx_firmware_set_feat_caps()
91 arr_idx = cap / 32; in wcn36xx_firmware_set_feat_caps()
92 bit_idx = cap % 32; in wcn36xx_firmware_set_feat_caps()
97 enum wcn36xx_firmware_feat_caps cap) in wcn36xx_firmware_get_feat_caps() argument
101 if (cap < 0 || cap > 127) { in wcn36xx_firmware_get_feat_caps()
102 wcn36xx_warn("error cap idx %d\n", cap); in wcn36xx_firmware_get_feat_caps()
106 arr_idx = cap / 32; in wcn36xx_firmware_get_feat_caps()
107 bit_idx = cap % 32; in wcn36xx_firmware_get_feat_caps()
[all …]
/linux-6.6.21/drivers/thunderbolt/ !
Dlc.c53 int cap, ret; in tb_lc_set_port_configured() local
58 cap = find_port_lc_cap(port); in tb_lc_set_port_configured()
59 if (cap < 0) in tb_lc_set_port_configured()
60 return cap; in tb_lc_set_port_configured()
62 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
82 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
111 int cap, ret; in tb_lc_set_xdomain_configured() local
116 cap = find_port_lc_cap(port); in tb_lc_set_xdomain_configured()
117 if (cap < 0) in tb_lc_set_xdomain_configured()
118 return cap; in tb_lc_set_xdomain_configured()
[all …]
Dcap.c87 static int __tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap) in __tb_port_find_cap() argument
103 if (header.basic.cap == cap) in __tb_port_find_cap()
119 int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap) in tb_port_find_cap() argument
127 ret = __tb_port_find_cap(port, cap); in tb_port_find_cap()
157 switch (header.basic.cap) { in tb_switch_next_cap()
171 header.basic.cap, offset); in tb_switch_next_cap()
188 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap) in tb_switch_find_cap() argument
204 if (header.basic.cap == cap) in tb_switch_find_cap()
237 if (header.extended_short.cap == TB_SWITCH_CAP_VSE && in tb_switch_find_vse_cap()
/linux-6.6.21/fs/ceph/ !
Dcaps.c137 struct ceph_cap *cap; in ceph_caps_finalize() local
141 cap = list_first_entry(&mdsc->caps_list, in ceph_caps_finalize()
143 list_del(&cap->caps_item); in ceph_caps_finalize()
144 kmem_cache_free(ceph_cap_cachep, cap); in ceph_caps_finalize()
170 struct ceph_cap *cap; in __ceph_unreserve_caps() local
180 cap = list_first_entry(&mdsc->caps_list, in __ceph_unreserve_caps()
182 list_del(&cap->caps_item); in __ceph_unreserve_caps()
183 kmem_cache_free(ceph_cap_cachep, cap); in __ceph_unreserve_caps()
206 struct ceph_cap *cap; in ceph_reserve_caps() local
231 cap = kmem_cache_alloc(ceph_cap_cachep, GFP_NOFS); in ceph_reserve_caps()
[all …]
/linux-6.6.21/include/linux/mlx5/ !
Ddevice.h1260 #define MLX5_CAP_GEN(mdev, cap) \ argument
1261 MLX5_GET(cmd_hca_cap, mdev->caps.hca[MLX5_CAP_GENERAL]->cur, cap)
1263 #define MLX5_CAP_GEN_64(mdev, cap) \ argument
1264 MLX5_GET64(cmd_hca_cap, mdev->caps.hca[MLX5_CAP_GENERAL]->cur, cap)
1266 #define MLX5_CAP_GEN_MAX(mdev, cap) \ argument
1267 MLX5_GET(cmd_hca_cap, mdev->caps.hca[MLX5_CAP_GENERAL]->max, cap)
1269 #define MLX5_CAP_GEN_2(mdev, cap) \ argument
1270 MLX5_GET(cmd_hca_cap_2, mdev->caps.hca[MLX5_CAP_GENERAL_2]->cur, cap)
1272 #define MLX5_CAP_GEN_2_64(mdev, cap) \ argument
1273 MLX5_GET64(cmd_hca_cap_2, mdev->caps.hca[MLX5_CAP_GENERAL_2]->cur, cap)
[all …]
/linux-6.6.21/kernel/ !
Dcapability.c281 struct user_namespace *ns, int cap) in has_ns_capability() argument
286 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NONE); in has_ns_capability()
302 bool has_capability(struct task_struct *t, int cap) in has_capability() argument
304 return has_ns_capability(t, &init_user_ns, cap); in has_capability()
322 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() argument
327 ret = security_capable(__task_cred(t), ns, cap, CAP_OPT_NOAUDIT); in has_ns_capability_noaudit()
345 bool has_capability_noaudit(struct task_struct *t, int cap) in has_capability_noaudit() argument
347 return has_ns_capability_noaudit(t, &init_user_ns, cap); in has_capability_noaudit()
352 int cap, in ns_capable_common() argument
357 if (unlikely(!cap_valid(cap))) { in ns_capable_common()
[all …]
/linux-6.6.21/security/apparmor/ !
Dcapability.c49 audit_log_untrustedstring(ab, capability_names[sa->u.cap]); in audit_cb()
65 int cap, int error) in audit_caps() argument
77 !cap_raised(rules->caps.audit, cap))) in audit_caps()
81 cap_raised(rules->caps.kill, cap)) { in audit_caps()
83 } else if (cap_raised(rules->caps.quiet, cap) && in audit_caps()
92 if (profile == ent->profile && cap_raised(ent->caps, cap)) { in audit_caps()
100 cap_raise(ent->caps, cap); in audit_caps()
116 static int profile_capable(struct aa_profile *profile, int cap, in profile_capable() argument
123 if (cap_raised(rules->caps.allow, cap) && in profile_capable()
124 !cap_raised(rules->caps.denied, cap)) in profile_capable()
[all …]
/linux-6.6.21/drivers/infiniband/core/ !
Duverbs_std_types_qp.c65 struct ib_uverbs_qp_cap *cap, bool req) in set_caps() argument
68 attr->cap.max_send_wr = cap->max_send_wr; in set_caps()
69 attr->cap.max_recv_wr = cap->max_recv_wr; in set_caps()
70 attr->cap.max_send_sge = cap->max_send_sge; in set_caps()
71 attr->cap.max_recv_sge = cap->max_recv_sge; in set_caps()
72 attr->cap.max_inline_data = cap->max_inline_data; in set_caps()
74 cap->max_send_wr = attr->cap.max_send_wr; in set_caps()
75 cap->max_recv_wr = attr->cap.max_recv_wr; in set_caps()
76 cap->max_send_sge = attr->cap.max_send_sge; in set_caps()
77 cap->max_recv_sge = attr->cap.max_recv_sge; in set_caps()
[all …]
/linux-6.6.21/include/linux/ !
Dcapability.h142 extern bool has_capability(struct task_struct *t, int cap);
144 struct user_namespace *ns, int cap);
145 extern bool has_capability_noaudit(struct task_struct *t, int cap);
147 struct user_namespace *ns, int cap);
148 extern bool capable(int cap);
149 extern bool ns_capable(struct user_namespace *ns, int cap);
150 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
151 extern bool ns_capable_setid(struct user_namespace *ns, int cap);
153 static inline bool has_capability(struct task_struct *t, int cap) in has_capability() argument
158 struct user_namespace *ns, int cap) in has_ns_capability() argument
[all …]
/linux-6.6.21/net/mac80211/ !
Ddebugfs_sta.c483 p += scnprintf(p, bufsz + buf - p, "cap: %#.4x\n", htc->cap); in link_sta_ht_capa_read()
485 PRINT_HT_CAP((htc->cap & BIT(0)), "RX LDPC"); in link_sta_ht_capa_read()
486 PRINT_HT_CAP((htc->cap & BIT(1)), "HT20/HT40"); in link_sta_ht_capa_read()
487 PRINT_HT_CAP(!(htc->cap & BIT(1)), "HT20"); in link_sta_ht_capa_read()
489 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 0, "Static SM Power Save"); in link_sta_ht_capa_read()
490 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 1, "Dynamic SM Power Save"); in link_sta_ht_capa_read()
491 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 3, "SM Power Save disabled"); in link_sta_ht_capa_read()
493 PRINT_HT_CAP((htc->cap & BIT(4)), "RX Greenfield"); in link_sta_ht_capa_read()
494 PRINT_HT_CAP((htc->cap & BIT(5)), "RX HT20 SGI"); in link_sta_ht_capa_read()
495 PRINT_HT_CAP((htc->cap & BIT(6)), "RX HT40 SGI"); in link_sta_ht_capa_read()
[all …]
Dvht.c25 vht_cap->cap &= ~flag; in __check_vhtcap_disable()
60 u32 cap, n; in ieee80211_apply_vhtcap_overrides() local
65 cap = vht_cap->cap & IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; in ieee80211_apply_vhtcap_overrides()
66 cap >>= IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT; in ieee80211_apply_vhtcap_overrides()
68 if (n < cap) { in ieee80211_apply_vhtcap_overrides()
69 vht_cap->cap &= in ieee80211_apply_vhtcap_overrides()
71 vht_cap->cap |= in ieee80211_apply_vhtcap_overrides()
172 vht_cap->cap = cap_info; in ieee80211_vht_cap_ie_to_sta_vht_cap()
173 vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC | in ieee80211_vht_cap_ie_to_sta_vht_cap()
182 vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK, in ieee80211_vht_cap_ie_to_sta_vht_cap()
[all …]
/linux-6.6.21/drivers/char/tpm/ !
Dtpm-sysfs.c85 cap_t cap; in pcrs_show() local
94 if (tpm1_getcap(chip, TPM_CAP_PROP_PCR, &cap, in pcrs_show()
96 sizeof(cap.num_pcrs))) { in pcrs_show()
101 num_pcrs = be32_to_cpu(cap.num_pcrs); in pcrs_show()
122 cap_t cap; in enabled_show() local
127 if (tpm1_getcap(chip, TPM_CAP_FLAG_PERM, &cap, in enabled_show()
129 sizeof(cap.perm_flags))) in enabled_show()
132 rc = sprintf(buf, "%d\n", !cap.perm_flags.disable); in enabled_show()
144 cap_t cap; in active_show() local
149 if (tpm1_getcap(chip, TPM_CAP_FLAG_PERM, &cap, in active_show()
[all …]
/linux-6.6.21/rust/alloc/ !
Draw_vec.rs55 cap: usize, field
124 Self { ptr: Unique::dangling(), cap: 0, alloc } in new_in()
206 cap: capacity, in allocate_in()
231 cap: capacity, in try_allocate_in()
248 Self { ptr: unsafe { Unique::new_unchecked(ptr) }, cap: capacity, alloc } in from_raw_parts_in()
264 if T::IS_ZST { usize::MAX } else { self.cap } in capacity()
273 if T::IS_ZST || self.cap == 0 { in current_memory()
283 let size = mem::size_of::<T>().unchecked_mul(self.cap); in current_memory()
395 pub fn shrink_to_fit(&mut self, cap: usize) { in shrink_to_fit()
396 handle_reserve(self.shrink(cap)); in shrink_to_fit()
[all …]
/linux-6.6.21/drivers/infiniband/hw/hfi1/ !
Dcommon.h45 #define HFI1_CAP_KSET(cap) ({ hfi1_cap_mask |= HFI1_CAP_##cap; hfi1_cap_mask; }) argument
46 #define HFI1_CAP_KCLEAR(cap) \ argument
48 hfi1_cap_mask &= ~HFI1_CAP_##cap; \
51 #define HFI1_CAP_USET(cap) \ argument
53 hfi1_cap_mask |= (HFI1_CAP_##cap << HFI1_CAP_USER_SHIFT); \
56 #define HFI1_CAP_UCLEAR(cap) \ argument
58 hfi1_cap_mask &= ~(HFI1_CAP_##cap << HFI1_CAP_USER_SHIFT); \
61 #define HFI1_CAP_SET(cap) \ argument
63 hfi1_cap_mask |= (HFI1_CAP_##cap | (HFI1_CAP_##cap << \
67 #define HFI1_CAP_CLEAR(cap) \ argument
[all …]
/linux-6.6.21/drivers/platform/surface/aggregator/ !
Dssh_parser.h27 size_t cap; member
39 static inline void sshp_buf_init(struct sshp_buf *buf, u8 *ptr, size_t cap) in sshp_buf_init() argument
43 buf->cap = cap; in sshp_buf_init()
57 static inline int sshp_buf_alloc(struct sshp_buf *buf, size_t cap, gfp_t flags) in sshp_buf_alloc() argument
61 ptr = kzalloc(cap, flags); in sshp_buf_alloc()
65 sshp_buf_init(buf, ptr, cap); in sshp_buf_alloc()
82 buf->cap = 0; in sshp_buf_free()
116 n = kfifo_out(fifo, buf->ptr + buf->len, buf->cap - buf->len); in sshp_buf_read_from_fifo()
/linux-6.6.21/drivers/platform/x86/intel/uncore-frequency/ !
Duncore-frequency.c42 u64 cap; in uncore_read_control_freq() local
48 ret = rdmsrl_on_cpu(data->control_cpu, MSR_UNCORE_RATIO_LIMIT, &cap); in uncore_read_control_freq()
52 *max = (cap & 0x7F) * UNCORE_FREQ_KHZ_MULTIPLIER; in uncore_read_control_freq()
53 *min = ((cap & GENMASK(14, 8)) >> 8) * UNCORE_FREQ_KHZ_MULTIPLIER; in uncore_read_control_freq()
62 u64 cap; in uncore_write_control_freq() local
71 ret = rdmsrl_on_cpu(data->control_cpu, MSR_UNCORE_RATIO_LIMIT, &cap); in uncore_write_control_freq()
76 cap &= ~0x7F; in uncore_write_control_freq()
77 cap |= input; in uncore_write_control_freq()
79 cap &= ~GENMASK(14, 8); in uncore_write_control_freq()
80 cap |= (input << 8); in uncore_write_control_freq()
[all …]

12345678910>>...55