EDAC/ghes: Use standard kernel macros for page calculations
Use standard macros for page calculations. Signed-off-by: Robert Richter <rrichter@marvell.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: James Morse <james.morse@arm.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org> Cc: Tony Luck <tony.luck@intel.com> Link: https://lkml.kernel.org/r/20191106093239.25517-10-rrichter@marvell.com
This commit is contained in:
parent
98edb865bd
commit
7c10493170
|
@ -319,8 +319,8 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
|
|||
|
||||
/* Error address */
|
||||
if (mem_err->validation_bits & CPER_MEM_VALID_PA) {
|
||||
e->page_frame_number = mem_err->physical_addr >> PAGE_SHIFT;
|
||||
e->offset_in_page = mem_err->physical_addr & ~PAGE_MASK;
|
||||
e->page_frame_number = PHYS_PFN(mem_err->physical_addr);
|
||||
e->offset_in_page = offset_in_page(mem_err->physical_addr);
|
||||
}
|
||||
|
||||
/* Error grain */
|
||||
|
|
Loading…
Reference in New Issue