Lines Matching refs:region_nr
126 static void switch_get_position(struct switch_ctx *sctx, unsigned long region_nr, in switch_get_position() argument
130 *region_index = region_nr >> sctx->region_entries_per_slot_bits; in switch_get_position()
131 *bit = region_nr & (sctx->region_entries_per_slot - 1); in switch_get_position()
133 *region_index = region_nr / sctx->region_entries_per_slot; in switch_get_position()
134 *bit = region_nr % sctx->region_entries_per_slot; in switch_get_position()
140 static unsigned switch_region_table_read(struct switch_ctx *sctx, unsigned long region_nr) in switch_region_table_read() argument
145 switch_get_position(sctx, region_nr, ®ion_index, &bit); in switch_region_table_read()
174 static void switch_region_table_write(struct switch_ctx *sctx, unsigned long region_nr, in switch_region_table_write() argument
181 switch_get_position(sctx, region_nr, ®ion_index, &bit); in switch_region_table_write()
195 unsigned long region_nr; in initialise_region_table() local
197 for (region_nr = 0; region_nr < sctx->nr_regions; region_nr++) { in initialise_region_table()
198 switch_region_table_write(sctx, region_nr, path_nr); in initialise_region_table()