Lines Matching refs:ftrp
430 static u64 arm64_ftr_set_value(const struct arm64_ftr_bits *ftrp, s64 reg, in arm64_ftr_set_value() argument
433 u64 mask = arm64_ftr_mask(ftrp); in arm64_ftr_set_value()
436 reg |= (ftr_val << ftrp->shift) & mask; in arm64_ftr_set_value()
440 static s64 arm64_ftr_safe_value(const struct arm64_ftr_bits *ftrp, s64 new, in arm64_ftr_safe_value() argument
445 switch (ftrp->type) { in arm64_ftr_safe_value()
447 ret = ftrp->safe_val; in arm64_ftr_safe_value()
484 const struct arm64_ftr_bits *ftrp; in init_cpu_ftr_reg() local
489 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in init_cpu_ftr_reg()
490 u64 ftr_mask = arm64_ftr_mask(ftrp); in init_cpu_ftr_reg()
491 s64 ftr_new = arm64_ftr_value(ftrp, new); in init_cpu_ftr_reg()
493 val = arm64_ftr_set_value(ftrp, val, ftr_new); in init_cpu_ftr_reg()
496 if (!ftrp->strict) in init_cpu_ftr_reg()
498 if (ftrp->visible) in init_cpu_ftr_reg()
501 reg->user_val = arm64_ftr_set_value(ftrp, in init_cpu_ftr_reg()
503 ftrp->safe_val); in init_cpu_ftr_reg()
568 const struct arm64_ftr_bits *ftrp; in update_cpu_ftr_reg() local
570 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in update_cpu_ftr_reg()
571 s64 ftr_cur = arm64_ftr_value(ftrp, reg->sys_val); in update_cpu_ftr_reg()
572 s64 ftr_new = arm64_ftr_value(ftrp, new); in update_cpu_ftr_reg()
577 ftr_new = arm64_ftr_safe_value(ftrp, ftr_new, ftr_cur); in update_cpu_ftr_reg()
578 reg->sys_val = arm64_ftr_set_value(ftrp, reg->sys_val, ftr_new); in update_cpu_ftr_reg()