s390/smp: use register pair instead of register asm
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
committed by
Vasily Gorbik
parent
4f38c7aefe
commit
ddd38fd261
@@ -1233,21 +1233,21 @@ subsys_initcall(s390_smp_init);
|
|||||||
|
|
||||||
static __always_inline void set_new_lowcore(struct lowcore *lc)
|
static __always_inline void set_new_lowcore(struct lowcore *lc)
|
||||||
{
|
{
|
||||||
struct lowcore *old_lc = &S390_lowcore;
|
union register_pair dst, src;
|
||||||
struct lowcore *new_lc = lc;
|
|
||||||
u32 pfx;
|
u32 pfx;
|
||||||
register struct lowcore *reg2 asm ("2") = new_lc;
|
|
||||||
register unsigned long reg3 asm ("3") = sizeof(*reg2);
|
src.even = (unsigned long) &S390_lowcore;
|
||||||
register struct lowcore *reg4 asm ("4") = old_lc;
|
src.odd = sizeof(S390_lowcore);
|
||||||
register unsigned long reg5 asm ("5") = sizeof(*reg4);
|
dst.even = (unsigned long) lc;
|
||||||
|
dst.odd = sizeof(*lc);
|
||||||
|
pfx = (unsigned long) lc;
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
" st 2,%[pfx]\n"
|
" mvcl %[dst],%[src]\n"
|
||||||
" mvcl 2,4\n"
|
|
||||||
" spx %[pfx]\n"
|
" spx %[pfx]\n"
|
||||||
: "+&d" (reg2), "+&d" (reg3),
|
: [dst] "+&d" (dst.pair), [src] "+&d" (src.pair)
|
||||||
"+&d" (reg4), "+&d" (reg5), [pfx] "=Q" (pfx)
|
: [pfx] "Q" (pfx)
|
||||||
: : "memory", "cc");
|
: "memory", "cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init smp_reinit_ipl_cpu(void)
|
static int __init smp_reinit_ipl_cpu(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user