Commit bbf78606 authored by Sven Schnelle's avatar Sven Schnelle Committed by Vasily Gorbik

s390/boot: Replace S390_lowcore by get_lowcore()

Replace all S390_lowcore usages in arch/s390/boot by get_lowcore().
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent eafcd205
...@@ -51,11 +51,11 @@ static inline int __diag308(unsigned long subcode, void *addr) ...@@ -51,11 +51,11 @@ static inline int __diag308(unsigned long subcode, void *addr)
: [r1] "+&d" (r1.pair), : [r1] "+&d" (r1.pair),
[reg1] "=&d" (reg1), [reg1] "=&d" (reg1),
[reg2] "=&a" (reg2), [reg2] "=&a" (reg2),
"+Q" (S390_lowcore.program_new_psw), "+Q" (get_lowcore()->program_new_psw),
"=Q" (old) "=Q" (old)
: [subcode] "d" (subcode), : [subcode] "d" (subcode),
[psw_old] "a" (&old), [psw_old] "a" (&old),
[psw_pgm] "a" (&S390_lowcore.program_new_psw) [psw_pgm] "a" (&get_lowcore()->program_new_psw)
: "cc", "memory"); : "cc", "memory");
return r1.odd; return r1.odd;
} }
......
...@@ -106,7 +106,7 @@ int read_ipl_report(void) ...@@ -106,7 +106,7 @@ int read_ipl_report(void)
* the IPL parameter list, then align the address to a double * the IPL parameter list, then align the address to a double
* word boundary. * word boundary.
*/ */
tmp = (unsigned long) S390_lowcore.ipl_parmblock_ptr; tmp = (unsigned long)get_lowcore()->ipl_parmblock_ptr;
pl_hdr = (struct ipl_pl_hdr *) tmp; pl_hdr = (struct ipl_pl_hdr *) tmp;
tmp = (tmp + pl_hdr->len + 7) & -8UL; tmp = (tmp + pl_hdr->len + 7) & -8UL;
rl_hdr = (struct ipl_rl_hdr *) tmp; rl_hdr = (struct ipl_rl_hdr *) tmp;
......
...@@ -145,22 +145,22 @@ void print_stacktrace(unsigned long sp) ...@@ -145,22 +145,22 @@ void print_stacktrace(unsigned long sp)
void print_pgm_check_info(void) void print_pgm_check_info(void)
{ {
unsigned long *gpregs = (unsigned long *)S390_lowcore.gpregs_save_area; unsigned long *gpregs = (unsigned long *)get_lowcore()->gpregs_save_area;
struct psw_bits *psw = &psw_bits(S390_lowcore.psw_save_area); struct psw_bits *psw = &psw_bits(get_lowcore()->psw_save_area);
decompressor_printk("Linux version %s\n", kernel_version); decompressor_printk("Linux version %s\n", kernel_version);
if (!is_prot_virt_guest() && early_command_line[0]) if (!is_prot_virt_guest() && early_command_line[0])
decompressor_printk("Kernel command line: %s\n", early_command_line); decompressor_printk("Kernel command line: %s\n", early_command_line);
decompressor_printk("Kernel fault: interruption code %04x ilc:%x\n", decompressor_printk("Kernel fault: interruption code %04x ilc:%x\n",
S390_lowcore.pgm_code, S390_lowcore.pgm_ilc >> 1); get_lowcore()->pgm_code, get_lowcore()->pgm_ilc >> 1);
if (kaslr_enabled()) { if (kaslr_enabled()) {
decompressor_printk("Kernel random base: %lx\n", __kaslr_offset); decompressor_printk("Kernel random base: %lx\n", __kaslr_offset);
decompressor_printk("Kernel random base phys: %lx\n", __kaslr_offset_phys); decompressor_printk("Kernel random base phys: %lx\n", __kaslr_offset_phys);
} }
decompressor_printk("PSW : %016lx %016lx (%pS)\n", decompressor_printk("PSW : %016lx %016lx (%pS)\n",
S390_lowcore.psw_save_area.mask, get_lowcore()->psw_save_area.mask,
S390_lowcore.psw_save_area.addr, get_lowcore()->psw_save_area.addr,
(void *)S390_lowcore.psw_save_area.addr); (void *)get_lowcore()->psw_save_area.addr);
decompressor_printk( decompressor_printk(
" R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x P:%x AS:%x CC:%x PM:%x RI:%x EA:%x\n", " R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x P:%x AS:%x CC:%x PM:%x RI:%x EA:%x\n",
psw->per, psw->dat, psw->io, psw->ext, psw->key, psw->mcheck, psw->per, psw->dat, psw->io, psw->ext, psw->key, psw->mcheck,
...@@ -174,8 +174,8 @@ void print_pgm_check_info(void) ...@@ -174,8 +174,8 @@ void print_pgm_check_info(void)
gpregs[8], gpregs[9], gpregs[10], gpregs[11]); gpregs[8], gpregs[9], gpregs[10], gpregs[11]);
decompressor_printk(" %016lx %016lx %016lx %016lx\n", decompressor_printk(" %016lx %016lx %016lx %016lx\n",
gpregs[12], gpregs[13], gpregs[14], gpregs[15]); gpregs[12], gpregs[13], gpregs[14], gpregs[15]);
print_stacktrace(S390_lowcore.gpregs_save_area[15]); print_stacktrace(get_lowcore()->gpregs_save_area[15]);
decompressor_printk("Last Breaking-Event-Address:\n"); decompressor_printk("Last Breaking-Event-Address:\n");
decompressor_printk(" [<%016lx>] %pS\n", (unsigned long)S390_lowcore.pgm_last_break, decompressor_printk(" [<%016lx>] %pS\n", (unsigned long)get_lowcore()->pgm_last_break,
(void *)S390_lowcore.pgm_last_break); (void *)get_lowcore()->pgm_last_break);
} }
...@@ -81,11 +81,11 @@ static int __diag260(unsigned long rx1, unsigned long rx2) ...@@ -81,11 +81,11 @@ static int __diag260(unsigned long rx1, unsigned long rx2)
[reg2] "=&a" (reg2), [reg2] "=&a" (reg2),
[rc] "+&d" (rc), [rc] "+&d" (rc),
[ry] "+&d" (ry), [ry] "+&d" (ry),
"+Q" (S390_lowcore.program_new_psw), "+Q" (get_lowcore()->program_new_psw),
"=Q" (old) "=Q" (old)
: [rx] "d" (rx.pair), : [rx] "d" (rx.pair),
[psw_old] "a" (&old), [psw_old] "a" (&old),
[psw_pgm] "a" (&S390_lowcore.program_new_psw) [psw_pgm] "a" (&get_lowcore()->program_new_psw)
: "cc", "memory"); : "cc", "memory");
return rc == 0 ? ry : -1; return rc == 0 ? ry : -1;
} }
...@@ -129,10 +129,10 @@ static int tprot(unsigned long addr) ...@@ -129,10 +129,10 @@ static int tprot(unsigned long addr)
: [reg1] "=&d" (reg1), : [reg1] "=&d" (reg1),
[reg2] "=&a" (reg2), [reg2] "=&a" (reg2),
[rc] "+&d" (rc), [rc] "+&d" (rc),
"=Q" (S390_lowcore.program_new_psw.addr), "=Q" (get_lowcore()->program_new_psw.addr),
"=Q" (old) "=Q" (old)
: [psw_old] "a" (&old), : [psw_old] "a" (&old),
[psw_pgm] "a" (&S390_lowcore.program_new_psw), [psw_pgm] "a" (&get_lowcore()->program_new_psw),
[addr] "a" (addr) [addr] "a" (addr)
: "cc", "memory"); : "cc", "memory");
return rc; return rc;
......
...@@ -78,10 +78,10 @@ static int cmma_test_essa(void) ...@@ -78,10 +78,10 @@ static int cmma_test_essa(void)
[reg2] "=&a" (reg2), [reg2] "=&a" (reg2),
[rc] "+&d" (rc), [rc] "+&d" (rc),
[tmp] "=&d" (tmp), [tmp] "=&d" (tmp),
"+Q" (S390_lowcore.program_new_psw), "+Q" (get_lowcore()->program_new_psw),
"=Q" (old) "=Q" (old)
: [psw_old] "a" (&old), : [psw_old] "a" (&old),
[psw_pgm] "a" (&S390_lowcore.program_new_psw), [psw_pgm] "a" (&get_lowcore()->program_new_psw),
[cmd] "i" (ESSA_GET_STATE) [cmd] "i" (ESSA_GET_STATE)
: "cc", "memory"); : "cc", "memory");
return rc; return rc;
...@@ -101,10 +101,10 @@ static void cmma_init(void) ...@@ -101,10 +101,10 @@ static void cmma_init(void)
static void setup_lpp(void) static void setup_lpp(void)
{ {
S390_lowcore.current_pid = 0; get_lowcore()->current_pid = 0;
S390_lowcore.lpp = LPP_MAGIC; get_lowcore()->lpp = LPP_MAGIC;
if (test_facility(40)) if (test_facility(40))
lpp(&S390_lowcore.lpp); lpp(&get_lowcore()->lpp);
} }
#ifdef CONFIG_KERNEL_UNCOMPRESSED #ifdef CONFIG_KERNEL_UNCOMPRESSED
...@@ -477,7 +477,7 @@ void startup_kernel(void) ...@@ -477,7 +477,7 @@ void startup_kernel(void)
* Save KASLR offset for early dumps, before vmcore_info is set. * Save KASLR offset for early dumps, before vmcore_info is set.
* Mark as uneven to distinguish from real vmcore_info pointer. * Mark as uneven to distinguish from real vmcore_info pointer.
*/ */
S390_lowcore.vmcore_info = __kaslr_offset_phys ? __kaslr_offset_phys | 0x1UL : 0; get_lowcore()->vmcore_info = __kaslr_offset_phys ? __kaslr_offset_phys | 0x1UL : 0;
/* /*
* Jump to the decompressed kernel entry point and switch DAT mode on. * Jump to the decompressed kernel entry point and switch DAT mode on.
......
...@@ -470,13 +470,13 @@ void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned l ...@@ -470,13 +470,13 @@ void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned l
kasan_populate_shadow(kernel_start, kernel_end); kasan_populate_shadow(kernel_start, kernel_end);
S390_lowcore.kernel_asce.val = swapper_pg_dir | asce_bits; get_lowcore()->kernel_asce.val = swapper_pg_dir | asce_bits;
S390_lowcore.user_asce = s390_invalid_asce; get_lowcore()->user_asce = s390_invalid_asce;
local_ctl_load(1, &S390_lowcore.kernel_asce); local_ctl_load(1, &get_lowcore()->kernel_asce);
local_ctl_load(7, &S390_lowcore.user_asce); local_ctl_load(7, &get_lowcore()->user_asce);
local_ctl_load(13, &S390_lowcore.kernel_asce); local_ctl_load(13, &get_lowcore()->kernel_asce);
init_mm.context.asce = S390_lowcore.kernel_asce.val; init_mm.context.asce = get_lowcore()->kernel_asce.val;
init_mm.pgd = init_mm_pgd; init_mm.pgd = init_mm_pgd;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment