From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CB2343C60 for ; Thu, 7 Mar 2024 02:33:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E31442E7A; Thu, 7 Mar 2024 02:33:22 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 3460740E5A for ; Thu, 7 Mar 2024 02:33:21 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33d36736d4eso204470f8f.1 for ; Wed, 06 Mar 2024 17:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775201; x=1710380001; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xd3SU6DBLK7djwYZJ9jBvA5SaMB5lYuigIAjHkNhzwY=; b=V8wA+OQVtejv3xKyK9huHwZW/Mw6jHFUHWw9wUreuGWHeSHyzXChSz0oxeSaAEUchD JPX/x2alQdgyPFMeex4Elu2CyJETyFj8EcnTnFKb3lasuXzOwUTeAWNRyAXM0914S2pL f8wSPFFjjmZxwlOT1q9x5GMhU/9v6l1T2Er+xZh3t+vfh4XWRwXy6DEh806rVkWjZQJB Xh0RSX8EuCZKq9bHktKP6E7wZ+cgKBAB7s0phuTPAB8qIwpMT+llbGPyu08m4BM+KWoQ 4p9g8NTj8Yw8KsqMAO7pTL6hGzaY9zX2uxbEXblQ1qJJAOX1LA+84KJgY9VtLiAfrl2k TTXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775201; x=1710380001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xd3SU6DBLK7djwYZJ9jBvA5SaMB5lYuigIAjHkNhzwY=; b=TqVLEypINreEYzFaNFKZNzkTbV8VcrEAiR+j3YAgFcEp6oeCkihd57K1bWh5Kx3ZfO QevT52bjpbRVd293YI3/i3J1sARbkEZ2VxNbnPymyE8hKvA2MUVSeVqu4zoZmPhwVFB6 DJ4FqBRhg8T8nM6lTjE4CefatVnsXaNscvQdV19uSmTiPgkY7d7jjVtu6EJjfxYuDxv8 pr0dpKIk5+sWzKzjn9ht8fvbYyJU9GsJ7h6xBzSQnkeg7mDcHRh+XAPEz4MbKiZjgBrZ FDw3ZgHKbwY6xtowsLgGGIDEP1h2Akd5Rix1GnpZzKzOJOSBLClO7RjWsTylHe2rXLlA AIdg== X-Forwarded-Encrypted: i=1; AJvYcCVOjAT5AlvS1KRMTZdk3vOONcwNfNNr2njLGTDRivv1mwbz8rga6j1D3vOZgIDZyY+f2oFqeev5jzYWgAyclYQ= X-Gm-Message-State: AOJu0YyJMC1zOH98rI7/+CQODQgNFKknhxM2WqZ3kXneFdx1CZHaYzZt 2htnoW1e0Is3G5McUukKB8pUJVZ/ksF38i3onzMSuXdzw/oe5+1Se5JQaUav X-Google-Smtp-Source: AGHT+IE13M+KMdWMLTAdpjZdjMThXnm/QSLH/n6Ebd7XUA4+2yP6Q0YqHUL7ipgEOKeqGgQZdzDGgg== X-Received: by 2002:adf:ea51:0:b0:33e:1603:f0f0 with SMTP id j17-20020adfea51000000b0033e1603f0f0mr11732899wrn.30.1709775200822; Wed, 06 Mar 2024 17:33:20 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id l9-20020a056000022900b0033cf2063052sm18742058wrz.111.2024.03.06.17.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:33:20 -0800 (PST) From: luca.boccassi@gmail.com To: Sivaprasad Tummala Cc: Ferruh Yigit , dpdk stable Subject: patch 'eal/x86: add AMD vendor check for TSC calibration' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:30:36 +0000 Message-Id: <20240307013159.1735343-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Thanks. Luca Boccassi --- >From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001 From: Sivaprasad Tummala Date: Wed, 22 Nov 2023 23:27:30 -0800 Subject: [PATCH] eal/x86: add AMD vendor check for TSC calibration [ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ] AMD Epyc processors doesn't support get_tsc_freq_arch(). The patch allows graceful return to allow fallback to alternate TSC calibration. Fixes: 3dbc565e81a0 ("timer: honor arch-specific TSC frequency query") Signed-off-by: Sivaprasad Tummala Acked-by: Ferruh Yigit --- lib/eal/x86/rte_cycles.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/eal/x86/rte_cycles.c b/lib/eal/x86/rte_cycles.c index 0e695caf28..2a601d7035 100644 --- a/lib/eal/x86/rte_cycles.c +++ b/lib/eal/x86/rte_cycles.c @@ -6,6 +6,10 @@ #include #include +#define x86_vendor_amd(t1, t2, t3) \ + ((t1 == 0x68747541) && /* htuA */ \ + (t2 == 0x444d4163) && /* DMAc */ \ + (t3 == 0x69746e65)) /* itne */ #include "eal_private.h" @@ -90,6 +94,18 @@ get_tsc_freq_arch(void) uint8_t mult, model; int32_t ret; +#ifdef RTE_TOOLCHAIN_MSVC + __cpuid(cpuinfo, 0); + a = cpuinfo[0]; + b = cpuinfo[1]; + c = cpuinfo[2]; + d = cpuinfo[3]; +#else + __cpuid(0, a, b, c, d); +#endif + if (x86_vendor_amd(b, c, d)) + return 0; + /* * Time Stamp Counter and Nominal Core Crystal Clock * Information Leaf -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:36.676799989 +0000 +++ 0019-eal-x86-add-AMD-vendor-check-for-TSC-calibration.patch 2024-03-07 01:05:34.694937810 +0000 @@ -1 +1 @@ -From 31d72ff4dc7c057366153e9918ac92bf9123a3bc Mon Sep 17 00:00:00 2001 +From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 69ed59b4f0..f147a5231d 100644 +index 0e695caf28..2a601d7035 100644 @@ -23 +24,2 @@ -@@ -10,6 +10,10 @@ +@@ -6,6 +6,10 @@ + #include @@ -25 +26,0 @@ - #endif @@ -34 +35 @@ -@@ -110,6 +114,18 @@ get_tsc_freq_arch(void) +@@ -90,6 +94,18 @@ get_tsc_freq_arch(void)