Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp105866pxb; Wed, 18 Nov 2020 17:58:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJybLNnUORg68Xpk7w063PajEOVyTOaf4xi7RjFymm+TYDdgfCY6NSIN1EYHqAPC0fNMCbZJ X-Received: by 2002:a05:6402:154b:: with SMTP id p11mr29007726edx.217.1605751110942; Wed, 18 Nov 2020 17:58:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605751110; cv=none; d=google.com; s=arc-20160816; b=FvmzOTl9fiFFYThbUUhvLGj50TmaB3fTHExXZwFVSUCTfie91Gf92uVMTiiVbEpBAf alJ9z3VeV3iAzp1ABt7xUnxLu0HjFpvsTxAo12Ccs9h/inDhW0f5JEDtSvHCXBN0TUtI HpLBG8ckqSqS7ZR7QadbPIQwnRW4VXDRt7PkCAhyWG8/Gw4xfI1ITHaFM9aZvTDItPGu p5Ksp83mtKdxkigIALTW2NkII5o6JrDWaId5XpNDX8Q6QykK7xO+Y5TXQVdrsoXFbwNN SxXxM01LfTePfjclGk0/0jX/ATo8uHLJKNGrVwGVxuQUNAPnnoxasn0sfvVQ0KTOozWV 7B7Q== 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=6qxK5B7XCQ7iUC+yK5iKM+HiJWwFc8HXNQMCb0yd+Tw=; b=usc6dQXqPg0hCAdZVEvxcubEHfz5bSYza0heQPP/HfQgU5aub8N0bZydi57XaYZUdW zlk7ec2H0t1g/LbXOJeAhxqMCz5V0rsnjnYwDVQG7ndVEkvaMVQT9RUCCOGRGeaapTuD msTHdCrmIixWX+xTRQ8hgZQFBuwNecLeK7Al9/OuowonPbyylsvLZBh/3D3uxjwv7RWF AKpqRDDgTQoTnHYDXhaqpCz7GtS8V5+JfrSLWjH0e+TuUY/5F3EmssnlF/Ooo20Lxhzw WMzG4h/dm8k1Vi0UGEXYHW4UbCbO9gWFTcTMbdoUQkqZfGEJjsXfxvcOcaSdbrgZ8iKe W/dg== 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 y7si16092536ejd.450.2020.11.18.17.58.08; Wed, 18 Nov 2020 17:58:30 -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 S1727136AbgKSB4C (ORCPT + 99 others); Wed, 18 Nov 2020 20:56:02 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8111 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbgKSB4B (ORCPT ); Wed, 18 Nov 2020 20:56:01 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cc2nl1fXzzLq1y; Thu, 19 Nov 2020 09:55:39 +0800 (CST) Received: from [127.0.0.1] (10.174.176.144) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Thu, 19 Nov 2020 09:55:51 +0800 Subject: Re: [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce() To: "Verma, Vishal L" , "linux-nvdimm@lists.01.org" , "Jiang, Dave" , "lenb@kernel.org" , "rjw@rjwysocki.net" , "linux-kernel@vger.kernel.org" , "Williams, Dan J" , "linux-acpi@vger.kernel.org" , "Weiny, Ira" References: <20201118084117.1937-1-thunder.leizhen@huawei.com> <1fa493113c74a0618d34f0e5d88e4402abe3e69c.camel@intel.com> From: "Leizhen (ThunderTown)" Message-ID: Date: Thu, 19 Nov 2020 09:55:50 +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: <1fa493113c74a0618d34f0e5d88e4402abe3e69c.camel@intel.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/19 4:50, Verma, Vishal L wrote: > On Wed, 2020-11-18 at 16:41 +0800, Zhen Lei wrote: >> 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(-) > > Ah good find, agreed with Dan that this is stable material. > Minor nit, I'd recommend rewording the subject line to something like: > > "acpi/nfit: fix badrange insertion in nfit_handle_mce()" OK, I will send v2. > > Otherwise, looks good to me. > 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); >