Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp160664pxb; Wed, 18 Nov 2020 00:45:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3gcykKpZBlOhd10L8h/bpwiuQJLQo3GB0MFQr8AeMr0WxeP4xIWTe5U7FxHo9EwxUXY6Q X-Received: by 2002:a17:906:eb46:: with SMTP id mc6mr6293624ejb.54.1605689159004; Wed, 18 Nov 2020 00:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605689158; cv=none; d=google.com; s=arc-20160816; b=KBhscDEBaGtY/6ca3nX/hE6nwx3qIfaScckehEqhBPj+DK/viJN2IKiH6A7gmE62W4 3fOJUv8XWT9+t4KUCCZT4c+xQ4sY9ZfB+KoFIeU5USDqlYY9ojzkr/wfqn8gxjzj7oRv BmzQ/FPiA3i35/UVe6hwdOx3vk/75JzyAgR4IuZNIoJaFSqBGfJtxqomonsFo1TZxY1f OgzfiG1mnzyGrIhGKZwRvauOvQZ7lBDyVH0oOr2H+gHpNElKE5JnnRAVrw2cLsEXANxy FGJXuHA/FotnZgjfBRQaMNGC0oLJ9OFtW1KTxYuHPMGumwsEFP2Yt8QJfIPrCjFL7bni mZrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8gIA+B/pms/ev+1uAKGIK7V9GhhWcqRvs51hXWlc/4Q=; b=KqujY9tdvMv7n2zIekIr1XjrmWKhhIQGhZ5Mi7fFYN+JeSqDS2jmPxP3JM+Dl7SwAW /3E1TGPvxf3MbMB+1OEQiJGMtXB/BLsPrv/Y7cV2dPCKFaDp81He6+3QG6FVuWQLL7FN 74y94CJofFQ2AkIi3kyjAXs8gM2wUrnDdMHDXqWASKHWDM1ah3PQe+QBiGr3ih7UCj74 c6dgbMy+QndUFU8bkJ7aKwoeCaNrtl74E4ev5P6a7b9q9Iz7lwXeUgj0SsYg7X3AalQS odtBXQ1kcqAKJli5MOIuK7hCWYCmdDtLvaimHwxompZN7AZ+/hUxGB1sjvwGzKP60seO psfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si7032364edw.81.2020.11.18.00.45.33; Wed, 18 Nov 2020 00:45:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbgKRImJ (ORCPT + 99 others); Wed, 18 Nov 2020 03:42:09 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7646 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgKRImI (ORCPT ); Wed, 18 Nov 2020 03:42:08 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Cbbrg6TyTz15NJp; Wed, 18 Nov 2020 16:41:39 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.176.144) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 18 Nov 2020 16:41:47 +0800 From: Zhen Lei To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , "Rafael J . Wysocki" , Len Brown , linux-nvdimm , linux-acpi , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce() Date: Wed, 18 Nov 2020 16:41:17 +0800 Message-ID: <20201118084117.1937-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.176.144] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The badrange to be reported should always cover mce->addr. Signed-off-by: Zhen Lei --- 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