• Heiko Carstens's avatar
    s390: introduce text_poke_sync() · e16d02ee
    Heiko Carstens authored
    Introduce a text_poke_sync() similar to what x86 has. This can be
    used to execute a serializing instruction on all CPUs (including
    the current one).
    
    Note: according to the Principles of Operation an IPI (= interrupt)
    will already serialize a CPU, however it is better to be explicit. In
    addition on_each_cpu() makes sure that also the current CPU get
    serialized - just to make sure that possible preemption can prevent
    some theoretical case where a CPU will not be serialized.
    
    Therefore text_poke_sync() has to be used whenever code got modified,
    just to avoid to rely on implicit serialization.
    
    Also introduce text_poke_sync_lock() which will also disable CPU
    hotplug, to prevent that any CPU is just going online with a
    prefetched old version of a modified instruction.
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    e16d02ee
alternative.c 2.83 KB