Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp166261pxb; Wed, 18 Nov 2020 00:58:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlTLeIieodRaTcszZW9ldj3SMWXZV8spMBXqh99OyqWfCfrPvuwfafETrqb7WQlvoaQYCb X-Received: by 2002:a50:f68b:: with SMTP id d11mr25503763edn.64.1605689908959; Wed, 18 Nov 2020 00:58:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605689908; cv=none; d=google.com; s=arc-20160816; b=WyRObofJK5mKdRTgPuOpv9pPy7TZakPjU+cz5yGqPDXMe+YEhhZOrnaDjbGDAtjhqb d7p7MdG7ybRPuEktIx8xTlcNR9/KjSeHEHc7ENtv8gx7u1q2taupOHNJOojYKCgIDt0c raFgN0oStmivuzPxsvsgU/jM4CZdCni9xJ84YDh2wmg/GEQI3Jf7YpbSsOBXBn6pTYmp Gp02mNDT3Aj8sGforFXpwAYjV8nimESEcXxKTHw+wmSbq/tOrNp2fZS8YheWrBtBgfh3 HAOdxMc8jM7HdUFIC94MwaadxikKxNkYf+a3uMznMLwQ0A7mZQmapIplEo2mFfEsLCqC ENVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=l76B6uVRtzQLDRYi5APK/f/shVOy1WpHbdzKmzrhv20=; b=Q3nj1Oo04zT9PUe3k7H5KvcRyLmAIZhcc6wFT/1iUHRZUg1fxD7rdX7Jpq9LBZ8n2i N866DrgdQLgGbNCQmpBoKMuRGDdoOd/fn/KIOM+68ewGKxxBkD9it4F4o0TiE0UAv2AU C1sz6+MBF/SvDFH/d0fLunsSPTil4MjHM8K0YqODeI72Tzu+b6daTDX0dsi2maqs8ptI pRTM9XqRTpG0gBLbq3x+qxqVABwCxUoFnYNye8jY6qp0f0L45AjtAV0Olit5V6YeHw4m hSOsJE1S0TZWF4ZkZtOVjP6/ybcFxmmeQKn9KA6j7Wvyb4DdDRXuWtFGwMUDEEj63bXZ anyg== 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.58.06; Wed, 18 Nov 2020 00:58:28 -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 S1727061AbgKRIye (ORCPT + 99 others); Wed, 18 Nov 2020 03:54:34 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8107 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbgKRIye (ORCPT ); Wed, 18 Nov 2020 03:54:34 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cbc773fBYzLqK8; Wed, 18 Nov 2020 16:54:11 +0800 (CST) Received: from [127.0.0.1] (10.174.176.144) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Wed, 18 Nov 2020 16:54:25 +0800 Subject: Re: [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce() To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , "Rafael J . Wysocki" , Len Brown , linux-nvdimm , linux-acpi , linux-kernel References: <20201118084117.1937-1-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <9b8310ed-e93f-e708-eefa-520701e6d044@huawei.com> Date: Wed, 18 Nov 2020 16:54:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20201118084117.1937-1-thunder.leizhen@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.144] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/11/18 16:41, Zhen Lei wrote: > The badrange to be reported should always cover mce->addr. Maybe I should change this description to: Make sure the badrange to be reported can 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); >