Lines Matching refs:ftrp
320 static u64 arm64_ftr_set_value(struct arm64_ftr_bits *ftrp, s64 reg, s64 ftr_val) in arm64_ftr_set_value() argument
322 u64 mask = arm64_ftr_mask(ftrp); in arm64_ftr_set_value()
325 reg |= (ftr_val << ftrp->shift) & mask; in arm64_ftr_set_value()
329 static s64 arm64_ftr_safe_value(struct arm64_ftr_bits *ftrp, s64 new, s64 cur) in arm64_ftr_safe_value() argument
333 switch (ftrp->type) { in arm64_ftr_safe_value()
335 ret = ftrp->safe_val; in arm64_ftr_safe_value()
381 struct arm64_ftr_bits *ftrp; in init_cpu_ftr_reg() local
386 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in init_cpu_ftr_reg()
387 s64 ftr_new = arm64_ftr_value(ftrp, new); in init_cpu_ftr_reg()
389 val = arm64_ftr_set_value(ftrp, val, ftr_new); in init_cpu_ftr_reg()
390 if (!ftrp->strict) in init_cpu_ftr_reg()
391 strict_mask &= ~arm64_ftr_mask(ftrp); in init_cpu_ftr_reg()
433 struct arm64_ftr_bits *ftrp; in update_cpu_ftr_reg() local
435 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in update_cpu_ftr_reg()
436 s64 ftr_cur = arm64_ftr_value(ftrp, reg->sys_val); in update_cpu_ftr_reg()
437 s64 ftr_new = arm64_ftr_value(ftrp, new); in update_cpu_ftr_reg()
442 ftr_new = arm64_ftr_safe_value(ftrp, ftr_new, ftr_cur); in update_cpu_ftr_reg()
443 reg->sys_val = arm64_ftr_set_value(ftrp, reg->sys_val, ftr_new); in update_cpu_ftr_reg()