From patchwork Tue Apr 30 08:52:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "D, Lakshmi Sowjanya" X-Patchwork-Id: 13648500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 0275C19DF4F; Tue, 30 Apr 2024 08:53:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714467183; cv=none; b=nduDpjUm9K3Ja4KfBNIGV5BiD49CeWMB7z5GlS/QBKOw68tEiCNqdUKcwt3g9PliDvbCpugcKUSjTKjoC5Vf4GfQaIk/QI9ZZ+UU6oV1heIFqiyRMhMxwWJnPcZJQi5xTqPrPdSYVIu4lklukJuEKK/xMIga2KaakNAtoAGa1so= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714467183; c=relaxed/simple; bh=E24oiqBr9fZRW5QO8Q7Dp8xrmLM7n8Eet5142z/yLlA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BqTvCQkts29KPE0piUA/Eae0MXRKamfTzE8prBNH1OWwcBIOAbzO5gbCGSnBP5cvWek/HyfGbonoBky+sl5QlYpmb8DDlshbOnOR0BXmjtgMs1CmYPk0cLjbi0omCEcqp4mQPhys6Ab7uyYb1whfchxJzg20aU0hoCwXUV3MaP0= 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=cyW7MMSa; arc=none smtp.client-ip=198.175.65.13 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cyW7MMSa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714467183; x=1746003183; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E24oiqBr9fZRW5QO8Q7Dp8xrmLM7n8Eet5142z/yLlA=; b=cyW7MMSaFfv9+m9ekRK4v2tRnbbt18FiqXuk/y5BxrdprbXmedY7rpDO yCSPRwncz8hMd+qFDFQuSspn/+j72T0pCuUsU2APOst3nt86X+IVVIhaG 6XBF7U1/h69Bm7sgEZJ+lShDealKlI0Ilk+OOrfGmpd/daE993br7UIXO 4g3FNzRX1Z4WYE50Pi2+o7OUp1G3N21IUiyjYDmf5gO+CjRJzoe0FeRu2 e3ZRuhGE+UcIODZN/yi5yOAOfO+hLtF3GFbts0hsWKU1aRe9WARAkbfqP C0D20CCEAbGpNsiAhlEJqHABwBsq8dlPL5D0R1MCRDmf082mvY6QwyJgA Q==; X-CSE-ConnectionGUID: hTpKwsvPT5q1fCfJUr2DOA== X-CSE-MsgGUID: a0QAXQZ0QFGmpqc78qVINA== X-IronPort-AV: E=McAfee;i="6600,9927,11059"; a="21311364" X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208";a="21311364" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 01:53:01 -0700 X-CSE-ConnectionGUID: CdPgzq2HRl2lDZmLrv1utQ== X-CSE-MsgGUID: o36HLBf7SJKALATptWxugQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208";a="26891514" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orviesa007.jf.intel.com with ESMTP; 30 Apr 2024 01:52:54 -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 v7 04/12] igc: remove convert_art_ns_to_tsc() Date: Tue, 30 Apr 2024 14:22:17 +0530 Message-Id: <20240430085225.18086-5-lakshmi.sowjanya.d@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240430085225.18086-1-lakshmi.sowjanya.d@intel.com> References: <20240430085225.18086-1-lakshmi.sowjanya.d@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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