Skip to content

Commit

Permalink
[S390] ETR support.
Browse files Browse the repository at this point in the history
This patch adds support for clock synchronization to an external time
reference (ETR). The external time reference sends an oscillator
signal and a synchronization signal every 2^20 microseconds to keep
the TOD clocks of all connected servers in sync. For availability
two ETR units can be connected to a machine. If the clock deviates
for more than the sync-check tolerance all cpus get a machine check
that indicates that the clock is out of sync. For the lovely details
how to get the clock back in sync see the code below.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Feb 5, 2007
1 parent c1821c2 commit d54853e
Show file tree
Hide file tree
Showing 13 changed files with 1,488 additions and 109 deletions.
8 changes: 3 additions & 5 deletions arch/s390/kernel/s390_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,12 @@ void do_extint(struct pt_regs *regs, unsigned short code)
* Make sure that the i/o interrupt did not "overtake"
* the last HZ timer interrupt.
*/
account_ticks();
account_ticks(S390_lowcore.int_clock);
kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
index = ext_hash(code);
for (p = ext_int_hash[index]; p; p = p->next) {
if (likely(p->code == code)) {
if (likely(p->handler))
p->handler(code);
}
if (likely(p->code == code))
p->handler(code);
}
irq_exit();
set_irq_regs(old_regs);
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,10 @@ int __devinit start_secondary(void *cpuvoid)
/* Setup the cpu */
cpu_init();
preempt_disable();
/* init per CPU timer */
/* Enable TOD clock interrupts on the secondary cpu. */
init_cpu_timer();
#ifdef CONFIG_VIRT_TIMER
/* Enable cpu timer interrupts on the secondary cpu. */
init_cpu_vtimer();
#endif
/* Enable pfault pseudo page faults on this cpu. */
Expand Down
Loading

0 comments on commit d54853e

Please sign in to comment.