s390/boot: Rename decompressor_printk() to boot_printk()
Rename decompressor_printk() to boot_printk() just to have a shorter function name, which also makes the code more readable. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
fccb175bc8
commit
bfda610814
@ -70,7 +70,7 @@ void print_pgm_check_info(void);
|
|||||||
unsigned long randomize_within_range(unsigned long size, unsigned long align,
|
unsigned long randomize_within_range(unsigned long size, unsigned long align,
|
||||||
unsigned long min, unsigned long max);
|
unsigned long min, unsigned long max);
|
||||||
void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned long asce_limit);
|
void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned long asce_limit);
|
||||||
void __printf(1, 2) decompressor_printk(const char *fmt, ...);
|
void __printf(1, 2) boot_printk(const char *fmt, ...);
|
||||||
void print_stacktrace(unsigned long sp);
|
void print_stacktrace(unsigned long sp);
|
||||||
void error(char *m);
|
void error(char *m);
|
||||||
int get_random(unsigned long limit, unsigned long *value);
|
int get_random(unsigned long limit, unsigned long *value);
|
||||||
|
@ -80,7 +80,7 @@ static noinline char *strsym(void *ip)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompressor_printk(const char *fmt, ...)
|
void boot_printk(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
char buf[1024] = { 0 };
|
char buf[1024] = { 0 };
|
||||||
char *end = buf + sizeof(buf) - 1; /* make sure buf is 0 terminated */
|
char *end = buf + sizeof(buf) - 1; /* make sure buf is 0 terminated */
|
||||||
@ -129,11 +129,11 @@ void print_stacktrace(unsigned long sp)
|
|||||||
(unsigned long)_stack_end };
|
(unsigned long)_stack_end };
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
decompressor_printk("Call Trace:\n");
|
boot_printk("Call Trace:\n");
|
||||||
while (!(sp & 0x7) && on_stack(&boot_stack, sp, sizeof(struct stack_frame))) {
|
while (!(sp & 0x7) && on_stack(&boot_stack, sp, sizeof(struct stack_frame))) {
|
||||||
struct stack_frame *sf = (struct stack_frame *)sp;
|
struct stack_frame *sf = (struct stack_frame *)sp;
|
||||||
|
|
||||||
decompressor_printk(first ? "(sp:%016lx [<%016lx>] %pS)\n" :
|
boot_printk(first ? "(sp:%016lx [<%016lx>] %pS)\n" :
|
||||||
" sp:%016lx [<%016lx>] %pS\n",
|
" sp:%016lx [<%016lx>] %pS\n",
|
||||||
sp, sf->gprs[8], (void *)sf->gprs[8]);
|
sp, sf->gprs[8], (void *)sf->gprs[8]);
|
||||||
if (sf->back_chain <= sp)
|
if (sf->back_chain <= sp)
|
||||||
@ -148,34 +148,30 @@ void print_pgm_check_info(void)
|
|||||||
unsigned long *gpregs = (unsigned long *)get_lowcore()->gpregs_save_area;
|
unsigned long *gpregs = (unsigned long *)get_lowcore()->gpregs_save_area;
|
||||||
struct psw_bits *psw = &psw_bits(get_lowcore()->psw_save_area);
|
struct psw_bits *psw = &psw_bits(get_lowcore()->psw_save_area);
|
||||||
|
|
||||||
decompressor_printk("Linux version %s\n", kernel_version);
|
boot_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);
|
boot_printk("Kernel command line: %s\n", early_command_line);
|
||||||
decompressor_printk("Kernel fault: interruption code %04x ilc:%x\n",
|
boot_printk("Kernel fault: interruption code %04x ilc:%x\n",
|
||||||
get_lowcore()->pgm_code, get_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);
|
boot_printk("Kernel random base: %lx\n", __kaslr_offset);
|
||||||
decompressor_printk("Kernel random base phys: %lx\n", __kaslr_offset_phys);
|
boot_printk("Kernel random base phys: %lx\n", __kaslr_offset_phys);
|
||||||
}
|
}
|
||||||
decompressor_printk("PSW : %016lx %016lx (%pS)\n",
|
boot_printk("PSW : %016lx %016lx (%pS)\n",
|
||||||
get_lowcore()->psw_save_area.mask,
|
get_lowcore()->psw_save_area.mask,
|
||||||
get_lowcore()->psw_save_area.addr,
|
get_lowcore()->psw_save_area.addr,
|
||||||
(void *)get_lowcore()->psw_save_area.addr);
|
(void *)get_lowcore()->psw_save_area.addr);
|
||||||
decompressor_printk(
|
boot_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,
|
||||||
psw->wait, psw->pstate, psw->as, psw->cc, psw->pm, psw->ri,
|
psw->wait, psw->pstate, psw->as, psw->cc, psw->pm, psw->ri,
|
||||||
psw->eaba);
|
psw->eaba);
|
||||||
decompressor_printk("GPRS: %016lx %016lx %016lx %016lx\n",
|
boot_printk("GPRS: %016lx %016lx %016lx %016lx\n", gpregs[0], gpregs[1], gpregs[2], gpregs[3]);
|
||||||
gpregs[0], gpregs[1], gpregs[2], gpregs[3]);
|
boot_printk(" %016lx %016lx %016lx %016lx\n", gpregs[4], gpregs[5], gpregs[6], gpregs[7]);
|
||||||
decompressor_printk(" %016lx %016lx %016lx %016lx\n",
|
boot_printk(" %016lx %016lx %016lx %016lx\n", gpregs[8], gpregs[9], gpregs[10], gpregs[11]);
|
||||||
gpregs[4], gpregs[5], gpregs[6], gpregs[7]);
|
boot_printk(" %016lx %016lx %016lx %016lx\n", gpregs[12], gpregs[13], gpregs[14], gpregs[15]);
|
||||||
decompressor_printk(" %016lx %016lx %016lx %016lx\n",
|
|
||||||
gpregs[8], gpregs[9], gpregs[10], gpregs[11]);
|
|
||||||
decompressor_printk(" %016lx %016lx %016lx %016lx\n",
|
|
||||||
gpregs[12], gpregs[13], gpregs[14], gpregs[15]);
|
|
||||||
print_stacktrace(get_lowcore()->gpregs_save_area[15]);
|
print_stacktrace(get_lowcore()->gpregs_save_area[15]);
|
||||||
decompressor_printk("Last Breaking-Event-Address:\n");
|
boot_printk("Last Breaking-Event-Address:\n");
|
||||||
decompressor_printk(" [<%016lx>] %pS\n", (unsigned long)get_lowcore()->pgm_last_break,
|
boot_printk(" [<%016lx>] %pS\n", (unsigned long)get_lowcore()->pgm_last_break,
|
||||||
(void *)get_lowcore()->pgm_last_break);
|
(void *)get_lowcore()->pgm_last_break);
|
||||||
}
|
}
|
||||||
|
@ -190,23 +190,23 @@ static void die_oom(unsigned long size, unsigned long align, unsigned long min,
|
|||||||
enum reserved_range_type t;
|
enum reserved_range_type t;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
decompressor_printk("Linux version %s\n", kernel_version);
|
boot_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);
|
boot_printk("Kernel command line: %s\n", early_command_line);
|
||||||
decompressor_printk("Out of memory allocating %lx bytes %lx aligned in range %lx:%lx\n",
|
boot_printk("Out of memory allocating %lx bytes %lx aligned in range %lx:%lx\n",
|
||||||
size, align, min, max);
|
size, align, min, max);
|
||||||
decompressor_printk("Reserved memory ranges:\n");
|
boot_printk("Reserved memory ranges:\n");
|
||||||
for_each_physmem_reserved_range(t, range, &start, &end) {
|
for_each_physmem_reserved_range(t, range, &start, &end) {
|
||||||
decompressor_printk("%016lx %016lx %s\n", start, end, get_rr_type_name(t));
|
boot_printk("%016lx %016lx %s\n", start, end, get_rr_type_name(t));
|
||||||
total_reserved_mem += end - start;
|
total_reserved_mem += end - start;
|
||||||
}
|
}
|
||||||
decompressor_printk("Usable online memory ranges (info source: %s [%x]):\n",
|
boot_printk("Usable online memory ranges (info source: %s [%x]):\n",
|
||||||
get_physmem_info_source(), physmem_info.info_source);
|
get_physmem_info_source(), physmem_info.info_source);
|
||||||
for_each_physmem_usable_range(i, &start, &end) {
|
for_each_physmem_usable_range(i, &start, &end) {
|
||||||
decompressor_printk("%016lx %016lx\n", start, end);
|
boot_printk("%016lx %016lx\n", start, end);
|
||||||
total_mem += end - start;
|
total_mem += end - start;
|
||||||
}
|
}
|
||||||
decompressor_printk("Usable online memory total: %lx Reserved: %lx Free: %lx\n",
|
boot_printk("Usable online memory total: %lx Reserved: %lx Free: %lx\n",
|
||||||
total_mem, total_reserved_mem,
|
total_mem, total_reserved_mem,
|
||||||
total_mem > total_reserved_mem ? total_mem - total_reserved_mem : 0);
|
total_mem > total_reserved_mem ? total_mem - total_reserved_mem : 0);
|
||||||
print_stacktrace(current_frame_address());
|
print_stacktrace(current_frame_address());
|
||||||
|
@ -296,7 +296,7 @@ static unsigned long setup_kernel_memory_layout(unsigned long kernel_size)
|
|||||||
kernel_start = round_down(kernel_end - kernel_size, THREAD_SIZE);
|
kernel_start = round_down(kernel_end - kernel_size, THREAD_SIZE);
|
||||||
} else if (vmax < __NO_KASLR_END_KERNEL || vsize > __NO_KASLR_END_KERNEL) {
|
} else if (vmax < __NO_KASLR_END_KERNEL || vsize > __NO_KASLR_END_KERNEL) {
|
||||||
kernel_start = round_down(vmax - kernel_size, THREAD_SIZE);
|
kernel_start = round_down(vmax - kernel_size, THREAD_SIZE);
|
||||||
decompressor_printk("The kernel base address is forced to %lx\n", kernel_start);
|
boot_printk("The kernel base address is forced to %lx\n", kernel_start);
|
||||||
} else {
|
} else {
|
||||||
kernel_start = __NO_KASLR_START_KERNEL;
|
kernel_start = __NO_KASLR_START_KERNEL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user