linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] acpi/nfit: fix badrange insertion in nfit_handle_mce()
@ 2020-11-19  1:57 Zhen Lei
  2020-11-19  1:57 ` [PATCH v2 1/1] " Zhen Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2020-11-19  1:57 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

v1 --> v2:
Modified the title and description of the patch.

Zhen Lei (1):
  acpi/nfit: fix badrange insertion in nfit_handle_mce()

 drivers/acpi/nfit/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.0.106.g9fadedd



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

* [PATCH v2 1/1] acpi/nfit: fix badrange insertion in nfit_handle_mce()
  2020-11-19  1:57 [PATCH v2 0/1] acpi/nfit: fix badrange insertion in nfit_handle_mce() Zhen Lei
@ 2020-11-19  1:57 ` Zhen Lei
  0 siblings, 0 replies; 2+ messages in thread
From: Zhen Lei @ 2020-11-19  1:57 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

Make sure the badrange to be reported can always cover mce->addr.

Fixes: 9ffd6350a103 ("nfit: don't start a full scrub by default for an MCE")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19  1:57 [PATCH v2 0/1] acpi/nfit: fix badrange insertion in nfit_handle_mce() Zhen Lei
2020-11-19  1:57 ` [PATCH v2 1/1] " Zhen Lei

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).