Skip to content

Commit 839d364

Browse files
hcahcaAlexander Gordeev
authored andcommitted
s390/page: Cleanup page_set_storage_key() inline assemblies
Add extra lines, indentations, and symbolic names for operands in order to make the two page_set_storage_key() inline assemblies a bit more readable. Reviewed-by: Claudio Imbrenda <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent e04c78d commit 839d364

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

arch/s390/include/asm/page.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,17 @@ typedef pte_t *pgtable_t;
130130
static inline void page_set_storage_key(unsigned long addr,
131131
unsigned char skey, int mapped)
132132
{
133-
if (!mapped)
134-
asm volatile(".insn rrf,0xb22b0000,%0,%1,8,0"
135-
: : "d" (skey), "a" (addr));
136-
else
137-
asm volatile("sske %0,%1" : : "d" (skey), "a" (addr));
133+
if (!mapped) {
134+
asm volatile(
135+
" .insn rrf,0xb22b0000,%[skey],%[addr],8,0"
136+
:
137+
: [skey] "d" (skey), [addr] "a" (addr));
138+
} else {
139+
asm volatile(
140+
" sske %[skey],%[addr]"
141+
:
142+
: [skey] "d" (skey), [addr] "a" (addr));
143+
}
138144
}
139145

140146
static inline unsigned char page_get_storage_key(unsigned long addr)

0 commit comments

Comments
 (0)