Message ID | 1571197377-48650-1-git-send-email-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 29a0f5ad87e6f45c984ffffa57b7142d178ff422 |
Headers | show |
Series | arm64: sysreg: fix wrong PAR_EL1.F macro | expand |
On Wed, Oct 16, 2019 at 11:42:57AM +0800, Yang Yingliang wrote: > According to the spec: > > Field descriptions > The PAR_EL1 bit assignments are: > For all register layouts: > F, bit [0] > Indicates whether the conversion completed successfully. > 0 VA to PA conversion completed successfully. > 1 VA to PA conversion aborted. > > PAR_EL1.F is bit0. > > Fixes: e8620cff9994 ("arm64: sysreg: Add some field definitions for PAR_EL1") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > arch/arm64/include/asm/sysreg.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index 972d196..6e919fa 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -212,7 +212,7 @@ > #define SYS_FAR_EL1 sys_reg(3, 0, 6, 0, 0) > #define SYS_PAR_EL1 sys_reg(3, 0, 7, 4, 0) > > -#define SYS_PAR_EL1_F BIT(1) > +#define SYS_PAR_EL1_F BIT(0) Looks like this was a thinko, as we converted 1 -> BIT(1) in the original patch. Reviewed-by: Mark Rutland <mark.rutland@arm.com> That said, looking at is_spurious_el1_translation_fault() where this is used, we currently have: | if (!(par & SYS_PAR_EL1_F)) | return false; ... which I think is inverted. If PAR_EL1.F == 0, we now have a valid translation, so the fault *was* spurious, and we should return true. I'll spin a patch... Mark. > #define SYS_PAR_EL1_FST GENMASK(6, 1) > > /*** Statistical Profiling Extension ***/ > -- > 1.8.3 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 972d196..6e919fa 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -212,7 +212,7 @@ #define SYS_FAR_EL1 sys_reg(3, 0, 6, 0, 0) #define SYS_PAR_EL1 sys_reg(3, 0, 7, 4, 0) -#define SYS_PAR_EL1_F BIT(1) +#define SYS_PAR_EL1_F BIT(0) #define SYS_PAR_EL1_FST GENMASK(6, 1) /*** Statistical Profiling Extension ***/
According to the spec: Field descriptions The PAR_EL1 bit assignments are: For all register layouts: F, bit [0] Indicates whether the conversion completed successfully. 0 VA to PA conversion completed successfully. 1 VA to PA conversion aborted. PAR_EL1.F is bit0. Fixes: e8620cff9994 ("arm64: sysreg: Add some field definitions for PAR_EL1") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- arch/arm64/include/asm/sysreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)