/linux-6.3-rc2/arch/arm64/kvm/vgic/ |
A D | vgic-init.c | 139 if (!dist->spis) in kvm_vgic_dist_init() 169 kfree(dist->spis); in kvm_vgic_dist_init() 170 dist->spis = NULL; in kvm_vgic_dist_init() 270 if (!dist->nr_spis) in vgic_init() 328 dist->initialized = true; in vgic_init() 339 dist->ready = false; in kvm_vgic_dist_destroy() 340 dist->initialized = false; in kvm_vgic_dist_destroy() 342 kfree(dist->spis); in kvm_vgic_dist_destroy() 343 dist->spis = NULL; in kvm_vgic_dist_destroy() 344 dist->nr_spis = 0; in kvm_vgic_dist_destroy() [all …]
|
A D | vgic-v4.c | 190 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_configure_vsgis() local 197 if (dist->nassgireq) in vgic_v4_configure_vsgis() 249 if (dist->its_vm.vpes) in vgic_v4_init() 254 dist->its_vm.vpes = kcalloc(nr_vcpus, sizeof(*dist->its_vm.vpes), in vgic_v4_init() 256 if (!dist->its_vm.vpes) in vgic_v4_init() 259 dist->its_vm.nr_vpes = nr_vcpus; in vgic_v4_init() 267 kfree(dist->its_vm.vpes); in vgic_v4_init() 268 dist->its_vm.nr_vpes = 0; in vgic_v4_init() 269 dist->its_vm.vpes = NULL; in vgic_v4_init() 274 int irq = dist->its_vm.vpes[i]->irq; in vgic_v4_init() [all …]
|
A D | vgic-mmio-v3.c | 43 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_has_its() local 48 return dist->has_its; in vgic_has_its() 116 was_enabled = dist->enabled; in vgic_mmio_write_v3_misc() 117 is_hwsgi = dist->nassgireq; in vgic_mmio_write_v3_misc() 119 dist->enabled = val & GICD_CTLR_ENABLE_SS_G1; in vgic_mmio_write_v3_misc() 126 if (was_enabled && dist->enabled) { in vgic_mmio_write_v3_misc() 132 dist->nassgireq = val & GICD_CTLR_nASSGIreq; in vgic_mmio_write_v3_misc() 133 if (is_hwsgi != dist->nassgireq) in vgic_mmio_write_v3_misc() 137 was_enabled != dist->enabled) in vgic_mmio_write_v3_misc() 139 else if (!was_enabled && dist->enabled) in vgic_mmio_write_v3_misc() [all …]
|
A D | vgic-v3.c | 356 struct vgic_dist *dist = &kvm->arch.vgic; in unmap_all_vpes() local 359 for (i = 0; i < dist->its_vm.nr_vpes; i++) in unmap_all_vpes() 360 free_irq(dist->its_vm.vpes[i]->irq, kvm_get_vcpu(kvm, i)); in unmap_all_vpes() 365 struct vgic_dist *dist = &kvm->arch.vgic; in map_all_vpes() local 368 for (i = 0; i < dist->its_vm.nr_vpes; i++) in map_all_vpes() 370 dist->its_vm.vpes[i]->irq)); in map_all_vpes() 379 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_save_pending_tables() local 399 list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) { in vgic_v3_save_pending_tables() 540 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_map_resources() local 554 if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base)) { in vgic_v3_map_resources() [all …]
|
A D | vgic-its.c | 42 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_add_lpi() local 90 dist->lpi_list_count++; in vgic_add_lpi() 321 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_copy_lpi_list() local 334 irq_count = READ_ONCE(dist->lpi_list_count); in vgic_copy_lpi_list() 582 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_check_cache() local 597 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_cache_translation() local 648 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_invalidate_cache() local 1890 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_lpi_translation_cache_init() local 1914 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_lpi_translation_cache_destroy() local 2790 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_arch_allow_write_without_running_vcpu() local [all …]
|
A D | vgic-debug.c | 143 static void print_dist_state(struct seq_file *s, struct vgic_dist *dist) in print_dist_state() argument 145 bool v3 = dist->vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3; in print_dist_state() 150 seq_printf(s, "nr_spis:\t%d\n", dist->nr_spis); in print_dist_state() 152 seq_printf(s, "nr_lpis:\t%d\n", dist->lpi_list_count); in print_dist_state() 153 seq_printf(s, "enabled:\t%d\n", dist->enabled); in print_dist_state()
|
A D | vgic-v2.c | 291 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v2_map_resources() local 294 if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base) || in vgic_v2_map_resources() 295 IS_VGIC_ADDR_UNDEF(dist->vgic_cpu_base)) { in vgic_v2_map_resources() 300 if (!vgic_v2_check_base(dist->vgic_dist_base, dist->vgic_cpu_base)) { in vgic_v2_map_resources() 315 ret = vgic_register_dist_iodev(kvm, dist->vgic_dist_base, VGIC_V2); in vgic_v2_map_resources() 322 ret = kvm_phys_addr_ioremap(kvm, dist->vgic_cpu_base, in vgic_v2_map_resources()
|
A D | vgic.c | 60 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_get_lpi() local 64 raw_spin_lock_irqsave(&dist->lpi_list_lock, flags); in vgic_get_lpi() 66 list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) { in vgic_get_lpi() 80 raw_spin_unlock_irqrestore(&dist->lpi_list_lock, flags); in vgic_get_lpi() 126 struct vgic_dist *dist = &kvm->arch.vgic; in __vgic_put_lpi_locked() local 132 dist->lpi_list_count--; in __vgic_put_lpi_locked() 139 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_put_irq() local 145 raw_spin_lock_irqsave(&dist->lpi_list_lock, flags); in vgic_put_irq() 147 raw_spin_unlock_irqrestore(&dist->lpi_list_lock, flags); in vgic_put_irq()
|
A D | vgic-mmio-v2.c | 56 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_write_v2_misc() local 57 bool was_enabled = dist->enabled; in vgic_mmio_write_v2_misc() 61 dist->enabled = val & GICD_ENABLE; in vgic_mmio_write_v2_misc() 62 if (!was_enabled && dist->enabled) in vgic_mmio_write_v2_misc() 76 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_uaccess_write_v2_misc() local 99 dist->implementation_rev = reg; in vgic_mmio_uaccess_write_v2_misc()
|
A D | vgic-irqfd.c | 138 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_setup_default_irq_routing() local 139 u32 nr = dist->nr_spis; in kvm_vgic_setup_default_irq_routing()
|
/linux-6.3-rc2/lib/ |
A D | cpu_rmap.c | 54 rmap->near[cpu].dist = CPU_RMAP_DIST_INF; in alloc_cpu_rmap() 95 const struct cpumask *mask, u16 dist) in cpu_rmap_copy_neigh() argument 100 if (rmap->near[cpu].dist > dist && in cpu_rmap_copy_neigh() 101 rmap->near[neigh].dist <= dist) { in cpu_rmap_copy_neigh() 103 rmap->near[cpu].dist = dist; in cpu_rmap_copy_neigh() 121 cpu, index, rmap->near[cpu].dist); in debug_print_rmap() 169 rmap->near[cpu].dist = CPU_RMAP_DIST_INF; in cpu_rmap_update() 181 rmap->near[cpu].dist = 0; in cpu_rmap_update()
|
/linux-6.3-rc2/lib/zlib_inflate/ |
A D | inffast.c | 92 unsigned dist; /* match distance */ in inflate_fast() local 159 dist = (unsigned)(this.val); in inflate_fast() 169 dist += (unsigned)hold & ((1U << op) - 1); in inflate_fast() 171 if (dist > dmax) { in inflate_fast() 180 if (dist > op) { /* see if copy from window */ in inflate_fast() 181 op = dist - op; /* distance back in window */ in inflate_fast() 195 from = out - dist; /* rest from output */ in inflate_fast() 224 from = out - dist; /* rest from output */ in inflate_fast() 243 from = out - dist; /* copy direct from output */ in inflate_fast() 251 if (dist > 2) { in inflate_fast() [all …]
|
A D | inflate.c | 123 unsigned copy, dist; in zlib_updatewindow() local 135 dist = state->wsize - state->write; in zlib_updatewindow() 136 if (dist > copy) dist = copy; in zlib_updatewindow() 137 memcpy(state->window + state->write, strm->next_out - copy, dist); in zlib_updatewindow() 138 copy -= dist; in zlib_updatewindow() 145 state->write += dist; in zlib_updatewindow() 147 if (state->whave < state->wsize) state->whave += dist; in zlib_updatewindow()
|
/linux-6.3-rc2/lib/zlib_deflate/ |
A D | deftree.c | 159 #define d_code(dist) \ argument 160 ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)]) 178 int dist; /* distance index */ in tr_static_init() local 200 dist = 0; in tr_static_init() 202 base_dist[code] = dist; in tr_static_init() 210 base_dist[code] = dist << 7; in tr_static_init() 921 s->d_buf[s->last_lit] = (ush)dist; 923 if (dist == 0) { 977 dist = s->d_buf[lx]; 979 if (dist == 0) { [all …]
|
/linux-6.3-rc2/arch/hexagon/kernel/ |
A D | module.c | 102 int dist = (int)(value - (uint32_t)location); in apply_relocate_add() local 103 if ((dist < -0x00800000) || in apply_relocate_add() 104 (dist >= 0x00800000)) { in apply_relocate_add() 109 dist, value, (uint32_t)location, in apply_relocate_add() 116 *location |= 0x00003fff & dist; in apply_relocate_add() 117 *location |= 0x01ff0000 & (dist<<2); in apply_relocate_add()
|
/linux-6.3-rc2/arch/m68k/kernel/ |
A D | time.c | 45 static unsigned cnt = 0, period = 0, dist = 0; in timer_heartbeat() local 47 if (cnt == 0 || cnt == dist) in timer_heartbeat() 49 else if (cnt == 7 || cnt == dist+7) in timer_heartbeat() 59 dist = period / 4; in timer_heartbeat()
|
/linux-6.3-rc2/arch/powerpc/mm/ |
A D | numa.c | 201 int dist; in __cpu_form2_relative_distance() local 207 dist = numa_distance_table[node1][node2]; in __cpu_form2_relative_distance() 208 if (dist <= LOCAL_DISTANCE) in __cpu_form2_relative_distance() 210 else if (dist <= REMOTE_DISTANCE) in __cpu_form2_relative_distance() 218 int dist = 0; in __cpu_form1_relative_distance() local 226 dist++; in __cpu_form1_relative_distance() 229 return dist; in __cpu_form1_relative_distance() 416 int dist; in initialize_form2_numa_distance_lookup_table() local 421 dist = LOCAL_DISTANCE; in initialize_form2_numa_distance_lookup_table() 423 dist = REMOTE_DISTANCE; in initialize_form2_numa_distance_lookup_table() [all …]
|
/linux-6.3-rc2/net/ipv4/ |
A D | tcp_bic.c | 103 __u32 dist = (ca->last_max_cwnd - cwnd) in bictcp_update() local 106 if (dist > max_increment) in bictcp_update() 109 else if (dist <= 1U) in bictcp_update() 114 ca->cnt = cwnd / dist; in bictcp_update()
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
A D | ctxgm200.c | 50 u32 dist[TPC_MAX / 4] = {}; in gm200_grctx_generate_smid_config() local 57 dist[sm / 4] |= ((gpc << 4) | tpc) << ((sm % 4) * 8); in gm200_grctx_generate_smid_config() 62 nvkm_wr32(device, 0x405b60 + (i * 4), dist[i]); in gm200_grctx_generate_smid_config()
|
A D | ctxgp100.c | 110 u32 dist[TPC_MAX / 4] = {}, gpcs[16] = {}; in gp100_grctx_generate_smid_config() local 116 dist[sm / 4] |= ((gpc << 4) | tpc) << ((sm % 4) * 8); in gp100_grctx_generate_smid_config() 121 nvkm_wr32(device, 0x405b60 + (i * 4), dist[i]); in gp100_grctx_generate_smid_config()
|
/linux-6.3-rc2/tools/testing/selftests/kvm/aarch64/ |
A D | vgic_init.c | 136 struct vgic_region_attr dist; in subtest_dist_rdist() local 140 dist = VGIC_DEV_IS_V3(v->gic_dev_type) ? gic_v3_dist_region in subtest_dist_rdist() 144 kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, dist.attr); in subtest_dist_rdist() 153 addr = dist.alignment / 0x10; in subtest_dist_rdist() 155 dist.attr, &addr); in subtest_dist_rdist() 166 dist.attr, &addr); in subtest_dist_rdist() 174 addr = max_phys_size - dist.alignment; in subtest_dist_rdist() 208 dist.attr, &addr); in subtest_dist_rdist()
|
/linux-6.3-rc2/drivers/base/regmap/ |
A D | regcache-rbtree.c | 391 unsigned int dist, best_dist = UINT_MAX; in regcache_rbtree_write() local 412 dist = base_reg - reg; in regcache_rbtree_write() 414 dist = reg - top_reg; in regcache_rbtree_write() 416 dist = 0; in regcache_rbtree_write() 417 if (dist < best_dist) { in regcache_rbtree_write() 419 best_dist = dist; in regcache_rbtree_write()
|
/linux-6.3-rc2/arch/x86/mm/ |
A D | numa_emulation.c | 505 int dist; in numa_emulation() local 507 if (get_option(&emu_cmdline, &dist) == 2) in numa_emulation() 510 dist = physi == physj ? in numa_emulation() 513 dist = phys_dist[physi * numa_dist_cnt + physj]; in numa_emulation() 515 numa_set_distance(i, j, dist); in numa_emulation()
|
/linux-6.3-rc2/drivers/clk/imx/ |
A D | clk-pll14xx.c | 136 long fvco, rate_min, rate_max, dist, best = LONG_MAX; in imx_pll14xx_calc_settings() local 199 dist = abs((long)rate - (long)fvco); in imx_pll14xx_calc_settings() 200 if (dist < best) { in imx_pll14xx_calc_settings() 201 best = dist; in imx_pll14xx_calc_settings() 208 if (!dist) in imx_pll14xx_calc_settings()
|
/linux-6.3-rc2/drivers/ata/ |
A D | sata_sx4.c | 943 long dist; in pdc20621_get_from_dimm() local 961 dist = ((long) (window_size - (offset + size))) >= 0 ? size : in pdc20621_get_from_dimm() 963 memcpy_fromio(psource, dimm_mmio + offset / 4, dist); in pdc20621_get_from_dimm() 965 psource += dist; in pdc20621_get_from_dimm() 966 size -= dist; in pdc20621_get_from_dimm() 994 long dist; in pdc20621_put_to_dimm() local 1009 dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : in pdc20621_put_to_dimm() 1011 memcpy_toio(dimm_mmio + offset / 4, psource, dist); in pdc20621_put_to_dimm() 1015 psource += dist; in pdc20621_put_to_dimm() 1016 size -= dist; in pdc20621_put_to_dimm()
|