mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
timekeeping: Define a struct type for tk_core to make it reusable
The struct tk_core uses is not reusable. As long as there is only a single timekeeper, this is not a problem. But when the timekeeper infrastructure will be reused for per ptp clock timekeepers, an explicit struct type is required. Define struct tk_data as explicit struct type for tk_core. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <jstultz@google.com> Link: https://lore.kernel.org/all/20241009-devel-anna-maria-b4-timers-ptp-timekeeping-v2-10-554456a44a15@linutronix.de
This commit is contained in:
parent
8c4799b184
commit
10f7c178a9
|
@ -45,12 +45,14 @@ enum timekeeping_adv_mode {
|
||||||
* The most important data for readout fits into a single 64 byte
|
* The most important data for readout fits into a single 64 byte
|
||||||
* cache line.
|
* cache line.
|
||||||
*/
|
*/
|
||||||
static struct {
|
struct tk_data {
|
||||||
seqcount_raw_spinlock_t seq;
|
seqcount_raw_spinlock_t seq;
|
||||||
struct timekeeper timekeeper;
|
struct timekeeper timekeeper;
|
||||||
struct timekeeper shadow_timekeeper;
|
struct timekeeper shadow_timekeeper;
|
||||||
raw_spinlock_t lock;
|
raw_spinlock_t lock;
|
||||||
} tk_core ____cacheline_aligned;
|
} ____cacheline_aligned;
|
||||||
|
|
||||||
|
static struct tk_data tk_core;
|
||||||
|
|
||||||
/* flag for if timekeeping is suspended */
|
/* flag for if timekeeping is suspended */
|
||||||
int __read_mostly timekeeping_suspended;
|
int __read_mostly timekeeping_suspended;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user