Messages in this thread | | | Date | Wed, 20 May 2015 16:20:42 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [PATCH 0/2] clockevents: Hide CLOCK_EVT_STATE_* from rest of the kernel |
| |
On Wed, 20 May 2015, Viresh Kumar wrote: > So, probably we are left with following choices: > > - Maintain state internally within the driver. SMP cases need per-cpu > storage as clkevt devices are per-cpu. Probably that's a NONO as > well ? > > - Use CLK_EVT_STATE_* directly in drivers (similar to the way we use > CLK_EVT_MODE_* today). > > - Write the routines I proposed as macros or inline functions in > clockchips.h, and use them. Of course that wouldn't stop exposing > CLK_EVT_STATE_* to rest of the kernel.
I don't think that there is anything wrong with letting drivers access it. We can make it a little bit harder to do it without accessor functions, like I did with the state in irq_data: state_use_accessors and have inline helpers to access it.
That makes it simple to grep for abusers :)
Thanks,
tglx
| |