#include <asm/sysreg.h>
+#define ICC_IAR0_EL1 sys_reg(3, 0, 12, 8, 0)
+#define ICC_EOIR0_EL1 sys_reg(3, 0, 12, 8, 1)
+#define ICC_HPPIR0_EL1 sys_reg(3, 0, 12, 8, 2)
#define ICC_BPR0_EL1 sys_reg(3, 0, 12, 8, 3)
+#define ICC_AP0Rn_EL1(n) sys_reg(3, 0, 12, 8, 4 | n)
#define ICC_AP1Rn_EL1(n) sys_reg(3, 0, 12, 9, n)
#define ICC_EOIR1_EL1 sys_reg(3, 0, 12, 12, 1)
#define ICC_DIR_EL1 sys_reg(3, 0, 12, 11, 1)
is_read = (esr & ESR_ELx_SYS64_ISS_DIR_MASK) == ESR_ELx_SYS64_ISS_DIR_READ;
switch (sysreg) {
+ case ICC_IAR0_EL1:
case ICC_IAR1_EL1:
fn = __vgic_v3_read_iar;
break;
+ case ICC_EOIR0_EL1:
case ICC_EOIR1_EL1:
fn = __vgic_v3_write_eoir;
break;
else
fn = __vgic_v3_write_bpr1;
break;
+ case ICC_AP0Rn_EL1(0):
case ICC_AP1Rn_EL1(0):
if (is_read)
fn = __vgic_v3_read_apxr0;
else
fn = __vgic_v3_write_apxr0;
break;
+ case ICC_AP0Rn_EL1(1):
case ICC_AP1Rn_EL1(1):
if (is_read)
fn = __vgic_v3_read_apxr1;
else
fn = __vgic_v3_write_apxr1;
break;
+ case ICC_AP0Rn_EL1(2):
case ICC_AP1Rn_EL1(2):
if (is_read)
fn = __vgic_v3_read_apxr2;
else
fn = __vgic_v3_write_apxr2;
break;
+ case ICC_AP0Rn_EL1(3):
case ICC_AP1Rn_EL1(3):
if (is_read)
fn = __vgic_v3_read_apxr3;
else
fn = __vgic_v3_write_apxr3;
break;
+ case ICC_HPPIR0_EL1:
case ICC_HPPIR1_EL1:
fn = __vgic_v3_read_hppir;
break;