From patchwork Wed Nov 18 08:41:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 325537 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp145433ils; Wed, 18 Nov 2020 00:43:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiEJe8a23uk2LsFTLt9R4816ksNGQXOP8lPP/j2WB9OBQKoL/Xdp/TdVVNVBgrh/57aCNU X-Received: by 2002:a17:906:4ed2:: with SMTP id i18mr23603606ejv.195.1605689009777; Wed, 18 Nov 2020 00:43:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605689009; cv=none; d=google.com; s=arc-20160816; b=1JTeFSNAR7pBpuwufvnpvxvXtOjkldJUqNU9iMMHTV7NZxaEXuU3R4wnQiDEdGlTV2 5pHu+hvHvsbbT/3HUuvfIh/Eavkn4H6WtMIzlsX9WUtW//t3fihEuc0sO1NUXEv2r6Zi Bdlt9zDH+qP4p8cFNKQ0/mKTHBOZ6QS1GWB3urw9fcXZ5f5Zj0ZFEMcS9yJxJfWX0FCc TduD46im/ZU0rj5RRxGH55CMKvuxncjdovurgY2Rs0eVL1+thld6g9422itutBOmLw63 DXrfrBuT2kDLLiUaZ5FM2DypM5IsiROlkdrMz1rZWueoWOG5FzKIGc1Ra6ScfMxF9idF jmMw== 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=bqCd8/2kRh9RiGhkSop5WgHWVL7FRp/M9ig4MwhN559eIGFclqpKQKCxBBj5S9ek7Z oHOo/vQX0okmymV4tGLl5enSpYZBWrSf89mGjurZ90x4IXNRi+iWXi47ASCK4wj8jaUb TVsgj4cwTPgK0yVsjs7IgS6Io9eJ1apbyW1vvNFUFcPzZN6u8m5NrYZOeVwR0xy25Dln ZnB6w75gf7VVhXbFT43fCX0Xf6rF6/fUBuxn5g/atvbrgPkrCdTc/iX072LWzrO2vuQs Oq9SiohjAnfIKYTb+/hn4LbdAJrl5pHvrXslvLGSilMfcAx5m8bGu+grMuKrVfAgdoNk LnpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-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 a15si6420325edr.228.2020.11.18.00.43.29; Wed, 18 Nov 2020 00:43:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-acpi-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-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbgKRImI (ORCPT + 5 others); Wed, 18 Nov 2020 03:42:08 -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 X-Originating-IP: [10.174.176.144] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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(-) -- 2.26.0.106.g9fadedd Reviewed-by: Vishal Verma 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);