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 97FA3AC0EB3 for ; Fri, 9 Feb 2024 09:42:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=AQm9DkIdDa3l8i7sUp8axTHndvN72eP25+GdHT08i5w=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707471736; v=1; b=qy7NU3UErZf4XRX8r349YAQSAYbx4obskWN4yZxcUWhVyDjI3UQkvYAPJCNTveyO7gOdsKq+ uhq09LOUHTKn1rL4xNky29S0j6mFN9hFXRX9Rij6TQiNPVilmAx3Nz9DE9l81FgMudHe3eTORuS MiVfcsLwqTNPZSAi+ZbS/iEE= X-Received: by 127.0.0.2 with SMTP id NMFyYY7687511xwKquJXTSn4; Fri, 09 Feb 2024 01:42:16 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.7920.1707471735537539727 for ; Fri, 09 Feb 2024 01:42:15 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-147-7fJY7mWQNZ6Cotv2ONStrw-1; Fri, 09 Feb 2024 04:42:11 -0500 X-MC-Unique: 7fJY7mWQNZ6Cotv2ONStrw-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6BA41005055; Fri, 9 Feb 2024 09:42:10 +0000 (UTC) X-Received: from [10.39.193.114] (unknown [10.39.193.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7DA51C02EB3; Fri, 9 Feb 2024 09:42:07 +0000 (UTC) Message-ID: Date: Fri, 9 Feb 2024 10:42:06 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2] MdeModulePkg/XhciDxe: Non-zero start/stop values in XhcGetElapsedTicks To: "Henz, Patrick (IMC Firmware Engineering)" , "devel@edk2.groups.io" Cc: "hao.a.wu@intel.com" , "ray.ni@intel.com" , Michael Kinney , "Liming Gao (Byosoft address)" References: <00c1038dda20f983fdcd6aab19dffc82324b6ad4.1707232975.git.patrick.henz@hpe.com> <0a5162ef-d2ab-a15b-af54-93ceaf656949@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: i3uyMZwifgzeTLFfbxXZiFIkx7686176AA= Content-Language: en-US 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=qy7NU3UE; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.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 2/7/24 22:07, Henz, Patrick (IMC Firmware Engineering) wrote: > Hi Laszlo, >=20 >> How does this patch differ from your v1, from October last year: >=20 > There's a conflict with my previous changes and those found in commit ff4= c49a5ee38d613384fb2e318d891a800d32999, some global variables in Xhci.c were= renamed, adding an Xhci prefix. My V2 patch is the same as V1, just with t= he updated globals. >=20 >> I'm really sorry that your v1 patch didn't get merged. >=20 > No worries!=20 OK, I guess the feedback tags given for v1 should carry over such a context change / rename. Do you want to post a v3 with the v1 feedback tags correctly picked up? (This is a question I could be asking for Liming's or Ray's sake, because I believe they're supposed to merge the patch.) Thanks Laszlo >=20 > Thanks, > Patrick Henz >=20 > -----Original Message----- > From: Laszlo Ersek =20 > Sent: Wednesday, February 7, 2024 3:00 PM > To: devel@edk2.groups.io; Henz, Patrick (IMC Firmware Engineering) > Cc: hao.a.wu@intel.com; ray.ni@intel.com; Michael Kinney ; Liming Gao (Byosoft address) > Subject: Re: [edk2-devel] [PATCH v2] MdeModulePkg/XhciDxe: Non-zero start= /stop values in XhcGetElapsedTicks >=20 > Hi Patrick, >=20 > (CC Liming, Mike) >=20 > On 2/6/24 16:29, Henz, Patrick wrote: >> From: Patrick Henz >> >> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4578 >> >> The implementation of XhcGetElapsedTicks did not account for non-zero=20 >> start and stop values for the performance counter timer, potentially=20 >> resulting in an incorrect elapsed tick count getting returned to the=20 >> caller. Account for non-zero start and stop values when calculating=20 >> the elapsed tick count. >> >> Cc: Hao A Wu >> Cc: Ray Ni >> Signed-off-by: Patrick Henz >> Reviewed-by: >> --- >> MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > How does this patch differ from your v1, from October last year: >=20 > https://edk2.groups.io/g/devel/message/110434 > message-id: > >=20 > That version was: >=20 > Acked-by: Hao A Wu > Reviewed-by: Laszlo Ersek >=20 > If this patch is the same (effectively a repost), then I have two comment= s: >=20 > - the Reviewed-by line on v2 is incomplete, plus the patch is missing Hao= 's Acked-by >=20 > - I'm really sorry that your v1 patch didn't get merged. I think we shoul= d just apply v1, with the feedback tags given back then. IMO the patch cert= ainly qualifies for the feature freeze (even the hard one), because it is a= bugfix. >=20 > At this development phase, I can't merge your v1, but Liming or Mike coul= d. Mike, Liming: can you git-am Patrick's v1, and pick up the feedback tags= , for merging? >=20 > Thanks! > Laszlo >=20 >=20 >> >> diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c=20 >> b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c >> index f4e61d223c..ff641d0130 100644 >> --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c >> +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c >> @@ -2389,7 +2389,7 @@ XhcGetElapsedTicks ( >> // Counter counts upwards, check for an overflow condition >> // >> if (*PreviousTick > CurrentTick) { >> - Delta =3D (mXhciPerformanceCounterEndValue - *PreviousTick) + Cur= rentTick; >> + Delta =3D (CurrentTick - mXhciPerformanceCounterStartValue) +=20 >> + (mXhciPerformanceCounterEndValue - *PreviousTick); >> } else { >> Delta =3D CurrentTick - *PreviousTick; >> } >> @@ -2398,7 +2398,7 @@ XhcGetElapsedTicks ( >> // Counter counts downwards, check for an underflow condition >> // >> if (*PreviousTick < CurrentTick) { >> - Delta =3D (mXhciPerformanceCounterStartValue - CurrentTick) + *Pr= eviousTick; >> + Delta =3D (mXhciPerformanceCounterStartValue - CurrentTick) +=20 >> + (*PreviousTick - mXhciPerformanceCounterEndValue); >> } else { >> Delta =3D *PreviousTick - CurrentTick; >> } >=20 -=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 (#115292): https://edk2.groups.io/g/devel/message/115292 Mute This Topic: https://groups.io/mt/104199605/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-