mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
s390/maccess: add no DAT mode to kernel_write
To be able to patch kernel code before paging is initialized do plain memcpy if DAT is off. This is required to enable early jump label initialization. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
3047766bc6
commit
d6df52e999
@ -62,11 +62,15 @@ notrace void *s390_kernel_write(void *dst, const void *src, size_t size)
|
||||
long copied;
|
||||
|
||||
spin_lock_irqsave(&s390_kernel_write_lock, flags);
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(tmp, src, size);
|
||||
tmp += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
if (!(flags & PSW_MASK_DAT)) {
|
||||
memcpy(dst, src, size);
|
||||
} else {
|
||||
while (size) {
|
||||
copied = s390_kernel_write_odd(tmp, src, size);
|
||||
tmp += copied;
|
||||
src += copied;
|
||||
size -= copied;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&s390_kernel_write_lock, flags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user