On Tue, Feb 16, 2016 at 03:45:09PM -0600, Aravind Gopalakrishnan wrote:
/* 'SMCA': AMD64 Scalable MCA */Are those MSRs going to be used in multiple files? If not, they should
+#define MSR_AMD64_SMCA_MC0_MISC0 0xc0002003
#define MSR_AMD64_SMCA_MC0_CONFIG 0xc0002004
#define MSR_AMD64_SMCA_MC0_IPID 0xc0002005
+#define MSR_AMD64_SMCA_MC0_MISC1 0xc000200a
+#define MSR_AMD64_SMCA_MCx_MISC(x) (MSR_AMD64_SMCA_MC0_MISC0 + 0x10*(x))
#define MSR_AMD64_SMCA_MCx_CONFIG(x) (MSR_AMD64_SMCA_MC0_CONFIG + 0x10*(x))
#define MSR_AMD64_SMCA_MCx_IPID(x) (MSR_AMD64_SMCA_MC0_IPID + 0x10*(x))
+#define MSR_AMD64_SMCA_MCx_MISCy(x, y) ((MSR_AMD64_SMCA_MC0_MISC1 + y) + (0x10*(x)))
all go to mce.h.
+static u32 get_block_address(u32 current_addr,Use arg formatting like the rest of functions in the file please.
+ u32 low,
+ u32 high,
+ unsigned int bank,
+ unsigned int block)
+ u32 smca_low, smca_high;s/smca_//
+unnecessary line break.
+ if (rdmsr_safe(MSR_AMD64_SMCA_MCx_CONFIG(bank),
+ &smca_low, &smca_high) ||
+ !(smca_low & MCI_CONFIG_MCAX))
+ goto nextaddr_out;
+
+ if (!rdmsr_safe(MSR_AMD64_SMCA_MCx_MISC(bank),
+ &smca_low, &smca_high) &&
+ (smca_low & MASK_BLKPTR_LO))
+ addr = MSR_AMD64_SMCA_MCx_MISCy(bank,
+ block - 1);