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:	Wed, 20 May 2015 14:36:55 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH 1/2] clockevents: Move 'enum clock_event_state' to tick-internal.h

CLOCK_EVT_STATE_* symbols are local to the kernel/time and shouldn't be
exposed to other parts of the kernel.

They were added to clockchips.h as there was one external user
(arch/arm/common/bL_switcher.c).

That is modified now to not use these symbols directly:
7270d11c56f5 ("arm/bL_switcher: Kill tick suspend hackery")

We can now move them to a file local to kernel/time.

Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
 include/linux/clockchips.h  | 23 +----------------------
 kernel/time/tick-internal.h | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 271fa4c8eb29..62d3007f8a8c 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -28,27 +28,6 @@ enum clock_event_mode {
 };
 
 /*
- * Possible states of a clock event device.
- *
- * DETACHED:	Device is not used by clockevents core. Initial state or can be
- *		reached from SHUTDOWN.
- * SHUTDOWN:	Device is powered-off. Can be reached from PERIODIC or ONESHOT.
- * PERIODIC:	Device is programmed to generate events periodically. Can be
- *		reached from DETACHED or SHUTDOWN.
- * ONESHOT:	Device is programmed to generate event only once. Can be reached
- *		from DETACHED or SHUTDOWN.
- * ONESHOT_STOPPED: Device was programmed in ONESHOT mode and is temporarily
- *		    stopped.
- */
-enum clock_event_state {
-	CLOCK_EVT_STATE_DETACHED,
-	CLOCK_EVT_STATE_SHUTDOWN,
-	CLOCK_EVT_STATE_PERIODIC,
-	CLOCK_EVT_STATE_ONESHOT,
-	CLOCK_EVT_STATE_ONESHOT_STOPPED,
-};
-
-/*
  * Clock event features
  */
 # define CLOCK_EVT_FEAT_PERIODIC	0x000001
@@ -117,7 +96,7 @@ struct clock_event_device {
 	u32			mult;
 	u32			shift;
 	enum clock_event_mode	mode;
-	enum clock_event_state	state;
+	unsigned int		state;
 	unsigned int		features;
 	unsigned long		retries;
 
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 65273f0a11ed..04820f64146e 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -12,6 +12,27 @@
 # define TICK_DO_TIMER_NONE	-1
 # define TICK_DO_TIMER_BOOT	-2
 
+/*
+ * Possible states of a clock event device.
+ *
+ * DETACHED:	Device is not used by clockevents core. Initial state or can be
+ *		reached from SHUTDOWN.
+ * SHUTDOWN:	Device is powered-off. Can be reached from PERIODIC or ONESHOT.
+ * PERIODIC:	Device is programmed to generate events periodically. Can be
+ *		reached from DETACHED or SHUTDOWN.
+ * ONESHOT:	Device is programmed to generate event only once. Can be reached
+ *		from DETACHED or SHUTDOWN.
+ * ONESHOT_STOPPED: Device was programmed in ONESHOT mode and is temporarily
+ *		    stopped.
+ */
+enum clock_event_state {
+	CLOCK_EVT_STATE_DETACHED,
+	CLOCK_EVT_STATE_SHUTDOWN,
+	CLOCK_EVT_STATE_PERIODIC,
+	CLOCK_EVT_STATE_ONESHOT,
+	CLOCK_EVT_STATE_ONESHOT_STOPPED,
+};
+
 DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
 extern ktime_t tick_next_period;
 extern ktime_t tick_period;
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ