diff options
| -rw-r--r-- | drivers/clocksource/arc_timer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/clocksource/arc_timer.c b/drivers/clocksource/arc_timer.c index 471b428d8034..20da9b1d7f7d 100644 --- a/drivers/clocksource/arc_timer.c +++ b/drivers/clocksource/arc_timer.c | |||
| @@ -61,6 +61,20 @@ static u64 arc_read_gfrc(struct clocksource *cs) | |||
| 61 | unsigned long flags; | 61 | unsigned long flags; |
| 62 | u32 l, h; | 62 | u32 l, h; |
| 63 | 63 | ||
| 64 | /* | ||
| 65 | * From a programming model pov, there seems to be just one instance of | ||
| 66 | * MCIP_CMD/MCIP_READBACK however micro-architecturally there's | ||
| 67 | * an instance PER ARC CORE (not per cluster), and there are dedicated | ||
| 68 | * hardware decode logic (per core) inside ARConnect to handle | ||
| 69 | * simultaneous read/write accesses from cores via those two registers. | ||
| 70 | * So several concurrent commands to ARConnect are OK if they are | ||
| 71 | * trying to access two different sub-components (like GFRC, | ||
| 72 | * inter-core interrupt, etc...). HW also supports simultaneously | ||
| 73 | * accessing GFRC by multiple cores. | ||
| 74 | * That's why it is safe to disable hard interrupts on the local CPU | ||
| 75 | * before access to GFRC instead of taking global MCIP spinlock | ||
| 76 | * defined in arch/arc/kernel/mcip.c | ||
| 77 | */ | ||
| 64 | local_irq_save(flags); | 78 | local_irq_save(flags); |
| 65 | 79 | ||
| 66 | __mcip_cmd(CMD_GFRC_READ_LO, 0); | 80 | __mcip_cmd(CMD_GFRC_READ_LO, 0); |
