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]
Date:   Fri, 15 Dec 2017 13:08:18 +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>,
        Michal Simek <monstr@...str.eu>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Neil Armstrong <narmstrong@...libre.com>,
        Nicolai Stange <nicstange@...il.com>,
        Arnd Bergmann <arnd@...db.de>, Rob Herring <robh@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH 03/27] microblaze: Use timecounter_initialize interface

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

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@...el.com>
Cc: Richard Cochran <richardcochran@...il.com>
Cc: Michal Simek <monstr@...str.eu>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Neil Armstrong <narmstrong@...libre.com>
Cc: Nicolai Stange <nicstange@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Rob Herring <robh@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org
---
 arch/microblaze/kernel/timer.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index b7f89e9..b32a896 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -204,20 +204,21 @@ static u64 xilinx_cc_read(const struct cyclecounter *cc)
 	return xilinx_read(NULL);
 }
 
-static struct timecounter xilinx_tc = {
-	.cc.read = xilinx_cc_read,
-	.cc.mask = CLOCKSOURCE_MASK(32),
-	.cc.mult = 0,
-	.cc.shift = 8,
-};
+static struct timecounter xilinx_tc;
 
 static int __init init_xilinx_timecounter(void)
 {
-	struct cyclecounter *cc = &xilinx_tc.cc;
+	u32 mult = 0;
+	u32 shift = 8;
 
-	cc->mult = div_sc(timer_clock_freq, NSEC_PER_SEC, cc->shift);
+	mult = div_sc(timer_clock_freq, NSEC_PER_SEC, shift);
 
-	timecounter_init(&xilinx_tc, sched_clock());
+	timecounter_initialize(&xilinx_tc,
+			       xilinx_cc_read,
+			       CLOCKSOURCE_MASK(32),
+			       mult,
+			       shift,
+			       sched_clock());
 
 	return 0;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ