History log of /fuchsia/zircon/kernel/arch/x86/asm.S
Revision Date Author Comments
# 5881b59a 13-Apr-2018 Roland McGrath <mcgrathr@google.com>

[kernel][x86] Make _idt_startup uses position-independent without a fixup

Change-Id: I3351796fde7f2b26279fa4032ba9434b42c37635


# 3e988edd 15-Oct-2017 Mateusz Guzik <mjguzik@gmail.com>

[kernel][x86] cleanup spinlocks

Since xchg always modifies the lock, the cpu number stored gets replaced
by random threads attempting to grab the lock. While it does not affect
correctness, it hinders debugging. Replace xchg use with lock cmpxchg.
Problem spotted by teisenbe@.

lock:
Stop doing forward jump in the fast path, instead resort to jumping only
in case of contention. This saves on branch misprediction.

Note that contended behaviour remains simplistic: lock value is
repeatedly checked with pause in-between.

unlock:
amd64 has strong enough ordering that a mere write is sufficient to
unlock. Thus replace the heavy-weight xchg with mov.

This significantly speeds up lock/unlock as reported by k bench:
40 vs 21 just lock/unlock
58 vs 43 w/irqsave (already disabled)
62 vs 44 w/irqsave

Change-Id: Ie5ba95964333f559ae223341cf2ec0c2e0c446a9


# 650c7c1a 11-Oct-2017 Roland McGrath <mcgrathr@google.com>

[kernel][x86] Remove arch/x86/64/ subdirectory

Zircon only supports x86-64.
The historical subdirectory split just makes it harder to find all the code.

Change-Id: I7c828660bd1d4d277718aa74f35a3fab5f2333ea