Logo
Explore Help
Register Sign In
leandrof/linux
1
0
Fork 0
You've already forked linux
Code Issues Pull Requests Packages Projects Releases Wiki Activity
Files
00f6ebbd0177a4cb15b353bbd4eaee6372fdbbc2
linux/arch/s390/include/asm/text-patching.h

17 lines
301 B
C
Raw Normal View History

s390: introduce text_poke_sync() 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: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2021-10-01 12:47:01 +02:00
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_S390_TEXT_PATCHING_H
#define _ASM_S390_TEXT_PATCHING_H
#include <asm/barrier.h>
static __always_inline void sync_core(void)
{
bcr_serialize();
}
void text_poke_sync(void);
void text_poke_sync_lock(void);
#endif /* _ASM_S390_TEXT_PATCHING_H */
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.1 Page: 514ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API