lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1513323522-15021-6-git-send-email-sagar.a.kamble@intel.com>
Date:   Fri, 15 Dec 2017 13:08:20 +0530
From:   Sagar Arun Kamble <sagar.a.kamble@...el.com>
To:     linux-kernel@...r.kernel.org
Cc:     Sagar Arun Kamble <sagar.a.kamble@...el.com>,
        Richard Cochran <richardcochran@...il.com>,
        Tom Lendacky <thomas.lendacky@....com>, netdev@...r.kernel.org
Subject: [PATCH 05/27] amd-xgbe: Use timecounter_initialize interface

With new interface timecounter_initialize we can initialize timecounter
fields and underlying cyclecounter together. Update xgbe tstamp_tc
timecounter init with this new function.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@...el.com>
Cc: Richard Cochran <richardcochran@...il.com>
Cc: Tom Lendacky <thomas.lendacky@....com>
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
index 5ea4edf..486437b 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
@@ -228,7 +228,6 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata)
 {
 	struct ptp_clock_info *info = &pdata->ptp_clock_info;
 	struct ptp_clock *clock;
-	struct cyclecounter *cc = &pdata->tstamp_tc.cc;
 	u64 dividend;
 
 	snprintf(info->name, sizeof(info->name), "%s",
@@ -258,12 +257,12 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata)
 	pdata->tstamp_addend = div_u64(dividend, pdata->ptpclk_rate);
 
 	/* Setup the timecounter */
-	cc->read = xgbe_cc_read;
-	cc->mask = CLOCKSOURCE_MASK(64);
-	cc->mult = 1;
-	cc->shift = 0;
-
-	timecounter_init(&pdata->tstamp_tc, ktime_to_ns(ktime_get_real()));
+	timecounter_initialize(&pdata->tstamp_tc,
+			       xgbe_cc_read,
+			       CLOCKSOURCE_MASK(64),
+			       1,
+			       0,
+			       ktime_to_ns(ktime_get_real()));
 
 	/* Disable all timestamping to start */
 	XGMAC_IOWRITE(pdata, MAC_TSCR, 0);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ