Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1559202lqe; Mon, 8 Apr 2024 12:30:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvgip+H0ShorEaPDog81i9t2Y11iagfDBhdG2UHVSzoLKoVTQY1hcuzNG5GlL9wDL7eRj3FVjf0q2mM9wEXR+zo5UN1cyvh3jXB5hNwg== X-Google-Smtp-Source: AGHT+IGSe6lDQ6flqVPd3RpKBgEAO9QbcutNrgRrQ9fzCsgYofuaX0RRItiBwUy34xBHEPlLOKRD X-Received: by 2002:a05:6122:3a87:b0:4da:d617:520c with SMTP id fq7-20020a0561223a8700b004dad617520cmr3165514vkb.13.1712604606662; Mon, 08 Apr 2024 12:30:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712604606; cv=pass; d=google.com; s=arc-20160816; b=NWRyLYU5+VlqAdsxq79tI+QfFeNwu0UWUrT+YfQAu+3ATAUkps67Atq6lB38AkevbH bvmLeZoegPbZthZaKcK5h/ySoiNu+htopq5cLuAkWYiwv50tY/kzO+xVH5j349fdDUZg KORu15TjashB2PTdw1VmRPjlJqAB2BJ+bHgsntPnXs8LLsDIuuDX+GEDtvguWFtIKr8n GyXDAdTQBi9dHLIRdBiPapGAE3BuBa1s3zK9qel/l3udZRrHtnvORePkDRgJnISn0Rk3 Hk5pme3lki3fve/AVoXCU8NsLAUB7HjBrny4j6I4LVEFLmeBRLGUoz1VFje5CR55VXRd VVKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yN6bFhwdl5sICPVPEYEcKQ5mIe1fZP4wvXP11Uicvo4=; fh=+J42hpa7CB/JKTYKT+AdpwWOqpes+0kZwerFvGLDums=; b=aovEQVJ1m1cSfYYoYV3TP4XV6Nmv8XAwEFJ71dDZ4Dr2Q07unF1WOB+eWYI6kaVnCS p7IOtARO7V6UDIRvpMpEJfeRPc/f1HlWydXy+FBlpmSDqPcqX0cgR5SyOMXsuRmjVyGb IpC37envTkOh1jfVlKgjTvo+xbHAfsiNpkI+BjkJbBobJ1cTWnqQVcBOmcYUQYgWsz2+ VZnogcAdtwIzhK7RiVFFsU8njqAq33F62xlK+IijiDbRSjW7rSow6c3i2xkABTEAVKKT ZwMjgLuQLGgQHhTbK0eMl0Vl6JgNr/JKsor+wxM/zqsrt83rVoKYZUjeAjMpuVYEXlK+ 9J8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WiNzgSM5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z10-20020a0cfeca000000b0069b1f7e3a0dsi1825873qvs.510.2024.04.08.12.30.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 12:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WiNzgSM5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6269B1C221C1 for ; Mon, 8 Apr 2024 19:30:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3C6A146000; Mon, 8 Apr 2024 19:29:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WiNzgSM5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0A964847B; Mon, 8 Apr 2024 19:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712604596; cv=none; b=Lk88k62251Bnj8WajstkXmAIAQxPF1f+7pedAeT+0PfRlN66zOw3IJFLBmRQbxF27foNO0uBc1uvdAvIwvtOR4sVmtyuc/W0uanUWvl2Tp4BtRhAxRFS4b2jEuDqzP/rngyFYlr3eof2GUyE+WsPTVgoMouY3nmekEhUej+UXYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712604596; c=relaxed/simple; bh=1UUcvMJHOtwmpTvXNKrcpf/ImAQ3BMCEn7Pokve/y0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g4uABAMqPtj+JY9nDRPB/Zj6ijfTvdoDOwTUBzjVyd6vlCiytMQDBxRcKH0nAs0EJ0VFTo6WEmuLciVSPuIa51c640YysO43fVqE2n6iP/5XnAjMzf4IiJw26hpj4kwjpBkvbzQOFzeHzF9QPf8Ru0SQVrO3ThfcLGRFSDq6Z1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WiNzgSM5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06E0EC433C7; Mon, 8 Apr 2024 19:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712604595; bh=1UUcvMJHOtwmpTvXNKrcpf/ImAQ3BMCEn7Pokve/y0A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WiNzgSM5uXPmYN1B3ICo5srAuEowWqvM/1wA4fhzjZiWxWY6bkE6MPYpk44Rb3G4q xvZCz1vsJEcpXL0h+sjVAqOvAYnhVIo45eAM+GCyRQSzdHAcu8OW3ZiY4UE0zm09z0 EHeNOMQ/6XOEDIfavkN9zDw1Ov7lAYUi7OGtZEOFzjo5swdY0A+r9/fUp4eJYehjAU u2awsNlFVbPn30pwjFMKQYa5JeDtwHY24S0dk/dyo9QG/qpT2r5ZrE0M3QuJMVh8nP IpElzQAR+sLGC5MzEirNxayV1ycpVnPKzLpmOtWyD1MA+X4oFg52cHjK/cck4k8cT/ XRP5OZ6mb4C1w== Date: Mon, 8 Apr 2024 12:29:53 -0700 From: PJ Waskiewicz To: Jonathan Cameron Cc: Lukas Wunner , Dan Williams , linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure Message-ID: References: <20240407210526.8500-1-ppwaskie@kernel.org> <20240408093422.000062d9@Huawei.com> 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=utf-8 Content-Disposition: inline In-Reply-To: <20240408093422.000062d9@Huawei.com> On 24/04/08 09:34AM, Jonathan Cameron wrote: > 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. Thanks, it's been awhile, and my normal (i.e. old) workflow isn't available to me just quite yet. I can fix and send a new patch, but I'll hold off and see what Dan's thoughts are after my reply to his reply. > 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? I can confirm this was definitely a BIOS bug in this particular case. The vendor spun a quick test BIOS for us to test on an EMR and SPR host, and the _UID's were finally correct. I could successfully walk the CEDT and get to the CAPS structs I was after (link speed, bus width, etc.). I'd be fine also marking the others, but I don't have any easy way to validate that I'd hit those cases. My BIOS for this platform is only minorly broken. I suppose it could be mocked in QEMU to cause those to fail... -PJ