From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 73832941A99 for ; Mon, 4 Dec 2023 19:59:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cNGWGqCGIlsJfytHVQrH7Uf8kq1sCiuZMd45onbeKlA=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701719974; v=1; b=jSLNAmdQKV+hQvZky7GInEUknPgwTGYO4+dX40TVibexX6VAvMMXF8T2pQv8Nrmm/pzhqkm7 jiNdmm8CWKJjoEtXhI8Wuc+wYR6CACUn5hSFYpZG5gRdHlU5VNVVXxAJO5i8oDMpe+fYkCJ3Vp1 I1UEMQvRcxW+uAZDW84jYo0c= X-Received: by 127.0.0.2 with SMTP id 3zEeYY7687511xCKwdGFxoPR; Mon, 04 Dec 2023 11:59:34 -0800 X-Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) by mx.groups.io with SMTP id smtpd.web10.80459.1701719974077882727 for ; Mon, 04 Dec 2023 11:59:34 -0800 X-Received: by mail-vs1-f46.google.com with SMTP id ada2fe7eead31-46492458701so288804137.0 for ; Mon, 04 Dec 2023 11:59:33 -0800 (PST) X-Gm-Message-State: bqbyuXVxJxkbd8pETed9t3Ilx7686176AA= X-Google-Smtp-Source: AGHT+IE8q/Oe/hhpAutnlQjQP75UNK0a5sTjz/1v+Qflw80AFspZJPBuJcU59EOH7JtK65QYG725KmA7HFptrZvIaUk= X-Received: by 2002:a05:6102:2d0:b0:464:4d01:63f2 with SMTP id h16-20020a05610202d000b004644d0163f2mr1496698vsh.27.1701719972970; Mon, 04 Dec 2023 11:59:32 -0800 (PST) MIME-Version: 1.0 References: <20231204184751.348-1-nathaniel.l.desimone@intel.com> <20231204184751.348-2-nathaniel.l.desimone@intel.com> In-Reply-To: <20231204184751.348-2-nathaniel.l.desimone@intel.com> From: "Pedro Falcato" Date: Mon, 4 Dec 2023 19:59:21 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH v2] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe To: devel@edk2.groups.io, nathaniel.l.desimone@intel.com Cc: Ray Ni , Michael D Kinney Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=jSLNAmdQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Mon, Dec 4, 2023 at 6:48=E2=80=AFPM Nate DeSimone wrote: > > The DXE & MM standalone variant of AcpiTimerLib defines a global > named mPerformanceCounterFrequency. A global with an identical > name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > > Since XhciDxe has a dependency on TimerLib, this can cause link > errors due to the same symbol being defined twice if the platform > DSC chooses to use AcpiTimerLib as the TimerLib implementation for > any given platform. > > To resolve this, I have changed made the definition of > mPerformanceCounterFrequency to static and renamed it to > mAcpiTimerLibTscFrequency. Since this variable is not used outside > of the DxeStandaloneMmAcpiTimerLib.c compilation unit, there is no > reason to have it exported as a global. > > Cc: Ray Ni > Cc: Michael D Kinney > Signed-off-by: Nate DeSimone > --- > .../AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimer= Lib.c b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c > index 16ac48938f..ccceb8a649 100644 > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c > +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c > @@ -1,7 +1,7 @@ > /** @file > ACPI Timer implements one instance of Timer Library. > > - Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
> + Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent > > **/ > @@ -11,6 +11,11 @@ > #include > #include > > +// > +// Cached performance counter frequency > +// > +static UINT64 mAcpiTimerLibTscFrequency =3D 0; I'd say you don't need to rename it if it's a static variable. Now the identifier is 2x longer with no additional relevant information. Aren't we supposed to use STATIC vs static, CONST vs const, etc? Annoyingly= :/ --=20 Pedro -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112051): https://edk2.groups.io/g/devel/message/112051 Mute This Topic: https://groups.io/mt/102976788/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-