Home
last modified time | relevance | path

Searched refs:max_idx (Results 1 – 25 of 30) sorted by relevance

12

/linux/ipc/
H A Dutil.c122 ids->max_idx = -1; in ipc_init_ids()
224 int max_idx; in ipc_idr_alloc() local
226 max_idx = max(ids->in_use*3/2, ipc_min_cycle); in ipc_idr_alloc()
227 max_idx = min(max_idx, ipc_mni); in ipc_idr_alloc()
230 idx = idr_alloc_cyclic(&ids->ipcs_idr, NULL, 0, max_idx, in ipc_idr_alloc()
324 if (idx > ids->max_idx) in ipc_addid()
325 ids->max_idx = idx; in ipc_addid()
506 if (unlikely(idx == ids->max_idx)) { in ipc_rmid()
507 idx = ids->max_idx-1; in ipc_rmid()
510 ids->max_idx = idx; in ipc_rmid()
H A Dmsg.c481 int max_idx; in msgctl_info() local
501 max_idx = ipc_get_maxidx(&msg_ids(ns)); in msgctl_info()
515 return (max_idx < 0) ? 0 : max_idx; in msgctl_info()
H A Dutil.h160 return ids->max_idx; in ipc_get_maxidx()
H A Dsem.c1312 int max_idx; in semctl_info() local
1336 max_idx = ipc_get_maxidx(&sem_ids(ns)); in semctl_info()
1340 return (max_idx < 0) ? 0 : max_idx; in semctl_info()
/linux/drivers/regulator/
H A Dlp87565-regulator.c194 int i, min_idx, max_idx; in lp87565_regulator_probe() local
206 max_idx = LP87565_BUCK_23; in lp87565_regulator_probe()
210 max_idx = LP87565_BUCK_3210; in lp87565_regulator_probe()
214 max_idx = LP87565_BUCK_3; in lp87565_regulator_probe()
218 for (i = min_idx; i <= max_idx; i++) { in lp87565_regulator_probe()
/linux/drivers/scsi/snic/
H A Dsnic_trc.c26 if (trc->wr_idx == trc->max_idx) in snic_get_trc_buf()
36 if (trc->rd_idx == trc->max_idx) in snic_get_trc_buf()
97 if (trc->rd_idx == trc->max_idx) in snic_get_trc_data()
129 trc->max_idx = (tbuf_sz / SNIC_TRC_ENTRY_SZ); in snic_trc_init()
H A Dsnic_trc.h31 u32 max_idx; /* Max Index into trace buffer */ member
/linux/drivers/net/ethernet/intel/ice/
H A Dice_irq.c365 unsigned long start, index, max_idx; in ice_get_max_used_msix_vector() local
370 max_idx = start - 1; in ice_get_max_used_msix_vector()
373 if (index > max_idx) in ice_get_max_used_msix_vector()
374 max_idx = index; in ice_get_max_used_msix_vector()
377 return max_idx; in ice_get_max_used_msix_vector()
/linux/drivers/power/reset/
H A Dat91-sama5d2_shdwc.c176 int max_idx = ARRAY_SIZE(sdwc_dbc_period) - 1; in at91_shdwc_debouncer_value() local
178 unsigned long long max_period_us = DBC_PERIOD_US(sdwc_dbc_period[max_idx]); in at91_shdwc_debouncer_value()
184 return max_idx; in at91_shdwc_debouncer_value()
187 for (i = max_idx - 1; i > 0; i--) { in at91_shdwc_debouncer_value()
/linux/fs/ntfs3/
H A Drun.c36 size_t min_idx, max_idx, mid_idx; in run_lookup() local
45 max_idx = run->count - 1; in run_lookup()
59 r += max_idx; in run_lookup()
66 *index = max_idx; in run_lookup()
71 mid_idx = min_idx + ((max_idx - min_idx) >> 1); in run_lookup()
75 max_idx = mid_idx - 1; in run_lookup()
84 } while (min_idx <= max_idx); in run_lookup()
86 *index = max_idx + 1; in run_lookup()
H A Dindex.c723 int min_idx = 0, mid_idx, max_idx = 0; in hdr_find_e() local
749 offs[max_idx] = off; in hdr_find_e()
752 max_idx++; in hdr_find_e()
753 if (max_idx < table_size) in hdr_find_e()
756 max_idx--; in hdr_find_e()
770 max_idx = 0; in hdr_find_e()
776 max_idx = mid_idx - 1; in hdr_find_e()
778 max_idx--; in hdr_find_e()
786 if (min_idx > max_idx) { in hdr_find_e()
791 mid_idx = (min_idx + max_idx) >> 1; in hdr_find_e()
/linux/arch/x86/kvm/
H A Dcpuid.c969 int r, i, max_idx; in __do_cpuid_func() local
1028 max_idx = entry->eax = min(entry->eax, 2u); in __do_cpuid_func()
1034 if (max_idx >= 1) { in __do_cpuid_func()
1044 if (max_idx >= 2) { in __do_cpuid_func()
1185 for (i = 1, max_idx = entry->eax; i <= max_idx; ++i) { in __do_cpuid_func()
1197 for (i = 1, max_idx = entry->eax; i <= max_idx; ++i) { in __do_cpuid_func()
/linux/drivers/mmc/core/
H A Dhost.c522 int alias_id, min_idx, max_idx; in mmc_alloc_host() local
536 max_idx = 0; in mmc_alloc_host()
538 index = ida_alloc_range(&mmc_host_ida, min_idx, max_idx - 1, in mmc_alloc_host()
/linux/include/linux/
H A Dipc_namespace.h23 int max_idx; member
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
H A Dfwsignal.c1661 if (start > rfi->max_idx) in brcmf_rxreorder_get_skb_list()
1671 u8 flow_id, max_idx, cur_idx, exp_idx, end_idx; in brcmf_fws_rxreorder() local
1710 max_idx = reorder_data[BRCMF_RXREORDER_MAXIDX_OFFSET]; in brcmf_fws_rxreorder()
1714 flow_id, max_idx); in brcmf_fws_rxreorder()
1715 rfi = kzalloc(struct_size(rfi, pktslots, max_idx + 1), in brcmf_fws_rxreorder()
1724 rfi->max_idx = max_idx; in brcmf_fws_rxreorder()
1737 rfi->max_idx = reorder_data[BRCMF_RXREORDER_MAXIDX_OFFSET]; in brcmf_fws_rxreorder()
1803 if (exp_idx == ((cur_idx + 1) % (rfi->max_idx + 1))) { in brcmf_fws_rxreorder()
H A Dcore.h62 u8 max_idx; member
/linux/drivers/vdpa/mlx5/core/
H A Dmlx5_vdpa.h113 u16 max_idx; member
/linux/tools/objtool/
H A Delf.c606 int max_idx, idx = sym->idx; in elf_update_symbol() local
695 max_idx = symtab_data->d_size / entsize; in elf_update_symbol()
696 if (idx < max_idx) in elf_update_symbol()
700 idx -= max_idx; in elf_update_symbol()
/linux/sound/pci/lola/
H A Dlola_mixer.c325 int idx, max_idx; in lola_setup_all_analog_gains() local
328 max_idx = chip->pin[dir].num_pins; in lola_setup_all_analog_gains()
329 for (idx = 0; idx < max_idx; idx++) { in lola_setup_all_analog_gains()
/linux/mm/
H A Dfilemap.c3309 pgoff_t max_idx, index = vmf->pgoff; in filemap_fault() local
3314 max_idx = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE); in filemap_fault()
3315 if (unlikely(index >= max_idx)) in filemap_fault()
3418 max_idx = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE); in filemap_fault()
3419 if (unlikely(index >= max_idx)) { in filemap_fault()
3495 unsigned long max_idx; in next_uptodate_folio() local
3519 max_idx = DIV_ROUND_UP(i_size_read(mapping->host), PAGE_SIZE); in next_uptodate_folio()
3520 if (xas->xa_index >= max_idx) in next_uptodate_folio()
/linux/arch/x86/kernel/fpu/
H A Dxstate.c103 long xfeature_idx, max_idx; in cpu_has_xfeatures() local
118 max_idx = ARRAY_SIZE(xfeature_names)-1; in cpu_has_xfeatures()
119 xfeature_idx = min(xfeature_idx, max_idx); in cpu_has_xfeatures()
/linux/drivers/input/misc/
H A Dad714x.c164 int max_idx = 0; in ad714x_cal_highest_stage() local
170 max_idx = i; in ad714x_cal_highest_stage()
174 return max_idx; in ad714x_cal_highest_stage()
/linux/drivers/iommu/arm/arm-smmu-v3/
H A Dtegra241-cmdqv.c610 static int tegra241_cmdqv_init_vintf(struct tegra241_cmdqv *cmdqv, u16 max_idx, in tegra241_cmdqv_init_vintf() argument
617 ret = ida_alloc_max(&cmdqv->vintf_ids, max_idx, GFP_KERNEL); in tegra241_cmdqv_init_vintf()
/linux/drivers/net/wireless/ath/ath5k/
H A Dphy.c3081 u8 pdadc_i, pdadc_n, pwr_step, pdg, max_idx, table_size; in ath5k_combine_pwr_to_pdadc_curves() local
3136 max_idx = min(pdadc_n, table_size); in ath5k_combine_pwr_to_pdadc_curves()
3139 while (pdadc_0 < max_idx && pdadc_i < 128) in ath5k_combine_pwr_to_pdadc_curves()
3143 if (pdadc_n <= max_idx) in ath5k_combine_pwr_to_pdadc_curves()
3157 (pdadc_0 - max_idx) * pwr_step; in ath5k_combine_pwr_to_pdadc_curves()
/linux/drivers/net/wireless/ath/ath9k/
H A Dar9003_calib.c844 int mp_max = -64, max_idx = 0; in ar9003_hw_detect_outlier() local
852 max_idx = i; in ar9003_hw_detect_outlier()
880 outlier_idx = max_idx; in ar9003_hw_detect_outlier()

12