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
This commit is contained in:
parent
724ed53e8a
commit
847b2f42be
|
@ -56,46 +56,47 @@ enum clock_event_nofitiers {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct clock_event_device - clock event device descriptor
|
* struct clock_event_device - clock event device descriptor
|
||||||
* @name: ptr to clock event name
|
* @event_handler: Assigned by the framework to be called by the low
|
||||||
* @features: features
|
* level handler of the event source
|
||||||
|
* @set_next_event: set next event function
|
||||||
|
* @next_event: local storage for the next event in oneshot mode
|
||||||
* @max_delta_ns: maximum delta value in ns
|
* @max_delta_ns: maximum delta value in ns
|
||||||
* @min_delta_ns: minimum delta value in ns
|
* @min_delta_ns: minimum delta value in ns
|
||||||
* @mult: nanosecond to cycles multiplier
|
* @mult: nanosecond to cycles multiplier
|
||||||
* @shift: nanoseconds to cycles divisor (power of two)
|
* @shift: nanoseconds to cycles divisor (power of two)
|
||||||
|
* @mode: operating mode assigned by the management code
|
||||||
|
* @features: features
|
||||||
|
* @retries: number of forced programming retries
|
||||||
|
* @set_mode: set mode function
|
||||||
|
* @broadcast: function to broadcast events
|
||||||
|
* @name: ptr to clock event name
|
||||||
* @rating: variable to rate clock event devices
|
* @rating: variable to rate clock event devices
|
||||||
* @irq: IRQ number (only for non CPU local devices)
|
* @irq: IRQ number (only for non CPU local devices)
|
||||||
* @cpumask: cpumask to indicate for which CPUs this device works
|
* @cpumask: cpumask to indicate for which CPUs this device works
|
||||||
* @set_next_event: set next event function
|
|
||||||
* @set_mode: set mode function
|
|
||||||
* @event_handler: Assigned by the framework to be called by the low
|
|
||||||
* level handler of the event source
|
|
||||||
* @broadcast: function to broadcast events
|
|
||||||
* @list: list head for the management code
|
* @list: list head for the management code
|
||||||
* @mode: operating mode assigned by the management code
|
|
||||||
* @next_event: local storage for the next event in oneshot mode
|
|
||||||
* @retries: number of forced programming retries
|
|
||||||
*/
|
*/
|
||||||
struct clock_event_device {
|
struct clock_event_device {
|
||||||
const char *name;
|
void (*event_handler)(struct clock_event_device *);
|
||||||
unsigned int features;
|
int (*set_next_event)(unsigned long evt,
|
||||||
|
struct clock_event_device *);
|
||||||
|
ktime_t next_event;
|
||||||
u64 max_delta_ns;
|
u64 max_delta_ns;
|
||||||
u64 min_delta_ns;
|
u64 min_delta_ns;
|
||||||
u32 mult;
|
u32 mult;
|
||||||
u32 shift;
|
u32 shift;
|
||||||
|
enum clock_event_mode mode;
|
||||||
|
unsigned int features;
|
||||||
|
unsigned long retries;
|
||||||
|
|
||||||
|
void (*broadcast)(const struct cpumask *mask);
|
||||||
|
void (*set_mode)(enum clock_event_mode mode,
|
||||||
|
struct clock_event_device *);
|
||||||
|
const char *name;
|
||||||
int rating;
|
int rating;
|
||||||
int irq;
|
int irq;
|
||||||
const struct cpumask *cpumask;
|
const struct cpumask *cpumask;
|
||||||
int (*set_next_event)(unsigned long evt,
|
|
||||||
struct clock_event_device *);
|
|
||||||
void (*set_mode)(enum clock_event_mode mode,
|
|
||||||
struct clock_event_device *);
|
|
||||||
void (*event_handler)(struct clock_event_device *);
|
|
||||||
void (*broadcast)(const struct cpumask *mask);
|
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
enum clock_event_mode mode;
|
} ____cacheline_aligned;
|
||||||
ktime_t next_event;
|
|
||||||
unsigned long retries;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate a multiplication factor for scaled math, which is used to convert
|
* Calculate a multiplication factor for scaled math, which is used to convert
|
||||||
|
|
Loading…
Reference in New Issue