Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1956700lqo; Mon, 13 May 2024 03:54:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNTTL1ULIzCUzhEz9dfKl+pmqtjyG5lovQmJo1zpc6QQGBMu4jKL38oW45u9MKsgpU3sz20wP7A07Zink7Fe8RRrWBT0D7NFpvS39x/w== X-Google-Smtp-Source: AGHT+IFFOBZAmtrO5CTm5QZzDVmZVxWrtIelSm/Nw74imF+bOSu9ND1bds8hTDCCvCg8jaobGZBD X-Received: by 2002:a05:6a00:2e12:b0:6f3:ea8a:f974 with SMTP id d2e1a72fcca58-6f4e029bb36mr11726481b3a.1.1715597692315; Mon, 13 May 2024 03:54:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715597692; cv=pass; d=google.com; s=arc-20160816; b=GLadYnB3oAtg9OM0S390esP5jDTrhDm4Wsmw2mJMIYS59vg/XzLFW7CgSwKQVrQEX0 er/l6bgE7bf2mZjO2yxxwx/7kppEH6msYLRAf+NepONIdJpeHGoLwIgIhpvm2yXAKx10 3WVXzpKpeearp8Z3sp0GHd/kFnHVjZHq47vOohZ0qm6iz5BL8PQWLup0zox3g1eNev1s 2gy2Xkf1wIWhQbCla1musY+F+Sn3loE6tV8s+wz1sY9yOkTMMNdZuk0/Nfe0uwcd2U75 6U7x+XPVmDoO78BD8iJcpujs+kVeOpEYhHBLT3SnWkXdhnYFrlasDmhf2QCRrIHSJZty 1QMA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ctccFuzOIHSR6wxuV6SotfOznbxPKQQaMU06/bru3UA=; fh=9Ba0DaKzo2I1dMve9dlPa9QXf3otfKRHKeoWQOhs61U=; b=MdqdnI8qbaJ9X4VayKJt4Vzkb8tuL/jAa33N+HQ+OuvDt/WZLPVLxNZSogFRbnRiRK +SbgVduBoUQ9hWn4LZ3b2InWPRgSHaSNEkil0s9ZcFYVQZkyxfYVSeRL3IXuej+B7VlL UGswXLb3t+0gYtHCf81P5qEznZU+LaVq7QTf9cU8CmIpbqt+FGQAYt5Jzq5PWHHOkHmf 7yNEPAWvmgRYCJmSRLU6p6XCo+l0oUQu9Mwn8YpneEKyrgXhA/Kyirkd5bP1eEnAwHtL ru4H7I8rim86j9mbrTD4wa26QMUWsdwmqJGkyfc1gn6EFlZLP3QcfrjzThk3/a6oE3SY Kqtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cUmZCXpX; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-177462-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177462-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f5146a1b9csi1137477b3a.367.2024.05.13.03.54.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 03:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177462-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cUmZCXpX; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-177462-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177462-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 192DA288169 for ; Mon, 13 May 2024 10:39:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E863414F121; Mon, 13 May 2024 10:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cUmZCXpX" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 AA193149DEE; Mon, 13 May 2024 10:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715596729; cv=none; b=LjEe3Hpqz0At69epOuSY9Idm9g3LuEy/Rn44UbYG25VBTtxbF8KzsWbRbhDA2t6SvNooWAO+MmE7/7czLi02ZRGdSNSZlx04hXtcI+KtYMKheymmHr1HkNvwNKqj1jO8bfeMwVU4aml0b2VaiBcqr1Upyt/uR9B5Prc7G1SvD1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715596729; c=relaxed/simple; bh=E24oiqBr9fZRW5QO8Q7Dp8xrmLM7n8Eet5142z/yLlA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BRjPE2h2dtA+UEty5+aMu/cWzK5ZNAh7bJDTaD7GjnsHpny9HvjkxIpvemVu0bPC07VXIA++qCBVcx16/BB5qun+i3DTNh0kAvk3x2A2AbJcTBxENVCQW9ML+VX/U0PkFETNu1XE4gPDyYp2q/DS/+tBqD1w1ViCssQ9Wa6N7e0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cUmZCXpX; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715596727; x=1747132727; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E24oiqBr9fZRW5QO8Q7Dp8xrmLM7n8Eet5142z/yLlA=; b=cUmZCXpXBgnUVqZqE99BZ/+cSS3PPkm+ZiMKonWvGgx8RVt0AwsFx45R g7G5xqTra0eyGdG/H/9A9r2E4Ubl31UMOZfvTdfDtxest91c872EiG7Gc rAPKyByCkgeHS3toPXz279+luTL0+nhzyS7StgTKQ/3bwQhR4mOZxUW9H x+F9AWnJJXN/6CBrkvihxFPeqbPYzeov7MKgV5n3wF+CHq9Y4INvG/f0M QmMREzm2Nx0P9ZMzAa3woaSmbCQB4JvCAHKYPaAjHBVd+UEzcIOAxguhB GwnhCx403qqnc/rvT9PSBrpDXERr2PLXryp4F+HTD+M0MmRHRptELxYuA w==; X-CSE-ConnectionGUID: 6F3UnCjBQ1SO1/ZBXFyJ8w== X-CSE-MsgGUID: 8cE+sBgQRlajLJge9EN/7g== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="29038986" X-IronPort-AV: E=Sophos;i="6.08,158,1712646000"; d="scan'208";a="29038986" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2024 03:38:46 -0700 X-CSE-ConnectionGUID: ffHlNrxyRwOrL7MFQJm/9w== X-CSE-MsgGUID: 1qZZ6hJaRCCuZyQIRuokXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,158,1712646000"; d="scan'208";a="61481729" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmviesa001.fm.intel.com with ESMTP; 13 May 2024 03:38:40 -0700 From: lakshmi.sowjanya.d@intel.com To: tglx@linutronix.de, jstultz@google.com, giometti@enneenne.com, corbet@lwn.net, linux-kernel@vger.kernel.org Cc: x86@kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, intel-wired-lan@lists.osuosl.org, andriy.shevchenko@linux.intel.com, eddie.dong@intel.com, christopher.s.hall@intel.com, jesse.brandeburg@intel.com, davem@davemloft.net, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, perex@perex.cz, linux-sound@vger.kernel.org, anthony.l.nguyen@intel.com, peter.hilber@opensynergy.com, pandith.n@intel.com, subramanian.mohan@intel.com, thejesh.reddy.t.r@intel.com, lakshmi.sowjanya.d@intel.com Subject: [PATCH v8 04/12] igc: remove convert_art_ns_to_tsc() Date: Mon, 13 May 2024 16:08:05 +0530 Message-Id: <20240513103813.5666-5-lakshmi.sowjanya.d@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240513103813.5666-1-lakshmi.sowjanya.d@intel.com> References: <20240513103813.5666-1-lakshmi.sowjanya.d@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Thomas Gleixner The core code provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. All what is required is to store the ART clocksoure ID and the cycles value in the provided system_counterval structure. Replace the direct conversion via convert_art_ns_to_tsc() by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D --- drivers/net/ethernet/intel/igc/igc_ptp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c index 885faaa7b9de..39656489d73e 100644 --- a/drivers/net/ethernet/intel/igc/igc_ptp.c +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c @@ -901,7 +901,11 @@ static bool igc_is_crosststamp_supported(struct igc_adapter *adapter) static struct system_counterval_t igc_device_tstamp_to_system(u64 tstamp) { #if IS_ENABLED(CONFIG_X86_TSC) && !defined(CONFIG_UML) - return convert_art_ns_to_tsc(tstamp); + return (struct system_counterval_t) { + .cs_id = CSID_X86_ART, + .cycles = tstamp, + .use_nsecs = true, + }; #else return (struct system_counterval_t) { }; #endif -- 2.35.3