Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1202204lqe; Mon, 8 Apr 2024 01:34:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXENR9wvcCDsWDvbSsRd72L4WeSWH/jovFF/Fmd7mScR4XeNMpVLzbwNuNaAjp4cqa9a0V0PZ8uclvMnvfKv0FS8nELCdAWk4GHcuL/iQ== X-Google-Smtp-Source: AGHT+IH9xpssnjmJyA0cbPaj2W0FQyuDSB7USvrKIbB6cbeYhyo+bVeR1rxAjjMRpN3azSFLbUaa X-Received: by 2002:a9d:7453:0:b0:6ea:117b:cd5b with SMTP id p19-20020a9d7453000000b006ea117bcd5bmr4271415otk.4.1712565285402; Mon, 08 Apr 2024 01:34:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712565285; cv=pass; d=google.com; s=arc-20160816; b=sv0ZKI9Y8i9ZT65yVbzkOSxwkhyri1MyNxs4u9G6xorwe+zf0Lgi1YMqViDv3/xgQ6 NEhW950f64btHZ9lkdzn7mre/XHwcfOpvDDGGKnjIhxLJGRcX//Wf23JlAlQXNReODTU 3PG683hgT9v11D+UX8BnzAaeaA8ASGF0MaWjWUGQ3Qj26UOo0L61QhoC1csbHQz1Ku4P NsckBQrwc4xqynA2etDRdrOsGpDd1j9YF1L17FqA+WaE7ZkiJGsgGra1HsnDSFjV4TbH Tpr9OD5kz2VhyLvYB6MR9nATep1FbR8btOlYURFp3xyvqbxRVXwkRRzjIsA5jZCVstBJ bENA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=DwIuBaVU3598rLP6RQnw/uTU5QI0SwXaTGLCBiGk8YY=; fh=MwkkFvtyWWMJaNlUkovGEzbs2rtOe95UUxOwqse7SIk=; b=gCwNqUvI14pEbpP4bdpTa9qnDc+DHpAm4ZvKoF/1YLalWTI4SdrjlXcMWNvwWw+G8h X39uZTBpx+ySJG7GK+hufV8yLIF6pKEdKJdq0ukJ9Sp2nM0sQvaSVqYTomwfCNpWQKix dZ/ufCla4yMv59B8ikcqKEesz1U/Obg1tL0BnMV433I8ye1h/PA8WLWR1prEfWPY5nLc MpZKVXXICrs2nDbqBu9WYhKDveeeUXXjodLOcMKGRST4QWgjpkL4mSErXWQTXiJATHIr CU9AgJ3BRp66QtvaEGBNrX82U2BgvRW1XYhsbmmIDbNee67SwoCSHOOJ2Bzr17jmm8o5 rcRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-135049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d129-20020a633687000000b005dc89648272si6000873pga.24.2024.04.08.01.34.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 01:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-135049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3FC04B209A3 for ; Mon, 8 Apr 2024 08:34:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 295D539846; Mon, 8 Apr 2024 08:34:35 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B74343A1A1; Mon, 8 Apr 2024 08:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712565274; cv=none; b=h6W9qCoVCyiplvh2xatwAca8I0wATWXPhPwcsrcLqW+/guwJV9VzK7Ar7Nwl7W2jrTIkGyxRHc2egToDhZetBi16hD/OVj8XKYexoVoVW1eI7gKfXgINX/I7+KCCpm8nimx1BN3kbeTo2zo5XBrWc04z5qxbwftZGy8HEWZv6bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712565274; c=relaxed/simple; bh=x17ORC32Viklhe62/M9AbxsYOugUrbs6BdpjADn5zX0=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c371PMLQv4ZnDLOIs8Mvx/3QXKmgKWAQCM7TzbraJza0PakKCsfiWhOSvSBxy8E7jmXIy9wgpqAkGtvf8CQfQfhDtJCZCLqQj2iNUR11IdcN8SdkhBd8R5Fv9xT3AdhQafHmrruMSFgX4v5crSAUY5HCT2R7xz8m5GJYlGmrDd8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VCj1v1qsJz6K6hC; Mon, 8 Apr 2024 16:29:39 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 5FD81140A79; Mon, 8 Apr 2024 16:34:23 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 8 Apr 2024 09:34:22 +0100 Date: Mon, 8 Apr 2024 09:34:22 +0100 From: Jonathan Cameron To: PJ Waskiewicz CC: Lukas Wunner , Dan Williams , , , Subject: Re: [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure Message-ID: <20240408093422.000062d9@Huawei.com> In-Reply-To: References: <20240407210526.8500-1-ppwaskie@kernel.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) On Sun, 7 Apr 2024 19:03:23 -0700 PJ Waskiewicz wrote: > On 24/04/07 11:28PM, Lukas Wunner wrote: > > Hi Lukas, > > > On Sun, Apr 07, 2024 at 02:05:26PM -0700, ppwaskie@kernel.org wrote: > > > --- a/drivers/cxl/acpi.c > > > +++ b/drivers/cxl/acpi.c > > > @@ -504,7 +504,7 @@ static int cxl_get_chbs(struct device *dev, struct acpi_device *hb, > > > > > > rc = acpi_evaluate_integer(hb->handle, METHOD_NAME__UID, NULL, &uid); > > > if (rc != AE_OK) { > > > - dev_err(dev, "unable to retrieve _UID\n"); > > > + dev_err(dev, "unable to retrieve _UID. Potentially buggy BIOS\n"); > > > return -ENOENT; > > > } > > > > dev_err(dev, FW_BUG "unable to retrieve _UID\n"); > > ^^^^^^ > > > > There's a macro for that. > > Doh...it's been awhile since I've crossed buggy BIOS's. Thanks for the > review and comment. > > Updated patch: > > cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure > > From: PJ Waskiewicz > > Currently, Type 3 CXL devices (CXL.mem) can train using host CXL > drivers on Emerald Rapids systems. However, on some production > systems from some vendors, a buggy BIOS exists that improperly > populates the ACPI => PCI mappings. This leads to the cxl_acpi > driver to fail probe when it cannot find the root port's _UID, in > order to look up the device's CXL attributes in the CEDT. > > Add a bit more of a descriptive message that the lookup failure > could be a bad BIOS, rather than just "failed." > > v2: Updated message to use existing FW_BUG macro Move the change log "v2..." etc below the --- as we don't want it in the long term git log + better to send a fresh patch in a separate thread. Other than that seems reasonable to hint it is probably a bios bug - however I wonder how many other cases we should do this for and whether it is worth the effort of marking them all? Jonathan > > Signed-off-by: PJ Waskiewicz > --- > drivers/cxl/acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c > index af5cb818f84d..d321cfbd4682 100644 > --- a/drivers/cxl/acpi.c > +++ b/drivers/cxl/acpi.c > @@ -504,7 +504,7 @@ static int cxl_get_chbs(struct device *dev, struct acpi_device *hb, > > rc = acpi_evaluate_integer(hb->handle, METHOD_NAME__UID, NULL, &uid); > if (rc != AE_OK) { > - dev_err(dev, "unable to retrieve _UID\n"); > + dev_err(dev, FW_BUG "unable to retrieve _UID\n"); > return -ENOENT; > } >