Lines Matching refs:region_nr
127 static void switch_get_position(struct switch_ctx *sctx, unsigned long region_nr, in switch_get_position() argument
131 *region_index = region_nr >> sctx->region_entries_per_slot_bits; in switch_get_position()
132 *bit = region_nr & (sctx->region_entries_per_slot - 1); in switch_get_position()
134 *region_index = region_nr / sctx->region_entries_per_slot; in switch_get_position()
135 *bit = region_nr % sctx->region_entries_per_slot; in switch_get_position()
141 static unsigned int switch_region_table_read(struct switch_ctx *sctx, unsigned long region_nr) in switch_region_table_read() argument
146 switch_get_position(sctx, region_nr, ®ion_index, &bit); in switch_region_table_read()
175 static void switch_region_table_write(struct switch_ctx *sctx, unsigned long region_nr, in switch_region_table_write() argument
182 switch_get_position(sctx, region_nr, ®ion_index, &bit); in switch_region_table_write()
196 unsigned long region_nr; in initialise_region_table() local
198 for (region_nr = 0; region_nr < sctx->nr_regions; region_nr++) { in initialise_region_table()
199 switch_region_table_write(sctx, region_nr, path_nr); in initialise_region_table()