};
struct feature_fme_error0 {
-#define FME_ERROR0_MASK 0xFFUL
#define FME_ERROR0_MASK_DEFAULT 0x40UL /* pcode workaround */
union {
u64 csr;
struct {
u8 fabric_err:1; /* Fabric error */
u8 fabfifo_overflow:1; /* Fabric fifo overflow */
- u8 kticdc_parity_err:2;/* KTI CDC Parity Error */
- u8 iommu_parity_err:1; /* IOMMU Parity error */
+ u8 reserved2:3;
/* AFU PF/VF access mismatch detected */
u8 afu_acc_mode_err:1;
- u8 mbp_err:1; /* Indicates an MBP event */
+ u8 reserved6:1;
/* PCIE0 CDC Parity Error */
u8 pcie0cdc_parity_err:5;
/* PCIE1 CDC Parity Error */
u8 pcie1cdc_parity_err:5;
/* CVL CDC Parity Error */
u8 cvlcdc_parity_err:3;
- u64 rsvd:44; /* Reserved */
+ u8 fpgaseuerr:1;
+ u64 rsvd:43; /* Reserved */
};
};
};
int ret = 0;
spinlock_lock(&fme->lock);
- writeq(FME_ERROR0_MASK, &fme_err->fme_err_mask);
+ writeq(GENMASK_ULL(63, 0), &fme_err->fme_err_mask);
fme_error0.csr = readq(&fme_err->fme_err);
if (val != fme_error0.csr) {
fme_first_err.csr = readq(&fme_err->fme_first_err);
fme_next_err.csr = readq(&fme_err->fme_next_err);
- writeq(fme_error0.csr & FME_ERROR0_MASK, &fme_err->fme_err);
+ writeq(fme_error0.csr, &fme_err->fme_err);
writeq(fme_first_err.csr & FME_FIRST_ERROR_MASK,
&fme_err->fme_first_err);
writeq(fme_next_err.csr & FME_NEXT_ERROR_MASK,
#ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif
+#ifndef BITS_PER_LONG_LONG
+#define BITS_PER_LONG_LONG (__SIZEOF_LONG_LONG__ * 8)
+#endif
#ifndef BIT
#define BIT(a) (1UL << (a))
#endif /* BIT */
-#define U64_C(x) x ## ULL
#ifndef BIT_ULL
#define BIT_ULL(a) (1ULL << (a))
#endif /* BIT_ULL */
#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
#endif /* GENMASK */
#ifndef GENMASK_ULL
-#define GENMASK_ULL(h, l) (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l))
+#define GENMASK_ULL(h, l) \
+ (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
#endif /* GENMASK_ULL */
#endif /* LINUX_MACROS */