mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
s390/page: Add memory clobber to page_set_storage_key()
Add memory clobbers to the page_set_storage_key() inline assemblies. This allows for data dependencies from other code, which is important to prevent the compiler from reordering instructions if required. Note that this doesn't fix a bug in existing code; this is just a prerequisite for upcoming code changes. Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
committed by
Alexander Gordeev
parent
839d364e41
commit
ac5bf06650
@@ -134,12 +134,14 @@ static inline void page_set_storage_key(unsigned long addr,
|
||||
asm volatile(
|
||||
" .insn rrf,0xb22b0000,%[skey],%[addr],8,0"
|
||||
:
|
||||
: [skey] "d" (skey), [addr] "a" (addr));
|
||||
: [skey] "d" (skey), [addr] "a" (addr)
|
||||
: "memory");
|
||||
} else {
|
||||
asm volatile(
|
||||
" sske %[skey],%[addr]"
|
||||
:
|
||||
: [skey] "d" (skey), [addr] "a" (addr));
|
||||
: [skey] "d" (skey), [addr] "a" (addr)
|
||||
: "memory");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user