Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d54853ef authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

[S390] ETR support.



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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c1821c2e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -125,15 +125,13 @@ 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))
		if (likely(p->code == code))
			p->handler(code);
	}
	}
	irq_exit();
	set_irq_regs(old_regs);
}
+2 −1
Original line number Diff line number Diff line
@@ -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. */
Loading