diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-18 17:33:41 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-19 08:24:15 -0400 |
commit | 847b2f42be203f3cff7f243fdd3ee50c1e06c882 (patch) | |
tree | 18447792ac25ac001aaf2e22fda7eec3183a162d /include/linux/clockchips.h | |
parent | 724ed53e8ac2c5278af8955673049714c1073464 (diff) |
clockevents: Restructure clock_event_device members
Group the hot path members of struct clock_event_device together so we
have a better cache line footprint. Make it cacheline aligned.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Link: http://lkml.kernel.org/r/%3C20110518210136.223607682%40linutronix.de%3E
Diffstat (limited to 'include/linux/clockchips.h')
-rw-r--r-- | include/linux/clockchips.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index fc53492b6ad7..9466eebc8e19 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -56,46 +56,47 @@ enum clock_event_nofitiers { | |||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * struct clock_event_device - clock event device descriptor | 58 | * struct clock_event_device - clock event device descriptor |
59 | * @name: ptr to clock event name | 59 | * @event_handler: Assigned by the framework to be called by the low |
60 | * @features: features | 60 | * level handler of the event source |
61 | * @set_next_event: set next event function | ||
62 | * @next_event: local storage for the next event in oneshot mode | ||
61 | * @max_delta_ns: maximum delta value in ns | 63 | * @max_delta_ns: maximum delta value in ns |
62 | * @min_delta_ns: minimum delta value in ns | 64 | * @min_delta_ns: minimum delta value in ns |
63 | * @mult: nanosecond to cycles multiplier | 65 | * @mult: nanosecond to cycles multiplier |
64 | * @shift: nanoseconds to cycles divisor (power of two) | 66 | * @shift: nanoseconds to cycles divisor (power of two) |
67 | * @mode: operating mode assigned by the management code | ||
68 | * @features: features | ||
69 | * @retries: number of forced programming retries | ||
70 | * @set_mode: set mode function | ||
71 | * @broadcast: function to broadcast events | ||
72 | * @name: ptr to clock event name | ||
65 | * @rating: variable to rate clock event devices | 73 | * @rating: variable to rate clock event devices |
66 | * @irq: IRQ number (only for non CPU local devices) | 74 | * @irq: IRQ number (only for non CPU local devices) |
67 | * @cpumask: cpumask to indicate for which CPUs this device works | 75 | * @cpumask: cpumask to indicate for which CPUs this device works |
68 | * @set_next_event: set next event function | ||
69 | * @set_mode: set mode function | ||
70 | * @event_handler: Assigned by the framework to be called by the low | ||
71 | * level handler of the event source | ||
72 | * @broadcast: function to broadcast events | ||
73 | * @list: list head for the management code | 76 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | ||
75 | * @next_event: local storage for the next event in oneshot mode | ||
76 | * @retries: number of forced programming retries | ||
77 | */ | 77 | */ |
78 | struct clock_event_device { | 78 | struct clock_event_device { |
79 | const char *name; | 79 | void (*event_handler)(struct clock_event_device *); |
80 | unsigned int features; | 80 | int (*set_next_event)(unsigned long evt, |
81 | struct clock_event_device *); | ||
82 | ktime_t next_event; | ||
81 | u64 max_delta_ns; | 83 | u64 max_delta_ns; |
82 | u64 min_delta_ns; | 84 | u64 min_delta_ns; |
83 | u32 mult; | 85 | u32 mult; |
84 | u32 shift; | 86 | u32 shift; |
87 | enum clock_event_mode mode; | ||
88 | unsigned int features; | ||
89 | unsigned long retries; | ||
90 | |||
91 | void (*broadcast)(const struct cpumask *mask); | ||
92 | void (*set_mode)(enum clock_event_mode mode, | ||
93 | struct clock_event_device *); | ||
94 | const char *name; | ||
85 | int rating; | 95 | int rating; |
86 | int irq; | 96 | int irq; |
87 | const struct cpumask *cpumask; | 97 | const struct cpumask *cpumask; |
88 | int (*set_next_event)(unsigned long evt, | ||
89 | struct clock_event_device *); | ||
90 | void (*set_mode)(enum clock_event_mode mode, | ||
91 | struct clock_event_device *); | ||
92 | void (*event_handler)(struct clock_event_device *); | ||
93 | void (*broadcast)(const struct cpumask *mask); | ||
94 | struct list_head list; | 98 | struct list_head list; |
95 | enum clock_event_mode mode; | 99 | } ____cacheline_aligned; |
96 | ktime_t next_event; | ||
97 | unsigned long retries; | ||
98 | }; | ||
99 | 100 | ||
100 | /* | 101 | /* |
101 | * Calculate a multiplication factor for scaled math, which is used to convert | 102 | * Calculate a multiplication factor for scaled math, which is used to convert |