dev_id is specified per struct irqaction, which is registered once per
irq number. However, each core has a separate clock_event_device. Since
the timer irq has the same irq number on both cores, we need to know
what core we are on to know which clock_event_device is the correct one.
The reason is I had a common function for reading a timer count, but
sometimes we want to read the cpu local timer, such as in the case of
set_next_event, but sometimes I want to read a global timer, which is at
a different address. However, you are right that it is silly to put a
conditional there, especially when which branch I want is static at the
callsite.
Done.
The clockevent could be the local_clock_event, which is not embedded
into a struct msm_clock. However, its parameters will be the same as one
of the existing msm_clock entries, so use that.
Done.
Done.
As stated by Russell, this is due to the fact that the timer interrupts
are private to each core, and share the same irq number on each core.
Done.
So what needs to be done in local_timer_stop? Just stopping the timer
from ticking? Aren't I going to want to do all the same things my
set_mode function does in the shutdown case? I understand not calling
into the clockevents functions, would you be opposed to me directly
calling my set_mode function?
-Jeff
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--