Lines Matching refs:ftrp

784 static u64 arm64_ftr_set_value(const struct arm64_ftr_bits *ftrp, s64 reg,  in arm64_ftr_set_value()  argument
787 u64 mask = arm64_ftr_mask(ftrp); in arm64_ftr_set_value()
790 reg |= (ftr_val << ftrp->shift) & mask; in arm64_ftr_set_value()
794 static s64 arm64_ftr_safe_value(const struct arm64_ftr_bits *ftrp, s64 new, in arm64_ftr_safe_value() argument
799 switch (ftrp->type) { in arm64_ftr_safe_value()
801 ret = ftrp->safe_val; in arm64_ftr_safe_value()
883 const struct arm64_ftr_bits *ftrp; in init_cpu_ftr_reg() local
889 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in init_cpu_ftr_reg()
890 u64 ftr_mask = arm64_ftr_mask(ftrp); in init_cpu_ftr_reg()
891 s64 ftr_new = arm64_ftr_value(ftrp, new); in init_cpu_ftr_reg()
892 s64 ftr_ovr = arm64_ftr_value(ftrp, reg->override->val); in init_cpu_ftr_reg()
895 s64 tmp = arm64_ftr_safe_value(ftrp, ftr_ovr, ftr_new); in init_cpu_ftr_reg()
916 ftrp->shift + ftrp->width - 1, in init_cpu_ftr_reg()
917 ftrp->shift, str, tmp); in init_cpu_ftr_reg()
922 ftrp->shift + ftrp->width - 1, in init_cpu_ftr_reg()
923 ftrp->shift); in init_cpu_ftr_reg()
926 val = arm64_ftr_set_value(ftrp, val, ftr_new); in init_cpu_ftr_reg()
929 if (!ftrp->strict) in init_cpu_ftr_reg()
931 if (ftrp->visible) in init_cpu_ftr_reg()
934 reg->user_val = arm64_ftr_set_value(ftrp, in init_cpu_ftr_reg()
936 ftrp->safe_val); in init_cpu_ftr_reg()
1059 const struct arm64_ftr_bits *ftrp; in update_cpu_ftr_reg() local
1061 for (ftrp = reg->ftr_bits; ftrp->width; ftrp++) { in update_cpu_ftr_reg()
1062 s64 ftr_cur = arm64_ftr_value(ftrp, reg->sys_val); in update_cpu_ftr_reg()
1063 s64 ftr_new = arm64_ftr_value(ftrp, new); in update_cpu_ftr_reg()
1068 ftr_new = arm64_ftr_safe_value(ftrp, ftr_new, ftr_cur); in update_cpu_ftr_reg()
1069 reg->sys_val = arm64_ftr_set_value(ftrp, reg->sys_val, ftr_new); in update_cpu_ftr_reg()
1091 const struct arm64_ftr_bits *ftrp; in relax_cpu_ftr_reg() local
1097 for (ftrp = regp->ftr_bits; ftrp->width; ftrp++) { in relax_cpu_ftr_reg()
1098 if (ftrp->shift == field) { in relax_cpu_ftr_reg()
1099 regp->strict_mask &= ~arm64_ftr_mask(ftrp); in relax_cpu_ftr_reg()
1105 WARN_ON(!ftrp->width); in relax_cpu_ftr_reg()