linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce()
@ 2020-11-18  8:41 Zhen Lei
  2020-11-18  8:54 ` Leizhen (ThunderTown)
  2020-11-18 20:50 ` Verma, Vishal L
  0 siblings, 2 replies; 7+ messages in thread
From: Zhen Lei @ 2020-11-18  8:41 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny,
	Rafael J . Wysocki, Len Brown, linux-nvdimm, linux-acpi,
	linux-kernel
  Cc: Zhen Lei

The badrange to be reported should always cover mce->addr.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/acpi/nfit/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/nfit/mce.c b/drivers/acpi/nfit/mce.c
index ee8d9973f60b..053e719c7bea 100644
--- a/drivers/acpi/nfit/mce.c
+++ b/drivers/acpi/nfit/mce.c
@@ -63,7 +63,7 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
 
 		/* If this fails due to an -ENOMEM, there is little we can do */
 		nvdimm_bus_add_badrange(acpi_desc->nvdimm_bus,
-				ALIGN(mce->addr, L1_CACHE_BYTES),
+				ALIGN_DOWN(mce->addr, L1_CACHE_BYTES),
 				L1_CACHE_BYTES);
 		nvdimm_region_notify(nfit_spa->nd_region,
 				NVDIMM_REVALIDATE_POISON);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-19  2:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  8:41 [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce() Zhen Lei
2020-11-18  8:54 ` Leizhen (ThunderTown)
2020-11-18 19:16   ` Dan Williams
2020-11-19  1:53     ` Leizhen (ThunderTown)
2020-11-19  2:06       ` Dan Williams
2020-11-18 20:50 ` Verma, Vishal L
2020-11-19  1:55   ` Leizhen (ThunderTown)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).